From 80da88967326cdda69c7b59199193f57c14aa9f1 Mon Sep 17 00:00:00 2001 From: liuxy Date: Fri, 25 Nov 2022 13:55:04 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/service/impl/MesToLmsServiceImpl.java | 6 ++++++ .../src/main/java/org/nl/wms/pdm/wql/pdm.xls | Bin 248320 -> 249344 bytes .../service/impl/CheckOutBillServiceImpl.java | 10 +++++++-- .../org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql | 19 ++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java index 0581627f1..4db597d1e 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java @@ -695,6 +695,9 @@ public class MesToLmsServiceImpl implements MesToLmsService { String Description = param.getString("Description"); // 来源卷位置 String DateOfFGInbound = param.getString("DateOfFGInbound"); // 来源卷位置 String box_type = param.getString("Attribute1"); // 木箱料号 + String box_length = param.getString("Attribute2"); // 木箱料号 + String box_width = param.getString("Attribute3"); // 木箱料号 + String box_high = param.getString("Attribute4"); // 木箱料号 JSONArray details = param.getJSONArray("details"); @@ -723,6 +726,9 @@ public class MesToLmsServiceImpl implements MesToLmsService { jo.put("package_box_sn", PackageBoxSN); jo.put("sap_pcsn", sap_pcsn); jo.put("box_type", box_type); + jo.put("box_length", box_length); + jo.put("box_width", box_width); + jo.put("box_high", box_high); jo.put("quanlity_in_box", QuanlityInBox); jo.put("box_weight", BoxWeight); jo.put("quality_guaran_period", QualityGuaranPeriod); diff --git a/lms/nladmin-system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8Nb6;s#MPb*813kGJy)PMTNHe^PYBE9kB}_(8&^oxJl_~n)4POkRMH;FQ`s?wIjQ%kL z(sn%Q+y5(m!L25|Tf0RzQ+qts?q0ZHbGG7UMibsi{^vCQ97_7QsC3G$XurrNeAP!e zM|++`2|M&97Xqq`flc`HL;E`WUb+_7bMwvFe$OX3f7vwfv3Kc(Jx}e^KS&zbCOdXt z$0j_5y}^7a0`NBt7b7XYWYm=NhjHa@K8C}{*kv#8iY5B3_pOCR6}*=)xq^2QoGW-= zp}c~>!dIgS!p6OPTjMADcnRi$#t1w2^Z(`N|CJ$RSMo#Qb@uT}UWxk%Pb>LhG*Isv z`BI!BoHz2FX!n_s52Vn)iVx<1>0N+8J-><%pkGT0`zapaZHh-mmjnDQ9(OYS{W%}X z^-?E66;vndlA^Ss&6~HKjkb4EthX*g7p~HVhK7b~L)9v6n5n^N*W_4lZKzfq5~Yq% zg{dQH(85Akzw<(IsQ!}|pFSG-S;0 oneMap = new HashMap<>(); - oneMap.put("vbeln", ""); oneMap.put("consignee", jsonMst.getString("consignee")); oneMap.put("receiver", jsonMst.getString("receiver")); oneMap.put("receiptaddress", jsonMst.getString("receiptaddress")); @@ -2159,7 +2158,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { oneMap.put("carno", jsonMst.getString("carno")); oneMap.put("driverphone", jsonMst.getString("driverphone")); oneMap.put("contractno", jsonMst.getString("contractno")); - oneMap.put("all_box", ""); + // 总箱数 + JSONArray jsonAllBox = WQL.getWO("ST_OUTIVT02").addParam("flag", "4").addParam("iostorinv_id", MapUtil.getStr(whereJson, "iostorinv_id")).process().getResultJSONArray(0); + oneMap.put("all_box", jsonAllBox.size()); oneMap.put("all_qty", ""); oneMap.put("deliveryaddress", jsonMst.getString("deliveryaddress")); oneMap.put("deliveryname", jsonMst.getString("deliveryname")); @@ -2176,6 +2177,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { JSONObject json = dtlArr.getJSONObject(i); HashMap mapFL = new HashMap<>(); + oneMap.put("vbeln", json.getString("vbeln")); // 送货单号 + // 明细 mapFL.put("index", i + 1); mapFL.put("source_bill_code", json.getString("source_bill_code")); mapFL.put("material_name", json.getString("material_name")); @@ -2199,6 +2202,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { } JSONObject json = dtlArr.getJSONObject(i); HashMap mapFL = new HashMap<>(); + + oneMap.put("vbeln", json.getString("vbeln")); // 送货单号 + // 明细 mapFL.put("index", i + 1); mapFL.put("source_bill_code", json.getString("source_bill_code")); mapFL.put("material_name", json.getString("material_name")); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql index 61ae56fae..fe82afebc 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql @@ -98,6 +98,25 @@ dtl.iostorinv_id = 输入.iostorinv_id ENDOPTION + ENDSELECT + ENDQUERY + ENDIF + + IF 输入.flag = "3" + QUERY + SELECT + count(*) AS num + FROM + ST_IVT_IOStorInvDis dis + WHERE + 1 = 1 + + OPTION 输入.iostorinv_id <> "" + dis.iostorinv_id = 输入.iostorinv_id + ENDOPTION + + group by dis.struct_id + ENDSELECT ENDQUERY ENDIF \ No newline at end of file From 78fdfd38e593a258c747a4fd56102194b75b0cb9 Mon Sep 17 00:00:00 2001 From: liuxy Date: Fri, 25 Nov 2022 17:22:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../master/service/dto/CustomerbaseDto.java | 5 ++ .../master/wql/QMD_CS_TRANSPORAIONL.wql | 2 +- .../inbill/service/CheckOutBillService.java | 6 ++ .../outbill/rest/CheckOutBillController.java | 7 ++ .../service/impl/CheckOutBillServiceImpl.java | 84 +++++++++++++------ .../org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql | 17 ++-- .../wms/basedata/master/customer/index.vue | 14 ++++ .../src/views/wms/st/outbill/checkoutbill.js | 9 +- .../src/views/wms/st/outbill/index.vue | 22 ++--- 9 files changed, 120 insertions(+), 46 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/dto/CustomerbaseDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/dto/CustomerbaseDto.java index 3c84156fa..e3bf30b64 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/dto/CustomerbaseDto.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/dto/CustomerbaseDto.java @@ -189,4 +189,9 @@ public class CustomerbaseDto implements Serializable { * 送货单打印模板号 */ private String shd_print_no; + + /** + * 送货单明细数 + */ + private String shd_dtl_num; } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_CS_TRANSPORAIONL.wql b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_CS_TRANSPORAIONL.wql index 02a888458..f2bb4f63c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_CS_TRANSPORAIONL.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/wql/QMD_CS_TRANSPORAIONL.wql @@ -68,7 +68,7 @@ IF 输入.flag = "2" QUERY SELECT - cust_code AS value, + cust_name AS value, cust_name AS label FROM MD_CS_TransportationBase diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/CheckOutBillService.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/CheckOutBillService.java index 8cbd99c80..fb67c7567 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/CheckOutBillService.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/CheckOutBillService.java @@ -176,4 +176,10 @@ public interface CheckOutBillService { * @param whereJson / */ void downloadExcel(HttpServletResponse response, Map whereJson) throws IOException; + + /** + * 获取分配明细条数 + * @param whereJson / + */ + JSONObject getDisNum(Map whereJson); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/rest/CheckOutBillController.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/rest/CheckOutBillController.java index b4dcb58aa..e9b1e432b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/rest/CheckOutBillController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/rest/CheckOutBillController.java @@ -211,4 +211,11 @@ public class CheckOutBillController { checkOutBillService.downloadExcel(response,whereJson); return new ResponseEntity<>(HttpStatus.OK); } + + @PostMapping("/getDisNum") + @Log("获取分配明细条数") + @ApiOperation("获取分配明细条数") + public ResponseEntity getDisNum(@RequestBody Map whereJson) { + return new ResponseEntity<>(checkOutBillService.getDisNum(whereJson),HttpStatus.OK); + } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java index 118b8bbdc..a53458d4c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java @@ -2132,6 +2132,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { WQLObject custTab = WQLObject.getWQLObject("MD_CS_CustomerBase"); // 客户基本信息表 WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_IOStorInv"); // 出入库主表 + WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); // 子卷包装关系表 JSONObject jsonMst = mstTab.query("iostorinv_id = '" + MapUtil.getStr(whereJson, "iostorinv_id") + "'").uniqueResult(0); String cust_code = jsonMst.getString("cust_code"); @@ -2149,22 +2150,21 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { // WriteSheet sheet = EasyExcel.writerSheet().build(); // 5.单组填充 HashMap oneMap = new HashMap<>(); - oneMap.put("consignee", jsonMst.getString("consignee")); - oneMap.put("receiver", jsonMst.getString("receiver")); - oneMap.put("receiptaddress", jsonMst.getString("receiptaddress")); - oneMap.put("receiptphone", jsonMst.getString("receiptphone")); - oneMap.put("logisticscompany", jsonMst.getString("logisticscompany")); - oneMap.put("drivername", jsonMst.getString("drivername")); - oneMap.put("carno", jsonMst.getString("carno")); - oneMap.put("driverphone", jsonMst.getString("driverphone")); - oneMap.put("contractno", jsonMst.getString("contractno")); + oneMap.put("bill_code", jsonMst.getString("bill_code")); // 出库单号 + oneMap.put("create_date", DateUtil.today()); // 出库日期 + oneMap.put("consignee", jsonMst.getString("consignee")); // 客户 + oneMap.put("receiptaddress", jsonMst.getString("receiptaddress")); // 客户地址 + oneMap.put("trans_code", jsonMst.getString("trans_code")); // 承运公司 + oneMap.put("receiptaddress2", jsonMst.getString("receiptaddress")); // 收货地址 + oneMap.put("receiptphone", jsonMst.getString("receiver") +"/"+jsonMst.getString("receiptphone")); // 客户电话 + oneMap.put("deliveryphone", jsonMst.getString("deliveryname") +"/"+jsonMst.getString("deliveryphone") ); // 承运人电话 // 总箱数 - JSONArray jsonAllBox = WQL.getWO("ST_OUTIVT02").addParam("flag", "4").addParam("iostorinv_id", MapUtil.getStr(whereJson, "iostorinv_id")).process().getResultJSONArray(0); + /* JSONArray jsonAllBox = WQL.getWO("ST_OUTIVT02").addParam("flag", "4").addParam("iostorinv_id", MapUtil.getStr(whereJson, "iostorinv_id")).process().getResultJSONArray(0); oneMap.put("all_box", jsonAllBox.size()); oneMap.put("all_qty", ""); oneMap.put("deliveryaddress", jsonMst.getString("deliveryaddress")); oneMap.put("deliveryname", jsonMst.getString("deliveryname")); - oneMap.put("deliveryphone", jsonMst.getString("deliveryphone")); + oneMap.put("deliveryphone", jsonMst.getString("deliveryphone"));*/ // 6.多组填充 JSONArray dtlArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "3").addParam("iostorinv_id", MapUtil.getStr(whereJson, "iostorinv_id")).process().getResultJSONArray(0); @@ -2175,16 +2175,27 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { WriteSheet sheet = EasyExcel.writerSheet().build(); for (int i = 0; i < dtlArr.size(); i++) { JSONObject json = dtlArr.getJSONObject(i); - HashMap mapFL = new HashMap<>(); + JSONObject jsonSub = subTab.query("package_box_sn = '" + json.getString("box_no") + "'").uniqueResult(0); + if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("没有查询到子卷包装"); - oneMap.put("vbeln", json.getString("vbeln")); // 送货单号 + // 规格: 厚度*幅宽 + String material_spec = jsonSub.getString("thickness") + "*" + jsonSub.getString("width"); + // 箱号 + String box_no = json.getString("box_no"); + String sub_box_no = ""; + if (ObjectUtil.isNotEmpty(box_no)) { + sub_box_no = box_no.substring(box_no.lastIndexOf("@")+1, box_no.length()); + } + + HashMap mapFL = new HashMap<>(); // 明细 - mapFL.put("index", i + 1); - mapFL.put("source_bill_code", json.getString("source_bill_code")); + String date_of_production = jsonSub.getString("date_of_production").replaceAll("[[\\s-:punct:]]", ""); + mapFL.put("date_of_production", date_of_production); // 批号 : 子卷包装生产日期 mapFL.put("material_name", json.getString("material_name")); - mapFL.put("material_spec", json.getString("material_spec")); - mapFL.put("qty", json.getString("real_qty")); - mapFL.put("remark", json.getString("remark")); + mapFL.put("material_spec", material_spec); + mapFL.put("qty_unit_name", "KG"); + mapFL.put("box_no", sub_box_no); + mapFL.put("qty", NumberUtil.round(json.getString("qty"), 2).toString()); flData.add(mapFL); } workBook.fill(oneMap, sheet); @@ -2200,17 +2211,29 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { if (i == dtlArr.size()) { break; } - JSONObject json = dtlArr.getJSONObject(i); - HashMap mapFL = new HashMap<>(); - oneMap.put("vbeln", json.getString("vbeln")); // 送货单号 + JSONObject json = dtlArr.getJSONObject(i); + JSONObject jsonSub = subTab.query("package_box_sn = '" + json.getString("box_no") + "'").uniqueResult(0); + if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("没有查询到子卷包装"); + + // 规格: 厚度*幅宽 + String material_spec = jsonSub.getString("thickness") + "*" + jsonSub.getString("width"); + // 箱号 + String box_no = json.getString("box_no"); + String sub_box_no = ""; + if (ObjectUtil.isNotEmpty(box_no)) { + sub_box_no = box_no.substring(box_no.lastIndexOf("@")+1, box_no.length()); + } + + HashMap mapFL = new HashMap<>(); // 明细 - mapFL.put("index", i + 1); - mapFL.put("source_bill_code", json.getString("source_bill_code")); + String date_of_production = jsonSub.getString("date_of_production").replaceAll("[[\\s-:punct:]]", ""); + mapFL.put("date_of_production", date_of_production); // 批号 : 子卷包装生产日期 mapFL.put("material_name", json.getString("material_name")); - mapFL.put("material_spec", json.getString("material_spec")); - mapFL.put("qty", json.getString("real_qty")); - mapFL.put("remark", json.getString("remark")); + mapFL.put("material_spec", material_spec); + mapFL.put("qty_unit_name", "KG"); + mapFL.put("box_no", sub_box_no); + mapFL.put("qty", NumberUtil.round(json.getString("qty"), 2).toString()); flData.add(mapFL); } @@ -2221,6 +2244,15 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { } } + @Override + public JSONObject getDisNum(Map whereJson) { + JSONArray dtlArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "3").addParam("iostorinv_id", MapUtil.getStr(whereJson, "iostorinv_id")).process().getResultJSONArray(0); + + JSONObject json = new JSONObject(); + json.put("num", dtlArr.size()); + return json; + } + /** * 更新主表状态 * diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql index fe82afebc..18e4eeb52 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/wql/ST_OUTIVT02.wql @@ -84,25 +84,26 @@ IF 输入.flag = "3" QUERY SELECT - dtl.*, - mater.material_code, - mater.material_name, - mater.material_spec + SUM(dis.real_qty) AS qty, + dis.box_no, + MAX(mater.material_name) AS material_name FROM - ST_IVT_IOStorInvDtl dtl - LEFT JOIN md_me_materialbase mater ON mater.material_id = dtl.material_id + ST_IVT_IOStorInvDis dis + LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id WHERE 1 = 1 OPTION 输入.iostorinv_id <> "" - dtl.iostorinv_id = 输入.iostorinv_id + dis.iostorinv_id = 输入.iostorinv_id ENDOPTION + group by dis.box_no + ENDSELECT ENDQUERY ENDIF - IF 输入.flag = "3" + IF 输入.flag = "4" QUERY SELECT count(*) AS num diff --git a/lms/nladmin-ui/src/views/wms/basedata/master/customer/index.vue b/lms/nladmin-ui/src/views/wms/basedata/master/customer/index.vue index 3b0791e97..a591f328c 100644 --- a/lms/nladmin-ui/src/views/wms/basedata/master/customer/index.vue +++ b/lms/nladmin-ui/src/views/wms/basedata/master/customer/index.vue @@ -92,6 +92,18 @@ + + + + + + + + + + + + @@ -115,6 +127,8 @@ + + diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/checkoutbill.js b/lms/nladmin-ui/src/views/wms/st/outbill/checkoutbill.js index 033ab90be..fae986b89 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/checkoutbill.js +++ b/lms/nladmin-ui/src/views/wms/st/outbill/checkoutbill.js @@ -169,4 +169,11 @@ export function moneySubmit(data) { data }) } -export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit } +export function getDisNum(data) { + return request({ + url: '/api/checkoutbill/getDisNum', + method: 'post', + data + }) +} +export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum } diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/index.vue b/lms/nladmin-ui/src/views/wms/st/outbill/index.vue index ac4d72c23..ea426d10d 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/index.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/index.vue @@ -550,16 +550,18 @@ export default { return strStyle + arr.join('') }, printExcel(jo) { - debugger - const j = Math.ceil(jo.detail_count / jo.shd_dtl_num) - for (let i = 0; i < j; i++) { - download('/api/checkoutbill/downloadExcel', { 'iostorinv_id': jo.iostorinv_id, 'j': i }).then(result => { - downloadFile(result, '', 'xlsx') - crud.downloadLoading = false - }).catch(() => { - crud.downloadLoading = false - }) - } + checkoutbill.getDisNum({ 'iostorinv_id': jo.iostorinv_id }).then(res => { + debugger + const j = Math.ceil(res.num / jo.shd_dtl_num) + for (let i = 0; i < j; i++) { + download('/api/checkoutbill/downloadExcel', { 'iostorinv_id': jo.iostorinv_id, 'j': i }).then(result => { + downloadFile(result, '', 'xlsx') + crud.downloadLoading = false + }).catch(() => { + crud.downloadLoading = false + }) + } + }) } } } From bd2d06c497611bbc0d4ec220432f834decd8ccf8 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Fri, 25 Nov 2022 17:51:57 +0800 Subject: [PATCH 3/5] NDC --- .../auto/run/NDCSocketConnectionAutoRun.java | 245 ++++++++++++++++++ .../run/OneNDCSocketConnectionAutoRun.java | 32 +-- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 86 ++---- .../agv/ndctwo/AgvNdcTwoDeviceDriver.java | 232 +++++++++++------ .../rest/InstructionController.java | 8 + .../service/InstructionService.java | 7 + .../service/impl/InstructionServiceImpl.java | 54 ++++ .../src/api/acs/instruction/instruction.js | 10 +- .../src/views/acs/instruction/index.vue | 12 + 9 files changed, 527 insertions(+), 159 deletions(-) create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/auto/run/NDCSocketConnectionAutoRun.java diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/NDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/NDCSocketConnectionAutoRun.java new file mode 100644 index 000000000..c2ca0223a --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/NDCSocketConnectionAutoRun.java @@ -0,0 +1,245 @@ +package org.nl.acs.auto.run; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; +import org.nl.acs.AcsConfig; +import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.device.service.DeviceService; +import org.nl.acs.device_driver.basedriver.agv.ndcone.AgvNdcOneDeviceDriver; +import org.nl.acs.device_driver.basedriver.agv.ndctwo.AgvNdcTwoDefination; +import org.nl.acs.device_driver.basedriver.agv.ndctwo.AgvNdcTwoDeviceDriver; +import org.nl.acs.ext.wms.service.AcsToWmsService; +import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; +import org.nl.acs.instruction.service.InstructionService; +import org.nl.acs.instruction.service.dto.Instruction; +import org.nl.acs.instruction.service.impl.InstructionServiceImpl; +import org.nl.acs.opc.Device; +import org.nl.acs.opc.DeviceAppService; +import org.nl.modules.system.service.ParamService; +import org.nl.modules.system.service.impl.ParamServiceImpl; +import org.nl.modules.wql.util.SpringContextHolder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.net.Socket; +import java.util.Date; + +import static org.nl.acs.agv.server.impl.NDCAgvServiceImpl.Bytes2HexString; + +@Slf4j +@Component +public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable { + + Socket s; + String ip = "127.0.0.1"; + int port = 1234; + static DataOutputStream dos; + static DataInputStream dis; + private int recordTimeOut = 10000; + private Date recordTime; + String[] ERROR = new String[]{ + "货叉尖部传感器触发", "S300传感器触发", "载货状态改变", "急停按钮触发", "触边开关出发", "需要复位", + "停在充电位", "取货失败", "放货失败", "轮子打滑", "没有动作码不能进入站点", "取货时有货", "丢失定位", + "抬叉停止"}; + boolean bConnected = true; + + boolean isReConnect = false; + + + @Autowired + AutoRunService autoRunService; + + + public NDCSocketConnectionAutoRun() { + this.recordTime = new Date((new Date()).getTime() - (long) this.recordTimeOut); + } + + public String getCode() { + return NDCSocketConnectionAutoRun.class.getSimpleName(); + } + + public String getName() { + return "NDC在线连接"; + } + + public void autoRun() { + + try { + System.out.println("OneAgv链接开始"); + ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class); + InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); + AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); + NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class); + DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); + DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); + ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); + port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); + byte[] b = new byte[1028]; + s = new Socket(ip, port); + System.out.println("Agv链接成功"); + dos = new DataOutputStream(s.getOutputStream()); + dis = new DataInputStream(s.getInputStream()); + + while (bConnected) { + int count = dis.read(b); + + if (count == -1) { + break; + } + + int[] arr = new int[count]; + StringBuffer bs = new StringBuffer(); + + for (int i = 0; i < count; i++) { + int temp = b[i]; + if (temp < 0) + temp += 256; + arr[i] = temp; + StringBuffer bs1 = new StringBuffer("0"); + bs.append(temp < 16 ? bs1.append(Integer.toHexString(temp)) : Integer.toHexString(temp)); + } + + System.out.println("收到请求参数:" + bs); + boolean flag = false; + if (arr[8] * 256 + arr[9] == 0x73) { + byte[] data = null; + System.out.println("接收agv上报信息:" + bs); + //执行阶段 + int phase = arr[16] * 256 + arr[17]; + // agv任务号 + int index = arr[12] * 256 + arr[13]; + //任务号 + int ikey = arr[26] * 256 + arr[27]; + //站点号 + int agvaddr = arr[18] * 256 + arr[19]; + //车号 + int carno = arr[20]; + Instruction inst = null; + if (ikey != 0) { + inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); + } + log.info("接收agv上报信息:" + bs); + log.info("接收agv上报信息:" + "phase--" + phase + " index--" + index + " ikey--" + ikey + " agvaddr--" + agvaddr + " Car--" + carno); + Device device = null; + String device_code = null; + String old_device_code = null; + String emptyNum = null; + if (agvaddr != 0) { + old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr); + if (StrUtil.contains(old_device_code, "-")) { + String[] point = old_device_code.split("-"); + device_code = point[0]; + } else if (StrUtil.contains(old_device_code, ".")) { + String[] point = old_device_code.split("\\."); + device_code = point[0]; + emptyNum = point[1]; + } else { + device_code = old_device_code; + } + device = deviceAppService.findDeviceByCode(device_code); + } + + AgvNdcTwoDeviceDriver agvNdcTwoDeviceDriver; + //开始任务 + if (phase == 0x01) { + if (!ObjectUtil.isEmpty(inst)) { + inst.setInstruction_status("1"); + inst.setAgv_jobno(String.valueOf(index)); + inst.setSend_status("1"); + instructionService.update(inst); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + } + flag = true; + } + //任务完毕 + //(无车id及状态) + else if (phase == 0x14) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + break; + } + inst.setInstruction_status("2"); + instructionService.finish(inst); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + } + //请求删除任务 + //(需要WCS反馈) + else if (phase == 0x30) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + break; + } + data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0); + } + //任务删除确认 + //(需要WCS反馈) + else if (phase == 0xFF) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + break; + } + instructionService.cancel(inst.getInstruction_id()); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + } else { + //上报异常信息 + //(不需要WCS反馈) + if(phase == 0x67){ + device = deviceAppService.findDeviceByCode(Integer.toString(arr[27])); + } else { + device = deviceAppService.findDeviceByCode(Integer.toString(arr[20])); + } + if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) { + agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver(); + agvNdcTwoDeviceDriver.processSocket(arr); + } + } + if (!ObjectUtil.isEmpty(data)) { + write(data); + } + + } else { + System.out.println("agv上报不是0073类型动作,不处理"); + } + } + + } catch (Exception e) { + + + } finally { + + + } + + } + + + @Override + public void stop() { + super.after(); + try { + s.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + public static void write(byte[] b) { + try { + log.info("下发agv数据:" + Bytes2HexString(b)); + System.out.println("下发agv数据:" + Bytes2HexString(b)); + dos.write(b); + dos.flush(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } +} diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java index 3d1d66282..f84f92106 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java @@ -79,7 +79,6 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { try { - byte[] b = new byte[1024]; s = new Socket(ip, port); dos = new DataOutputStream(s.getOutputStream()); @@ -150,9 +149,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { instructionService.update(inst); } data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - - - } else if (phase == 0x0A) { + } + //任务完毕 + //(无车id及状态) + else if (phase == 0x0A) { for (Instruction inst : insts) { if (!ObjectUtil.isEmpty(inst)) { @@ -161,10 +161,16 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } else if(phase == 0x30){ - data = NDCAgvService.sendAgvOneModeInst(143, index, 0); + } + //请求删除任务 + //(需要WCS反馈) + else if(phase == 0x30){ + data = NDCAgvService.sendAgvOneModeInst(0x8F, index, 0); - } else if(phase == 0xFF) { + } + //任务删除确认 + //(需要WCS反馈) + else if(phase == 0xFF) { for (Instruction inst : insts) { if (!ObjectUtil.isEmpty(inst)) { @@ -173,15 +179,9 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - }else if(phase == 0x50){//离开区域 - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - - }else if(phase == 0x51){//离开区域 - - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } else { - + //上报异常信息 + //(不需要WCS反馈) if(phase == 0x67){ device = deviceAppService.findDeviceByCode(Integer.toString(arr[27])); } else { @@ -197,7 +197,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } } else { -// System.out.println("agv上报不是0073类型动作,不处理"); + System.out.println("agv上报不是0073类型动作,不处理"); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index b7a2bc4a5..f472e1403 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -25,7 +25,6 @@ import org.nl.acs.opc.DeviceAppService; import org.nl.modules.system.service.ParamService; import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.wql.util.SpringContextHolder; -import org.springframework.beans.factory.annotation.Autowired; import java.util.List; @@ -109,7 +108,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic //货架 StandardStorageDeviceDriver standardStorageDeviceDriver; - //开始任务/上报订单号 + //分配 车id + //(不需要WCS反馈) if (phase == 0x02) { for (Instruction inst : insts) { inst.setCarno(String.valueOf(carno)); @@ -117,7 +117,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); - //请求取货 + //到达取货点 + //(需要WCS反馈) } else if (phase == 0x03) { if (agvaddr == 0) { agvaddr = agvaddr_copy; @@ -167,34 +168,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); } - - } else if (phase == 0x65) {//param,重量待定 - //1、得到重量信息 - int weight = (arr[18] * 256 + arr[19]) * 10; - for (Instruction inst : insts) { - //校验agv上报站点编号与指令起始点相同 - if (ObjectUtil.isEmpty(inst)) { - log.info("未找到关联编号{}对应的指令", ikey); - break; - } - // 4010 待处理 - if (StrUtil.equals(inst.getStart_device_code(), device_code)) { - inst.setWeight(String.valueOf(weight)); - } - } - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - - //取货完毕/取满框完毕1/点对点取货完毕 - } else if (phase == 0x64) {//param,agv货位id待定 - //1、根据货位id找到对应三工位设备,赋给agv属性地址对应的满料位设备 - agvaddr = arr[18] * 256 + arr[19]; - agvaddr_copy = agvaddr; - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - //取货完毕 + //(需要WCS反馈) } else if (phase == 0x05) { if (agvaddr == 0) { agvaddr = agvaddr_copy; @@ -248,7 +223,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - //请求放货 + //到达放货点 + //(需要WCS反馈) } else if (phase == 0x07) { if (agvaddr == 0) { agvaddr = agvaddr_copy; @@ -298,7 +274,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - //放货完成 + //放货完毕 + //(需要WCS反馈) } else if (phase == 0x09) { if (agvaddr == 0) { agvaddr = agvaddr_copy; @@ -348,36 +325,21 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - } else if (phase == 0x71) { - x = ikey; - if (x != last_x) { - logServer.deviceExecuteLog(this.device_code,"", "x", String.valueOf(x)); - } - } else if (phase == 0x72) { - y = ikey; - if (y != last_y) { - logServer.deviceExecuteLog(this.device_code, "","y", String.valueOf(y)); - } - } else if (phase == 0x73) { - angle = last_angle; - if (angle != last_angle) { - logServer.deviceExecuteLog(this.device_code, "","angle", String.valueOf(angle)); - } - } else if (phase == 0x74) { - electric_qty = ikey; - if (electric_qty != last_electric_qty) { - logServer.deviceExecuteLog(this.device_code, "","electric_qty", String.valueOf(electric_qty)); - } - } else if (phase == 0x75) { - status = ikey; - if (status != last_status) { - logServer.deviceExecuteLog(this.device_code, "","status", String.valueOf(status)); - } - } else if (phase == 0x76) { - error = ikey; - if (error != last_error) { - logServer.deviceExecuteLog(this.device_code, "","error", String.valueOf(error)); - } + } + //到达位置点 + //(需要WCS反馈) + else if (phase == 0x64) {//param,agv货位id待定 + //1、根据货位id找到对应三工位设备,赋给agv属性地址对应的满料位设备 + agvaddr = arr[18] * 256 + arr[19]; + agvaddr_copy = agvaddr; + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + }else if(phase == 0x50){//进入交通灯区域 + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + }else if(phase == 0x51){//离开交通灯区域 + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); } if (!ObjectUtil.isEmpty(data)) { logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java index 9624ce030..ec0265186 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndctwo/AgvNdcTwoDeviceDriver.java @@ -6,7 +6,7 @@ import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.agv.server.NDCAgvService; -import org.nl.acs.auto.run.TwoNDCSocketConnectionAutoRun; +import org.nl.acs.auto.run.NDCSocketConnectionAutoRun; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; @@ -25,10 +25,9 @@ import org.nl.acs.opc.DeviceAppService; import org.nl.modules.system.service.ParamService; import org.nl.modules.wql.util.SpringContextHolder; -import java.util.List; /** - * NDC单工位AGV + * NDC双工位AGV */ @Slf4j @Data @@ -38,29 +37,17 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic ParamService ParamService = SpringContextHolder.getBean(ParamService.class); InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); - NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class); + NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class); DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); int agvaddr = 0; int agvaddr_copy = 0; int weight = 0; + int agv_power = 0; String device_code = ""; int phase = 0; - - int x = 0; //x坐标 - int y = 0; //y坐标 - int angle = 0; //角度 - int electric_qty = 0; //电量 - int status = 0; //三色灯状态 - int error = 0; //车辆故障 - - int last_x = 0; - int last_y = 0; - int last_angle = 0; - int last_electric_qty = 0; - int last_status = 0; - int last_error = 0; + int region = 0; @LokiLog(type = LokiLogType.ACA_TO_LMS) public synchronized void processSocket(int[] arr) throws Exception { @@ -105,87 +92,172 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } device = deviceAppService.findDeviceByCode(device_code); - if (phase == 0x67) { - //故障信息 - if (arr[18] * 256 + arr[19] == 0) { - - } - data = NDCAgvService.sendAgvTwoModeInst(phase, index, 0); - } - //普通站点 StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; //货架 StandardStorageDeviceDriver standardStorageDeviceDriver; - //开始任务/上报订单号 if (phase == 0x02) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } inst.setCarno(String.valueOf(carno)); instructionService.update(inst); logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); - - //请求取货 - } else if (phase == 0x03) { - //判断普通站点驱动是否开启等待 - if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if(StrUtil.equals("true",this.getDevice().getExtraValue().get("max_emptypalletnum").toString())){ - if(standardOrdinarySiteDeviceDriver.getStatus() == 1){ - data = NDCAgvService.sendAgvTwoModeInst(phase, index, 0); - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - } else { - logServer.deviceExecuteLog(this.device_code, "", "", "上位系统未允许取货"); - } - } else { - data = NDCAgvService.sendAgvTwoModeInst(phase, index, 0); - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - } + } + //到达取货点 + //(Itype=1/2/3,需要WCS反馈Phase) + else if (phase == 0x03) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + // 取货完毕 + //(Itype=1/2/3,需要WCS反馈Phase) + else if (phase == 0x05) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + //到达取货点(Itype=1、3,需要WCS反馈) + else if (phase == 0x08) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + String instruction_type = inst.getInstruction_type(); + if (StrUtil.equals(instruction_type, "1") || StrUtil.equals(instruction_type, "3")) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + } + // 取货完毕 + //(Itype=1、3,需要WCS反馈) + else if (phase == 0x0A) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + String instruction_type = inst.getInstruction_type(); + if (StrUtil.equals(instruction_type, "1") || StrUtil.equals(instruction_type, "3")) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); } - - } else if (phase == 0x65) {//param,重量待定 - //1、得到重量信息 - int weight = (arr[18] * 256 + arr[19]) * 10; - - data = NDCAgvService.sendAgvTwoModeInst(phase, index, 0); - + } + //(Itype=1,上传称重数据) + else if (phase == 0x64) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + String instruction_type = inst.getInstruction_type(); + //上传称重数据 + if (StrUtil.equals(instruction_type, "1")) { + weight = arr[18] * 256 + arr[19]; + inst.setWeight(String.valueOf(weight)); + instructionService.update(inst); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + } + // 到达放货点 + //(Itype=1/2/3,需要WCS反馈) + else if (phase == 0x0C) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + //放货完成 + //(Itype=1/2/3,需要WCS反馈) + else if (phase == 0x0E) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + //到达放货点 + //(Itype=1、3,需要WCS反馈) + else if (phase == 0x10) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + String instruction_type = inst.getInstruction_type(); + if (StrUtil.equals(instruction_type, "1") || StrUtil.equals(instruction_type, "3")) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + } + //放货完成 + //(Itype=1、3,需要WCS反馈) + else if (phase == 0x12) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + String instruction_type = inst.getInstruction_type(); + if (StrUtil.equals(instruction_type, "1") || StrUtil.equals(instruction_type, "3")) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + } + //上传AGV电量 + else if (phase == 0x73) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + agv_power = ikey; + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } //进入区域(phase值) + else if (phase == 0x50) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + region = arr[18] * 256 + arr[19]; + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - } else if (phase == 0x64) {//param,agv货位id待定 - - //取货完毕 - } else if (phase == 0x05) { - - - } else if (phase == 0x07) { - - - } else if (phase == 0x09) { - - - } else if (phase == 0x71) { - - - } else if (phase == 0x72) { - - - } else if (phase == 0x73) { - - - } else if (phase == 0x74) { - - - } else if (phase == 0x75) { - - - } else if (phase == 0x76) { + } + //离开区域(phase值) + else if (phase == 0x51) { + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + region = arr[18] * 256 + arr[19]; + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + } + //上报异常信息 + //(不需要WCS反馈) + else if (phase == 0x67) { + //故障信息 + if (arr[18] * 256 + arr[19] == 0) { + } + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); } if (!ObjectUtil.isEmpty(data)) { logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); - TwoNDCSocketConnectionAutoRun.write(data); + NDCSocketConnectionAutoRun.write(data); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java index 644f97175..841741cf1 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java @@ -108,6 +108,14 @@ public class InstructionController { return new ResponseEntity<>(HttpStatus.OK); } + @Log("强制取消指令") + @ApiOperation("强制取消指令") + @PostMapping(value = "/forceCancel/{id}") + public ResponseEntity forceCancel(@RequestBody String id) throws Exception { + instructionService.forceCancel(id); + return new ResponseEntity<>(HttpStatus.OK); + } + @Log("导出指令") @ApiOperation("导出指令") @GetMapping(value = "/download") diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/InstructionService.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/InstructionService.java index feeb0221a..bda5d43c5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/InstructionService.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/InstructionService.java @@ -164,6 +164,13 @@ public interface InstructionService { */ void cancel(String id) throws Exception; + /** + * 取消指令 + * + * @param id + */ + void forceCancel(String id) throws Exception; + /** * 取消指令不下发agv * diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index cc96d9210..e035ab86f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -833,6 +833,60 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu } } + @Override + public void forceCancel(String id) throws Exception { + //flag= true时取消指令 + boolean flag = false; + Instruction entity = this.findById(id); + if (entity == null) { + throw new BadRequestException("被删除或无权限,操作失败!"); + } + TaskDto task = taskService.findByCodeFromCache(entity.getTask_code()); + if (StrUtil.isEmpty(entity.getRoute_plan_code())) { + entity.setRoute_plan_code(task.getRoute_plan_code()); + } + String currentUsername = SecurityUtils.getCurrentUsername(); + String now = DateUtil.now(); + entity.setUpdate_time(now); + entity.setUpdate_by(currentUsername); + entity.setInstruction_status("3"); + WQLObject wo = WQLObject.getWQLObject("acs_instruction"); + JSONObject json = (JSONObject) JSONObject.toJSON(entity); + wo.update(json); + DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); + DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class); + // 如果是无光电的设备 指令完成变更起点、终点状态 + JSONObject jo = new JSONObject(); + jo.put("device_code", entity.getStart_device_code()); + if (StrUtil.equals(entity.getMaterial(), "1")) { + jo.put("hasGoodStatus", "1"); + } else if (!StrUtil.equals(entity.getMaterial(), "1") && !StrUtil.isEmpty(entity.getMaterial())) { + jo.put("hasGoodStatus", "2"); + } else { + jo.put("hasGoodStatus", "0"); + } + jo.put("material_type", entity.getMaterial()); + jo.put("batch", entity.getBatch()); + jo.put("islock", "false"); + deviceService.changeDeviceStatus(jo); + + JSONObject jo1 = new JSONObject(); + jo1.put("device_code", entity.getNext_device_code()); + jo.put("hasGoodStatus", "0"); + jo.put("material_type", ""); + jo.put("batch", ""); + jo1.put("islock", "false"); + deviceService.changeDeviceStatus(jo1); + + String instnextdevice = entity.getNext_device_code(); + Device device = appService.findDeviceByCode(instnextdevice); + if (device == null) { + log.debug("地址对应设备未找到"); + return; + } + removeByCodeFromCache(entity.getInstruction_code()); + } + @Override public void cancelNOSendAgv(String id) throws Exception { diff --git a/acs/nladmin-ui/src/api/acs/instruction/instruction.js b/acs/nladmin-ui/src/api/acs/instruction/instruction.js index 12aea742d..5d8bec045 100644 --- a/acs/nladmin-ui/src/api/acs/instruction/instruction.js +++ b/acs/nladmin-ui/src/api/acs/instruction/instruction.js @@ -40,6 +40,14 @@ export function cancel(instruction_id) { }) } +export function forceCancel(instruction_id) { + return request({ + url: 'api/instruction/forceCancel/' + instruction_id, + method: 'post', + data: instruction_id + }) +} + export function queryUnFinish() { return request({ url: 'api/instruction/unfinish/', @@ -62,4 +70,4 @@ export function reload() { }) } -export default { add, edit, del, finish, cancel, queryUnFinish, queryByTaskId, reload } +export default { add, edit, del, finish, cancel, forceCancel, queryUnFinish, queryByTaskId, reload } diff --git a/acs/nladmin-ui/src/views/acs/instruction/index.vue b/acs/nladmin-ui/src/views/acs/instruction/index.vue index 7e82e25db..8d57de0ef 100644 --- a/acs/nladmin-ui/src/views/acs/instruction/index.vue +++ b/acs/nladmin-ui/src/views/acs/instruction/index.vue @@ -160,6 +160,7 @@ 完成 取消 + 强制取消 @@ -290,6 +291,14 @@ export default { console.log(err.response.data.message) }) }, + forceCancel(index, row) { + crudInstruction.forceCancel(row.instruction_id).then(res => { + this.crud.toQuery() + this.crud.notify('强制取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS) + }).catch(err => { + console.log(err.response.data.message) + }) + }, reload() { crudInstruction.reload().then(res => { this.crud.toQuery() @@ -313,6 +322,9 @@ export default { case 'b':// 取消 this.cancel(command.index, command.row) break + case 'c':// 强制取消 + this.forceCancel(command.index, command.row) + break } } From e69be1bc25b6e01bc849131cbccb42bde45d3c5e Mon Sep 17 00:00:00 2001 From: liuxy Date: Fri, 25 Nov 2022 18:08:38 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/st/outbill/service/impl/CheckOutBillServiceImpl.java | 1 + lms/nladmin-ui/src/views/wms/st/outbill/index.vue | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java index a53458d4c..35e53ed97 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java @@ -2138,6 +2138,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { String cust_code = jsonMst.getString("cust_code"); JSONObject jsonCust = custTab.query("cust_code = '" + cust_code + "'").uniqueResult(0); + if (ObjectUtil.isEmpty(jsonCust)) throw new BadRequestException("客户不存在"); int j = Integer.parseInt((String) whereJson.get("j")); //1.根据出入库主表中 收货单位 查询客户表中的模板路径 diff --git a/lms/nladmin-ui/src/views/wms/st/outbill/index.vue b/lms/nladmin-ui/src/views/wms/st/outbill/index.vue index ea426d10d..019a92060 100644 --- a/lms/nladmin-ui/src/views/wms/st/outbill/index.vue +++ b/lms/nladmin-ui/src/views/wms/st/outbill/index.vue @@ -551,11 +551,10 @@ export default { }, printExcel(jo) { checkoutbill.getDisNum({ 'iostorinv_id': jo.iostorinv_id }).then(res => { - debugger const j = Math.ceil(res.num / jo.shd_dtl_num) for (let i = 0; i < j; i++) { download('/api/checkoutbill/downloadExcel', { 'iostorinv_id': jo.iostorinv_id, 'j': i }).then(result => { - downloadFile(result, '', 'xlsx') + downloadFile(result, '发货单', 'xlsx') crud.downloadLoading = false }).catch(() => { crud.downloadLoading = false From 7aa3933a36d4b0ae4d2428f33d1b9c7f16ebe90f Mon Sep 17 00:00:00 2001 From: liuxy Date: Fri, 25 Nov 2022 18:41:16 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CheckOutBillServiceImpl.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java index 35e53ed97..5bb9aa8ca 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/outbill/service/impl/CheckOutBillServiceImpl.java @@ -2172,6 +2172,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { int shd_dtl_num = jsonCust.getIntValue("shd_dtl_num"); // 送货单明细数 if (shd_dtl_num > dtlArr.size()) { + double all_qty = 0; ArrayList> flData = new ArrayList<>(); WriteSheet sheet = EasyExcel.writerSheet().build(); for (int i = 0; i < dtlArr.size(); i++) { @@ -2196,9 +2197,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { mapFL.put("material_spec", material_spec); mapFL.put("qty_unit_name", "KG"); mapFL.put("box_no", sub_box_no); - mapFL.put("qty", NumberUtil.round(json.getString("qty"), 2).toString()); + mapFL.put("qty", NumberUtil.round(json.getString("qty"), 2).doubleValue()); flData.add(mapFL); + all_qty = NumberUtil.add(String.valueOf(all_qty), json.getString("qty")).doubleValue(); } + oneMap.put("all_qty",all_qty); workBook.fill(oneMap, sheet); workBook.fill(new FillWrapper("data", flData), sheet); workBook.finish(); @@ -2207,6 +2210,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { double ceil = Math.ceil(div); Integer integer = Integer.valueOf(String.valueOf(NumberUtil.round(ceil, 0))); + double all_qty = 0; ArrayList> flData = new ArrayList<>(); for (int i = j * shd_dtl_num; i < (j + 1) * shd_dtl_num; i++) { if (i == dtlArr.size()) { @@ -2234,10 +2238,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { mapFL.put("material_spec", material_spec); mapFL.put("qty_unit_name", "KG"); mapFL.put("box_no", sub_box_no); - mapFL.put("qty", NumberUtil.round(json.getString("qty"), 2).toString()); + mapFL.put("qty", NumberUtil.round(json.getString("qty"), 2).doubleValue()); flData.add(mapFL); + // 计算合计重量 + all_qty = NumberUtil.add(String.valueOf(all_qty), json.getString("qty")).doubleValue(); + } + oneMap.put("all_qty",all_qty); WriteSheet sheet = EasyExcel.writerSheet(0).build(); workBook.fill(oneMap, sheet); workBook.fill(new FillWrapper("data", flData), sheet);