opt:优化
This commit is contained in:
@@ -292,34 +292,37 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
// 创建桁架任务,入烘箱。
|
// 创建桁架任务,入烘箱。
|
||||||
JSONObject hotPoint = bean.getJsonObject(jsonIvt2.getString("product_area"), jsonIvt2, temperature);
|
JSONObject hotPoint = bean.getJsonObject(jsonIvt2.getString("product_area"), jsonIvt2, temperature);
|
||||||
String container_name = jsonTask.getString("material_code");
|
String container_name = jsonTask.getString("material_code");
|
||||||
// 创建暂存位 --> 烘烤区任务
|
//优化
|
||||||
JSONObject param = new JSONObject();
|
if (ObjectUtil.isNotEmpty(hotPoint)) {
|
||||||
param.put("type", "2");
|
// 创建暂存位 --> 烘烤区任务
|
||||||
param.put("point_code1", point_code4);
|
JSONObject param = new JSONObject();
|
||||||
param.put("point_code2", hotPoint.getString("point_code"));
|
param.put("type", "2");
|
||||||
param.put("material_code", container_name);
|
param.put("point_code1", point_code4);
|
||||||
param.put("product_area", hotPoint.getString("product_area"));
|
param.put("point_code2", hotPoint.getString("point_code"));
|
||||||
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
param.put("material_code", container_name);
|
||||||
|
param.put("product_area", hotPoint.getString("product_area"));
|
||||||
|
param.put("request_param", NumberUtil.mul(Double.parseDouble(hours), 60));
|
||||||
|
|
||||||
InHotTask inHotTask = new InHotTask();
|
InHotTask inHotTask = new InHotTask();
|
||||||
String taskId = inHotTask.createTask(param);
|
String taskId = inHotTask.createTask(param);
|
||||||
// 3.插入主表
|
// 3.插入主表
|
||||||
JSONObject jsonRawHot = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonRawHot = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
||||||
JSONObject jsonMater = materTab.query("material_code = '" + jsonRawHot.getString("product_name") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_code = '" + jsonRawHot.getString("product_name") + "'").uniqueResult(0);
|
||||||
|
|
||||||
JSONObject hotParam = new JSONObject();
|
JSONObject hotParam = new JSONObject();
|
||||||
hotParam.put("container_name", container_name);
|
hotParam.put("container_name", container_name);
|
||||||
hotParam.put("workorder_id", jsonRawHot.getString("workorder_id"));
|
hotParam.put("workorder_id", jsonRawHot.getString("workorder_id"));
|
||||||
hotParam.put("material_id", jsonMater.getString("material_id"));
|
hotParam.put("material_id", jsonMater.getString("material_id"));
|
||||||
hotParam.put("qty", jsonRawHot.get("productin_qty"));
|
hotParam.put("qty", jsonRawHot.get("productin_qty"));
|
||||||
hotParam.put("io_type", "0");
|
hotParam.put("io_type", "0");
|
||||||
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
|
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
|
||||||
hotParam.put("task_id", taskId);
|
hotParam.put("task_id", taskId);
|
||||||
hotParam.put("start_point_code", point_code1);
|
hotParam.put("start_point_code", point_code1);
|
||||||
hotParam.put("end_point_code", hotPoint.getString("point_code"));
|
hotParam.put("end_point_code", hotPoint.getString("point_code"));
|
||||||
hotParam.put("temperature", temperature);
|
hotParam.put("temperature", temperature);
|
||||||
hotParam.put("oven_time", hours);
|
hotParam.put("oven_time", hours);
|
||||||
bean.createHotIoMst(hotParam);
|
bean.createHotIoMst(hotParam);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 校验终点是否存在
|
// 校验终点是否存在
|
||||||
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
|
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
|
||||||
|
|||||||
@@ -128,9 +128,6 @@ public class OutHotTask extends AbstractAcsTask {
|
|||||||
jo.put("product_area", cut_jo.getString("product_area"));
|
jo.put("product_area", cut_jo.getString("product_area"));
|
||||||
jo.put("task_type", "010302");
|
jo.put("task_type", "010302");
|
||||||
} else {
|
} else {
|
||||||
if(ObjectUtil.isNotEmpty(cut_jo.getString("container_name"))){
|
|
||||||
throw new BadRequestException("点位:"+cut_jo.getString("full_point_code")+"已存在母卷:"+cut_jo.getString("container_name")+"");
|
|
||||||
}
|
|
||||||
jo.put("point_code1", jsonTask.getString("point_code2"));
|
jo.put("point_code1", jsonTask.getString("point_code2"));
|
||||||
jo.put("point_code2", cut_jo.getString("full_point_code"));
|
jo.put("point_code2", cut_jo.getString("full_point_code"));
|
||||||
jo.put("point_code3", cut_jo.getString("empty_point_code"));
|
jo.put("point_code3", cut_jo.getString("empty_point_code"));
|
||||||
|
|||||||
Reference in New Issue
Block a user