产品报废

master
赵嘉伟 3 years ago
parent f4a23895e3
commit 9cb4b6e662

@ -69,6 +69,7 @@
<result column="ROUTER" property="router"/> <result column="ROUTER" property="router"/>
<result column="BOM" property="bom"/> <result column="BOM" property="bom"/>
<result column="REASON" property="reason"/> <result column="REASON" property="reason"/>
<result column="TYPE" property="type"/>
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
@ -992,7 +993,8 @@
CASE WHEN B.BOM != 'NULL' THEN B.BOM || '/' || B.REVISION END BOM, CASE WHEN B.BOM != 'NULL' THEN B.BOM || '/' || B.REVISION END BOM,
CASE WHEN ZSS.HANDLE != 'NULL' THEN ZSS.REASON CASE WHEN ZSS.HANDLE != 'NULL' THEN ZSS.REASON
ELSE ZABV.PB_DESCRIPTION ELSE ZABV.PB_DESCRIPTION
END REASON END REASON,
ZSS.TYPE TYPE
FROM SFC S FROM SFC S
INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE
INNER JOIN SFC_ROUTER ST ON ST.SFC_ROUTING_BO = SR.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 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 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 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
<where>
ZABV2.SFC = #{sfc}
</where>
)) ZABV ON ZABV.SFC = S.SFC AND ZABV.SITE= S.SITE
<where> <where>
S.SITE = #{site} AND S.SFC = #{sfc} S.SITE = #{site} AND S.SFC = #{sfc}
</where> </where>

@ -24,6 +24,8 @@ public class ScrapDto {
private String reason; private String reason;
private String type;
public String getSfc() { public String getSfc() {
return sfc; return sfc;
} }
@ -95,4 +97,12 @@ public class ScrapDto {
public void setReason(String reason) { public void setReason(String reason) {
this.reason = reason; this.reason = reason;
} }
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
} }

@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.enums.HandleEnum;
import com.foreverwin.mesnac.common.service.UserService;
import com.foreverwin.mesnac.common.util.StringUtil; import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.mapper.SfcMapper; import com.foreverwin.mesnac.meapi.mapper.SfcMapper;
import com.foreverwin.mesnac.meapi.model.Sfc; import com.foreverwin.mesnac.meapi.model.Sfc;
@ -72,6 +74,9 @@ public class SfcScrapServiceImpl extends ServiceImpl<SfcScrapMapper, SfcScrap> i
@Autowired @Autowired
private PodTemplateService podTemplateService; private PodTemplateService podTemplateService;
@Autowired
private UserService userService;
@Override @Override
public IPage<SfcScrap> selectPage(FrontPage<SfcScrap> frontPage, SfcScrap sfcScrap) { public IPage<SfcScrap> selectPage(FrontPage<SfcScrap> frontPage, SfcScrap sfcScrap) {
QueryWrapper<SfcScrap> queryWrapper = new QueryWrapper<>(); QueryWrapper<SfcScrap> queryWrapper = new QueryWrapper<>();
@ -211,12 +216,14 @@ public class SfcScrapServiceImpl extends ServiceImpl<SfcScrapMapper, SfcScrap> i
int day = now.getDayOfMonth(); int day = now.getDayOfMonth();
Map<String, String> wordMap = sfcScrapMapper.generatorWord(site,locale ,shopOrder, sfc); Map<String, String> wordMap = sfcScrapMapper.generatorWord(site,locale ,shopOrder, sfc);
wordMap.put("SCRAP_MARK","线下质量贴红色标签"); wordMap.put("SCRAP_MARK","线下质量贴红色标签");
wordMap.put("OPERATOR",user);
if(!StringUtil.isBlank(wordMap.get("TYPE"))){ List<UsrDto> list = userService.findList(user);
wordMap.put("GF",(wordMap.get("TYPE").contains("GF"))? "✔": ""); if(list.size() > 0){
wordMap.put("LF",(wordMap.get("TYPE").contains("LF"))? "✔": ""); wordMap.put("OPERATOR",list.get(0).getFullName());
wordMap.put("OT",(wordMap.get("TYPE").contains("QT"))? "✔": "");
} }
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("OPINION","报废");
wordMap.put("YEAR",year + ""); wordMap.put("YEAR",year + "");
wordMap.put("MONTH",month + ""); wordMap.put("MONTH",month + "");

Loading…
Cancel
Save