From 9cb4b6e662f046ed9d432ebd960df9f983afc917 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com>
Date: Wed, 11 Aug 2021 16:10:37 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=A7=E5=93=81=E6=8A=A5=E5=BA=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mapper/AbnormalBillMapper.xml | 10 ++++++++--
.../foreverwin/mesnac/common/dto/ScrapDto.java | 10 ++++++++++
.../service/impl/SfcScrapServiceImpl.java | 17 ++++++++++++-----
3 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml
index 14836bc4..24f60e19 100644
--- a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml
+++ b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml
@@ -69,6 +69,7 @@
+
@@ -992,7 +993,8 @@
CASE WHEN B.BOM != 'NULL' THEN B.BOM || '/' || B.REVISION END BOM,
CASE WHEN ZSS.HANDLE != 'NULL' THEN ZSS.REASON
ELSE ZABV.PB_DESCRIPTION
- END REASON
+ END REASON,
+ ZSS.TYPE TYPE
FROM SFC S
INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE
INNER JOIN SFC_ROUTER ST ON ST.SFC_ROUTING_BO = SR.HANDLE
@@ -1004,7 +1006,11 @@
LEFT JOIN ROUTER R ON R.HANDLE = ZSD.ROUTER_BO
LEFT JOIN Z_SFC_SCRAP ZSS ON ZSS.SFC = S.SFC AND ZSS.SITE = S.SITE
LEFT JOIN BOM B ON B.HANDLE = SO.PLANNED_BOM_BO
- INNER JOIN ( SELECT * FROM Z_ABNORMAL_BILL_VIEW ZABV WHERE ZABV.HANDLE = (SELECT MAX(HANDLE) FROM Z_ABNORMAL_BILL_VIEW) ) ZABV ON ZABV.SFC = S.SFC AND ZABV.SITE= S.SITE
+ INNER JOIN ( SELECT * FROM Z_ABNORMAL_BILL_VIEW ZABV WHERE ZABV.HANDLE = (SELECT MAX(HANDLE) FROM Z_ABNORMAL_BILL_VIEW ZABV2
+
+ ZABV2.SFC = #{sfc}
+
+ )) ZABV ON ZABV.SFC = S.SFC AND ZABV.SITE= S.SITE
S.SITE = #{site} AND S.SFC = #{sfc}
diff --git a/common/src/main/java/com/foreverwin/mesnac/common/dto/ScrapDto.java b/common/src/main/java/com/foreverwin/mesnac/common/dto/ScrapDto.java
index 4b15b007..0d3c933b 100644
--- a/common/src/main/java/com/foreverwin/mesnac/common/dto/ScrapDto.java
+++ b/common/src/main/java/com/foreverwin/mesnac/common/dto/ScrapDto.java
@@ -24,6 +24,8 @@ public class ScrapDto {
private String reason;
+ private String type;
+
public String getSfc() {
return sfc;
}
@@ -95,4 +97,12 @@ public class ScrapDto {
public void setReason(String reason) {
this.reason = reason;
}
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
}
diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcScrapServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcScrapServiceImpl.java
index 14a6e95c..619c4874 100644
--- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcScrapServiceImpl.java
+++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcScrapServiceImpl.java
@@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.foreverwin.mesnac.common.dto.UsrDto;
import com.foreverwin.mesnac.common.enums.HandleEnum;
+import com.foreverwin.mesnac.common.service.UserService;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.mapper.SfcMapper;
import com.foreverwin.mesnac.meapi.model.Sfc;
@@ -72,6 +74,9 @@ public class SfcScrapServiceImpl extends ServiceImpl i
@Autowired
private PodTemplateService podTemplateService;
+ @Autowired
+ private UserService userService;
+
@Override
public IPage selectPage(FrontPage frontPage, SfcScrap sfcScrap) {
QueryWrapper queryWrapper = new QueryWrapper<>();
@@ -211,12 +216,14 @@ public class SfcScrapServiceImpl extends ServiceImpl i
int day = now.getDayOfMonth();
Map wordMap = sfcScrapMapper.generatorWord(site,locale ,shopOrder, sfc);
wordMap.put("SCRAP_MARK","线下质量贴红色标签");
- wordMap.put("OPERATOR",user);
- if(!StringUtil.isBlank(wordMap.get("TYPE"))){
- wordMap.put("GF",(wordMap.get("TYPE").contains("GF"))? "✔": "");
- wordMap.put("LF",(wordMap.get("TYPE").contains("LF"))? "✔": "");
- wordMap.put("OT",(wordMap.get("TYPE").contains("QT"))? "✔": "");
+
+ List list = userService.findList(user);
+ if(list.size() > 0){
+ wordMap.put("OPERATOR",list.get(0).getFullName());
}
+ wordMap.put("GF",(wordMap.get("TYPE").contains("GF"))? "✔": " ");
+ wordMap.put("LF",(wordMap.get("TYPE").contains("LF"))? "✔": " ");
+ wordMap.put("OT",(wordMap.get("TYPE").contains("QT"))? "✔": " ");
wordMap.put("OPINION","报废");
wordMap.put("YEAR",year + "");
wordMap.put("MONTH",month + "");
From 43afbafc667c32f04f14f896cef37f4905441bdc Mon Sep 17 00:00:00 2001
From: philip <244793088@qq.com>
Date: Wed, 11 Aug 2021 16:32:04 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=A7=E5=89=8D=E5=87=86=E5=A4=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mesnac/common/service/impl/ProdReadyTaskServiceImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java
index 048a8df8..5bba7756 100644
--- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java
+++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java
@@ -523,12 +523,12 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl