From 458e903be7b0040606079288691fabfc0f4967bc Mon Sep 17 00:00:00 2001
From: Calvin <2440603509@qq.com>
Date: 星期三, 31 七月 2024 09:53:30 +0800
Subject: [PATCH] 费用到处统计根据委托单位区分sheet

---
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index 2121f5b..b7c7873 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -227,7 +227,7 @@
         // 闃叉鍥炵幆鍦板潃鍙樹负IPv6
         String ip =  ipAddress.equals("0:0:0:0:0:0:0:1") ? "127.0.0.1" : ipAddress;
         insProducts.forEach(i -> {
-            Map<String, Object> devices = baseMapper.getDeviceMessage(ip, i.getInspectionItem(), i.getInspectionItemSubclass());
+            Map<String, Object> devices = baseMapper.getDeviceMessage(ip, i.getInspectionItem(), i.getInspectionItemSubclass(), i.getSampleType());
             if (ObjectUtils.isNotEmpty(devices) && ObjectUtils.isNotEmpty(devices.get("file_type")) && ObjectUtils.isNotEmpty(devices.get("collect_url"))) {
                 InsProductResult insProductResult = i.getInsProductResult();
                 if (ObjectUtils.isEmpty(insProductResult)) {
@@ -399,7 +399,7 @@
                                 ProductVo productVo = new ProductVo();
                                 productVo.setCode(insFiber.getCode());
                                 productVo.setColor(fiber.getColor());
-                                productVo.setBushColor(fiber.getBushColor());
+                                productVo.setBushColor(insBushing.getColor());
                                 if (ObjectUtils.isNotEmpty(insProductResult)) {
                                     insProduct.setInsProductResult(insProductResult);
                                 }
@@ -432,7 +432,7 @@
                         for (InsProduct insProduct : insProducts) {
                             InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
                             ProductVo productVo = new ProductVo();
-                            productVo.setCode("/");
+                            productVo.setCode("-");
                             productVo.setColor(fiber.getColor());
                             productVo.setBushColor(fiber.getBushColor());
                             insProduct.setInsProductResult(insProductResult);
@@ -650,7 +650,7 @@
                                 auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//鍛ㄦ
                                 auxiliaryOutputWorkingHours.setCheck(userId);//妫�娴嬩汉
                             }
-                            if (ObjectUtils.isEmpty(insProductResult) || (ObjectUtils.isNotEmpty(insProductResult) && !insProductResult.getInsValue().equals(result.getInsValue()))) {
+                            if (ObjectUtils.isEmpty(insProductResult) && !result.getInsValue().equals("[]") || (ObjectUtils.isNotEmpty(insProductResult) && !insProductResult.getInsValue().equals(result.getInsValue()) && !insProductResult.getInsValue().equals("[]"))) {
                                 auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours);
                             }
                         }
@@ -1756,7 +1756,7 @@
             } catch (Exception e) {
                 throw new ErrorException("鎵句笉鍒版楠屼汉鐨勭鍚�");
             }
-            if (signatureUrl.equals("")) {
+            if (ObjectUtils.isEmpty(signatureUrl)  || signatureUrl.equals("")) {
                 throw new ErrorException("鎵句笉鍒版楠屼汉鐨勭鍚�");
             }
             //Custom custom = customMapper.selectById(user.get("company"));
@@ -3477,7 +3477,7 @@
     }
 
     @Override
-    public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode, String sampleCode) {
+    public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode) {
         List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
         List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
         List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
@@ -3567,8 +3567,8 @@
             return null;
         });
         // 鍒犻櫎鏁伴噰閲囬泦娆℃暟
-        String key = "frequency" + ":" + entrustCode + ":" + sampleCode;
-        RedisUtil.del(key);
+        String key = "frequency" + ":" + entrustCode + ":*";
+        RedisUtil.delsLike(key);
         return 1;
     }
 

--
Gitblit v1.9.3