This commit is contained in:
2023-02-14 14:48:30 +08:00
parent 55e46858ac
commit 32c845edf8
7 changed files with 52 additions and 10 deletions

View File

@@ -312,18 +312,26 @@ public class BakingServiceImpl implements BakingService {
//查询该母卷对应最近的一条入烘箱记录
JSONObject last_hot_mst = WQLObject.getWQLObject("ST_IVT_HotRegionIOMst").query("container_name = '" + jsonHotIvt.getString("container_name") + "' AND io_type = '0' order by confirm_time desc").uniqueResult(0);
JSONObject jsonRaw = rawTab.query("container_name = '" + jsonHotIvt.getString("container_name") + "' and is_delete = '0'").uniqueResult(0);
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料基础信息中无此物料!");
JSONObject hotParam = new JSONObject();
hotParam.put("container_name", last_hot_mst.getString("container_name"));
hotParam.put("workorder_id", last_hot_mst.getString("workorder_id"));
hotParam.put("material_id", last_hot_mst.getString("material_id"));
hotParam.put("qty", last_hot_mst.get("qty"));
hotParam.put("container_name", jsonRaw.getString("container_name"));
hotParam.put("workorder_id", jsonRaw.getString("workorder_id"));
hotParam.put("material_id", jsonMater.getString("material_id"));
hotParam.put("qty", jsonRaw.get("qty"));
hotParam.put("io_type", "1");
hotParam.put("qty_unit_id", last_hot_mst.getString("qty_unit_id"));
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
hotParam.put("task_id", task_id);
hotParam.put("start_point_code", point_code1);
hotParam.put("end_point_code", point_code2);
hotParam.put("temperature", last_hot_mst.getString("temperature"));
hotParam.put("oven_time", last_hot_mst.getString("oven_time"));
hotParam.put("temperature", jsonHotIvt.getString("temperature"));
if (ObjectUtil.isEmpty(last_hot_mst)){
hotParam.put("oven_time", "480");
}else {
hotParam.put("oven_time", last_hot_mst.getString("oven_time"));
}
this.createHotIoMst(hotParam);
}
JSONObject result = new JSONObject();

View File

@@ -61,6 +61,10 @@ public class InServiceImpl implements InService {
throw new BadRequestException("未查询到对应的分切机!");
}
if (!StrUtil.equals(cut_row.getString("point_code"),cut_ivt.getString("point_code"))){
throw new BadRequestException("请选择和分切计划相同的设备点位进行上空轴!");
}
JSONObject jo = new JSONObject();
jo.put("point_code1", cut_row.getString("delivery_code"));
jo.put("point_code2", point_code);

View File

@@ -107,6 +107,10 @@ public class OutServiceImpl implements OutService {
throw new BadRequestException("未查询到对应的分切机!");
}
if (!StrUtil.equals(rows.getJSONObject(0).getString("point_code"),cut_ivt.getString("point_code"))){
throw new BadRequestException("请选择和分切计划相同的设备点位进行上空轴!");
}
String cut_qzzno = rows.getJSONObject(0).getString("qzzno");
//判断是否末次下卷

View File

@@ -148,6 +148,7 @@ public class HotPointIvtServiceImpl implements HotPointIvtService {
String task_code = MapUtil.getStr(whereJson, "task_code");
String start_point_code = MapUtil.getStr(whereJson, "start_point_code");
String next_point_code = MapUtil.getStr(whereJson, "next_point_code");
String container_name = MapUtil.getStr(whereJson, "container_name");
JSONObject map = new JSONObject();
map.put("flag","2");
@@ -155,6 +156,7 @@ public class HotPointIvtServiceImpl implements HotPointIvtService {
map.put("dtl_status", MapUtil.getStr(whereJson,"dtl_status"));
map.put("begin_time", whereJson.get("begin_time"));
map.put("end_time", whereJson.get("end_time"));
map.put("container_name", container_name);
if (ObjectUtil.isNotEmpty(task_code)) map.put("task_code","%"+task_code+"%");
if (ObjectUtil.isNotEmpty(start_point_code)) map.put("start_point_code","%"+start_point_code+"%");
if (ObjectUtil.isNotEmpty(next_point_code)) map.put("next_point_code","%"+next_point_code+"%");

View File

@@ -128,7 +128,7 @@
mst.create_time <= 输入.end_time
ENDOPTION
OPTION 输入.end_time <> ""
OPTION 输入.container_name <> ""
mst.container_name = 输入.container_name
ENDOPTION

View File

@@ -43,13 +43,20 @@ public class CutConveyorTask extends AbstractAcsTask {
for (int i = 0; i < arr.size(); i++) {
JSONObject json = arr.getJSONObject(i);
String vehicle_code = "";
if (json.getString("task_type").equals("010507")){
vehicle_code = json.getString("vehicle_code");
}else {
vehicle_code = json.getString("vehicle_code2");
}
AcsTaskDto dto = AcsTaskDto.builder()
.ext_task_id(json.getString("task_id"))
.task_code(json.getString("task_code"))
.task_type(json.getString("acs_task_type"))
.start_device_code(json.getString("point_code1"))
.next_device_code(json.getString("point_code2"))
.vehicle_code(json.getString("vehicle_code2"))
.vehicle_code(vehicle_code)
.priority(json.getString("priority"))
.remark(json.getString("remark"))
.build();
@@ -273,6 +280,14 @@ public class CutConveyorTask extends AbstractAcsTask {
json.put("point_code2", point_code2);
json.put("vehicle_code", form.getString("vehicle_code"));
json.put("vehicle_code2", form.getString("vehicle_code2"));
String vehicle_code2 = form.getString("vehicle_code2");
if (StrUtil.isNotEmpty(vehicle_code2)){
//判断该架子是否存在未完成的输送线任务
JSONObject vehicle_task = WQLObject.getWQLObject("sch_base_task").query("vehicle_code2 = '"+vehicle_code2+"' AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(vehicle_task)){
throw new BadRequestException("载具码:"+vehicle_code2+"存在未完成的输送线任务!");
}
}
json.put("handle_class", THIS_CLASS);
json.put("create_id", currentUserId);
json.put("create_name", currentUsername);