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
eff37916b8
|
|
@ -134,6 +134,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
}
|
||||
} else {
|
||||
Page<BomNewEbomParentVO> result = this.getBaseMapper().getEBomListPage(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode());
|
||||
|
||||
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||
returnResult = result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
package com.nflg.product.bomnew.service.domain.EBom;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.bomnew.constant.VirtualPackageTypeEnum;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||
import com.nflg.product.bomnew.util.EnumUtils;
|
||||
import com.nflg.product.bomnew.util.VUtils;
|
||||
import nflg.product.common.constant.STATE;
|
||||
|
|
@ -38,6 +40,7 @@ public class VirtualPackageFor31 extends VirtualPackageBase {
|
|||
public void generateVirtualPackage() {
|
||||
|
||||
List<BomNewEbomParentVO> child = getChild();
|
||||
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(child);
|
||||
BomNewEbomParentEntity parent = getParentByRowId(bomRowId);
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -182,20 +182,19 @@
|
|||
set root_is=0,
|
||||
user_root_is=0
|
||||
where last_version_is = 1;
|
||||
update t_bom_new_ebom_parent a join (
|
||||
select a.row_id from t_bom_new_ebom_parent a
|
||||
left join t_bom_new_ebom_child b
|
||||
on a.material_no=b.material_no
|
||||
where a.last_version_is=1 and b.row_id is null ) t
|
||||
on a.row_id=t.row_id set a.root_is=1;
|
||||
update t_bom_new_ebom_parent a set a.root_is=1 ,a.user_root_is=1 where material_no not in (select material_no from (
|
||||
select b.material_no from t_bom_new_ebom_parent a
|
||||
join t_bom_new_ebom_child b on a.row_id=b.parent_row_id
|
||||
where a.last_version_is=1 ) b ) and last_version_is=1;
|
||||
|
||||
|
||||
update t_bom_new_ebom_parent a join (
|
||||
select a.row_id from t_bom_new_ebom_parent a
|
||||
left join t_bom_new_ebom_child b
|
||||
on a.material_no=b.material_no and a.created_by=b.created_by
|
||||
where a.last_version_is=1 and b.row_id is null ) t
|
||||
on a.row_id=t.row_id set a.user_root_is=1;
|
||||
update t_bom_new_ebom_parent a left join (select material_no ,created_by from (
|
||||
select b.material_no ,b.created_by from t_bom_new_ebom_parent a
|
||||
join t_bom_new_ebom_child b on a.row_id=b.parent_row_id
|
||||
where a.last_version_is=1 ) b ) t on a.material_no=t.material_no and a.created_by=t.created_by
|
||||
set user_root_is=1
|
||||
where a.last_version_is=1 and t.created_by is null
|
||||
|
||||
</update>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue