Merge branch 'feature/DM/nflg-bom' of http://112.74.186.154:3000/nflj/nflg_project into feature/DM/nflg-bom
This commit is contained in:
commit
e0531ca0e9
|
|
@ -128,7 +128,7 @@ public class EbomApi extends BaseApi {
|
|||
public ResultVO<Boolean> generateVirtualPackage(@RequestBody VirtualPackageParamDto paramDto) {
|
||||
VUtils.isTure(CollUtil.isEmpty(paramDto.getVirtualPackageValue())).throwMessage("请选择要生成的虚拟包");
|
||||
|
||||
|
||||
//检查-是否已
|
||||
bomNewEbomParentService.generateVirtualPackage(paramDto);
|
||||
return ResultVO.success(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import lombok.Getter;
|
|||
@AllArgsConstructor
|
||||
public enum PBomStatusEnum implements ValueEnum<Integer>{
|
||||
|
||||
//1=待发布 2=待分配工厂 3=已分配工厂 4=已发布
|
||||
|
||||
WAIT_PUBLISH(1,"待发布"),
|
||||
BORROWED_PARTS(2, "借用件"),
|
||||
PUBLISH(4,"已发布"),
|
||||
|
|
|
|||
|
|
@ -752,6 +752,9 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
BomNewPbomParentEntity rootParent = this.getById(bomRowId);
|
||||
List<BomNewPbomParentVO> allChild = getAllBom(bomRowId, 0);
|
||||
|
||||
//检查物料是否被冻结
|
||||
materialMainService.checkMaterialFreeze(allChild);
|
||||
|
||||
// if (StrUtil.isBlank(rootParent.getOrderNo())) {
|
||||
// String orderNo = crmService.getOrderNo(rootParent.getMaterialNo());
|
||||
// rootParent.setOrderNo(orderNo);
|
||||
|
|
@ -828,6 +831,10 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
BomNewPbomParentEntity parent = this.getById(bomRowId);
|
||||
try {
|
||||
List<BomNewPbomParentVO> allBom = getAllBom(bomRowId, 0);
|
||||
|
||||
//检查物料是否被冻结
|
||||
materialMainService.checkMaterialFreeze(allBom);
|
||||
|
||||
List<Long> bomRowIds = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0).map(u -> u.getBomRowId()).collect(Collectors.toList());
|
||||
Integer state = (parent.getMaterialNo().startsWith("31") && parent.getFacCode().equals(EBomConstant.MAIN_FACTORY_CODE_1010)) ? PBomStatusEnum.WAIT_FACTORY.getValue() : PBomStatusEnum.PUBLISH.getValue();
|
||||
bomRowIds.add(bomRowId);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.google.common.collect.Sets;
|
|||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||
import com.nflg.product.bomnew.constant.EBomExceptionStatusEnum;
|
||||
import com.nflg.product.bomnew.constant.EBomStatusEnum;
|
||||
import com.nflg.product.bomnew.constant.PBomStatusEnum;
|
||||
import com.nflg.product.bomnew.constant.VirtualPackageTypeEnum;
|
||||
import com.nflg.product.bomnew.pojo.entity.*;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||
|
|
@ -162,6 +163,7 @@ public class EBomToPBom {
|
|||
BomNewPbomParentEntity pBomParent = new BomNewPbomParentEntity();
|
||||
BeanUtil.copyProperties(parentVo, pBomParent);
|
||||
pBomParent.setRowId(IdWorker.getId());
|
||||
pBomParent.setStatus(PBomStatusEnum.WAIT_PUBLISH.getValue());
|
||||
pBomParent.setLastVersionIs(1);
|
||||
pBomParent.setFacCode(facCode);
|
||||
pBomParent.setTechnologyUserCode(SessionUtil.getUserCode());
|
||||
|
|
|
|||
|
|
@ -99,7 +99,10 @@
|
|||
<!--获取已发布列表-->
|
||||
<select id="releaseListByPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
|
||||
select * , row_id as bomRowId
|
||||
from t_bom_new_pbom_parent where root_is=1 and status >= 4
|
||||
from t_bom_new_pbom_parent where status >= 4 and last_version_is=1
|
||||
<if test=" (query.materialNo== null || query.materialNo=='' ) and (query.drawingNo== null || query.drawingNo=='')">
|
||||
and root_is=1
|
||||
</if>
|
||||
<if test="query.startDate== null">
|
||||
and release_time > DATE_SUB(release_time, INTERVAL 4 DAY)
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue