Merge remote-tracking branch 'origin/master'

master
philip 3 years ago
commit 2bf61f6b30

@ -69,6 +69,7 @@
<result column="ROUTER" property="router"/>
<result column="BOM" property="bom"/>
<result column="REASON" property="reason"/>
<result column="TYPE" property="type"/>
</resultMap>
<!-- 通用查询结果列 -->
@ -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
<where>
ZABV2.SFC = #{sfc}
</where>
)) ZABV ON ZABV.SFC = S.SFC AND ZABV.SITE= S.SITE
<where>
S.SITE = #{site} AND S.SFC = #{sfc}
</where>

@ -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;
}
}

@ -317,6 +317,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)
{
BigDecimal result = new BigDecimal(FORMATTER_DECIMAL.format(number));
@ -410,8 +419,7 @@ public class NumberUtil
return matcher.matches();
}
public static void main(String[] args)
{
public static void main(String[] args) {
}
}

@ -100,6 +100,7 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> 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);
@ -314,7 +315,7 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> 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]);
@ -326,7 +327,7 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> 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]);

@ -85,10 +85,10 @@ public class SurplusReturnServiceImpl extends ServiceImpl<SurplusReturnMapper, S
if (StringUtil.isBlank(perMater) && StringUtil.isBlank(perSquareMeter)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每米重量】和【每平米重量】都没维护!");
}
if (StringUtil.notBlank(perMater) && !NumberUtil.isNumber(perMater)) {
if (StringUtil.notBlank(perMater) && !NumberUtil.isDouble(perMater)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每米重量】只能维护数值!");
}
if (StringUtil.notBlank(perSquareMeter) && !NumberUtil.isNumber(perSquareMeter)) {
if (StringUtil.notBlank(perSquareMeter) && !NumberUtil.isDouble(perSquareMeter)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每平米重量】只能维护数值!");
}

@ -38,5 +38,9 @@
<groupId>com.foreverwin.mesnac</groupId>
<artifactId>dispatch</artifactId>
</dependency>
<dependency>
<groupId>com.foreverwin.mesnac</groupId>
<artifactId>common</artifactId>
</dependency>
</dependencies>
</project>

@ -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<SfcScrapMapper, SfcScrap> i
@Autowired
private PodTemplateService podTemplateService;
@Autowired
private UserService userService;
@Override
public IPage<SfcScrap> selectPage(FrontPage<SfcScrap> frontPage, SfcScrap sfcScrap) {
QueryWrapper<SfcScrap> queryWrapper = new QueryWrapper<>();
@ -211,12 +216,14 @@ public class SfcScrapServiceImpl extends ServiceImpl<SfcScrapMapper, SfcScrap> i
int day = now.getDayOfMonth();
Map<String, String> wordMap = sfcScrapMapper.generatorWord(site,locale ,shopOrder, sfc);
wordMap.put("SCRAP_MARK","线下质量贴红色标签");
wordMap.put("OPERATOR",user);
if(!StringUtil.isBlank(wordMap.get("TYPE"))){
List<UsrDto> 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 + "");

Loading…
Cancel
Save