diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java index f36a7619..f244aad0 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java @@ -48,7 +48,7 @@ public class EBomEdit { BomNewEbomParentEntity createParentBomInfo(BomNewEbomParentVO vo) { BomNewEbomParentEntity parent = new BomNewEbomParentEntity(); - BeanUtil.copyProperties(parent, vo); + BeanUtil.copyProperties(vo,parent); // BaseMaterialVO material = materialVOMap.get(vo.getMaterialNo()); String batchNo = IdUtil.simpleUUID(); @@ -256,6 +256,9 @@ public class EBomEdit { if (dto.getParent().getBomRowId() == null || dto.getParent().getBomRowId().longValue() == 0) { dto.getParent().setBomRowId(dto.getParent().getRowId()); parent = createParentBomInfo(dto.getParent()); + dto.getDatas().forEach(k->{ + k.setParentRowId(parent.getRowId()); + }); parent.setEditStatus(dto.getOpType()); //工艺人员 diff --git a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml index 8c3537aa..730b7d42 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml +++ b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml @@ -86,7 +86,7 @@ order by created_time desc - select * ,row_id as bomRowId from t_bom_new_ebom_parent where ( (user_root_is= 1 and created_by=#{createdBy} ) or root_is=1) and status=2 + select * ,row_id as bomRowId from t_bom_new_ebom_parent where ((((user_root_is=1 and created_by=#{createdBy}) or root_is=1) and status=2) or (created_by=#{createdBy} and user_root_is=1 and (status=1 or status=3))) order by created_time desc