From 2bbd50fb56275986e2a8658c373686d56804b99b Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期五, 29 八月 2025 14:14:52 +0800 Subject: [PATCH] yml配置 --- inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java | 163 ++++++----------------------------------------------- 1 files changed, 20 insertions(+), 143 deletions(-) diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java index 568a0ec..bfdf692 100644 --- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java +++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java @@ -34,7 +34,6 @@ import com.ruoyi.common.core.domain.entity.InformationNotification; import com.ruoyi.common.config.WechatProperty; import com.ruoyi.common.utils.*; -import com.ruoyi.common.utils.api.IfsApiUtils; import com.ruoyi.framework.exception.ErrorException; import com.ruoyi.inspect.dto.InsReportExport; import com.ruoyi.inspect.dto.ReportPageDto; @@ -108,12 +107,10 @@ private ThreadPoolTaskExecutor threadPoolTaskExecutor; @Resource private InsOrderService insOrderService; - @Resource - private WechatProperty wechatProperty; +// @Resource +// private WechatProperty wechatProperty; @Resource private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper; - @Resource - private IfsApiUtils ifsApiUtils; @Resource private InsSampleUserMapper insSampleUserMapper; @@ -836,23 +833,23 @@ .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); } - threadPoolTaskExecutor.execute(() -> { - // 浼佷笟寰俊閫氱煡 - String message = ""; - message += "妫�娴嬬粨鏋滄彁浜ら�氱煡"; - message += "\n鎵规鍙�: " + one.getUpdateBatchNo(); - message += "\n闆朵欢鍙�: " + one.getPartNo(); - message += "\n闆朵欢鎻忚堪: " + one.getPartDesc(); - message += "\n渚涘簲鍟嗗悕绉�: " + one.getSupplierName(); - message += "\n鎶佃揪鏁伴噺: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); - // 鍙戦�佷紒涓歩nspectStatus淇¢�氱煡 - if (inspectStatus == 1) { - message += "\n妫�娴嬬粨鏋�: 鍚堟牸"; - } else { - message += "\n妫�娴嬬粨鏋�: 涓嶅悎鏍�"; - } - WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); - }); +// threadPoolTaskExecutor.execute(() -> { +// // 浼佷笟寰俊閫氱煡 +// String message = ""; +// message += "妫�娴嬬粨鏋滄彁浜ら�氱煡"; +// message += "\n鎵规鍙�: " + one.getUpdateBatchNo(); +// message += "\n闆朵欢鍙�: " + one.getPartNo(); +// message += "\n闆朵欢鎻忚堪: " + one.getPartDesc(); +// message += "\n渚涘簲鍟嗗悕绉�: " + one.getSupplierName(); +// message += "\n鎶佃揪鏁伴噺: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); +// // 鍙戦�佷紒涓歩nspectStatus淇¢�氱煡 +// if (inspectStatus == 1) { +// message += "\n妫�娴嬬粨鏋�: 鍚堟牸"; +// } else { +// message += "\n妫�娴嬬粨鏋�: 涓嶅悎鏍�"; +// } +// WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); +// }); } @@ -904,66 +901,7 @@ */ @Override public String moveRawMaterial(IfsInventoryQuantity one) { - String toLocation; - // 鐧昏閲囪喘妫�楠岀粨鏋淪TD - if (one.getIsRegister().equals(0)) { - Map<String, Object> resultMap = new HashMap<>(); - List<Map<String, Object>> resultList = new ArrayList<>(); - Map<String, Object> map = new HashMap<>(); - map.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙� - map.put("LINE_NO", one.getLineNo()); // 琛屽彿 - map.put("RELEASE_NO", one.getReleaseNo()); // 涓嬭揪鍙� - map.put("RECEIPT_NO", one.getReceiptNo()); // 鎺ユ敹鍙� - map.put("PURCH_QTY", one.getQtyToInspect()); // 瑕佹楠岀殑閲囪喘鏁伴噺 - resultList.add(map); - resultMap.put("RECORD_ID", UUID.randomUUID().toString()); - resultMap.put("SYSCODE", "LIMS"); - resultMap.put("SYSMODEL", "鐧昏閲囪喘妫�楠岀粨鏋�"); - resultMap.put("BATCH_INFO", resultList); - Result result = ifsApiUtils.getProcurementResults(JSONUtil.toJsonStr(resultMap)); - if (result.getCode() != 200) { - throw new ErrorException("IFS鐧昏閲囪喘妫�楠岀粨鏋滃け璐�: " + result.getMessage()); - } - } - insOrderService.updateIfsInventoryQuantity(one.getId()); - /** - * TODO 鍚庣画闇�瑕佽皟鐢↖FS鐨勬帴鍙� 绉诲叆鐨勫簱浣嶅彿 toLocation - */ - // 妫�楠屽悗绉诲簱 - toLocation = "1301"; - Map<String, Object> moveResultMap = new HashMap<>(); - List<Map<String, Object>> moveResultList = new ArrayList<>(); - Map<String, Object> moveMap = new HashMap<>(); - moveMap.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙� - moveMap.put("LINE_NO", one.getLineNo()); - moveMap.put("RELEASE_NO", one.getReleaseNo()); - moveMap.put("RECEIPT_NO", one.getReceiptNo()); - moveMap.put("PART_NO", one.getPartNo()); - moveMap.put("QTY", one.getQtyArrived()); - moveMap.put("LOCATION_NO", one.getLocationNo()); - moveMap.put("TO_LOCATION_NO", toLocation); - moveMap.put("LOT_BATCH_NO", one.getLotBatchNo()); - moveMap.put("SERIAL_NO", one.getSerialNo()); - moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); - moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); - moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); - moveResultList.add(moveMap); - moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); - moveResultMap.put("SYSCODE", "LIMS"); - moveResultMap.put("SYSMODEL", "妫�楠屽悗绉诲簱"); - moveResultMap.put("BATCH_INFO", moveResultList); - - Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); - // 濡傛灉鏈夊繀椤讳负闆朵欢鎸囧畾鎵瑰彿鎶ラ敊闇�瑕侀噸鏂版彁浜ょЩ搴撲俊鎭幓鎸囧畾鎵瑰彿 - if (result1.getCode() != 200) { - String message = result1.getMessage(); - if (message.contains("蹇呴』涓洪浂浠�") && message.contains("鎸囧畾鎵瑰彿")) { - updaeBatch(one, toLocation); - } else { - throw new ErrorException("IFS妫�楠屽悗绉诲簱澶辫触: " + result1.getMessage()); - } - } - return toLocation; + return null; } /** @@ -1045,67 +983,6 @@ * @param toLocation */ private void updaeBatch(IfsInventoryQuantity one, String toLocation) { - if (one.getIsUpdateBatch().equals(0)) { - // 鍏堜慨鏀规壒娆″彿鍚庤繘琛岀Щ搴� - Map<String, Object> resultMap = new HashMap<>(); - List<Map<String, Object>> resultList = new ArrayList<>(); - Map<String, Object> map = new HashMap<>(); - map.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙� - map.put("LINE_NO", one.getLineNo()); // 琛屽彿 - map.put("RELEASE_NO", one.getReleaseNo()); // 涓嬭揪鍙� - map.put("RECEIPT_NO", one.getReceiptNo()); // 鎺ユ敹鍙� - map.put("PART_NO", one.getPartNo()); //闆朵欢鍙� - map.put("CONFIGURATION_ID", one.getConfigurationId()); // 閰嶇疆鏍囪瘑 - map.put("LOCATION_NO", one.getLocationNo()); // 搴撲綅鍙� - map.put("LOT_BATCH_NO", one.getLotBatchNo());// 鎵规鍙� - map.put("NEW_LOT_BATCH_NO", one.getUpdateBatchNo()); // 鐩爣鎵规鍙� - map.put("SERIAL_NO", one.getSerialNo()); // 搴忓垪鍙� - map.put("ENG_CHG_LEVEL", one.getEngChgLevel()); // 鐗堟湰鍙� - map.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); // wdr鍙� - map.put("ACTIVITY_SEQ", one.getActivitySeq()); // 娲诲姩搴忓彿 - map.put("QTY_TO_CHANGE", one.getQtyArrived()); // 鍙樻洿鏁伴噺 - resultList.add(map); - resultMap.put("RECORD_ID", UUID.randomUUID().toString()); - resultMap.put("SYSCODE", "LIMS"); - resultMap.put("SYSMODEL", "淇敼閲囪喘璁㈠崟鎵规鍙�"); - resultMap.put("BATCH_INFO", resultList); - - Result result = ifsApiUtils.updateMoveReceiptLot(JSONUtil.toJsonStr(resultMap)); - - if (result.getCode() != 200) { - throw new ErrorException("IFS淇敼鎵规鍙峰け璐�: " + result.getMessage()); - } - ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() - .set(IfsInventoryQuantity::getIsUpdateBatch, 1) - .eq(IfsInventoryQuantity::getId, one.getId())); - } - - Map<String, Object> moveResultMap = new HashMap<>(); - List<Map<String, Object>> moveResultList = new ArrayList<>(); - Map<String, Object> moveMap = new HashMap<>(); - moveMap.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙� - moveMap.put("LINE_NO", one.getLineNo()); - moveMap.put("RELEASE_NO", one.getReleaseNo()); - moveMap.put("RECEIPT_NO", one.getReceiptNo()); - moveMap.put("PART_NO", one.getPartNo()); - moveMap.put("QTY", one.getQtyArrived()); - moveMap.put("LOCATION_NO", one.getLocationNo()); - moveMap.put("TO_LOCATION_NO", toLocation); - moveMap.put("LOT_BATCH_NO", one.getUpdateBatchNo()); - moveMap.put("SERIAL_NO", one.getSerialNo()); - moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); - moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); - moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); - moveResultList.add(moveMap); - moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); - moveResultMap.put("SYSCODE", "LIMS"); - moveResultMap.put("SYSMODEL", "妫�楠屽悗绉诲簱"); - moveResultMap.put("BATCH_INFO", moveResultList); - - Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); - if (result1.getCode() != 200) { - throw new ErrorException("IFS妫�楠屽悗绉诲簱澶辫触: " + result1.getMessage()); - } } -- Gitblit v1.9.3