pbom-异常处理,版本变更-bug修复

This commit is contained in:
大米 2024-10-06 17:42:13 +08:00
parent 4270e8662d
commit 020b18afd4
3 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,10 @@ public class UpdateLogVO {
@ApiModelProperty(value = "数量")
private BigDecimal num;
public BigDecimal getNum() {
return num!=null ?num.stripTrailingZeros():null;
}
@ApiModelProperty("单位")
private String materialUnit;

View File

@ -2060,7 +2060,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
}
//子级
List<BomNewPbomParentVO> child = allBom.stream().filter(u -> u.getRowId() != null && u.getRowId() > 0 && u.getExceptionStatus()>1).collect(Collectors.toList());
List<BomNewPbomParentVO> child = allBom.stream().filter(u -> u.getRowId() != null && u.getRowId() > 0).collect(Collectors.toList());
if (CollUtil.isNotEmpty(parents)) {
List<BomNewPbomChildEntity> childList = new ArrayList<>();
child.forEach(k -> {

View File

@ -507,7 +507,7 @@ public class ForwardReportService {
for (String item: intersection) {
UpdateLogVO oldEnt = oldBom.stream().filter(u -> u.getOrderNumber().equals(item)).findFirst().get();
UpdateLogVO newEnt = newBom.stream().filter(u -> u.getOrderNumber().equals(item)).findFirst().get();
if(!oldEnt.getMaterialNo().equals(newEnt.getMaterialNo()) || ! oldEnt.getNum().equals(newEnt.getNum()) || oldEnt.getProjectType().equals(newEnt.getProjectType())){
if(!oldEnt.getMaterialNo().equals(newEnt.getMaterialNo()) || !oldEnt.getNum().equals(newEnt.getNum()) || !oldEnt.getProjectType().equals(newEnt.getProjectType())){
result.add(oldEnt);
newEnt.setOpType(BomConstant.UP);
result.add(newEnt);