代码更新

This commit is contained in:
2022-10-17 15:43:51 +08:00
parent a19dbd747b
commit 25a840e680
2 changed files with 41 additions and 4 deletions

View File

@@ -52,6 +52,7 @@ public class BakingServiceImpl implements BakingService {
WQLObject hosIvtTab = WQLObject.getWQLObject("ST_IVT_HotPointIvt"); // 烤箱区点位库存表
WQLObject hosReMstTab = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst"); // 烤箱区点位库存表
if (StrUtil.equals(option, "1")) {
// 入箱
String container_name = whereJson.getString("container_name"); // 母卷号
@@ -64,6 +65,42 @@ public class BakingServiceImpl implements BakingService {
if (ObjectUtil.isEmpty(hours)) throw new BadRequestException("时间不能为空");
if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("点位不能为空");
/*
* 根据点位判断是 冷却却入烘箱还是暂存区入烘箱
*/
JSONObject jsonPointZc = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonPointZc)) {
// 暂存区入烘箱
// 查询烘箱对应的空位
JSONObject jsonHotIvt = hosIvtTab.query("product_area = '" + jsonPointZc.getString("product_area") + "' and temperature = '" + temperature + "' and point_location = '"+jsonPointZc.getString("point_location")+"' and is_used = '1' and point_status = '01' order by point_code ASC").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("烘烤区没有对应空位");
// 创建暂存位 --> 烘烤区任务
JSONObject param = new JSONObject();
param.put("type","2"); // 1- 冷却区入烘箱 2- 暂存位入烘箱
param.put("point_code1",point_code1);
param.put("point_code2",jsonHotIvt.getString("point_code"));
// 创建冷却区 --> 暂存位的任务
InHotTask inHotTask = new InHotTask(null);
String task_id = inHotTask.createTask(param);
// 插入明细明细
JSONObject jsonHotReMst = hosReMstTab.query("container_name = '" + container_name + "' and bill_status <> '50' and is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonHotReMst)) throw new BadRequestException("烘箱区出入主表不存在");
JSONObject hotParam = new JSONObject();
hotParam.put("container_name",container_name);
hotParam.put("task_id",task_id);
hotParam.put("iostorinv_id",jsonHotReMst.getString("iostorinv_id"));
hotParam.put("start_point_code",point_code1);
hotParam.put("next_point_code",jsonHotIvt.getString("point_code"));
hotParam.put("temperature",temperature);
hotParam.put("oven_time",hours);
this.createHotDtl(hotParam);
}
// 1.根据冷却区此母卷的点位找到对应的暂存区、找到空位
JSONObject jsonCoolIvt = coolIvtTab.query("container_name ='" + container_name + "' and is is_used = '1' and full_point_status = '02'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("母卷不存在");
@@ -128,7 +165,7 @@ public class BakingServiceImpl implements BakingService {
param.put("point_code3",jsonHotIvt.getString("point_code"));
// 创建冷却区 --> 暂存位的任务
InHotTask inHotTask = new InHotTask();
InHotTask inHotTask = new InHotTask(null);
String task_id = inHotTask.createTask(param);
// 4.插入烘箱区出入主表 和 明细表
@@ -203,7 +240,7 @@ public class BakingServiceImpl implements BakingService {
JSONObject param = new JSONObject();
param.put("point_code1", point_code1);
param.put("point_code2", point_code2);
OutHotTask outHotTask = new OutHotTask();
OutHotTask outHotTask = new OutHotTask(null);
String task_id = outHotTask.createTask(param);
// 4.插入烘箱区出入明细表

View File

@@ -183,7 +183,7 @@ public class RawFoilServiceImpl implements RawFoilService {
param.put("task_type", "010101");
param.put("material_code", whereJson.getString("container_name"));
CallEmpReelTask callEmpReelTask = new CallEmpReelTask();
CallEmpReelTask callEmpReelTask = new CallEmpReelTask(null);
String task_id = callEmpReelTask.createTask(param);
// 下发任务
@@ -283,7 +283,7 @@ public class RawFoilServiceImpl implements RawFoilService {
regionTab.insert(jsonRegion);
// 6.下发任务入库任务
BookTwoConfirmTask bookTwoConfirmTask = new BookTwoConfirmTask();
BookTwoConfirmTask bookTwoConfirmTask = new BookTwoConfirmTask(null);
JSONObject jsonObject = bookTwoConfirmTask.renotifyAcs(task_jo.getString("task_id"));
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
// 成功返回 更新任务状态