5、BOM查看时,版本号赋值优化

6、PBOM工作明细列表在输入物料编码、图号时,不校验工厂和当前登录人
This commit is contained in:
10002327 2024-11-01 20:06:07 +08:00
parent 7c5980e821
commit 423a89e038
5 changed files with 53 additions and 6 deletions

View File

@ -150,10 +150,12 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
parentMaterialByMaterialNo.add(materialNo);
if (CollUtil.isNotEmpty(parentMaterialByMaterialNo)) {
String queryFac= StrUtil.isBlank(query.getFacCode())? userRoleService.getUserFactory():query.getFacCode();
//不做工厂限制 by 10002327 241101
//String queryFac= StrUtil.isBlank(query.getFacCode())? userRoleService.getUserFactory():query.getFacCode();
String queryFac= "";
List<BomNewPbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(queryFac , parentMaterialByMaterialNo,SessionUtil.getUserCode());
List<BomNewPbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(queryFac , parentMaterialByMaterialNo, materialNo,SessionUtil.getUserCode());
List<BomNewPbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(queryFac , parentMaterialByMaterialNo,"");
List<BomNewPbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(queryFac , parentMaterialByMaterialNo, materialNo,"");
List<BomNewPbomParentVO> data = new ArrayList<>();
data.addAll(parents);
data.addAll(childs);

View File

@ -250,6 +250,15 @@ public class ForwardReportService {
vo.setCurrentVersion(parentEntity.getCurrentVersion());
vo.setExpireEndTime(parentEntity.getExpireEndTime());
}
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241012
if(MaterialshouldBomExistUtil.checkNoNeedBom(vo)){
vo.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}else if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
} else {
vo.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
}
// if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
// vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
// }
@ -338,6 +347,16 @@ public class ForwardReportService {
vo.setCurrentVersion(parentEntity.getCurrentVersion());
// vo.setCreatedBy(parentEntity.getCreatedBy());
}
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241012
if(MaterialshouldBomExistUtil.checkNoNeedBom(vo)){
vo.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}else if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
} else {
vo.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
}
// if (MaterialshouldBomExistUtil.checkShouldBomExist(vo)) {
// vo.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
// }

View File

@ -310,6 +310,11 @@ public class EBomForwardReport extends BaseForwardReport {
initMaterialInfo(nodeList);
nodeList.forEach(item->{
item.setBomVersion(parentFormal.getCurrentVersion());
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241101
if(MaterialshouldBomExistUtil.checkNoNeedBom(item)){
item.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}
});
nodesList.addAll(nodeList);
@ -486,6 +491,10 @@ public class EBomForwardReport extends BaseForwardReport {
vo.setBomVersion(parentFormal.getCurrentVersion());
// vo.setDeviseName(parentFormal.getDeviseName());
// vo.setExpireEndTime(parentFormal.getConvertToEbomTime());
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241101
if(MaterialshouldBomExistUtil.checkNoNeedBom(vo)){
vo.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}
}
nodesList.addAll(nodeList);
@ -525,6 +534,10 @@ public class EBomForwardReport extends BaseForwardReport {
// vo.setLevelNum(1);
vo.setOrderNumber(orderNum.incrementAndGet() + "");
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241101
if(MaterialshouldBomExistUtil.checkNoNeedBom(vo)){
vo.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}
}
nodesList.addAll(nodeList);

View File

@ -323,6 +323,10 @@ public class PBomForwardReport extends BaseForwardReport {
initMaterialInfo(nodeList);
nodeList.forEach(item->{
item.setBomVersion(parentFormal.getCurrentVersion());
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241101
if(MaterialshouldBomExistUtil.checkNoNeedBom(item)){
item.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}
});
nodesList.addAll(nodeList);
@ -516,7 +520,10 @@ public class PBomForwardReport extends BaseForwardReport {
// vo.setDeviseName(parentFormal.getDeviseName());
// vo.setCreatedTime(parentFormal.getCreatedTime());
// vo.setExpireEndTime(parentFormal.getReleaseTime());
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241101
if(MaterialshouldBomExistUtil.checkNoNeedBom(vo)){
vo.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}
}
nodesList.addAll(nodeList);
}
@ -553,7 +560,10 @@ public class PBomForwardReport extends BaseForwardReport {
// vo.setLevelNum(1);
vo.setOrderNumber(orderNum.incrementAndGet() + "");
// 1040506070大类以及200201小类这些不需要BOM的物料版本号显示B00 by 10002327 241101
if(MaterialshouldBomExistUtil.checkNoNeedBom(vo)){
vo.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
}
}
nodesList.addAll(nodeList);

View File

@ -212,7 +212,10 @@
<!--物料编码搜索-父级-->
<select id="getParentForMaterialNoSeach" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
SELECT created_by as bomCreatedBy , row_id as bomRowId, row_id as childBomRowId, a.*
FROM t_bom_new_pbom_parent a where a.last_version_is=1 and a.status=1 and a.created_by=#{userCode}
FROM t_bom_new_pbom_parent a where a.last_version_is=1 and a.status=1
<if test="userCode!=null and userCode!=''">
and a.created_by=#{userCode}
</if>
<if test="userFac!=null and userFac!=''">
and fac_code=#{userFac}
</if> and material_no in