|
|
@ -110,216 +110,123 @@ public class CoolCutTask extends AbstractAcsTask { |
|
|
|
String point_code3 = jsonTask.getString("point_code3"); |
|
|
|
String point_code4 = jsonTask.getString("point_code4"); |
|
|
|
String product_area = jsonTask.getString("product_area"); |
|
|
|
//下空轴上满卷
|
|
|
|
if ("010301".equals(jsonTask.getString("task_type"))) { |
|
|
|
if ("B1".equals(product_area)) { |
|
|
|
//更新起点烘箱对接位
|
|
|
|
JSONObject dj_jo = WQLObject.getWQLObject("sch_base_point").query("point_code ='" + point_code1 + "'").uniqueResult(0); |
|
|
|
JSONObject cool_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code ='" + point_code1 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(dj_jo)) { |
|
|
|
dj_jo.put("point_status", "1"); |
|
|
|
dj_jo.put("material_code", ""); |
|
|
|
WQLObject.getWQLObject("sch_base_point").update(dj_jo); |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotEmpty(cool_jo)) { |
|
|
|
cool_jo.put("full_point_status", "01"); |
|
|
|
cool_jo.put("container_name", ""); |
|
|
|
cool_jo.put("workorder_id", ""); |
|
|
|
cool_jo.put("update_optid", currentUserId); |
|
|
|
cool_jo.put("update_optname", currentUsername); |
|
|
|
cool_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(cool_jo); |
|
|
|
} |
|
|
|
JSONObject full_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code ='" + point_code2 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(full_jo)) { |
|
|
|
full_jo.put("full_point_status", "02"); |
|
|
|
full_jo.put("container_name", jsonTask.getString("material_code")); |
|
|
|
full_jo.put("update_optid", currentUserId); |
|
|
|
full_jo.put("update_optname", currentUsername); |
|
|
|
full_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(full_jo); |
|
|
|
} |
|
|
|
|
|
|
|
//更新满轴终点的空轴对接位
|
|
|
|
JSONObject cut_jo = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code3 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(cut_jo)) { |
|
|
|
cut_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '" + point_code3 + "'").uniqueResult(0); |
|
|
|
cut_jo.put("empty_point_status", "01"); |
|
|
|
cut_jo.put("empty_vehicle_code", ""); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(cut_jo); |
|
|
|
} else { |
|
|
|
cut_jo.put("empty_point_status", "02"); |
|
|
|
cut_jo.put("empty_vehicle_code", "SJG"); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo); |
|
|
|
} |
|
|
|
|
|
|
|
//更新空轴点位
|
|
|
|
JSONObject jsonCoolIvt2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '" + point_code4 + "'").uniqueResult(0); |
|
|
|
jsonCoolIvt2.put("empty_point_status", "02"); |
|
|
|
jsonCoolIvt2.put("empty_vehicle_code", jsonTask.getString("vehicle_code2")); |
|
|
|
jsonCoolIvt2.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt2.put("instorage_time", ""); |
|
|
|
jsonCoolIvt2.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt2.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt2); |
|
|
|
} else { |
|
|
|
// 更新主表状态
|
|
|
|
JSONObject coolMst = ivtTab.query("task_id = '" + task_id + "'").uniqueResult(0); |
|
|
|
coolMst.put("bill_status", "50"); |
|
|
|
ivtTab.update(coolMst); |
|
|
|
|
|
|
|
//更新冷却区母卷库存
|
|
|
|
JSONObject jsonCoolIvt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
|
|
|
|
|
|
|
jsonCoolIvt.put("full_point_status", "01"); |
|
|
|
jsonCoolIvt.put("container_name", ""); |
|
|
|
jsonCoolIvt.put("workorder_id", ""); |
|
|
|
jsonCoolIvt.put("ivt_qty", "0"); |
|
|
|
jsonCoolIvt.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt.put("instorage_time", ""); |
|
|
|
jsonCoolIvt.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt); |
|
|
|
|
|
|
|
//更新分切区母卷库存
|
|
|
|
JSONObject cut_jo = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
cut_jo.put("full_point_status", "02"); |
|
|
|
cut_jo.put("container_name", container_name); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo); |
|
|
|
|
|
|
|
//更新分切区空轴库存
|
|
|
|
JSONObject cut_jo2 = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code3 + "'").uniqueResult(0); |
|
|
|
cut_jo2.put("empty_point_status", "01"); |
|
|
|
cut_jo2.put("empty_vehicle_code", ""); |
|
|
|
cut_jo2.put("update_optid", currentUserId); |
|
|
|
cut_jo2.put("update_optname", currentUsername); |
|
|
|
cut_jo2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo2); |
|
|
|
|
|
|
|
//更新冷却区空轴库存
|
|
|
|
JSONObject jsonCoolIvt2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '" + point_code4 + "'").uniqueResult(0); |
|
|
|
jsonCoolIvt2.put("empty_point_status", "02"); |
|
|
|
jsonCoolIvt2.put("empty_vehicle_code", jsonTask.getString("vehicle_code2")); |
|
|
|
jsonCoolIvt2.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt2.put("instorage_time", ""); |
|
|
|
jsonCoolIvt2.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt2.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt2); |
|
|
|
|
|
|
|
//更新该母卷对应分切计划的状态
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
map.put("is_parent_ok", "1"); |
|
|
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map, "parent_container_name = '" + container_name + "'"); |
|
|
|
|
|
|
|
//回传MES
|
|
|
|
JSONObject mom_jo = new JSONObject(); |
|
|
|
mom_jo.put("contain_name", container_name); |
|
|
|
mom_jo.put("warehouse", "1"); |
|
|
|
//判断该接口是否需要回传
|
|
|
|
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'cutPlanMomRollDeliveryComplete'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { |
|
|
|
new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mom_jo); |
|
|
|
} |
|
|
|
} |
|
|
|
// 更新主表状态
|
|
|
|
JSONObject coolMst = ivtTab.query("task_id = '" + task_id + "'").uniqueResult(0); |
|
|
|
coolMst.put("bill_status", "50"); |
|
|
|
ivtTab.update(coolMst); |
|
|
|
|
|
|
|
//更新冷却区母卷库存
|
|
|
|
JSONObject jsonCoolIvt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
|
|
|
|
|
|
|
jsonCoolIvt.put("full_point_status", "01"); |
|
|
|
jsonCoolIvt.put("container_name", ""); |
|
|
|
jsonCoolIvt.put("workorder_id", ""); |
|
|
|
jsonCoolIvt.put("ivt_qty", "0"); |
|
|
|
jsonCoolIvt.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt.put("instorage_time", ""); |
|
|
|
jsonCoolIvt.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt); |
|
|
|
|
|
|
|
//更新分切区母卷库存
|
|
|
|
JSONObject cut_jo = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
cut_jo.put("full_point_status", "02"); |
|
|
|
cut_jo.put("container_name", container_name); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo); |
|
|
|
|
|
|
|
//更新分切区空轴库存
|
|
|
|
JSONObject cut_jo2 = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code3 + "'").uniqueResult(0); |
|
|
|
cut_jo2.put("empty_point_status", "01"); |
|
|
|
cut_jo2.put("empty_vehicle_code", ""); |
|
|
|
cut_jo2.put("update_optid", currentUserId); |
|
|
|
cut_jo2.put("update_optname", currentUsername); |
|
|
|
cut_jo2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo2); |
|
|
|
|
|
|
|
//更新冷却区空轴库存
|
|
|
|
JSONObject jsonCoolIvt2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '" + point_code4 + "'").uniqueResult(0); |
|
|
|
jsonCoolIvt2.put("empty_point_status", "02"); |
|
|
|
jsonCoolIvt2.put("empty_vehicle_code", jsonTask.getString("vehicle_code2")); |
|
|
|
jsonCoolIvt2.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt2.put("instorage_time", ""); |
|
|
|
jsonCoolIvt2.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt2.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt2); |
|
|
|
|
|
|
|
//更新该母卷对应分切计划的状态
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
map.put("is_parent_ok", "1"); |
|
|
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map, "parent_container_name = '" + container_name + "'"); |
|
|
|
|
|
|
|
//回传MES
|
|
|
|
// JSONObject mom_jo = new JSONObject();
|
|
|
|
// mom_jo.put("contain_name", container_name);
|
|
|
|
// mom_jo.put("warehouse", "1");
|
|
|
|
//判断该接口是否需要回传
|
|
|
|
// JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'cutPlanMomRollDeliveryComplete'").uniqueResult(0);
|
|
|
|
// if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
|
|
|
// new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mom_jo);
|
|
|
|
// }
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//单送满卷
|
|
|
|
if ("010302".equals(jsonTask.getString("task_type"))) { |
|
|
|
// todo: B2,B3,B4未考虑完成处理方式(是否回传MES )
|
|
|
|
if ("B1".equals(product_area)) { |
|
|
|
//更新起点烘箱对接位
|
|
|
|
JSONObject dj_jo = WQLObject.getWQLObject("sch_base_point").query("point_code ='" + point_code1 + "'").uniqueResult(0); |
|
|
|
JSONObject cool_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code ='" + point_code1 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(dj_jo)) { |
|
|
|
dj_jo.put("point_status", "1"); |
|
|
|
dj_jo.put("material_code", ""); |
|
|
|
WQLObject.getWQLObject("sch_base_point").update(dj_jo); |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotEmpty(cool_jo)) { |
|
|
|
cool_jo.put("full_point_status", "01"); |
|
|
|
cool_jo.put("container_name", ""); |
|
|
|
cool_jo.put("workorder_id", ""); |
|
|
|
cool_jo.put("update_optid", currentUserId); |
|
|
|
cool_jo.put("update_optname", currentUsername); |
|
|
|
cool_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(cool_jo); |
|
|
|
} |
|
|
|
//更新满轴终点的空轴对接位
|
|
|
|
JSONObject cut_jo = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(cut_jo)) { |
|
|
|
cut_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
cut_jo.put("full_point_status", "02"); |
|
|
|
cut_jo.put("container_name", jsonTask.getString("material_code")); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(cut_jo); |
|
|
|
} else { |
|
|
|
cut_jo.put("empty_point_status", "02"); |
|
|
|
cut_jo.put("empty_vehicle_code", "SJG"); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
// 更新主表状态
|
|
|
|
JSONObject coolMst = ivtTab.query("task_id = '" + task_id + "'").uniqueResult(0); |
|
|
|
coolMst.put("bill_status", "50"); |
|
|
|
ivtTab.update(coolMst); |
|
|
|
|
|
|
|
//更新冷却区母卷库存
|
|
|
|
JSONObject jsonCoolIvt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
|
|
|
|
|
|
|
jsonCoolIvt.put("full_point_status", "01"); |
|
|
|
jsonCoolIvt.put("container_name", ""); |
|
|
|
jsonCoolIvt.put("workorder_id", ""); |
|
|
|
jsonCoolIvt.put("ivt_qty", "0"); |
|
|
|
jsonCoolIvt.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt.put("instorage_time", ""); |
|
|
|
jsonCoolIvt.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt); |
|
|
|
|
|
|
|
//更新分切区母卷库存
|
|
|
|
JSONObject cut_jo = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
cut_jo.put("full_point_status", "02"); |
|
|
|
cut_jo.put("container_name", container_name); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo); |
|
|
|
|
|
|
|
//更新该母卷对应分切计划的状态
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
map.put("is_parent_ok", "1"); |
|
|
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map, "parent_container_name = '" + container_name + "'"); |
|
|
|
|
|
|
|
//回传MES
|
|
|
|
JSONObject mom_jo = new JSONObject(); |
|
|
|
mom_jo.put("contain_name", container_name); |
|
|
|
mom_jo.put("warehouse", "1"); |
|
|
|
//判断该接口是否需要回传
|
|
|
|
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'cutPlanMomRollDeliveryComplete'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { |
|
|
|
new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mom_jo); |
|
|
|
} |
|
|
|
// 更新主表状态
|
|
|
|
JSONObject coolMst = ivtTab.query("task_id = '" + task_id + "'").uniqueResult(0); |
|
|
|
coolMst.put("bill_status", "50"); |
|
|
|
ivtTab.update(coolMst); |
|
|
|
|
|
|
|
//更新冷却区母卷库存
|
|
|
|
JSONObject jsonCoolIvt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
|
|
|
|
|
|
|
jsonCoolIvt.put("full_point_status", "01"); |
|
|
|
jsonCoolIvt.put("container_name", ""); |
|
|
|
jsonCoolIvt.put("workorder_id", ""); |
|
|
|
jsonCoolIvt.put("ivt_qty", "0"); |
|
|
|
jsonCoolIvt.put("cool_ivt_status", "01"); |
|
|
|
jsonCoolIvt.put("instorage_time", ""); |
|
|
|
jsonCoolIvt.put("update_optid", currentUserId); |
|
|
|
jsonCoolIvt.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt); |
|
|
|
|
|
|
|
//更新分切区母卷库存
|
|
|
|
JSONObject cut_jo = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
cut_jo.put("full_point_status", "02"); |
|
|
|
cut_jo.put("container_name", container_name); |
|
|
|
cut_jo.put("update_optid", currentUserId); |
|
|
|
cut_jo.put("update_optname", currentUsername); |
|
|
|
cut_jo.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo); |
|
|
|
|
|
|
|
//更新该母卷对应分切计划的状态
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
map.put("is_parent_ok", "1"); |
|
|
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map, "parent_container_name = '" + container_name + "'"); |
|
|
|
|
|
|
|
//回传MES
|
|
|
|
JSONObject mom_jo = new JSONObject(); |
|
|
|
mom_jo.put("contain_name", container_name); |
|
|
|
mom_jo.put("warehouse", "1"); |
|
|
|
//判断该接口是否需要回传
|
|
|
|
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'cutPlanMomRollDeliveryComplete'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { |
|
|
|
new LmsToMesServiceImpl().cutPlanMomRollDeliveryComplete(mom_jo); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//空轴送回
|
|
|
|
if ("010303".equals(jsonTask.getString("task_type"))) { |
|
|
|
//更新分切区空轴库存
|
|
|
|
JSONObject cut_jo2 = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
@ -342,55 +249,20 @@ public class CoolCutTask extends AbstractAcsTask { |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt2); |
|
|
|
} |
|
|
|
|
|
|
|
if ("010305".equals(jsonTask.getString("task_type"))) { |
|
|
|
//更新冷却区空轴库存
|
|
|
|
JSONObject jsonCoolIvt2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
String container_name = jsonCoolIvt2.getString("container_name"); |
|
|
|
jsonCoolIvt2.put("full_point_status", "01"); |
|
|
|
jsonCoolIvt2.put("container_name", ""); |
|
|
|
jsonCoolIvt2.put("workorder_id", ""); |
|
|
|
jsonCoolIvt2.put("ivt_qty", "0"); |
|
|
|
jsonCoolIvt2.put("cool_ivt_status", "01"); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt2); |
|
|
|
|
|
|
|
//更新中转区点位库存
|
|
|
|
JSONObject point_jo2 = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code2 + "'").uniqueResult(0); |
|
|
|
point_jo2.put("point_status", "2"); |
|
|
|
point_jo2.put("material_code", container_name); |
|
|
|
WQLObject.getWQLObject("sch_base_point").update(point_jo2); |
|
|
|
} |
|
|
|
|
|
|
|
//满轴送回
|
|
|
|
if ("010304".equals(jsonTask.getString("task_type"))) { |
|
|
|
//更新分切区空轴库存
|
|
|
|
String container_name = ""; |
|
|
|
//若起点是ST_IVT_CutPointIvt表
|
|
|
|
JSONObject cut_jo2 = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(cut_jo2)) { |
|
|
|
//B1车间支持从分切上料暂存位送回母卷
|
|
|
|
if(point_code1.contains("B1_FQZC")){ |
|
|
|
cut_jo2 = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(cut_jo2)) { |
|
|
|
throw new BadRequestException("任务点位异常,st_ivt_coolpointivt表找不到满轴点位:"+point_code1); |
|
|
|
} |
|
|
|
container_name = cut_jo2.getString("container_name"); |
|
|
|
cut_jo2.put("full_point_status", "01"); |
|
|
|
cut_jo2.put("full_vehicle_code", ""); |
|
|
|
cut_jo2.put("container_name", ""); |
|
|
|
cut_jo2.put("update_optid", currentUserId); |
|
|
|
cut_jo2.put("update_optname", currentUsername); |
|
|
|
cut_jo2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(cut_jo2); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
container_name = cut_jo2.getString("container_name"); |
|
|
|
cut_jo2.put("full_point_status", "01"); |
|
|
|
cut_jo2.put("full_vehicle_code", ""); |
|
|
|
cut_jo2.put("container_name", ""); |
|
|
|
cut_jo2.put("update_optid", currentUserId); |
|
|
|
cut_jo2.put("update_optname", currentUsername); |
|
|
|
cut_jo2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo2); |
|
|
|
} |
|
|
|
container_name = cut_jo2.getString("container_name"); |
|
|
|
cut_jo2.put("full_point_status", "01"); |
|
|
|
cut_jo2.put("full_vehicle_code", ""); |
|
|
|
cut_jo2.put("container_name", ""); |
|
|
|
cut_jo2.put("update_optid", currentUserId); |
|
|
|
cut_jo2.put("update_optname", currentUsername); |
|
|
|
cut_jo2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo2); |
|
|
|
|
|
|
|
|
|
|
|
//更新冷却区空轴库存
|
|
|
@ -403,6 +275,15 @@ public class CoolCutTask extends AbstractAcsTask { |
|
|
|
jsonCoolIvt2.put("update_optname", currentUsername); |
|
|
|
jsonCoolIvt2.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("st_ivt_coolpointivt").update(jsonCoolIvt2); |
|
|
|
|
|
|
|
//更新母卷状态
|
|
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
|
map.put("origin", "3"); |
|
|
|
map.put("roll_status", "1"); |
|
|
|
map.put("update_optid", currentUserId + ""); |
|
|
|
map.put("update_optname", currentUsername); |
|
|
|
map.put("update_time", DateUtil.now()); |
|
|
|
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map, "container_name = '" + jsonTask.getString("material_code") + "'"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@ -430,20 +311,20 @@ public class CoolCutTask extends AbstractAcsTask { |
|
|
|
String point_code3 = form.getString("point_code3"); |
|
|
|
String point_code4 = form.getString("point_code4"); |
|
|
|
JSONObject task1 = isSingleTask(point_code1); |
|
|
|
if ( ObjectUtil.isNotEmpty(task1)) { |
|
|
|
throw new BadRequestException("点位:" + point_code1 + "存在未完成的任务:"+task1.getString("task_code")); |
|
|
|
if (ObjectUtil.isNotEmpty(task1)) { |
|
|
|
throw new BadRequestException("点位:" + point_code1 + "存在未完成的任务:" + task1.getString("task_code")); |
|
|
|
} |
|
|
|
JSONObject task2 = isSingleTask(point_code2); |
|
|
|
if ( ObjectUtil.isNotEmpty(task2)) { |
|
|
|
throw new BadRequestException("点位:" + point_code2 + "存在未完成的任务:"+task2.getString("task_code")); |
|
|
|
if (ObjectUtil.isNotEmpty(task2)) { |
|
|
|
throw new BadRequestException("点位:" + point_code2 + "存在未完成的任务:" + task2.getString("task_code")); |
|
|
|
} |
|
|
|
JSONObject task3 = isSingleTask(point_code3); |
|
|
|
if ( ObjectUtil.isNotEmpty(task3)) { |
|
|
|
throw new BadRequestException("点位:" + point_code3 +"存在未完成的任务:"+task3.getString("task_code")); |
|
|
|
if (ObjectUtil.isNotEmpty(task3)) { |
|
|
|
throw new BadRequestException("点位:" + point_code3 + "存在未完成的任务:" + task3.getString("task_code")); |
|
|
|
} |
|
|
|
JSONObject task4 = isSingleTask(point_code4); |
|
|
|
if ( ObjectUtil.isNotEmpty(task4)) { |
|
|
|
throw new BadRequestException("点位:" + point_code4 + "存在未完成的任务:"+task4.getString("task_code")); |
|
|
|
if (ObjectUtil.isNotEmpty(task4)) { |
|
|
|
throw new BadRequestException("点位:" + point_code4 + "存在未完成的任务:" + task4.getString("task_code")); |
|
|
|
} |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId()); |
|
|
@ -503,13 +384,13 @@ public class CoolCutTask extends AbstractAcsTask { |
|
|
|
JSONObject task3 = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code3 = '" + point_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0); |
|
|
|
JSONObject task4 = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code4 = '" + point_code + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0); |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(task1)){ |
|
|
|
if (ObjectUtil.isNotEmpty(task1)) { |
|
|
|
return task1; |
|
|
|
}else if(ObjectUtil.isNotEmpty(task2)){ |
|
|
|
} else if (ObjectUtil.isNotEmpty(task2)) { |
|
|
|
return task2; |
|
|
|
}else if(ObjectUtil.isNotEmpty(task3)){ |
|
|
|
} else if (ObjectUtil.isNotEmpty(task3)) { |
|
|
|
return task3; |
|
|
|
}else if(ObjectUtil.isNotEmpty(task4)){ |
|
|
|
} else if (ObjectUtil.isNotEmpty(task4)) { |
|
|
|
return task4; |
|
|
|
} |
|
|
|
|
|
|
|