diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkOrderServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkOrderServiceImpl.java index 1f89c256..1c9c482e 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkOrderServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkOrderServiceImpl.java @@ -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"); //设置开始时间 diff --git a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue index b9c4ddaf..7982747b 100644 --- a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue +++ b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue @@ -155,26 +155,25 @@ /> - - - + + - + - - - + + + - - + + - - - - - - + + + + + + diff --git a/mes/qd/src/views/wms/pdm/produce/workorder/AddDialog.vue b/mes/qd/src/views/wms/pdm/produce/workorder/AddDialog.vue index 9a9836f3..a0043441 100644 --- a/mes/qd/src/views/wms/pdm/produce/workorder/AddDialog.vue +++ b/mes/qd/src/views/wms/pdm/produce/workorder/AddDialog.vue @@ -90,11 +90,21 @@ - + - - - + + @@ -127,6 +137,7 @@ import DeviceDialog from '@/views/wms/pub/DeviceDialog' import MaterDialog from '@/views/wms/pub/MaterDialog' import workorder from '@/api/wms/pdm/workorder' import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute' +import producetask from '@/api/wms/pdm/producetask' const defaultForm = { workorder_code: '', @@ -164,6 +175,7 @@ export default { materType: '05', XLList: [], Depts: [], + Devices: [], materShow: false, rules: { pcsn: [ @@ -204,6 +216,9 @@ export default { workorder.getDepts().then(res => { this.Depts = res }) + producetask.getDevices().then(res => { + this.Devices = res + }) }, methods: { close() { diff --git a/mes/qd/src/views/wms/pdm/produce/workorder/index.vue b/mes/qd/src/views/wms/pdm/produce/workorder/index.vue index 6f818034..c6af1bca 100644 --- a/mes/qd/src/views/wms/pdm/produce/workorder/index.vue +++ b/mes/qd/src/views/wms/pdm/produce/workorder/index.vue @@ -235,23 +235,23 @@ /> - + - - - - + + + + - + - - + + diff --git a/mes/qd/src/views/wms/pf/initformula/index.vue b/mes/qd/src/views/wms/pf/initformula/index.vue index 04fa7544..be608741 100644 --- a/mes/qd/src/views/wms/pf/initformula/index.vue +++ b/mes/qd/src/views/wms/pf/initformula/index.vue @@ -139,24 +139,24 @@ :highlight-current-row="true" @selection-change="mySelectionChange" > - - + + - - + + - - - - - - - - + + + + + + + +