This commit is contained in:
zds
2022-09-20 16:04:32 +08:00
parent 7043d95d28
commit d9241f2b38
5 changed files with 64 additions and 41 deletions

View File

@@ -293,11 +293,12 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
String factorycalendar_id = calendar.getJSONObject(0).getString("factorycalendar_id");
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
JSONObject jsonMst = PDM_BI_WorkOrder.query("workorder_id ='" + jo.getString("workorder_id") + "' and is_delete = '0'").uniqueResult(0);
if (jsonMst == null) {
throw new BadRequestException(jo.getString("workorder_code") + "当前工令记录状态异常,操作失败!");
}
String jo_device_id = jsonMst.getString("device_id");
JSONObject Formula = PDM_BI_Formula.query("workorder_id ='" + jo.getString("workorder_id") + "' and is_delete = '0' and is_audit='0' ").uniqueResult(0);
if (Formula != null) {
throw new BadRequestException(jo.getString("workorder_code") + "工令对应配方未审核,操作失败!");
@@ -394,7 +395,9 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
}
}
}
}else if("GX001".equals(workprocedure_code)){//配粉工序
}else
//配粉工序
if("GX001".equals(workprocedure_code)){
String planstart_date = jsonMst.getString("planstart_time").substring(0,10);
String nowTime = planstart_date+" 24:00:00";
if(devices.size()>=0){
@@ -422,6 +425,12 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
}else{
throw new BadRequestException("未查询到满足条件的排产模板!");
}
//喷雾工序使用工令指定的设备生产工序任务
if("GX003".equals(workprocedure_code)){
if (StrUtil.isNotEmpty(jo_device_id)) {
jsonMst.put("device_id", jo_device_id);
}
}
String planstart_date = jsonMst.getString("planstart_time").substring(0,10);
String planstart_time = jsonMst.getString("planstart_time");
//设置开始时间