diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/upkeep/service/impl/DevicemaintenancemstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/upkeep/service/impl/DevicemaintenancemstServiceImpl.java index 729058b8..c7426911 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/upkeep/service/impl/DevicemaintenancemstServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/sb/upkeep/service/impl/DevicemaintenancemstServiceImpl.java @@ -270,6 +270,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ // 更新保养单主表 JSONObject jsonMainMst = mainMstTab.query("maint_id = '" + whereJson.getString("maint_id") + "'").uniqueResult(0); jsonMainMst.put("invstatus", "03"); + jsonMainMst.put("update_optname",whereJson.getString("update_optname") ); jsonMainMst.put("real_start_date", DateUtil.now()); mainMstTab.update(jsonMainMst); @@ -318,6 +319,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ WQLObject lifeTab = WQLObject.getWQLObject("EM_BI_DeviceLifeCycle"); // 设备声明周期表 WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenanceDtl"); + this.submitMain(whereJson); // 1.明细中的是否完成 :必须为全部完成 JSONArray dtlArr = dtlTab.query("maint_id = '" + maint_id + "'").getResultJSONArray(0); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PhysicalQueryServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PhysicalQueryServiceImpl.java index f0a7d61d..ecd1086d 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PhysicalQueryServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PhysicalQueryServiceImpl.java @@ -141,7 +141,7 @@ public class PhysicalQueryServiceImpl implements PhysicalQueryService { JSONObject jsonResult1 = new JSONObject(); jsonResult1.put("prop", "0"); jsonResult1.put("label", "质检单号"); - jsonResultArr.add(jsonResult1); +// jsonResultArr.add(jsonResult1); JSONObject jsonResult2 = new JSONObject(); jsonResult2.put("prop", "1"); jsonResult2.put("label", "物料编码"); @@ -163,8 +163,8 @@ public class PhysicalQueryServiceImpl implements PhysicalQueryService { JSONObject jsonResult19 = new JSONObject(); jsonResult19.put("prop", "19"); jsonResult19.put("label", "金相备注"); - jsonResultArr.add(jsonResult2); - jsonResultArr.add(jsonResult20); +// jsonResultArr.add(jsonResult2); +// jsonResultArr.add(jsonResult20); jsonResultArr.add(jsonResult21); jsonResultArr.add(jsonResult3); jsonResultArr.add(jsonResult4); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderOrderQueryServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderOrderQueryServiceImpl.java index d682ebde..37840653 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderOrderQueryServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/PowderOrderQueryServiceImpl.java @@ -71,6 +71,27 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService { jsonResult.put(jsonDtl.getString("material_id") +"formula_qty",jsonDtl.getString("formula_qty")); } } + // 碳平衡 + jsonResult.put("3", json.getString("c_balance")); + // 时间 + jsonResult.put("4", json.getString("ball_time")); + // 球料比 + jsonResult.put("5", json.getString("ball_rate")); + // 液料比 + jsonResult.put("6", json.getString("liquid_rate")); + // 球磨机号 + HashMap map1 = new HashMap<>(); + map1.put("flag", "3"); + map1.put("product_series_id", json.getString("product_series_id")); + map1.put("workprocedure_id", "1472449856613257216"); + JSONObject jsonDevice1 = WQL.getWO("QPF_POINTCARD01").addParamMap(map1).process().uniqueResult(0); + map1.put("flag", "4"); + JSONObject jsonDevice2= WQL.getWO("QPF_POINTCARD01").addParamMap(map1).process().uniqueResult(0); + if (ObjectUtil.isNotEmpty(jsonDevice1) && ObjectUtil.isNotEmpty(jsonDevice2)) { + String device_code_1 = jsonDevice1.getString("device_code").substring(4, 6); + String device_code_2 = jsonDevice2.getString("device_code").substring(4, 6); + jsonResult.put("7", device_code_1 + "-" + device_code_2); + } jsonResultArr.add(jsonResult); } resultJson.put("content",jsonResultArr); @@ -81,19 +102,6 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService { public JSONArray getHeader() { JSONArray jsonResultArr = new JSONArray(); - JSONObject jsonResult1 = new JSONObject(); - jsonResult1.put("prop", "0"); - jsonResult1.put("label", "日期"); - jsonResultArr.add(jsonResult1); - JSONObject jsonResult2 = new JSONObject(); - jsonResult2.put("prop", "1"); - jsonResult2.put("label", "产品编码"); - jsonResultArr.add(jsonResult2); - JSONObject jsonResult3 = new JSONObject(); - jsonResult3.put("prop", "2"); - jsonResult3.put("label", "批号"); - jsonResultArr.add(jsonResult3); - String classIds = classstandardService.getAllChildIdStr(MaterOptTypeEnum.YL_AND_FL.getClass_idStr()); String RF = classstandardService.getAllChildIdStr(MaterOptTypeEnum.RF.getClass_idStr()); JSONArray resultJSONArray = WQL.getWO("QP_POWDERORDERQUERY01").addParam("flag", "2").addParam("classIds", classIds).addParam("rf", RF).process().getResultJSONArray(0); @@ -104,10 +112,10 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService { jsonResult4.put("prop",json.getString("material_id")); jsonResult4.put("label","物料" + NumberUtil.add(String.valueOf(i), "1") + ""); jsonResultArr.add(jsonResult4); - JSONObject jsonResult5 = new JSONObject(); - jsonResult5.put("prop",json.getString("material_code")+""); - jsonResult5.put("label","物料编码"); - jsonResultArr.add(jsonResult5); +// JSONObject jsonResult5 = new JSONObject(); +// jsonResult5.put("prop",json.getString("material_code")+""); +// jsonResult5.put("label","物料编码"); +// jsonResultArr.add(jsonResult5); JSONObject jsonResult6 = new JSONObject(); jsonResult6.put("prop",json.getString("material_id")+"pcsn"); jsonResult6.put("label","批次"); @@ -117,6 +125,28 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService { jsonResult7.put("label","重量"); jsonResultArr.add(jsonResult7); } + + JSONObject jsonResult1 = new JSONObject(); + jsonResult1.put("prop", "3"); + jsonResult1.put("label", "碳平衡(%)"); + jsonResultArr.add(jsonResult1); + JSONObject jsonResult2 = new JSONObject(); + jsonResult2.put("prop", "4"); + jsonResult2.put("label", "时间(h)"); + jsonResultArr.add(jsonResult2); + JSONObject jsonResult3 = new JSONObject(); + jsonResult3.put("prop", "5"); + jsonResult3.put("label", "球料比"); + jsonResultArr.add(jsonResult3); + JSONObject jsonResult8 = new JSONObject(); + jsonResult8.put("prop", "6"); + jsonResult8.put("label", "液料比"); + jsonResultArr.add(jsonResult8); + JSONObject jsonResult9 = new JSONObject(); + jsonResult9.put("prop", "7"); + jsonResult9.put("label", "球磨机号"); + jsonResultArr.add(jsonResult9); + return jsonResultArr; } } diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/RawUatWcQueryServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/RawUatWcQueryServiceImpl.java index fed8bf11..6e264d2e 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/RawUatWcQueryServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/RawUatWcQueryServiceImpl.java @@ -128,7 +128,7 @@ public class RawUatWcQueryServiceImpl implements RawUatWcQueryService { // JSONArray jsonArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "2").addParam("inspection_scheme_code",inspection_scheme_code).process().getResultJSONArray(0); JSONArray jsonArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "5").process().getResultJSONArray(0); JSONArray jonsResuftArr = new JSONArray(); - JSONObject jsonResuft1 = new JSONObject(); +/* JSONObject jsonResuft1 = new JSONObject(); jsonResuft1.put("prop", "1"); jsonResuft1.put("label", "物料编码"); JSONObject jsonResuft2 = new JSONObject(); @@ -139,14 +139,14 @@ public class RawUatWcQueryServiceImpl implements RawUatWcQueryService { jsonResuft3.put("label", "批号"); JSONObject jsonResuft4 = new JSONObject(); jsonResuft4.put("prop", "4"); - jsonResuft4.put("label", "重量"); + jsonResuft4.put("label", "重量");*/ JSONObject jsonResuft5 = new JSONObject(); jsonResuft5.put("prop", "5"); jsonResuft5.put("label", "厂家"); - jonsResuftArr.add(jsonResuft1); + /* jonsResuftArr.add(jsonResuft1); jonsResuftArr.add(jsonResuft2); jonsResuftArr.add(jsonResuft3); - jonsResuftArr.add(jsonResuft4); + jonsResuftArr.add(jsonResuft4);*/ jonsResuftArr.add(jsonResuft5); for (int i = 0; i < jsonArr.size(); i++) { JSONObject json = jsonArr.getJSONObject(i); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/QP_POWDERORDERQUERY01.wql b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/QP_POWDERORDERQUERY01.wql index b8335d02..68d9f466 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/QP_POWDERORDERQUERY01.wql +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/QP_POWDERORDERQUERY01.wql @@ -51,11 +51,17 @@ work.create_time, mater.material_code, work.pcsn, - mst.formula_id + mst.formula_id, + mst.ball_time, + mst.product_series_id, + ext.c_balance, + ext.ball_rate, + ext.liquid_rate FROM PDM_BI_WorkOrder work LEFT JOIN PDM_BI_Formula mst ON mst.workorder_id = work.workorder_id LEFT JOIN md_me_materialbase mater ON mater.material_id = work.material_id + LEFT JOIN MD_ME_ProducMaterialExt ext ON mater.material_id = ext.material_id WHERE mst.is_delete= '0' diff --git a/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/ExecuteDialog.vue b/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/ExecuteDialog.vue index faca60a1..104259e3 100644 --- a/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/ExecuteDialog.vue +++ b/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/ExecuteDialog.vue @@ -8,12 +8,13 @@ destroy-on-close @close="close" > - - + + - + + 保存并结束 保存 关闭 @@ -183,6 +184,17 @@ export default { this.crud.toQuery() this.dialogVisible = false }) + }, + submitAndEnd() { + const data = this.form + if (this.form.update_optname === '') { + return this.crud.notify('保养人不能为空', CRUD.NOTIFICATION_TYPE.INFO) + } + crudDevicemaintenancemst.endMaintain(data).then(res => { + this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) + this.dialogVisible = false + this.crud.toQuery() + }) } } } diff --git a/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/StartDialog.vue b/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/StartDialog.vue new file mode 100644 index 00000000..368fb58e --- /dev/null +++ b/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/StartDialog.vue @@ -0,0 +1,111 @@ + + + + diff --git a/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/index.vue b/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/index.vue index 8022d616..cef73cd1 100644 --- a/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/index.vue +++ b/mes/qd/src/views/wms/sb/upkeep/devicemaintenancepa/index.vue @@ -89,7 +89,7 @@ > 开始保养 - 保养执行 - + --> - 保养确认 + 保养验收 @@ -150,6 +150,7 @@ + @@ -166,11 +167,12 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css' import crudMaterialbase from '@/api/wms/basedata/master/materialbase' import DateRangePicker from '@/components/DateRangePicker' import ExecuteDialog from '@/views/wms/sb/upkeep/devicemaintenancepa/ExecuteDialog' +import StartDialog from '@/views/wms/sb/upkeep/devicemaintenancepa/StartDialog' export default { name: 'Devicemaintenancepa', dicts: ['EM_DEVICE_BY_INVSTATUS', 'EM_DEVICE_BY_INVTYPE'], - components: { ExecuteDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker }, + components: { ExecuteDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker, StartDialog }, mixins: [presenter(), header(), crud()], cruds() { return CRUD({ @@ -199,6 +201,7 @@ export default { materOpt_code: '23', openParam: null, executeDialog: false, + startDialog: false, permission: { } } @@ -262,10 +265,8 @@ export default { if (data.invstatus !== '02') { return this.crud.notify('只能对提交状态的单据开始', CRUD.NOTIFICATION_TYPE.INFO) } - crudDevicemaintenancemst.startMaintain(data).then(res => { - this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) - this.crud.toQuery() - }) + this.openParam = data + this.startDialog = true }, endMaintain() { const _selectData = this.$refs.table.selection @@ -273,10 +274,17 @@ export default { if (data.invstatus !== '03') { return this.crud.notify('只能对开始状态的单据结束', CRUD.NOTIFICATION_TYPE.INFO) } - crudDevicemaintenancemst.endMaintain(data).then(res => { - this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) - this.crud.toQuery() + crudDevicemaintenancemst.getDtl(data).then(res => { + this.openParam = { + 'form': data, + 'tableData': res + } + this.executeDialog = true }) + // crudDevicemaintenancemst.endMaintain(data).then(res => { + // this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) + // this.crud.toQuery() + // }) }, executeMaintain() { const _selectData = this.$refs.table.selection diff --git a/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue b/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue index 270ecc03..81a9e41d 100644 --- a/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue @@ -124,7 +124,10 @@ style="width: 100%;" @selection-change="crud.selectionChangeHandler" > - + + + + diff --git a/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue b/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue index bd6847ef..be3a2fa9 100644 --- a/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue @@ -75,7 +75,10 @@ style="width: 100%;" @selection-change="crud.selectionChangeHandler" > - + + + + diff --git a/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue b/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue index 3416a7d8..68ef8e42 100644 --- a/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue @@ -57,10 +57,10 @@ @selection-change="crud.selectionChangeHandler" > - - - - + + + + diff --git a/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue b/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue index 9d106147..b1c314d7 100644 --- a/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue @@ -96,7 +96,11 @@ style="width: 100%;" @selection-change="crud.selectionChangeHandler" > - + + + + + diff --git a/mes/qd/src/views/wms/statistics/stifleQuery/index.vue b/mes/qd/src/views/wms/statistics/stifleQuery/index.vue index c4ce82fb..716c7193 100644 --- a/mes/qd/src/views/wms/statistics/stifleQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/stifleQuery/index.vue @@ -49,11 +49,11 @@ - - - - - + + + + +