fix: 调整发起变更后的数据设置
This commit is contained in:
parent
e6550b9cf0
commit
bb9c98c209
|
|
@ -12,7 +12,8 @@ public enum EBomSourceEnum implements ValueEnum<Integer> {
|
||||||
FROM_BOM(1, "原始BOM转换"),
|
FROM_BOM(1, "原始BOM转换"),
|
||||||
FROM_EXCE(2, "EXCE导入"),
|
FROM_EXCE(2, "EXCE导入"),
|
||||||
FROM_MDM(3, "MDM创建"),
|
FROM_MDM(3, "MDM创建"),
|
||||||
FROM_SAP(4, "从SAP导入");
|
FROM_SAP(4, "从SAP导入"),
|
||||||
|
FROM_CHANGE(5, "变更");
|
||||||
|
|
||||||
private final Integer value;
|
private final Integer value;
|
||||||
private final String description;
|
private final String description;
|
||||||
|
|
|
||||||
|
|
@ -1215,10 +1215,29 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
newParent.setChangeDesc(paramDTO.getChangeDesc());
|
newParent.setChangeDesc(paramDTO.getChangeDesc());
|
||||||
newParent.setNoticeNums(paramDTO.getNoticeNums());
|
newParent.setNoticeNums(paramDTO.getNoticeNums());
|
||||||
newParent.setStatus(EBomStatusEnum.WAIT_CHECK.getValue());
|
newParent.setStatus(EBomStatusEnum.WAIT_CHECK.getValue());
|
||||||
|
newParent.setEditStatus(EbomEditStatusEnum.HANDLER_CREATED.getValue());
|
||||||
newParent.setDeptRowId(SessionUtil.getDepartRowId());
|
newParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||||
newParent.setDeptName(SessionUtil.getDepartName());
|
newParent.setDeptName(SessionUtil.getDepartName());
|
||||||
|
newParent.setDeviseName(SessionUtil.getRealName());
|
||||||
|
newParent.setDeviseUserCode(SessionUtil.getUserCode());
|
||||||
|
newParent.setRemark("");
|
||||||
|
newParent.setSource(EBomSourceEnum.FROM_CHANGE.getValue());
|
||||||
|
newParent.setConvertToEbomTime(null);
|
||||||
|
newParent.setReleaseUserName(null);
|
||||||
|
newParent.setReleaseTime(null);
|
||||||
|
newParent.setRevertDesc(null);
|
||||||
|
newParent.setRevertTime(null);
|
||||||
|
newParent.setRevertUserName(null);
|
||||||
|
newParent.setAuditUserName(null);
|
||||||
|
newParent.setAuditTime(null);
|
||||||
newParent.setRootIs(1);
|
newParent.setRootIs(1);
|
||||||
newParent.setUserRootIs(1);
|
newParent.setUserRootIs(1);
|
||||||
|
newParent.setSapState(1);
|
||||||
|
newParent.setSapTime(null);
|
||||||
|
newParent.setModifyTime(null);
|
||||||
|
newParent.setCreatedTime(LocalDateTime.now());
|
||||||
|
newParent.setCreatedBy(SessionUtil.getUserCode());
|
||||||
|
newParent.setCreatedJob(userRoleService.technician() ? UserJobEnum.ENGINEER.getValue() : UserJobEnum.DESIGNER.getValue());
|
||||||
parent.setLastVersionIs(0);
|
parent.setLastVersionIs(0);
|
||||||
parentResult.add(newParent);
|
parentResult.add(newParent);
|
||||||
parentResult.add(parent);
|
parentResult.add(parent);
|
||||||
|
|
@ -1227,6 +1246,13 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
BeanUtil.copyProperties(childEnt, newChild);
|
BeanUtil.copyProperties(childEnt, newChild);
|
||||||
newChild.setRowId(IdWorker.getId());
|
newChild.setRowId(IdWorker.getId());
|
||||||
newChild.setParentRowId(newParent.getRowId());
|
newChild.setParentRowId(newParent.getRowId());
|
||||||
|
newChild.setIdentityNo(newParent.getRowId() + "_" + newChild.getRowId());
|
||||||
|
newChild.setCreatedBy(SessionUtil.getUserCode());
|
||||||
|
newChild.setCreatedTime(LocalDateTime.now());
|
||||||
|
newChild.setModifyTime(null);
|
||||||
|
newChild.setEditStatus(EbomEditStatusEnum.HANDLER_CREATED.getValue());
|
||||||
|
newChild.setSource(EBomSourceEnum.FROM_CHANGE.getValue());
|
||||||
|
newChild.setRemark("");
|
||||||
childResult.add(newChild);
|
childResult.add(newChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,15 @@ import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
|
import com.nflg.product.bomnew.constant.PBomEditStatusEnum;
|
||||||
import com.nflg.product.bomnew.constant.PBomStatusEnum;
|
import com.nflg.product.bomnew.constant.PBomStatusEnum;
|
||||||
import com.nflg.product.bomnew.constant.PbomSourceEnum;
|
import com.nflg.product.bomnew.constant.PbomSourceEnum;
|
||||||
|
import com.nflg.product.bomnew.constant.UserJobEnum;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildEntity;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentEntity;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO;
|
||||||
import com.nflg.product.bomnew.service.BomNewPbomParentService;
|
import com.nflg.product.bomnew.service.BomNewPbomParentService;
|
||||||
|
import com.nflg.product.bomnew.service.UserRoleService;
|
||||||
import com.nflg.product.bomnew.util.ListCommonUtil;
|
import com.nflg.product.bomnew.util.ListCommonUtil;
|
||||||
import com.nflg.product.bomnew.util.VUtils;
|
import com.nflg.product.bomnew.util.VUtils;
|
||||||
import com.nflg.product.bomnew.util.VersionUtil;
|
import com.nflg.product.bomnew.util.VersionUtil;
|
||||||
|
|
@ -87,12 +90,23 @@ public class PBomUpgrade {
|
||||||
pbomParent.setRowId(IdWorker.getId());
|
pbomParent.setRowId(IdWorker.getId());
|
||||||
pbomParent.setCreatedTime(LocalDateTime.now());
|
pbomParent.setCreatedTime(LocalDateTime.now());
|
||||||
pbomParent.setCreatedBy(SessionUtil.getUserCode());
|
pbomParent.setCreatedBy(SessionUtil.getUserCode());
|
||||||
pbomParent.setModifyTime(LocalDateTime.now());
|
|
||||||
pbomParent.setStatus(PBomStatusEnum.WAIT_PUBLISH.getValue());
|
pbomParent.setStatus(PBomStatusEnum.WAIT_PUBLISH.getValue());
|
||||||
|
pbomParent.setEditStatus(PBomEditStatusEnum.HANDLER_CREATED.getValue());
|
||||||
pbomParent.setCurrentVersion(VersionUtil.getNextVersion(parentVO.getCurrentVersion()));
|
pbomParent.setCurrentVersion(VersionUtil.getNextVersion(parentVO.getCurrentVersion()));
|
||||||
pbomParent.setModifyTime(LocalDateTime.now());
|
|
||||||
pbomParent.setDeptRowId(SessionUtil.getDepartRowId());
|
pbomParent.setDeptRowId(SessionUtil.getDepartRowId());
|
||||||
|
pbomParent.setDeptName(SessionUtil.getDepartName());
|
||||||
|
pbomParent.setDeviseName(SessionUtil.getRealName());
|
||||||
|
pbomParent.setDeviseUserCode(SessionUtil.getUserCode());
|
||||||
|
pbomParent.setTechnologyUserName(SessionUtil.getUserName());
|
||||||
|
pbomParent.setTechnologyUserCode(SessionUtil.getUserCode());
|
||||||
|
pbomParent.setRemark("");
|
||||||
pbomParent.setSource(PbomSourceEnum.FROM_CHANGE.getValue());
|
pbomParent.setSource(PbomSourceEnum.FROM_CHANGE.getValue());
|
||||||
|
pbomParent.setReleaseTime(null);
|
||||||
|
pbomParent.setReleaseUserName(null);
|
||||||
|
pbomParent.setSapState(1);
|
||||||
|
pbomParent.setSapTime(null);
|
||||||
|
pbomParent.setModifyTime(null);
|
||||||
|
pbomParent.setCreatedJob(SpringUtil.getBean(UserRoleService.class).technician() ? UserJobEnum.ENGINEER.getValue() : UserJobEnum.DESIGNER.getValue());
|
||||||
if (rootIs) {
|
if (rootIs) {
|
||||||
pbomParent.setRootIs(1);
|
pbomParent.setRootIs(1);
|
||||||
pbomParent.setUserRootIs(1);
|
pbomParent.setUserRootIs(1);
|
||||||
|
|
@ -118,10 +132,12 @@ public class PBomUpgrade {
|
||||||
BeanUtil.copyProperties(childVO, child);
|
BeanUtil.copyProperties(childVO, child);
|
||||||
child.setRowId(IdWorker.getId());
|
child.setRowId(IdWorker.getId());
|
||||||
child.setParentRowId(newParent.getRowId());
|
child.setParentRowId(newParent.getRowId());
|
||||||
|
child.setIdentityNo(newParent.getRowId() + "_" + child.getRowId());
|
||||||
child.setCreatedTime(LocalDateTime.now());
|
child.setCreatedTime(LocalDateTime.now());
|
||||||
child.setCreatedBy(SessionUtil.getRealName());
|
child.setCreatedBy(SessionUtil.getUserCode());
|
||||||
child.setModifyTime(LocalDateTime.now());
|
child.setModifyTime(null);
|
||||||
|
child.setSource(PbomSourceEnum.FROM_CHANGE.getValue());
|
||||||
|
child.setRemark("");
|
||||||
this.childResult.add(child);
|
this.childResult.add(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue