修改
This commit is contained in:
@@ -41,6 +41,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt");
|
||||
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工序工单表
|
||||
WQLObject sbTab = WQLObject.getWQLObject("st_ivt_sbpointivt"); // 生箔工序工单表
|
||||
|
||||
String task_id = taskObj.getString("task_id");
|
||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
@@ -66,18 +69,43 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
String point_code1 = jsonTask.getString("point_code1");
|
||||
String point_code2 = jsonTask.getString("point_code2");
|
||||
String point_code4 = jsonTask.getString("point_code4");
|
||||
|
||||
PointService point = SpringContextHolder.getBean(PointService.class);
|
||||
// 校验起点是否存在
|
||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + point_code1 + "'").uniqueResult(0);
|
||||
JSONObject jsonIvt = ivtTab.query("empty_point_code ='" + point_code1 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + point_code1);
|
||||
// 校验终点是否存在
|
||||
PointDto nextDto = point.findByCode(jsonTask.getString("point_code2"));
|
||||
JSONObject nextDto = sbTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + jsonTask.getString("point_code2"));
|
||||
|
||||
// 更新冷却库存状态
|
||||
jsonIvt.put("empty_point_status", "01");
|
||||
ivtTab.update(jsonIvt);
|
||||
|
||||
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||
|
||||
// 更新冷却库存状态
|
||||
JSONObject jsonRaw = rawTab.query("point_code ='" + point_code2 + "' AND status < 2 AND is_delete = '0'").uniqueResult(0);
|
||||
|
||||
jsonIvt2.put("full_point_status", "02");
|
||||
jsonIvt2.put("instorage_time", DateUtil.now());
|
||||
jsonIvt2.put("container_name", jsonRaw.getString("container_name"));
|
||||
jsonIvt2.put("workorder_id", jsonRaw.getString("workorder_id"));
|
||||
jsonIvt2.put("ivt_qty", jsonRaw.getString("productin_qty"));
|
||||
ivtTab.update(jsonIvt2);
|
||||
|
||||
// 更新冷却区出入表
|
||||
JSONObject jsonCool = coolTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
jsonCool.put("bill_status","50");
|
||||
jsonCool.put("confirm_optid", SecurityUtils.getCurrentUserId());
|
||||
jsonCool.put("confirm_optname", SecurityUtils.getCurrentUsername());
|
||||
jsonCool.put("confirm_time", DateUtil.now());
|
||||
coolTab.update(jsonCool);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user