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/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 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 + "");