代码更新
This commit is contained in:
@@ -52,6 +52,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
WQLObject coolIvtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区点位库存表
|
WQLObject coolIvtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区点位库存表
|
||||||
WQLObject hosIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烤箱区点位库存表
|
WQLObject hosIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烤箱区点位库存表
|
||||||
WQLObject hosReMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烤箱区出入主表
|
WQLObject hosReMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烤箱区出入主表
|
||||||
|
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
|
|
||||||
|
|
||||||
if (StrUtil.equals(option, "1")) {
|
if (StrUtil.equals(option, "1")) {
|
||||||
@@ -196,6 +197,32 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
hotParam.put("oven_time", hours);
|
hotParam.put("oven_time", hours);
|
||||||
this.createHotDtl(hotParam);
|
this.createHotDtl(hotParam);
|
||||||
|
|
||||||
|
// 生成冷却区出入表
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
JSONObject jsonCool = new JSONObject();
|
||||||
|
jsonCool.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
jsonCool.put("bill_code", CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
|
||||||
|
jsonCool.put("io_type", "1");
|
||||||
|
jsonCool.put("material_id", "");
|
||||||
|
jsonCool.put("pcsn", "");
|
||||||
|
jsonCool.put("bill_status", "10");
|
||||||
|
jsonCool.put("task_id", task_id);
|
||||||
|
jsonCool.put("start_point_code", point_code1);
|
||||||
|
jsonCool.put("end_point_code", jsonHotIvt.getString("point_code"));
|
||||||
|
jsonCool.put("create_mode", "03");
|
||||||
|
jsonCool.put("create_id", currentUserId);
|
||||||
|
jsonCool.put("create_name", currentUsername);
|
||||||
|
jsonCool.put("create_time", DateUtil.now());
|
||||||
|
jsonCool.put("update_optid", currentUserId);
|
||||||
|
jsonCool.put("update_optname", currentUsername);
|
||||||
|
jsonCool.put("update_time", DateUtil.now());
|
||||||
|
jsonCool.put("confirm_optid", currentUserId);
|
||||||
|
jsonCool.put("confirm_optname", currentUsername);
|
||||||
|
jsonCool.put("confirm_time", DateUtil.now());
|
||||||
|
coolTab.insert(jsonCool);
|
||||||
|
|
||||||
// 5.下发任务
|
// 5.下发任务
|
||||||
/* JSONObject jsonObject = inHotTask.renotifyAcs(task_id);
|
/* JSONObject jsonObject = inHotTask.renotifyAcs(task_id);
|
||||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||||
@@ -218,7 +245,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
// 1.查询暂存位有没有空位
|
// 1.查询暂存位有没有空位
|
||||||
String product_area = jsonHotIvt.getString("product_area");
|
String product_area = jsonHotIvt.getString("product_area");
|
||||||
String reging_id = "";
|
String reging_id = "";
|
||||||
/* switch (product_area) {
|
switch (product_area) {
|
||||||
case "A":
|
case "A":
|
||||||
reging_id = RegionTypeEnum.A_HKZC.getId();
|
reging_id = RegionTypeEnum.A_HKZC.getId();
|
||||||
break;
|
break;
|
||||||
@@ -231,7 +258,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
case "D":
|
case "D":
|
||||||
reging_id = RegionTypeEnum.D_HKZC.getId();
|
reging_id = RegionTypeEnum.D_HKZC.getId();
|
||||||
break;
|
break;
|
||||||
}*/
|
}
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
map.put("reging_id", reging_id);
|
map.put("reging_id", reging_id);
|
||||||
@@ -275,13 +302,13 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
this.createHotDtl(hotParam);
|
this.createHotDtl(hotParam);
|
||||||
|
|
||||||
// 5.下发任务
|
// 5.下发任务
|
||||||
JSONObject jsonObject = outHotTask.immediateNotifyAcs();
|
/* JSONObject jsonObject = outHotTask.immediateNotifyAcs();
|
||||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||||
// 成功返回 更新任务状态
|
// 成功返回 更新任务状态
|
||||||
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||||
jsonTask.put("task_status", "05");
|
jsonTask.put("task_status", "05");
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("message", "操作成功!");
|
result.put("message", "操作成功!");
|
||||||
@@ -294,6 +321,8 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||||
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst");
|
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst");
|
||||||
|
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
|
|
||||||
|
|
||||||
String point_code1 = whereJson.getString("point_code"); // 暂存位:起点
|
String point_code1 = whereJson.getString("point_code"); // 暂存位:起点
|
||||||
String container_name = whereJson.getString("container_name"); // 母卷号
|
String container_name = whereJson.getString("container_name"); // 母卷号
|
||||||
@@ -338,14 +367,40 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
hotParam.put("next_point_code", jsonCooIvt.getString("full_point_code"));
|
hotParam.put("next_point_code", jsonCooIvt.getString("full_point_code"));
|
||||||
this.createHotDtl(hotParam);
|
this.createHotDtl(hotParam);
|
||||||
|
|
||||||
|
// 生成冷却区出入表
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
JSONObject jsonCool = new JSONObject();
|
||||||
|
jsonCool.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
jsonCool.put("bill_code", CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
|
||||||
|
jsonCool.put("io_type", "0");
|
||||||
|
jsonCool.put("material_id", "");
|
||||||
|
jsonCool.put("pcsn", "");
|
||||||
|
jsonCool.put("bill_status", "10");
|
||||||
|
jsonCool.put("task_id", task_id);
|
||||||
|
jsonCool.put("start_point_code", point_code1);
|
||||||
|
jsonCool.put("end_point_code", jsonCooIvt.getString("full_point_code"));
|
||||||
|
jsonCool.put("create_mode", "03");
|
||||||
|
jsonCool.put("create_id", currentUserId);
|
||||||
|
jsonCool.put("create_name", currentUsername);
|
||||||
|
jsonCool.put("create_time", DateUtil.now());
|
||||||
|
jsonCool.put("update_optid", currentUserId);
|
||||||
|
jsonCool.put("update_optname", currentUsername);
|
||||||
|
jsonCool.put("update_time", DateUtil.now());
|
||||||
|
jsonCool.put("confirm_optid", currentUserId);
|
||||||
|
jsonCool.put("confirm_optname", currentUsername);
|
||||||
|
jsonCool.put("confirm_time", DateUtil.now());
|
||||||
|
coolTab.insert(jsonCool);
|
||||||
|
|
||||||
// 5.下发任务
|
// 5.下发任务
|
||||||
JSONObject jsonObject = inCoolIvtTask.immediateNotifyAcs();
|
/* JSONObject jsonObject = inCoolIvtTask.immediateNotifyAcs();
|
||||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||||
// 成功返回 更新任务状态
|
// 成功返回 更新任务状态
|
||||||
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||||
jsonTask.put("task_status", "05");
|
jsonTask.put("task_status", "05");
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("message", "操作成功!");
|
result.put("message", "操作成功!");
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ public class InCoolIvtTask extends AbstractAcsTask {
|
|||||||
jsonIvt.put("ivt_qty", jsonHotMst.getString("qty"));
|
jsonIvt.put("ivt_qty", jsonHotMst.getString("qty"));
|
||||||
ivtTab.update(jsonIvt);
|
ivtTab.update(jsonIvt);
|
||||||
|
|
||||||
|
// 更新冷却出入主表状态
|
||||||
|
JSONObject jsonCool = coolTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
jsonCool.put("bill_status", "50");
|
||||||
|
coolTab.update(jsonCool);
|
||||||
|
|
||||||
// 更新烘烤出入主表为完成
|
// 更新烘烤出入主表为完成
|
||||||
jsonHotMst.put("bill_status", "50");
|
jsonHotMst.put("bill_status", "50");
|
||||||
hotMstTab.update(jsonHotMst);
|
hotMstTab.update(jsonHotMst);
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
WQLObject hotIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烘箱区库存表
|
WQLObject hotIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烘箱区库存表
|
||||||
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烘箱区出入主表
|
WQLObject hotMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烘箱区出入主表
|
||||||
WQLObject hotDtlTab = WQLObject.getWQLObject("ST_IVT_HotRegionIODtl"); // 烘箱区出入明细表
|
WQLObject hotDtlTab = WQLObject.getWQLObject("ST_IVT_HotRegionIODtl"); // 烘箱区出入明细表
|
||||||
|
WQLObject coolIoTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
|
|
||||||
String task_id = taskObj.getString("task_id");
|
String task_id = taskObj.getString("task_id");
|
||||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
@@ -137,6 +138,11 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
* 冷却区入烘箱任务
|
* 冷却区入烘箱任务
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 更新冷却出入主表状态
|
||||||
|
JSONObject jsonCool = coolIoTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
jsonCool.put("bill_status", "50");
|
||||||
|
coolIoTab.update(jsonCool);
|
||||||
|
|
||||||
// 更新冷却区库存状态
|
// 更新冷却区库存状态
|
||||||
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||||
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
String container_name = jsonCoolIvt.getString("container_name"); // 母卷号
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class OutHotTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
// 更新烘箱区库存状态
|
// 更新烘箱区库存状态
|
||||||
JSONObject jsonHotIvt = hotIvtTab.query("point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
JSONObject jsonHotIvt = hotIvtTab.query("point_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||||
jsonHotIvt.put("point_status", "01");
|
jsonHotIvt.put("point_status", "00");
|
||||||
jsonHotIvt.put("container_name","" );
|
jsonHotIvt.put("container_name","" );
|
||||||
jsonHotIvt.put("workorder_id","" );
|
jsonHotIvt.put("workorder_id","" );
|
||||||
jsonHotIvt.put("ivt_qty",0 );
|
jsonHotIvt.put("ivt_qty",0 );
|
||||||
|
|||||||
Reference in New Issue
Block a user