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:
jing's 2023-12-17 15:30:02 +08:00
commit d4f526a235
33 changed files with 719 additions and 170 deletions

View File

@ -20,6 +20,7 @@ import com.nflg.product.bomnew.service.MaterialMainService;
import com.nflg.product.bomnew.service.domain.EBom.VirtualPackageBase;
import com.nflg.product.bomnew.service.domain.EBom.VirtualPackageFor31;
import com.nflg.product.bomnew.util.EecExcelUtil;
import com.nflg.product.bomnew.util.TreeNode;
import com.nflg.product.bomnew.util.VUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -61,10 +62,22 @@ public class EbomApi extends BaseApi {
private MaterialMainService materialMainService;
@PostMapping("bomPage")
@ApiOperation("Ebom-列表")
public ResultVO<Page<BomNewEbomParentVO>> bomPage(@RequestBody BomNewEbomParentQuery query) {
return ResultVO.success(bomNewEbomParentService.getListPage(query));
@PostMapping("workDetailsListByPage")
@ApiOperation("Ebom-工作明细列表")
public ResultVO<Page<TreeNode<BomNewEbomParentVO>>> workDetailsListByPage(@RequestBody BomNewEbomParentQuery query) {
return ResultVO.success(bomNewEbomParentService.workDetailsListByPage(query));
}
@PostMapping("formalWorksheet")
@ApiOperation("Ebom-正式工作表")
public ResultVO<Page<BomNewEbomParentVO>> formalWorksheet(@RequestBody BomNewEbomParentQuery query) {
return ResultVO.success(bomNewEbomParentService.formalWorksheet(query));
}
@PostMapping("changeImpact")
@ApiOperation("Ebom-变更影响")
public ResultVO<Page<BomNewEbomParentVO>> changeImpact(@RequestBody BomNewEbomParentQuery query) {
return ResultVO.success(bomNewEbomParentService.formalWorksheet(query));
}
@GetMapping("getChild")

View File

@ -14,10 +14,7 @@ import com.nflg.product.bomnew.pojo.dto.OptionalEbomSubmitEditDTO;
import com.nflg.product.bomnew.pojo.query.OptionalEbomConfigListQuery;
import com.nflg.product.bomnew.pojo.query.OptionalEbomMainListQuery;
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
import com.nflg.product.bomnew.pojo.vo.OptionalEbomConfigAggregVO;
import com.nflg.product.bomnew.pojo.vo.OptionalEbomConfigVO;
import com.nflg.product.bomnew.pojo.vo.OptionalEbomMainVO;
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO;
import com.nflg.product.bomnew.pojo.vo.*;
import com.nflg.product.bomnew.service.OptionalEbomConfigService;
import com.nflg.product.bomnew.service.OptionalEbomImportChildService;
import com.nflg.product.bomnew.service.OptionalEbomMainService;
@ -73,9 +70,7 @@ public class OptionalMbomApi extends BaseApi {
@PostMapping("getMaterialParentList")
@ApiOperation("物料分页数据")
public ResultVO<IPage<OptionalMbomMaterialVO>> getMaterialParentList(@RequestBody OptionalMbomMaterialListQuery query) {
public ResultVO<IPage<OptionalMbomMaterialListVO>> getMaterialParentList(@RequestBody OptionalMbomMaterialListQuery query) {
query.setCreatedBy(SessionUtil.getUserCode());
return ResultVO.success(this.optionalMbomMaterialService.getListPage(query));
}
@ -84,7 +79,7 @@ public class OptionalMbomApi extends BaseApi {
@GetMapping("getMaterialChildList")
@ApiOperation("物料子数据")
public ResultVO<List<OptionalMbomMaterialVO>> getMaterialChildList(@ApiParam("父id") @RequestParam("rowId") Long rowId) {
public ResultVO<List<OptionalMbomMaterialListVO>> getMaterialChildList(@ApiParam("父id") @RequestParam("rowId") Long rowId) {
return ResultVO.success(this.optionalMbomMaterialService.getChild(rowId));
}

View File

@ -0,0 +1,13 @@
package com.nflg.product.bomnew.constant;
/**
* @author 大米
* @date 2023/11/11 20:09
*/
public class EBomConstant {
//设计人员
public static final String DESIGNER = "设计人员";
//工艺人员
public static final String TECHNICIAN = "工艺人员";
}

View File

@ -11,7 +11,11 @@ public enum EBomStatusEnum implements ValueEnum<Integer> {
WAIT_CHECK(1,"待复核"),
CHECKED(2,"已复核"),
RETURNED(3,"已退回"),
PUBLISHED(4,"定版已发布PBOM");
PUBLISHED(4,"定版已发布PBOM"),
BORROWED_PARTS(99, "借用件"),
//非自己创建的
REFERENCE(100, "引用件");
private final Integer value;

View File

@ -14,8 +14,10 @@ public enum OriginalStatusEnum implements ValueEnum<Integer> {
OVER_CONVERT(2, "已转换"),
//已发布的
BORROWED_PARTS(3, "借用件"),
//非自己创建的
REFERENCE(4, "引用件");

View File

@ -0,0 +1,19 @@
package com.nflg.product.bomnew.constant;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum UserJobEnum implements ValueEnum<Integer> {
// 0-设计人员 1-工艺人员 2-其他
DESIGNER(0 ,"设计人员"),
ENGINEER(1,"工艺人员"),
OTHER(2,"其他");
private final Integer value;
private final String description;
}

View File

@ -17,4 +17,9 @@ public enum VirtualPackageTypeEnum implements ValueEnum<Integer>{
private final String description;
private final String conMaterialName;
private final String materialCategoryCode;
public static Integer getAll(){
return 1|2|4;
}
}

View File

@ -16,4 +16,9 @@ import java.util.List;
public interface BomNewEbomChildMapper extends BaseMapper<BomNewEbomChildEntity> {
List<BomNewEbomChildEntity> getChildByMaterialNo(@Param("materialNo") String materialNo);
/**
* 全量更新-EBOM物料use
*/
void updateEBomMaterialUse();
}

View File

@ -0,0 +1,14 @@
package com.nflg.product.bomnew.mapper.master;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nflg.product.bomnew.pojo.entity.BomNewEbomMaterialUseEntity;
/**
* t_bom_new_ebom_material_use 表数据库访问层
*
*
* @author makejava
* @since 2023-12-17 11:27:05
*/
public interface BomNewEbomMaterialUseMapper extends BaseMapper<BomNewEbomMaterialUseEntity> {
}

View File

@ -11,6 +11,7 @@ import com.nflg.product.bomnew.pojo.vo.MaterialHistoryProjectTypeVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* t_bom_new_ebom_parent 表数据库访问层
@ -27,8 +28,16 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
* @param query
* @return
*/
Page<BomNewEbomParentVO> getEBomListPage(Page<BomNewEbomParentVO> page, @Param("query") BomNewEbomParentQuery query);
Page<BomNewEbomParentVO> getEBomListPage(Page<BomNewEbomParentVO> page, @Param("query") BomNewEbomParentQuery query ,@Param("job") Integer job, @Param("createdBy") String createdBy);
/**
* 正式工作表
* @param page
* @param query
* @return
*/
Page<BomNewEbomParentVO> formalWorksheet(Page<BomNewEbomParentVO> page, @Param("query") BomNewEbomParentQuery query);
/**
* 获取子级
* @param rowId
@ -39,4 +48,10 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
List<BomNewEbomParentVO> getParentChildBatch(@Param("rowIds") List<Long> rowIds);
MaterialHistoryProjectTypeVO getMaterialHistoryProjectType(@Param("materialNo")String materialNo);
Set<String> getSelfParentMaterialNo(@Param("createdBy") String createdBy ,@Param("list") Set<String> list);
List<BomNewEbomParentVO> getParentForMaterialNoSeach(@Param("materialNoList") List<String> materialNoList);
List<BomNewEbomParentVO> getChildForMaterialNoSeach(@Param("materialNoList") List<String> materialNoList);
}

View File

@ -33,6 +33,8 @@ public interface MaterialMainMapper extends BaseMapper<MaterialMainEntity> {
List<BaseMaterialVO> getMaterialByAnyNo(@Param("drawingNos") List<String> drawingNos);
List<String> getUserPost(@Param("userRowId") Long userRowId);
}

View File

@ -13,6 +13,7 @@ package com.nflg.product.bomnew.mapper.master;
import com.nflg.product.bomnew.pojo.query.OptionalEbomMainListQuery;
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
import com.nflg.product.bomnew.pojo.vo.OptionalEbomMainVO;
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialListVO;
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -28,8 +29,8 @@ import java.util.List;
public interface OptionalMbomMaterialMapper extends BaseMapper<OptionalMbomMaterialEntity> {
IPage<OptionalMbomMaterialVO> getListPage(Page<OptionalMbomMaterialVO> page, @Param("query") OptionalMbomMaterialListQuery query);
public List<OptionalMbomMaterialVO> getChild(@Param("rowId") Long rowId);
Page<OptionalMbomMaterialListVO> getListPage(Page page, @Param("query") OptionalMbomMaterialListQuery query);
public List<OptionalMbomMaterialListVO> getChild(@Param("rowId") Long rowId);
}

View File

@ -63,7 +63,7 @@ public class OptionalMbomMaterialDTO implements Serializable {
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createdTime;
private String createdTime;
/**
* 操作人编码
*/

View File

@ -0,0 +1,48 @@
package com.nflg.product.bomnew.pojo.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.time.LocalDate;
/**
* t_bom_new_ebom_material_use
*
*
* @author makejava
* @since 2023-12-17 11:27:05
*/
@Data
@Accessors(chain = true)
@ApiModel(value="com-nflg-product-bomnew-pojo-new-entity-BomNewEbomMaterialUseEntity")
@TableName(value = "t_bom_new_ebom_material_use")
public class BomNewEbomMaterialUseEntity implements Serializable {
/**
* 主键-雪花
*/
@TableId(value = "row_id", type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键-雪花")
private Long rowId;
/**
* 物料编码
*/
@TableField(value = "material_no")
@ApiModelProperty(value = "物料编码")
private String materialNo;
/**
* 父级物料编码多个用逗号隔开
*/
@TableField(value = "parent_material_no")
@ApiModelProperty(value = "父级物料编码,多个用逗号隔开")
private String parentMaterialNo;
private static final long serialVersionUID = 344881455840528407L;
}

View File

@ -144,6 +144,10 @@ public class BomNewEbomParentEntity implements Serializable {
@ApiModelProperty(value = "是否跟节点 0-否 1-是")
private Integer rootIs;
@TableField(value = "virtrual_package_enum")
@ApiModelProperty("已生成的虚拟包 0-无 1-发货包 2-制作包 4-直发包 8-发货前装配包")
private Integer virtrualPackageEnum;
/**
* 是否应该有BOM 0- 1-
*/

View File

@ -47,11 +47,12 @@ public class BomNewEbomParentQuery extends BasePageQuery implements Serializabl
@ApiModelProperty(value = "结束时间")
private String endDate;
@ApiModelProperty("数据类型 0-EBOM工作列表数据 1-EBOM的变更页面数据 ")
@ApiModelProperty("数据类型 0-EBOM工作列表数据 1-EBOM正式工作表明细 2-变更影响")
private Integer dataType=0;
private static final long serialVersionUID = 1L;
}

View File

@ -52,4 +52,7 @@ public class BaseMaterialVO {
@ApiModelProperty("材质")
private String materialTexture;
@ApiModelProperty("物料大类别")
private String relCategoryCode;
}

View File

@ -0,0 +1,98 @@
package com.nflg.product.bomnew.pojo.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
@Data
@ApiModel("mbom发布生成的物料信息")
@Accessors(chain = true)
public class OptionalMbomMaterialListVO extends BaseMaterialVO {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
private Long rowId;
/**
* 父表Id (t_optional_ebom_config )
*/
@ApiModelProperty(value = "上层id")
private Long parentRowId;
/**
* 上层id
*/
@ApiModelProperty(value = "根id")
private Long rootRowId;;
/**
* 物料编码
*/
// @ApiModelProperty(value = "物料编码")
// private String materialNo;
/**
* 物料名
*/
// @ApiModelProperty(value = "物料名")
// private String materialName;
/**
* 物料描述
*/
// @ApiModelProperty(value = "物料描述")
// private String materialDesc;
/**
* 图号
*/
// @ApiModelProperty(value = "图号")
// private String drawingNo;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remak;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private String createdTime;
/**
* 操作人编码
*/
@ApiModelProperty(value = "操作人编码")
private String createdBy;
/**
* 机型编号
*/
@ApiModelProperty(value = "机型编号")
private String deviceNo;
/**
* 机型名称
*/
@ApiModelProperty(value = "机型名称")
private String deviceName;
/**
* 是否导入sap(0 : 1: )
*/
@ApiModelProperty(value = "是否导入sap(0 :否 1: 是)")
private Integer uploadSapStatus;
/**
* 部门名称
*/
@ApiModelProperty(value = "部门名称")
private String deptName;
/**
* 部门id
*/
@ApiModelProperty(value = "部门id")
private Long deptRowId;
/**
* 操作人姓名
*/
@ApiModelProperty(value = "操作人姓名")
private String realName;
}

View File

@ -20,7 +20,7 @@ import java.util.Date;
@Data
@ApiModel("mbom发布生成的物料信息")
@Accessors(chain = true)
public class OptionalMbomMaterialVO implements Serializable {
public class OptionalMbomMaterialVO {
/**
* 主键
*/

View File

@ -0,0 +1,19 @@
package com.nflg.product.bomnew.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nflg.product.bomnew.mapper.master.BomNewEbomMaterialUseMapper;
import com.nflg.product.bomnew.pojo.entity.BomNewEbomMaterialUseEntity;
import org.springframework.stereotype.Service;
/**
* t_bom_new_ebom_material_use 表服务实现类
*
*
* @author makejava
* @since 2023-12-17 11:27:05
*/
@Service
public class BomNewEbomMaterialUseService extends ServiceImpl<BomNewEbomMaterialUseMapper, BomNewEbomMaterialUseEntity> {
}

View File

@ -21,9 +21,7 @@ import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
import com.nflg.product.bomnew.pojo.dto.BomNewEBomCreateDTO;
import com.nflg.product.bomnew.pojo.dto.BomNewEBomRevertDTO;
import com.nflg.product.bomnew.pojo.dto.VirtualPackageParamDto;
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
import com.nflg.product.bomnew.pojo.entity.BomNewOriginalParentEntity;
import com.nflg.product.bomnew.pojo.entity.*;
import com.nflg.product.bomnew.pojo.query.BomNewEbomParentQuery;
import com.nflg.product.bomnew.pojo.query.OriginalBomQuery;
import com.nflg.product.bomnew.pojo.vo.BaseMaterialVO;
@ -35,10 +33,7 @@ import com.nflg.product.bomnew.service.domain.EBom.EbomInitProjectType;
import com.nflg.product.bomnew.service.domain.EBom.VirtualPackageBase;
import com.nflg.product.bomnew.service.domain.EBom.VirtualPackageFor31;
import com.nflg.product.bomnew.service.domain.OriginalBom.OriginalBomDetailTask;
import com.nflg.product.bomnew.util.EecExcelUtil;
import com.nflg.product.bomnew.util.ListCommonUtil;
import com.nflg.product.bomnew.util.MaterialshouldBomExistUtil;
import com.nflg.product.bomnew.util.VUtils;
import com.nflg.product.bomnew.util.*;
import nflg.product.common.constant.STATE;
import nflg.product.common.vo.ResultVO;
import org.apache.ibatis.annotations.Param;
@ -81,20 +76,133 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
@Qualifier(value = "getBomDetailPool")
private ForkJoinPool bomDetailPool;
@Resource
private UserRoleService userRoleService;
@Resource
private BomNewEbomMaterialUseService bomNewEbomMaterialUseService;
/**
* 获取列表
*
* @param query
* @return
*/
public Page<BomNewEbomParentVO> getListPage(BomNewEbomParentQuery query) {
Page<BomNewEbomParentVO> result = this.getBaseMapper().getEBomListPage(new Page<>(query.getPage(), query.getPageSize()), query);
public Page<TreeNode<BomNewEbomParentVO>> workDetailsListByPage(BomNewEbomParentQuery query) {
Page<TreeNode<BomNewEbomParentVO>> returnResult = new Page<>();
//物料编码搜索或图号搜索
if(StrUtil.isNotBlank(query.getMaterialNo()) || StrUtil.isNotBlank(query.getDrawingNo())) {
String materialNo=query.getMaterialNo();
if(StrUtil.isBlank(materialNo)){
List<MaterialMainEntity> materialList = materialMainService.lambdaQuery().eq(MaterialMainEntity::getDrawingNo, query.getDrawingNo()).list();
if(CollUtil.isNotEmpty(materialList)){
materialNo=materialList.get(0).getMaterialNo();
}
}
if(StrUtil.isNotBlank(materialNo)){
List<String> parentMaterialByMaterialNo = getParentMaterialByMaterialNo(materialNo, !userRoleService.technician());
List<BomNewEbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(parentMaterialByMaterialNo);
List<BomNewEbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(parentMaterialByMaterialNo);
returnResult= handSeachToTree(parents,childs);
}
}else {
Page<BomNewEbomParentVO> result = this.getBaseMapper().getEBomListPage(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode());
materialMainService.intiMaterialInfo(result.getRecords());
Page<TreeNode<BomNewEbomParentVO>> resutlData = new Page<>();
BeanUtil.copyProperties(result, resutlData);
resutlData.setRecords(handNodeToTree(result.getRecords()));
returnResult= resutlData;
}
return returnResult;
}
private Page<TreeNode<BomNewEbomParentVO>> handSeachToTree(List<BomNewEbomParentVO> parents, List<BomNewEbomParentVO> childs){
Page<TreeNode<BomNewEbomParentVO>> resutlData = new Page<>();
Set<String> parentSet = parents.stream().map(u -> u.getMaterialNo()).collect(Collectors.toSet());
Set<String> childSet = childs.stream().map(u -> u.getMaterialNo()).collect(Collectors.toSet());
Set<String> difference = Sets.difference(parentSet, childSet);
List<BomNewEbomParentVO> resultParents = parents.stream().filter(u -> difference.contains(u.getMaterialNo())).collect(Collectors.toList());
resutlData.setTotal(difference.size());
resutlData.setSize(difference.size());
resutlData.setPages(1);
resutlData.setCurrent(1L);
List<BomNewEbomParentVO> all=new ArrayList<>();
all.addAll(parents);
all.addAll(childs);
List<TreeNode<BomNewEbomParentVO>> result=new ArrayList<>();
for (BomNewEbomParentVO vo : resultParents) {
result.addAll( TreeUtils.toTree(vo.getRowId(), all, BomNewEbomParentVO::getParentRowId, BomNewEbomParentVO::getBomRowId));
}
resutlData.setRecords(result);
return resutlData;
}
private List<TreeNode<BomNewEbomParentVO>> handNodeToTree(List<BomNewEbomParentVO> list){
List<TreeNode<BomNewEbomParentVO>> result=new ArrayList<>();
for (BomNewEbomParentVO vo : list) {
TreeNode<BomNewEbomParentVO> treeData= new TreeNode<>();
treeData.setData(vo);
result.add(treeData);
}
return result;
}
/**
* 获取物料所有父节点
* @param materialNo
* @return
*/
private List<String> getParentMaterialByMaterialNo(String materialNo , Boolean selfIs) {
BomNewEbomMaterialUseEntity materialBom = bomNewEbomMaterialUseService.lambdaQuery().eq(BomNewEbomMaterialUseEntity::getMaterialNo, materialNo).one();
List<String> result = new ArrayList<>();
if (Objects.nonNull(materialBom) && StrUtil.isNotBlank(materialBom.getParentMaterialNo())) {
Set<String> relSkuNo = Sets.newHashSet(StrUtil.split(materialBom.getParentMaterialNo(), ","));
if(selfIs && CollUtil.isNotEmpty(relSkuNo)){
relSkuNo=getSelfMaterialNo(relSkuNo);
}
while (CollUtil.isNotEmpty(relSkuNo)) {
result.addAll(relSkuNo);
List<BomNewEbomMaterialUseEntity> relSkuList = bomNewEbomMaterialUseService.lambdaQuery().in(BomNewEbomMaterialUseEntity::getMaterialNo, relSkuNo).list();
relSkuNo.clear();
Set<String> finalRelSkuNo = relSkuNo;
relSkuList.forEach(k -> {
if (StrUtil.isNotBlank(k.getParentMaterialNo())) {
finalRelSkuNo.addAll(Sets.newHashSet(StrUtil.split(k.getParentMaterialNo(), ",")) );
}
});
relSkuNo=finalRelSkuNo;
if(CollUtil.isNotEmpty(relSkuNo) && selfIs){
relSkuNo=getSelfMaterialNo(relSkuNo);
}
}
}
return result;
}
private Set<String> getSelfMaterialNo(Set<String> relSkuNo){
Set<String> selfParentMaterialNo = this.getBaseMapper().getSelfParentMaterialNo(SessionUtil.getUserCode(), relSkuNo);
return selfParentMaterialNo;
}
/**
* 正式工作表
* @param query
* @return
*/
public Page<BomNewEbomParentVO> formalWorksheet(BomNewEbomParentQuery query) {
Page<BomNewEbomParentVO> result = this.getBaseMapper().formalWorksheet(new Page<>(query.getPage(), query.getPageSize()), query);
materialMainService.intiMaterialInfo(result.getRecords());
return result;
}
/**
* 获取子级
*
@ -117,12 +225,15 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
child.setStatus(parentEntity.getStatus());
child.setDeviseName(parentEntity.getDeviseName());
child.setDeviseUserCode(parentEntity.getDeviseUserCode());
child.setCreatedBy(parentEntity.getCreatedBy());
//child.setCreatedBy(parentEntity.getCreatedBy());
child.setCreatedTime(parentEntity.getCreatedTime());
child.setBomRowId(parentEntity.getRowId());
child.setLevelNum(parentEntity.getLevelNum());
child.setDeptName(parentEntity.getDeptName());
child.setSource(parentEntity.getSource());
if(parentEntity.getStatus().equals(EBomStatusEnum.PUBLISHED.getValue())){
child.setStatus(OriginalStatusEnum.BORROWED_PARTS.getValue());
}
} else { //无BOM-版本时 确定版本号

View File

@ -11,10 +11,12 @@ import com.nflg.product.bomnew.pojo.entity.OptionalMbomMaterialEntity;
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialListVO;
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
@ -24,13 +26,21 @@ import java.util.List;
public class OptionalMbomMaterialService extends ServiceImpl<OptionalMbomMaterialMapper, OptionalMbomMaterialEntity> {
public IPage<OptionalMbomMaterialVO> getListPage(OptionalMbomMaterialListQuery query) {
IPage<OptionalMbomMaterialVO> list = this.getBaseMapper().getListPage(new Page<>(query.getPage(), query.getPageSize()), query);
@Resource
MaterialMainService materialMainService;
public Page<OptionalMbomMaterialListVO> getListPage(OptionalMbomMaterialListQuery query) {
Page<OptionalMbomMaterialListVO> list = this.getBaseMapper().getListPage(new Page<>(query.getPage(), query.getPageSize()), query);
materialMainService.intiMaterialInfo(list.getRecords());
return list;
}
public List<OptionalMbomMaterialVO> getChild(Long rowId) {
return this.getBaseMapper().getChild(rowId);
public List<OptionalMbomMaterialListVO> getChild(Long rowId) {
List<OptionalMbomMaterialListVO> list= this.getBaseMapper().getChild(rowId);
materialMainService.intiMaterialInfo(list);
return list;
}

View File

@ -0,0 +1,54 @@
package com.nflg.product.bomnew.service;
import com.nflg.product.base.core.conmon.util.SessionUtil;
import com.nflg.product.bomnew.constant.EBomConstant;
import com.nflg.product.bomnew.constant.UserJobEnum;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@Service
public class UserRoleService {
@Resource
MaterialMainService materialMainService;
public List<String> getUserPost(){
return materialMainService.getBaseMapper().getUserPost(SessionUtil.getRowId());
}
/**
* 是否设计人员
* @return
*/
public Boolean designer(){
return getUserPost().contains(EBomConstant.DESIGNER);
}
/**
* 是否工艺
* @return
*/
public Boolean technician(){
return getUserPost().contains(EBomConstant.TECHNICIAN);
}
/**
* 获取用户岗位
* @return
*/
public Integer getUserJob(){
return 1;
// return technician()? UserJobEnum.ENGINEER.getValue():UserJobEnum.DESIGNER.getValue();
}
}

View File

@ -16,10 +16,7 @@ import com.nflg.product.bomnew.pojo.entity.OptionalEbomImportChildEntity;
import com.nflg.product.bomnew.pojo.entity.OptionalEbomMainEntity;
import com.nflg.product.bomnew.pojo.query.OptionalEbomImportChildQuery;
import com.nflg.product.bomnew.pojo.vo.*;
import com.nflg.product.bomnew.service.OptionalEbomConfigService;
import com.nflg.product.bomnew.service.OptionalEbomImportChildService;
import com.nflg.product.bomnew.service.OptionalEbomImportService;
import com.nflg.product.bomnew.service.OptionalEbomMainService;
import com.nflg.product.bomnew.service.*;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -41,6 +38,8 @@ public class AggregOptionConfigService {
@Resource
private OptionalEbomConfigService optionalEbomConfigService;
@Resource
MaterialMainService materialMainService;
/**
* 递归方法转换成树形结构

View File

@ -1,6 +1,7 @@
package com.nflg.product.bomnew.service.domain.EBom;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@ -12,6 +13,7 @@ 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.BomNewEbomChildService;
import com.nflg.product.bomnew.service.BomNewEbomParentService;
import com.nflg.product.bomnew.service.MaterialService;
import com.nflg.product.bomnew.util.VersionUtil;
@ -23,6 +25,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 生成虚拟包基类
@ -100,6 +103,25 @@ public abstract class VirtualPackageBase {
return SpringUtil.getBean(BomNewEbomParentService.class).getChild(bomRowId);
}
protected BomNewEbomParentEntity getParentZhiZuo(){
List<BomNewEbomChildEntity> list = SpringUtil.getBean(BomNewEbomChildService.class).lambdaQuery().eq(BomNewEbomChildEntity::getParentRowId, bomRowId).list();
List<BomNewEbomChildEntity> zhiZuo = list.stream().filter(u -> u.getMaterialName().contains("制作")).collect(Collectors.toList());
if(CollUtil.isNotEmpty(zhiZuo)){
String materialNo=zhiZuo.get(0).getMaterialNo();
return SpringUtil.getBean(BomNewEbomParentService.class).lambdaQuery().eq(BomNewEbomParentEntity::getMaterialNo,materialNo)
.eq(BomNewEbomParentEntity::getLastVersionIs,1).one();
}
return null;
}
/**
* 获取父节点
* @return
*/
protected BomNewEbomParentEntity getParentByRowId(Long rowId){
return SpringUtil.getBean(BomNewEbomParentService.class).getById(rowId);
}
/**
* 生成虚拟包
*/

View File

@ -11,6 +11,8 @@ import nflg.product.common.constant.STATE;
import java.io.IOException;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 31物料生成虚拟包
@ -33,22 +35,27 @@ public class VirtualPackageFor21 extends VirtualPackageBase {
@Override
public void generateVirtualPackage() throws IOException {
BomNewEbomParentEntity parent = SpringUtil.getBean(BomNewEbomParentService.class).lambdaQuery().eq(BomNewEbomParentEntity::getRowId, bomRowId).one();
BomNewEbomParentEntity parent = getParentByRowId(bomRowId);
BomNewEbomParentEntity makingPackage=null;
if((parent.getVirtrualPackageEnum()| VirtualPackageTypeEnum.MAKING_PACKAGE.getValue())!=VirtualPackageTypeEnum.MAKING_PACKAGE.getValue()) {
//构建构建发货包下制作包
BomNewEbomParentEntity makingPackage = buildParentVirtualPackage(parent.getDrawingNo(), parent.getMaterialName(), VirtualPackageTypeEnum.MAKING_PACKAGE);
makingPackage = buildParentVirtualPackage(parent.getDrawingNo(), parent.getMaterialName(), VirtualPackageTypeEnum.MAKING_PACKAGE);
//构建构建发货包下直发
BomNewEbomParentEntity directDeliveryPackage = buildParentVirtualPackage(parent.getDrawingNo(), parent.getMaterialName(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE);
//构建产品-子级为制作包合直发包
buildChild(makingPackage, bomRowId, "001", VirtualPackageTypeEnum.MAKING_PACKAGE);
buildChild(directDeliveryPackage, bomRowId, "002", VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE);
}
if(virtualPackageValue.contains(VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getValue()) && (parent.getVirtrualPackageEnum()| VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getValue())!=VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getValue()) {
//构建构建发货前装配包
if(Objects.isNull(makingPackage)){
makingPackage=getParentZhiZuo();
}
BomNewEbomParentEntity preAssemblyPackage = buildParentVirtualPackage(parent.getDrawingNo(), parent.getMaterialName(), VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
buildChild(preAssemblyPackage, makingPackage.getRowId(), "001", VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
}
List<BomNewEbomParentVO> child = getChild();
//将产品子级放制作包下
for (BomNewEbomParentVO item : child) {
@ -59,6 +66,8 @@ public class VirtualPackageFor21 extends VirtualPackageBase {
this.childResult.add(itemUp);
}
parent.setVirtrualPackageEnum(virtualPackageValue.stream().collect(Collectors.summingInt(u->u)));
parentResult.add(parent);
}

View File

@ -6,6 +6,7 @@ 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.util.EnumUtils;
import com.nflg.product.bomnew.util.VUtils;
import nflg.product.common.constant.STATE;
import java.util.List;
@ -31,7 +32,10 @@ public class VirtualPackageFor31 extends VirtualPackageBase {
*/
@Override
public void generateVirtualPackage() {
List<BomNewEbomParentVO> child = getChild();
BomNewEbomParentEntity parent = getParentByRowId(bomRowId);
VUtils.isTure(parent.getVirtrualPackageEnum()>0).throwMessage("已生成虚拟包无需重复生成");
try {
for (BomNewEbomParentVO item : child) {
//构建发货包
@ -55,6 +59,9 @@ public class VirtualPackageFor31 extends VirtualPackageBase {
this.childResult.add(itemUp);
}
parent.setVirtrualPackageEnum(VirtualPackageTypeEnum.getAll());
this.parentResult.add(parent);
}catch (Exception ex) {
throw new NflgBusinessException(STATE.BusinessError, ex.getMessage());
}

View File

@ -10,10 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
import com.nflg.product.base.core.conmon.util.SessionUtil;
import com.nflg.product.bomnew.constant.EBomSourceEnum;
import com.nflg.product.bomnew.constant.OriginalConstant;
import com.nflg.product.bomnew.constant.OriginalSourceEnum;
import com.nflg.product.bomnew.constant.OriginalStatusEnum;
import com.nflg.product.bomnew.constant.*;
import com.nflg.product.bomnew.mapper.master.BomNewEbomChildMapper;
import com.nflg.product.bomnew.mapper.master.MaterialMainMapper;
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
@ -25,6 +22,7 @@ import com.nflg.product.bomnew.pojo.vo.BomOriginalPlmBomVO;
import com.nflg.product.bomnew.pojo.vo.MaterialMateVO;
import com.nflg.product.bomnew.service.BomNewEbomParentService;
import com.nflg.product.bomnew.service.MaterialMainService;
import com.nflg.product.bomnew.service.UserRoleService;
import com.nflg.product.bomnew.util.ListCommonUtil;
import com.nflg.product.bomnew.util.VUtils;
import com.nflg.product.bomnew.util.VersionUtil;
@ -83,8 +81,6 @@ public class OriginalBomToEBomConvert extends BaseConvert {
hanlerDo(childParent);
this.hasHandlerParentIds.add(childParent.getBomRowId());
}
}
@ -94,7 +90,7 @@ public class OriginalBomToEBomConvert extends BaseConvert {
}
//子节点
List<BomOriginalListVO> parentChild = bomDetail.stream().filter(u -> Objects.nonNull(u.getParentRowId()) && u.getParentRowId().equals(parentEnt.getBomRowId())).collect(Collectors.toList());
//List<BomOriginalListVO> parentChildNoMaterilaNoList = parentChild.stream().filter(u -> StrUtil.isBlank(u.getMaterialNo())).collect(Collectors.toList());
List<BomOriginalListVO> parentChildNoMaterilaNoList = parentChild.stream().filter(u -> StrUtil.isBlank(u.getMaterialNo())).collect(Collectors.toList());
//无编码
if (StrUtil.isBlank(parentEnt.getMaterialNo())) {
@ -103,7 +99,7 @@ public class OriginalBomToEBomConvert extends BaseConvert {
if(StrUtil.isNotBlank(parentEnt.getDrawingNo())) {
SpringUtil.getBean(MaterialMainService.class).initMaterialForDrawdingNo(ImmutableList.of(parentEnt), BomOriginalListVO::getDrawingNo, BomOriginalListVO::setMaterialNo, BomOriginalListVO::setMaterialName);
//子级初始化物料编码
// SpringUtil.getBean(MaterialMainService.class).initMaterialForDrawdingNo(parentChildNoMaterilaNoList, BomOriginalListVO::getDrawingNo, BomOriginalListVO::setMaterialNo, BomOriginalListVO::setMaterialName);
SpringUtil.getBean(MaterialMainService.class).initMaterialForDrawdingNo(parentChildNoMaterilaNoList, BomOriginalListVO::getDrawingNo, BomOriginalListVO::setMaterialNo, BomOriginalListVO::setMaterialName);
}
//合并相同编码的物料
List<BomOriginalListVO> mergeResult = mergeBOM(parentChild);
@ -151,10 +147,7 @@ public class OriginalBomToEBomConvert extends BaseConvert {
newChild.setParentRowId(parentRowId);
this.eBomChildResult.add(newChild);
}
}
}
}}
} else {
buildEBomParent(parentEnt);
}
@ -222,7 +215,6 @@ public class OriginalBomToEBomConvert extends BaseConvert {
}
/**
* 构建EBom父级
*/
@ -239,6 +231,9 @@ public class OriginalBomToEBomConvert extends BaseConvert {
eBomParent.setLastVersionIs(1);
eBomParent.setModifyTime(LocalDateTime.now());
eBomParent.setBomExist(parentEnt.getBomRowId()>0?1:0);
//工艺岗直接到已复核
eBomParent.setStatus(SpringUtil.getBean(UserRoleService.class).technician()? EBomStatusEnum.CHECKED.getValue():EBomStatusEnum.WAIT_CHECK.getValue());
eBomParent.setCreatedJob(SpringUtil.getBean(UserRoleService.class).technician()?UserJobEnum.ENGINEER.getValue():UserJobEnum.DESIGNER.getValue());
if (Objects.nonNull(ebom)) {
ebom.setLastVersionIs(0);
this.eBomParentResult.add(ebom);
@ -281,7 +276,7 @@ public class OriginalBomToEBomConvert extends BaseConvert {
Integer numResult=0;
BigDecimal totalWeightResult=BigDecimal.ZERO;
for (BomOriginalListVO item : list1) {
numResult+= Objects.nonNull(item.getNum()) ? item.getNum() : 0;
numResult =Objects.nonNull(item.getNum()) ? item.getNum() : 0;
totalWeightResult=NumberUtil.add(totalWeightResult, item.getTotalWeight());
}
one.setNum(numResult);

View File

@ -47,4 +47,15 @@
join t_bom_new_ebom_child b on a.row_id = b.parent_row_id and a.material_no = #{materialNo}
and a.last_version_is = 1
</select>
<update id="updateEBomMaterialUse">
SET @@global.group_concat_max_len=804800;
delete from t_bom_new_ebom_material_use;
INSERT INTO `t_bom_new_ebom_material_use` (`row_id`, `material_no`, `parent_material_no`)
select min(b.row_id) rowId, b.material_no, GROUP_CONCAt( distinct a.material_no) as value_list
from t_bom_new_ebom_parent a
join t_bom_new_ebom_child b on a.row_id=b.parent_row_id and a.last_version_is=1
group by b.material_no ;
</update>
</mapper>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nflg.product.bomnew.mapper.master.BomNewEbomMaterialUseMapper">
<resultMap id="BaseResultMap" type="com.nflg.product.bomnew.pojo.entity.BomNewEbomMaterialUseEntity">
<!--@mbg.generated-->
<!--@Table t_bom_new_ebom_material_use -->
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
<result column="material_no" property="materialNo" jdbcType="VARCHAR"/>
<result column="parent_material_no" property="parentMaterialNo" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
row_id, material_no, parent_material_no </sql>
</mapper>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper">
<resultMap id="BaseResultMap" type="com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity">
<!--@mbg.generated-->
<!--@Table t_bom_new_ebom_parent -->
@ -22,6 +21,7 @@
<result column="project_type" property="projectType" jdbcType="VARCHAR"/>
<result column="project_type_input_type" property="projectTypeInputType" jdbcType="INTEGER"/>
<result column="root_is" property="rootIs" jdbcType="INTEGER"/>
<result column="virtrual_package_enum" property="virtrualPackageEnum"/>
<result column="should_bom_exist" property="shouldBomExist" jdbcType="INTEGER"/>
<result column="super_material_status" property="superMaterialStatus" jdbcType="INTEGER"/>
<result column="bom_exist" property="bomExist" jdbcType="INTEGER"/>
@ -55,7 +55,14 @@
<sql id="Base_Column_List">
<!--@mbg.generated-->
row_id, batch_no, drawing_no, material_no, order_number, material_name, material_desc, material_texture, material_unit, unit_weight, total_weight, current_version, num, source, project_type, project_type_input_type, root_is, should_bom_exist, super_material_status, bom_exist, last_version_is, edit_status, status, user_root_is, exception_status,virtual_package_is, source_row_id, devise_user_code, devise_name, created_by, created_time, created_job, audit_time, audit_user_name, release_time, release_user_name, revert_time, revert_user_name, expire_end_time, convert_to_ebom_time, remark, dept_name, level_num, change_desc, notice_nums, modify_time </sql>
row_id, batch_no, drawing_no, material_no, order_number, material_name, material_desc, material_texture,
material_unit, unit_weight, total_weight, current_version, num, source, project_type, project_type_input_type,
root_is,virtrual_package_enum, should_bom_exist, super_material_status, bom_exist, last_version_is, edit_status,
status, user_root_is, exception_status,virtual_package_is, source_row_id, devise_user_code, devise_name,
created_by, created_time, created_job, audit_time, audit_user_name, release_time, release_user_name,
revert_time, revert_user_name, expire_end_time, convert_to_ebom_time, remark, dept_name, level_num, change_desc,
notice_nums, modify_time
</sql>
<sql id="whr">
<if test="query.drawingNo!=null and query.drawingNo!=''">
@ -70,16 +77,48 @@
<if test="query.startDate!=null and query.startDate!=''">
and created_time between #{query.startDate} and #{query.endDate}
</if>
<if test="query.dataType==0">
and status=1 or status=3
</if>
<if test="query.dataType==1">
and status=2 or status=4
</if>
</sql>
<!--Ebom工作列表-->
<select id="getEBomListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
select * from t_bom_new_ebom_parent where true
<if test="job==0">
select * from t_bom_new_ebom_parent where status=1 and created_by=#{createdBy} and user_root_is=1 and
(status=1 or status=3)
<include refid="whr"/>
</if>
<if test="job==1">
select * from t_bom_new_ebom_parent where status=2 and user_root_is=1 and ( status=2 or status=4 )
<include refid="whr"/>
</if>
</select>
<!--物料编码搜索-父级-->
<select id="getParentForMaterialNoSeach" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
SELECT created_by as bomCreatedBy , row_id as bomRowId, row_id as childBomRowId, a.*
FROM t_bom_new_ebom_parent a where a.last_version_is=1 and material_no in
<foreach collection="materialNoList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!--物料编码搜索-子级-->
<select id="getChildForMaterialNoSeach" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
select if(c.status=4,99,c.status) as status ,c.current_version c.created_by as bomCreatedBy ,c.devise_name,c.devise_user_code,c.dept_name ,
c.source, c.row_id as bomRowId, c.row_id as childBomRowId, b.*
from t_bom_new_ebom_parent a
join t_bom_new_ebom_child b on a.row_id =b.parent_row_id
left join t_bom_new_ebom_parent c on b.material_no=c.material_no and c.last_version_is=1
where a.last_version_is=1 and a.material_no in
<foreach collection="materialNoList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!--BOM-正式工作表-->
<select id="formalWorksheet" resultType="com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO">
select row_id as bomRowId, * from t_bom_new_ebom_parent where 1=1
<include refid="whr"/>
</select>
@ -98,14 +137,22 @@
<foreach collection="rowIds" item="rowId" open="(" separator="," close=")">
#{rowId}
</foreach>
</select>
<!--统计物料历史项目类别-->
<select id="getMaterialHistoryProjectType" resultType="com.nflg.product.bomnew.pojo.vo.MaterialHistoryProjectTypeVO">
select b.project_type, COUNT(1) projectCount from t_bom_new_ebom_parent a
<select id="getMaterialHistoryProjectType"
resultType="com.nflg.product.bomnew.pojo.vo.MaterialHistoryProjectTypeVO">
select b.project_type, COUNT(1) projectCount
from t_bom_new_ebom_parent a
join t_bom_new_ebom_child b on a.row_id = b.parent_row_id and a.last_version_is = 1
where b.material_no=#{materialNo} group by b.project_type order by projectCount limit 1
where b.material_no = #{materialNo}
group by b.project_type
order by projectCount limit 1
</select>
<select id="getSelfParentMaterialNo" resultType="java.lang.String">
select material_no from t_bom_new_ebom_parent where last_version_is=1 and created_by=#{createdBy} material_no in
<foreach collection="list" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper>

View File

@ -70,9 +70,9 @@
<select id="getMaterialBaseInfo" resultType="com.nflg.product.bomnew.pojo.vo.BaseMaterialVO">
select row_id as materialRowId, material_no, material_name, material_desc, procure_type, project_type, material_state,drawing_no,material_category_code ,material_get_type,drawing_no
,material_texture as material ,material_texture
from t_material_main
select a.row_id as materialRowId, material_no, material_name, material_desc, procure_type, project_type, material_state,drawing_no,a.material_category_code ,material_get_type,drawing_no
,material_texture as material ,material_texture , b.rel_category_code
from t_material_main a join t_material_category b on a.material_category_code=b.category_code
where material_no in
<foreach collection="materialNos" item="item" open="(" close=")" separator=",">
#{item}
@ -116,4 +116,10 @@
#{item}
</foreach>
</select>
<!--获取用户角色-->
<select id="getUserPost" resultType="java.lang.String">
SELECT distinct b.post_name from t_authority_role_user a
join t_authority_role_post b on a.role_row_id=b.role_row_id where a.user_row_id=#{userRowId}
</select>
</mapper>

View File

@ -47,7 +47,7 @@ row_id,parent_row_id,level_row_id,material_no,material_name,material_desc,drawin
<!-- order by t1.created_time DESC-->
<!-- </select>-->
<select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO" >
<select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialListVO" >
select
t1.*,t2.device_name,
t2.device_no,
@ -82,7 +82,7 @@ row_id,parent_row_id,level_row_id,material_no,material_name,material_desc,drawin
</select>
<select id="getChild" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialVO" >
<select id="getChild" resultType="com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialListVO" >
select
t1.*,t2.device_name,
t2.device_no,