修改
This commit is contained in:
@@ -664,6 +664,27 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
throw new BadRequestException("分切计划对应的分切机不存在:" + ResourceName);
|
throw new BadRequestException("分切计划对应的分切机不存在:" + ResourceName);
|
||||||
}
|
}
|
||||||
if ("0".equals(cut_jo.getString("is_used"))) {
|
if ("0".equals(cut_jo.getString("is_used"))) {
|
||||||
|
if (Status.equals("1")) {
|
||||||
|
for (int i = 0; i < param.size(); i++) {
|
||||||
|
JSONObject row = param.getJSONObject(i);
|
||||||
|
JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + row.getString("ContainerGroup") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(plan_jo)) {
|
||||||
|
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
|
||||||
|
}
|
||||||
|
plan_jo.put("status", "05");
|
||||||
|
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < param.size(); i++) {
|
||||||
|
JSONObject row = param.getJSONObject(i);
|
||||||
|
JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + row.getString("ContainerGroup") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(plan_jo)) {
|
||||||
|
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
|
||||||
|
}
|
||||||
|
plan_jo.put("status", "09");
|
||||||
|
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
||||||
|
}
|
||||||
|
}
|
||||||
result.put("RTYPE", "S");
|
result.put("RTYPE", "S");
|
||||||
result.put("RTMSG", "设备" + ResourceName + "在LMS系统中未启用!");
|
result.put("RTMSG", "设备" + ResourceName + "在LMS系统中未启用!");
|
||||||
result.put("RTOAL", 1);
|
result.put("RTOAL", 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user