diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/wql/QPADST_OUT_SERVICE2.wql b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/wql/QPADST_OUT_SERVICE2.wql index c291c1dd..18e0539d 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/wql/QPADST_OUT_SERVICE2.wql +++ b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/wql/QPADST_OUT_SERVICE2.wql @@ -65,6 +65,14 @@ WHERE 1 = 1 AND workorder.is_out = '1' + AND workorder.workorder_id IN ( + SELECT DISTINCT + ( procedureoffline.workorder_id ) + FROM + pdm_bi_procedureoffline procedureoffline + WHERE + 1 = 1 + AND procedureoffline.is_send='0') ENDSELECT ENDPAGEQUERY ENDIF diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java index 4f1c0efd..8ed000a3 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java @@ -37,32 +37,41 @@ public class StatisticalReportServiceImpl implements StatisticalReportService { public Map sendOutQuery(Map whereJson, Pageable page) { HashMap map = new HashMap<>(whereJson); - String begin_time = MapUtil.getStr(whereJson, "begin_time"); + String begin_time = map.get("begin_time"); if (StrUtil.isNotEmpty(begin_time)) { map.put("begin_time", begin_time.substring(0,10)); } - String end_time = MapUtil.getStr(whereJson, "end_time"); + String end_time = map.get("end_time"); if (StrUtil.isNotEmpty(end_time)) { map.put("end_time", end_time.substring(0,10)); } - String pcsn = MapUtil.getStr(whereJson, "pcsn"); - if (!StrUtil.isEmpty(pcsn)) { + String pcsn = map.get("pcsn"); + if (StrUtil.isNotEmpty(pcsn)) { map.put("pcsn", "%" + pcsn + "%"); } - String material_code = MapUtil.getStr(whereJson, "material_code"); - if (!StrUtil.isEmpty(material_code)) { + String material_code = map.get("material_code"); + if (StrUtil.isNotEmpty(material_code)) { map.put("material_code", "%" + material_code + "%"); } - String workorder_code = MapUtil.getStr(whereJson, "workorder_code"); - if (!StrUtil.isEmpty(workorder_code)) { + String workorder_code = map.get("workorder_code"); + if (StrUtil.isNotEmpty(workorder_code)) { map.put("workorder_code", "%" + workorder_code + "%"); } - - String send_name = MapUtil.getStr(whereJson, "send_name"); - if (!StrUtil.isEmpty(send_name)) { + String send_name = map.get("send_name"); + if (StrUtil.isNotEmpty(send_name)) { map.put("send_name", "%" + send_name + "%"); } - + String is_send = map.get("is_send"); + if (StrUtil.isNotEmpty(is_send)) { + if ("1,2".contains(is_send)) { + map.put("is_send12", is_send); + } + if ("0".equals(is_send)) { + map.put("is_send0", "0"); + } + }else if (StrUtil.isEmpty(is_send)) { + map.put("is_send0", "0"); + } map.put("flag", "5"); JSONObject jo = WQL.getWO("statistical_report_query_02").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "send_date desc,material_code,pcsn"); return jo; @@ -564,24 +573,24 @@ public class StatisticalReportServiceImpl implements StatisticalReportService { JSONObject jsonObject = (JSONObject)JSON.toJSON(raw); String storagevehicle_code = (String) jsonObject.get("storagevehicle_code"); if (StrUtil.isEmpty(storagevehicle_code)) { - throw new PdaRequestException("载具不能为空!"); + throw new BadRequestException("载具不能为空!"); } if (StrUtil.isEmpty(jsonObject.getString("diskrecord_id"))) { - throw new PdaRequestException("组盘记录不能为空"); + throw new BadRequestException("组盘记录不能为空"); } // 仓位属性表【ST_IVT_StructAttr】 WQLObject PDM_BI_ProcedureOffline = WQLObject.getWQLObject("PDM_BI_ProcedureOffline"); JSONObject jo = PDM_BI_ProcedureOffline.query("storagevehicle_code='"+storagevehicle_code+"'").uniqueResult(0); if(jo==null){ - throw new PdaRequestException("该载具"+storagevehicle_code+"无组盘记录!"); + throw new BadRequestException("该载具"+storagevehicle_code+"无组盘记录!"); } if (!jo.getString("diskrecord_id").equals(jsonObject.getString("diskrecord_id"))){ - throw new PdaRequestException("该载具"+storagevehicle_code+"对应编号不一致!"); + throw new BadRequestException("该载具"+storagevehicle_code+"对应编号不一致!"); } String is_send = jo.getString("is_send"); if(!"1".equals(is_send)){ - throw new PdaRequestException("该载具"+storagevehicle_code+"状态不是已出库状态,不允许发货!"); + throw new BadRequestException("该载具"+storagevehicle_code+"状态不是已出库状态,不允许发货!"); } String diskrecord_id = jsonObject.getString("diskrecord_id"); HashMap map = new HashMap(); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/statistical_report_query_02.wql b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/statistical_report_query_02.wql index 90c6528d..77ae4bbe 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/statistical_report_query_02.wql +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/wql/statistical_report_query_02.wql @@ -32,7 +32,8 @@ 输入.org_id TYPEAS s_string 输入.workorder_code TYPEAS s_string 输入.send_name TYPEAS s_string - 输入.is_send TYPEAS s_string + 输入.is_send0 TYPEAS s_string + 输入.is_send12 TYPEAS s_string [临时表] @@ -235,7 +236,7 @@ workorder.send_date <= 输入.end_time ENDOPTION OPTION 输入.pcsn <> "" - procedureoffline.pcsn like 输入.pcsn + workorder.pcsn like 输入.pcsn ENDOPTION OPTION 输入.material_code <> "" (mb.material_code like 输入.material_code or mb.material_name like 输入.material_code) @@ -249,8 +250,11 @@ OPTION 输入.org_id <> "" workorder.org_id = 输入.org_id ENDOPTION - OPTION 输入.is_send <> "" - procedureoffline.is_send = 输入.is_send + OPTION 输入.is_send0 <> "" + (procedureoffline.is_send = 输入.is_send0 or procedureoffline.is_send is null) + ENDOPTION + OPTION 输入.is_send12 <> "" + (procedureoffline.is_send = 输入.is_send12) ENDOPTION ENDSELECT ENDPAGEQUERY diff --git a/mes/qd/src/views/wms/statistics/sendOutQuery/index.vue b/mes/qd/src/views/wms/statistics/sendOutQuery/index.vue index 227e8a59..34987e98 100644 --- a/mes/qd/src/views/wms/statistics/sendOutQuery/index.vue +++ b/mes/qd/src/views/wms/statistics/sendOutQuery/index.vue @@ -97,7 +97,6 @@ placeholder="请选择" class="filter-item" style="width: 210px;" - @change="hand" > { report.confirmOutStore(this.checkrows).then(res => { - if (res.code === '0') { - this.crud.notify(res.desc, CRUD.NOTIFICATION_TYPE.ERROR) - } else { - this.crud.notify('操作完成', CRUD.NOTIFICATION_TYPE.SUCCESS) - } + this.crud.notify('操作成功!') }) }) }, - // 钩子:在获取表格数据之前执行,false 则代表不获取数据 - [CRUD.HOOK.beforeRefresh]() { - }, - handleSelectionChange(val, row) { - if (val.length > 1) { - this.$refs.table.clearSelection() - this.$refs.table.toggleRowSelection(val.pop()) - this.buttonChange(row) - } else if (val.length === 1) { - this.buttonChange(row) - } else { - this.handleCurrentChange(null) - } - }, - onSelectAll() { - this.$refs.table.clearSelection() - }, orgFormat(row) { for (const item of this.Depts) { if (item.id === row.org_id) { @@ -267,14 +240,6 @@ export default { } } }, - hand(value) { - this.crud.toQuery() - }, - buttonChange(current) { - if (current !== null) { - this.currentRow = current - } - }, onInput() { this.$forceUpdate() }, @@ -288,11 +253,6 @@ export default { } this.crud.toQuery() }, - handleCurrentChange(current) { - if (current === null) { - this.currentRow = {} - } - }, formatStatus(row, column) { for (const item of this.statusList) { if (item.value === row.bill_status) { @@ -305,17 +265,14 @@ export default { return '已发货' } else if (row.is_send === '1') { return '已出库' - } else { + } else if (row.is_send === '0') { return '未出库' + } else{ + return '' } }, stateFormat(row) { return this.dict.label.workorder_status[row.workorder_status] - }, - querytable() { - this.onSelectAll() - this.crud.toQuery() - this.handleCurrentChange(null) } } }