From f4a23895e35cff047d727353838c9440fe70d9e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com>
Date: Sun, 8 Aug 2021 13:43:09 +0800
Subject: [PATCH 1/3] =?UTF-8?q?pom=E9=94=99=E8=AF=AF=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
integration/pom.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/integration/pom.xml b/integration/pom.xml
index 78216c8d..640557f7 100644
--- a/integration/pom.xml
+++ b/integration/pom.xml
@@ -38,5 +38,9 @@
com.foreverwin.mesnac
dispatch
+
+ com.foreverwin.mesnac
+ common
+
\ No newline at end of file
From 617a56fde0560ae51d89814ec8721cc6a12611ba Mon Sep 17 00:00:00 2001
From: Leon <3066758958@qq.com>
Date: Wed, 11 Aug 2021 14:51:43 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E7=89=A9=E6=96=99=E6=A8=A1=E5=9D=97BUG?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../foreverwin/mesnac/common/util/NumberUtil.java | 12 ++++++++++--
.../dispatch/service/impl/CallItemServiceImpl.java | 5 +++--
.../service/impl/SurplusReturnServiceImpl.java | 4 ++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java b/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java
index cca8eb45..27751eec 100644
--- a/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java
+++ b/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java
@@ -316,6 +316,15 @@ public class NumberUtil
}
return false;
}
+
+ public static boolean isDouble(String str)
+ {
+ if (!StringUtil.toString(str).equals(""))
+ {
+ return str.matches("^[0-9]+(.?[0-9]+)?$");
+ }
+ return false;
+ }
public static String toPlainString(Object number)
{
@@ -410,8 +419,7 @@ public class NumberUtil
return matcher.matches();
}
- public static void main(String[] args)
- {
+ public static void main(String[] args) {
}
}
\ No newline at end of file
diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java
index e9ad3806..6f7a510d 100644
--- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java
+++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java
@@ -100,6 +100,7 @@ public class CallItemServiceImpl extends ServiceImpl i
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo));
callItem.setCallType(Constants.CALL_TYPE_MATERIAL);
callItem.setStatus(Constants.CALL_ITEM_STATUS_NEW);
+ callItem.setIssueQty(BigDecimal.ZERO);
callItem.setCreateUser(user);
callItem.setCreatedDateTime(nowDate);
callItem.setModifyUser(user);
@@ -309,7 +310,7 @@ public class CallItemServiceImpl extends ServiceImpl i
}
if ("GB".equals(itemGroup) && blankingSize.contains("*")) {
- String []size = blankingSize.split("/*");
+ String []size = blankingSize.split("\\*");
if (size != null && size.length >= 2) {
int sizeLength = size.length;
BigDecimal length = new BigDecimal(size[sizeLength-1]);
@@ -321,7 +322,7 @@ public class CallItemServiceImpl extends ServiceImpl i
compQtyMap.put(component, (compQtyMap.get(component) != null ? compQtyMap.get(component).add(sizeReqQty) : sizeReqQty));
}
} else {
- String []size = blankingSize.split("/*");
+ String []size = blankingSize.split("\\*");
if (size != null && size.length >= 1) {
int sizeLength = size.length;
BigDecimal length = new BigDecimal(size[sizeLength-1]);
diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java
index ce92e030..f476f625 100644
--- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java
+++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java
@@ -85,10 +85,10 @@ public class SurplusReturnServiceImpl extends ServiceImpl
Date: Wed, 11 Aug 2021 16:10:37 +0800
Subject: [PATCH 3/3] =?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 + "");