Merge branch 'refs/heads/feature/DM/nflg-bom-dq' into dev
This commit is contained in:
commit
c4aea23972
|
|
@ -38,6 +38,7 @@ public class TestApi {
|
||||||
sapDto.setZID(RandomUtil.randomNumbers(5));
|
sapDto.setZID(RandomUtil.randomNumbers(5));
|
||||||
sapDto.setI_WERKS("1");
|
sapDto.setI_WERKS("1");
|
||||||
sapDto.setI_STLAN("1");
|
sapDto.setI_STLAN("1");
|
||||||
|
sapDto.setI_EMPNO("测试者");
|
||||||
List<T1DTO> t1s = new ArrayList<>();
|
List<T1DTO> t1s = new ArrayList<>();
|
||||||
T1DTO t1 = new T1DTO();
|
T1DTO t1 = new T1DTO();
|
||||||
t1.setID(RandomUtil.randomNumbers(5));
|
t1.setID(RandomUtil.randomNumbers(5));
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ package com.nflg.product.bomnew.pojo.dto.sap.impart2;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
@ -26,5 +24,7 @@ public class ImportSapParam2DTO {
|
||||||
@ApiModelProperty(" EBOM: 2;PBOM: P;MBOM: 1;移动破: 1")
|
@ApiModelProperty(" EBOM: 2;PBOM: P;MBOM: 1;移动破: 1")
|
||||||
private String I_STLAN;
|
private String I_STLAN;
|
||||||
|
|
||||||
|
//创建者
|
||||||
|
@ApiModelProperty("创建者")
|
||||||
|
private String I_EMPNO;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ public class ImportSapParamDTO {
|
||||||
@ApiModelProperty(" EBOM: 2;PBOM: P;MBOM: 1;移动破: 1")
|
@ApiModelProperty(" EBOM: 2;PBOM: P;MBOM: 1;移动破: 1")
|
||||||
private String I_STLAN;
|
private String I_STLAN;
|
||||||
|
|
||||||
|
//创建者
|
||||||
|
@ApiModelProperty("创建者")
|
||||||
|
private String I_EMPNO;
|
||||||
|
|
||||||
@ApiModelProperty("详情")
|
@ApiModelProperty("详情")
|
||||||
private List<T1DTO> T1;
|
private List<T1DTO> T1;
|
||||||
|
|
|
||||||
|
|
@ -937,6 +937,11 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
sapDto.setZID(RandomUtil.randomNumbers(5));
|
sapDto.setZID(RandomUtil.randomNumbers(5));
|
||||||
sapDto.setI_WERKS("1");
|
sapDto.setI_WERKS("1");
|
||||||
sapDto.setI_STLAN("2");
|
sapDto.setI_STLAN("2");
|
||||||
|
UserInfoVO userInfoVO = SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(root.getCreatedBy());
|
||||||
|
if (Objects.isNull(userInfoVO)) {
|
||||||
|
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("用户[{}]不存在", root.getCreatedBy()));
|
||||||
|
}
|
||||||
|
sapDto.setI_EMPNO(userInfoVO.getRealName());
|
||||||
List<T1DTO> t1s = new ArrayList<>();
|
List<T1DTO> t1s = new ArrayList<>();
|
||||||
buildChildrenForSap(root, t1s);
|
buildChildrenForSap(root, t1s);
|
||||||
sapDto.setT1(t1s);
|
sapDto.setT1(t1s);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.BomConstant;
|
import com.nflg.product.bomnew.constant.BomConstant;
|
||||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||||
import com.nflg.product.bomnew.constant.EBomSuperMaterialStatusEnum;
|
import com.nflg.product.bomnew.constant.EBomSuperMaterialStatusEnum;
|
||||||
|
|
@ -22,6 +23,7 @@ import com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO;
|
||||||
import com.nflg.product.bomnew.pojo.vo.OperationErrorMsgVO;
|
import com.nflg.product.bomnew.pojo.vo.OperationErrorMsgVO;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.UserInfoVO;
|
||||||
import com.nflg.product.bomnew.service.domain.MBom.IndexListTree;
|
import com.nflg.product.bomnew.service.domain.MBom.IndexListTree;
|
||||||
import com.nflg.product.bomnew.util.VUtils;
|
import com.nflg.product.bomnew.util.VUtils;
|
||||||
import nflg.product.common.constant.STATE;
|
import nflg.product.common.constant.STATE;
|
||||||
|
|
@ -271,6 +273,11 @@ public class BomNewMbomParentService extends ServiceImpl<BomNewMbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
result.setI_STLAN(BomConstant.SAP_MBOM);
|
result.setI_STLAN(BomConstant.SAP_MBOM);
|
||||||
|
UserInfoVO userInfoVO = SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(parentVO.getCreatedBy());
|
||||||
|
if (Objects.isNull(userInfoVO)) {
|
||||||
|
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("用户[{}]不存在", parentVO.getCreatedBy()));
|
||||||
|
}
|
||||||
|
result.setI_EMPNO(userInfoVO.getRealName());
|
||||||
String dateYMD= DateUtil.format(new Date(),"yyyyMMdd");
|
String dateYMD= DateUtil.format(new Date(),"yyyyMMdd");
|
||||||
|
|
||||||
List<BomNewMbomMiddleVO> parentList=list.stream().filter(u -> u.getBomExist().intValue()>0).collect(Collectors.toList());
|
List<BomNewMbomMiddleVO> parentList=list.stream().filter(u -> u.getBomExist().intValue()>0).collect(Collectors.toList());
|
||||||
|
|
|
||||||
|
|
@ -1108,6 +1108,11 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
sapDto.setZID(RandomUtil.randomNumbers(5));
|
sapDto.setZID(RandomUtil.randomNumbers(5));
|
||||||
sapDto.setI_WERKS("1");
|
sapDto.setI_WERKS("1");
|
||||||
sapDto.setI_STLAN("1");
|
sapDto.setI_STLAN("1");
|
||||||
|
UserInfoVO userInfoVO = SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(root.getCreatedBy());
|
||||||
|
if (Objects.isNull(userInfoVO)) {
|
||||||
|
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("用户[{}]不存在", root.getCreatedBy()));
|
||||||
|
}
|
||||||
|
sapDto.setI_EMPNO(userInfoVO.getRealName());
|
||||||
List<T1DTO> t1s = new ArrayList<>();
|
List<T1DTO> t1s = new ArrayList<>();
|
||||||
buildChildrenForSap(root, t1s);
|
buildChildrenForSap(root, t1s);
|
||||||
sapDto.setT1(t1s);
|
sapDto.setT1(t1s);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.*;
|
import com.nflg.product.bomnew.constant.*;
|
||||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParamDTO;
|
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParamDTO;
|
||||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.T1DTO;
|
import com.nflg.product.bomnew.pojo.dto.sap.impart2.T1DTO;
|
||||||
|
|
@ -403,6 +404,11 @@ public class DQBomService {
|
||||||
sapDto.setZID(RandomUtil.randomNumbers(5));
|
sapDto.setZID(RandomUtil.randomNumbers(5));
|
||||||
sapDto.setI_WERKS("1");
|
sapDto.setI_WERKS("1");
|
||||||
sapDto.setI_STLAN("1");
|
sapDto.setI_STLAN("1");
|
||||||
|
UserInfoVO userInfoVO = SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(root.getCreatedBy());
|
||||||
|
if (Objects.isNull(userInfoVO)) {
|
||||||
|
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("用户[{}]不存在", root.getCreatedBy()));
|
||||||
|
}
|
||||||
|
sapDto.setI_EMPNO(userInfoVO.getRealName());
|
||||||
List<T1DTO> t1s = new ArrayList<>();
|
List<T1DTO> t1s = new ArrayList<>();
|
||||||
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
||||||
datas.forEach(d -> {
|
datas.forEach(d -> {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialListQuery;
|
||||||
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialQuery;
|
import com.nflg.product.bomnew.pojo.query.OptionalMbomMaterialQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.OperationErrorMsgVO;
|
import com.nflg.product.bomnew.pojo.vo.OperationErrorMsgVO;
|
||||||
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialListVO;
|
import com.nflg.product.bomnew.pojo.vo.OptionalMbomMaterialListVO;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.UserInfoVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import nflg.product.common.constant.STATE;
|
import nflg.product.common.constant.STATE;
|
||||||
import nflg.product.common.vo.ResultVO;
|
import nflg.product.common.vo.ResultVO;
|
||||||
|
|
@ -133,6 +134,11 @@ public class OptionalMbomMaterialService extends ServiceImpl<OptionalMbomMateria
|
||||||
result.setZID(RandomUtil.randomNumbers(5));
|
result.setZID(RandomUtil.randomNumbers(5));
|
||||||
result.setI_WERKS("1");
|
result.setI_WERKS("1");
|
||||||
result.setI_STLAN(BomConstant.SAP_YDBOM);
|
result.setI_STLAN(BomConstant.SAP_YDBOM);
|
||||||
|
UserInfoVO userInfoVO = SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(entity.getCreatedBy());
|
||||||
|
if (Objects.isNull(userInfoVO)) {
|
||||||
|
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("用户[{}]不存在", entity.getCreatedBy()));
|
||||||
|
}
|
||||||
|
result.setI_EMPNO(userInfoVO.getRealName());
|
||||||
|
|
||||||
String dateYMD=DateUtil.format(new Date(),"yyyyMMdd");
|
String dateYMD=DateUtil.format(new Date(),"yyyyMMdd");
|
||||||
for (OptionalMbomMaterialListVO parent:
|
for (OptionalMbomMaterialListVO parent:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue