From b7c0212cc6871d14a9fcd95a2049496735d93426 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期日, 28 九月 2025 14:35:37 +0800
Subject: [PATCH] yys 修改报告模板
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java | 101 --------------------------------------------------
1 files changed, 1 insertions(+), 100 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
index 55d6e7f..ed3d251 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
@@ -28,7 +28,6 @@
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.numgen.NumberGenerator;
import com.ruoyi.common.utils.*;
-import com.ruoyi.common.utils.api.IfsApiUtils;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.inspect.dto.*;
import com.ruoyi.inspect.mapper.*;
@@ -80,7 +79,6 @@
private final NumberGenerator<InsOrder> numberGenerator;
private InsReportMapper insReportMapper;
private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper;
- private IfsApiUtils ifsApiUtils;
private SpotCheckQuarterItemMapper spotCheckQuarterItemMapper;
private StandardProductListMapper standardProductListMapper;
private StructureItemParameterMapper structureItemParameterMapper;
@@ -548,104 +546,7 @@
*/
@Override
public void getIfsOrder() {
- HashMap<String, Object> map = new HashMap<>();
- map.put("LOCATION_NO","1302");
- map.put("STATE_DB","To be Inspected");
- List<Map<String, Object>> inventory = ifsApiUtils.getInventory(JSONUtil.toJsonStr(map));
- if(inventory.size() == 0) {
- return;
- }
- // 杩涜淇濆瓨
- for (Map<String, Object> map1 : inventory) {
- DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); // 鏃堕棿鏍煎紡鍖�
- IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity();
- ifsInventoryQuantity.setContract(map1.get("CONTRACT") == null ? "" : map1.get("CONTRACT").toString()); // 鍩�
- ifsInventoryQuantity.setPartNo(map1.get("PART_NO") == null ? "" : map1.get("PART_NO").toString() ); // 闆朵欢鍙�
- ifsInventoryQuantity.setPartDesc(map1.get("PART_DESC") == null ? "" : map1.get("PART_DESC").toString()); // 闆朵欢鎻忚堪
- ifsInventoryQuantity.setOrderNo(map1.get("ORDER_NO") == null ? "" : map1.get("ORDER_NO").toString()); // 璁㈠崟鍙�
- ifsInventoryQuantity.setLineNo(map1.get("LINE_NO") == null ? "" : map1.get("LINE_NO").toString()); // 琛屽彿
- ifsInventoryQuantity.setReleaseNo(map1.get("RELEASE_NO") == null ? "" : map1.get("RELEASE_NO").toString()); // 涓嬭揪鍙�
- ifsInventoryQuantity.setReceiptNo(Integer.parseInt(map1.get("RECEIPT_NO") == null ? "" : map1.get("RECEIPT_NO").toString())); // 鎺ユ敹鍙�
- ifsInventoryQuantity.setStatus(map1.get("STATE") == null ? "" : map1.get("STATE").toString()); // 鐘舵�佹弿杩�
- ifsInventoryQuantity.setStatusDb(map1.get("STATE_DB") == null ? "" : map1.get("STATE_DB").toString()); // 鐘舵��
- if(map1.get("QTY_ARRIVED") != null) {
- ifsInventoryQuantity.setQtyArrived(new BigDecimal(map1.get("QTY_ARRIVED").toString())); // 鎶佃揪鐨勯噰璐暟閲�
- }
- if(map1.get("QTY_INSPECTED") != null) {
- ifsInventoryQuantity.setQtyInspected(new BigDecimal(map1.get("QTY_INSPECTED").toString())); // 宸叉楠岀殑璐拱鏁伴噺
- }
- if(map1.get("QTY_TO_INSPECT") != null) {
- ifsInventoryQuantity.setQtyToInspect(new BigDecimal(map1.get("QTY_TO_INSPECT").toString())); // 瑕佹楠岀殑閲囪喘鏁伴噺
- }
- if(map1.get("INV_QTY_IN_STORE") != null) {
- ifsInventoryQuantity.setInvQtyInStore(new BigDecimal(map1.get("INV_QTY_IN_STORE").toString())); // 鎶佃揪鐨勫簱瀛樻暟閲�
- }
- if(map1.get("PUR_QTY_IN_STORE") != null) {
- ifsInventoryQuantity.setPurQtyInStore(new BigDecimal( map1.get("PUR_QTY_IN_STORE").toString())); // 鎶佃揪鐨勯噰璐暟閲�
-
- }
- ifsInventoryQuantity.setSupplierId(map1.get("SUPPLIER_ID") == null ? "" : map1.get("SUPPLIER_ID").toString()); // 渚涘簲鍟咺D
- ifsInventoryQuantity.setSupplierName(map1.get("SUPPLIER_NAME") == null ? "" : map1.get("SUPPLIER_NAME").toString()); // 渚涘簲鍟嗗悕绉�
- ifsInventoryQuantity.setConfigurationId(map1.get("CONFIGURATION_ID") == null ? "" : map1.get("CONFIGURATION_ID").toString()); // 閰嶇疆鏍囪瘑
- ifsInventoryQuantity.setLotBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // 鎵规鍙�
- ifsInventoryQuantity.setUpdateBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // 鎵规鍙�
- ifsInventoryQuantity.setWaivDevRejNo(map1.get("WAIV_DEV_REJ_NO") == null ? "" : map1.get("WAIV_DEV_REJ_NO").toString()); // WDR鍙�
- ifsInventoryQuantity.setActivitySeq(map1.get("ACTIVITY_SEQ") == null ? null : Integer.parseInt(map1.get("ACTIVITY_SEQ").toString())); // 娲诲姩搴忓垪
- ifsInventoryQuantity.setSerialNo(map1.get("SERIAL_NO") == null ? "" : map1.get("SERIAL_NO").toString()); // 搴忓垪鍙�
- ifsInventoryQuantity.setLocationNo(map1.get("LOCATION_NO") == null ? "" : map1.get("LOCATION_NO").toString()); // 搴撲綅鍙�
- ifsInventoryQuantity.setEngChgLevel(map1.get("ENG_CHG_LEVEL") == null ? "" : map1.get("ENG_CHG_LEVEL").toString()); // 鐗堟湰鍙�
- ifsInventoryQuantity.setReceiver(map1.get("RECEIVER") == null ? "" : map1.get("RECEIVER").toString()); // 鎺ユ敹浜�
- ifsInventoryQuantity.setReceiverName(map1.get("RECEIVER_NAME") == null ? "" : map1.get("RECEIVER_NAME").toString()); // 鎺ユ敹浜哄悕绉�
- ifsInventoryQuantity.setBuyerCode(map1.get("BUYER_CODE") == null ? "" : map1.get("BUYER_CODE").toString()); // 閲囪喘鍛�
- ifsInventoryQuantity.setBuyerName(map1.get("BUYER_NAME") == null ? "" : map1.get("BUYER_NAME").toString()); // 閲囪喘鍛樺悕绉�
-
- if(map1.get("ARRIVE_DATE") != null) {
- ifsInventoryQuantity.setArriveDate(LocalDateTime.parse(map1.get("ARRIVE_DATE").toString(),dateTimeFormatter)); // 瀹為檯鍒拌揣鏃ユ湡
- }
- if(map1.get("DELIVERY_DATE") != null) {
- ifsInventoryQuantity.setDeliveryDate(LocalDateTime.parse(map1.get("DELIVERY_DATE").toString(),dateTimeFormatter)); // 瀹為檯浜よ揣鏃ユ湡
- }
- if(map1.get("PRODUCT_DATE") != null) {
- ifsInventoryQuantity.setProductDate(LocalDateTime.parse(map1.get("PRODUCT_DATE").toString(),dateTimeFormatter)); // 鐢熶骇鏃ユ湡
-
- }
- if(map1.get("INVALID_DATE") != null) {
- ifsInventoryQuantity.setInvalidDate(LocalDateTime.parse(map1.get("INVALID_DATE").toString(),dateTimeFormatter)); // 澶辨晥鏃ユ湡
- }
- if(map1.get("APPROVED_DATE") != null) {
- ifsInventoryQuantity.setApprovedDate(LocalDateTime.parse(map1.get("APPROVED_DATE").toString(),dateTimeFormatter)); // 瀹℃壒鏃ユ湡
- }
- ifsInventoryQuantity.setReqCeater(map1.get("REQ_CEATER") == null ? "" : map1.get("REQ_CEATER").toString()); // 閲囪喘鐢宠鍒涘缓浜�
- ifsInventoryQuantity.setReqCeaterName(map1.get("REQ_CEATER_NAME") == null ? "" : map1.get("REQ_CEATER_NAME").toString()); // 閲囪喘鐢宠鍒涘缓浜哄悕绉�
- ifsInventoryQuantity.setLineRemarks(map1.get("LINE_REMARKS") == null ? "" : map1.get("LINE_REMARKS").toString()); // 閲囪喘璁㈠崟琛屽娉�
- ifsInventoryQuantity.setBuyUnitMeas(map1.get("BUY_UNIT_MEAS") == null ? "" : map1.get("BUY_UNIT_MEAS").toString()); // 閲囪喘鍗曚綅
- ifsInventoryQuantity.setReceiverDate(LocalDateTime.now()); // 鎺ユ敹鏃ユ湡
- ifsInventoryQuantity.setIsSource(1);
- ifsInventoryQuantity.setState(0);
-
- Long count = ifsInventoryQuantityMapper.selectCount(new LambdaQueryWrapper<IfsInventoryQuantity>()
- .eq(IfsInventoryQuantity::getOrderNo, ifsInventoryQuantity.getOrderNo())
- .eq(IfsInventoryQuantity::getLineNo, ifsInventoryQuantity.getLineNo())
- .eq(IfsInventoryQuantity::getReleaseNo, ifsInventoryQuantity.getReleaseNo())
- .eq(IfsInventoryQuantity::getReceiptNo, ifsInventoryQuantity.getReceiptNo())
- .eq(IfsInventoryQuantity::getLocationNo, ifsInventoryQuantity.getLocationNo())
- .eq(IfsInventoryQuantity::getLotBatchNo, ifsInventoryQuantity.getLotBatchNo())
- .eq(IfsInventoryQuantity::getSerialNo, ifsInventoryQuantity.getSerialNo())
- .eq(IfsInventoryQuantity::getEngChgLevel, ifsInventoryQuantity.getEngChgLevel())
- .eq(IfsInventoryQuantity::getWaivDevRejNo, ifsInventoryQuantity.getWaivDevRejNo())
- .eq(IfsInventoryQuantity::getActivitySeq, ifsInventoryQuantity.getActivitySeq())
- );
- if(count == 0) {
- ifsInventoryQuantity.setIsFirst(0);
- // 鏌ヨ浜т笟閾炬娴嬫暟鎹�
- String industryChainAttrFields = IndustryChainUtils.getIndustryChainAttrFields(ifsInventoryQuantity.getOrderNo(),
- ifsInventoryQuantity.getLineNo(),
- ifsInventoryQuantity.getReleaseNo());
- ifsInventoryQuantity.setIndustryChain(industryChainAttrFields);
-
- ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
- }
- }
+ return;
}
/**
--
Gitblit v1.9.3