feat: 电气专用bom功能
This commit is contained in:
parent
f12a19cba4
commit
2f88516812
|
|
@ -6,6 +6,7 @@ import com.mzt.logapi.context.LogRecordContext;
|
||||||
import com.mzt.logapi.starter.annotation.LogRecord;
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import com.nflg.product.base.core.api.BaseApi;
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewDQbomPageQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewDQbomPageQuery;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.BomNewDQbomQuery;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewDQbomSaveQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewDQbomSaveQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomDQbomEditDetailVO;
|
import com.nflg.product.bomnew.pojo.vo.BomDQbomEditDetailVO;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO;
|
||||||
|
|
@ -25,6 +26,7 @@ import org.ttzero.excel.entity.Workbook;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -85,7 +87,7 @@ public class DQBomApi extends BaseApi {
|
||||||
@PostMapping("importBomSave")
|
@PostMapping("importBomSave")
|
||||||
@LogRecord(success = "电气BOM-确认导入,操作结果:{{#_ret}}", bizNo = "", type = "电气BOM导入")
|
@LogRecord(success = "电气BOM-确认导入,操作结果:{{#_ret}}", bizNo = "", type = "电气BOM导入")
|
||||||
public ResultVO importBomSave() {
|
public ResultVO importBomSave() {
|
||||||
dQBomService.checkException(dqBomImportService.save());
|
dqBomImportService.save();
|
||||||
return ResultVO.success();
|
return ResultVO.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,56 +127,56 @@ public class DQBomApi extends BaseApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异常检查
|
* 异常检查
|
||||||
* @param rootRowIds 顶级rowId
|
* @param bomRowIds bomRowId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("checkException")
|
@PostMapping("checkException")
|
||||||
@ApiOperation("异常检查")
|
@ApiOperation("异常检查")
|
||||||
public ResultVO<String> checkException(@RequestBody List<Long> rootRowIds) {
|
public ResultVO<String> checkException(@Valid @RequestBody @NotEmpty List<Long> bomRowIds) {
|
||||||
dQBomService.checkException(rootRowIds);
|
dQBomService.checkException(bomRowIds.get(0));
|
||||||
return ResultVO.success();
|
return ResultVO.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除bom
|
* 删除bom
|
||||||
* @param rowId rowId
|
* @param rootBomRowIds 顶级bom
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("deleteBom")
|
@PostMapping("deleteBom")
|
||||||
@ApiOperation("删除bom")
|
@ApiOperation("删除bom")
|
||||||
public ResultVO<String> deleteBom(@Valid @RequestBody @NotNull Long rowId) {
|
public ResultVO<String> deleteBom(@Valid @RequestBody @NotEmpty List<Long> rootBomRowIds) {
|
||||||
dQBomService.deleteBom(rowId);
|
dQBomService.deleteBom(rootBomRowIds.get(0));
|
||||||
return ResultVO.success();
|
return ResultVO.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出bom
|
* 导出bom
|
||||||
* @param rootBomRowId 顶级bom的rowId
|
* @param rootBomRowIds 顶级bom
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("exportBom")
|
@PostMapping("exportBom")
|
||||||
@ApiOperation("导出bom")
|
@ApiOperation("导出bom")
|
||||||
public ResultVO exportBom(@Valid @RequestBody @NotNull Long rootBomRowId) throws IOException {
|
public ResultVO exportBom(@Valid @RequestBody @NotEmpty List<Long> rootBomRowIds) throws IOException {
|
||||||
List<DQbomExcelVO> data = dQBomService.exportBom(rootBomRowId);
|
List<DQbomExcelVO> data = dQBomService.exportBom(rootBomRowIds.get(0));
|
||||||
EecExcelUtil.export(response, data, DQbomExcelVO.class, "专用bom正式表");
|
EecExcelUtil.export(response, data, DQbomExcelVO.class, "专用bom正式表");
|
||||||
return ResultVO.success();
|
return ResultVO.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成pbom
|
* 生成pbom
|
||||||
* @param rootBomRowId 顶级bom的rowId
|
* @param rootBomRowIds 顶级bom
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("convertToPbom")
|
@PostMapping("convertToPbom")
|
||||||
@ApiOperation("生成pbom")
|
@ApiOperation("生成pbom")
|
||||||
public ResultVO convertToPbom(@Valid @RequestBody @NotNull Long rootBomRowId) {
|
public ResultVO convertToPbom(@Valid @RequestBody @NotEmpty List<Long> rootBomRowIds) {
|
||||||
//TODO 生成pbom
|
dQBomService.convertToPbom(rootBomRowIds.get(0));
|
||||||
return ResultVO.error("暂未实现");
|
return ResultVO.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交
|
* 提交
|
||||||
* @param bomRowId 顶级bom的rowId
|
* @param query 保存的数据
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("submit")
|
@PostMapping("submit")
|
||||||
|
|
@ -186,25 +188,25 @@ public class DQBomApi extends BaseApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新物料行
|
* 更新物料行
|
||||||
* @param bomRowId bom的rowId
|
* @param query 要更新的数据
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("changeMaterial")
|
@PostMapping("changeMaterial")
|
||||||
@ApiOperation("更新物料行")
|
@ApiOperation("更新物料行")
|
||||||
public ResultVO changeMaterial(@Valid @RequestBody @NotNull Long bomRowId) {
|
public ResultVO<List<BomNewDQbomVO>> changeMaterial(@Valid @RequestBody @NotNull BomNewDQbomQuery query) {
|
||||||
//TODO 更新物料行
|
//return ResultVO.error("暂未实现");
|
||||||
return ResultVO.error("暂未实现");
|
return ResultVO.success(dQBomService.changeMaterial(query));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入到SAP
|
* 导入到SAP
|
||||||
* @param rootBomRowId 顶级bom的rowId
|
* @param rootBomRowIds 顶级bom的rowId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("importToSAP")
|
@PostMapping("importToSAP")
|
||||||
@ApiOperation("导入到SAP")
|
@ApiOperation("导入到SAP")
|
||||||
public ResultVO importToSAP(@Valid @RequestBody @NotNull Long rootBomRowId) {
|
public ResultVO importToSAP(@Valid @RequestBody @NotEmpty List<Long> rootBomRowIds) {
|
||||||
dQBomService.importToSAP(rootBomRowId);
|
dQBomService.importToSAP(rootBomRowIds.get(0));
|
||||||
return ResultVO.success();
|
return ResultVO.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public interface BomNewDQbomParentMapper extends BaseMapper<BomNewDQbomParentEnt
|
||||||
|
|
||||||
List<BomNewDQbomVO> getChildren(Long bomRowId);
|
List<BomNewDQbomVO> getChildren(Long bomRowId);
|
||||||
|
|
||||||
List<BomNewDQbomVO> getBom(String materialNo, String drawingNo, String materialName);
|
List<BomNewDQbomVO> getBom(int status, String materialNo, String drawingNo, String materialName);
|
||||||
|
|
||||||
List<BomNewDQbomVO> getVOById(Long parentRowId);
|
List<BomNewDQbomVO> getVOById(Long parentRowId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.nflg.product.bomnew.pojo.query;
|
||||||
|
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 曹鹏飞
|
||||||
|
* @date 2024/4/21 14:10:19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-query-BomNewDQbomQuery")
|
||||||
|
public class BomNewDQbomQuery implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "父级")
|
||||||
|
@NotNull
|
||||||
|
private BomNewDQbomVO parent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子级数据
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "子级数据")
|
||||||
|
private List<BomNewDQbomVO> datas;
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,12 @@ public class BomNewDQbomVO extends BomNewDQbomChildEntity implements Serializabl
|
||||||
@ApiModelProperty(value = "bom的创建人编号")
|
@ApiModelProperty(value = "bom的创建人编号")
|
||||||
private String bomCreateBy;
|
private String bomCreateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料信息表中的物料rowId
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主物料行id")
|
||||||
|
private Long materialRowId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料信息表中的物料名称
|
* 物料信息表中的物料名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -40,22 +46,39 @@ public class BomNewDQbomVO extends BomNewDQbomChildEntity implements Serializabl
|
||||||
/**
|
/**
|
||||||
* 物料类别
|
* 物料类别
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "物料类别")
|
@ApiModelProperty(value = "物料类别(系统)")
|
||||||
private String systemMaterialCategoryName;
|
private String systemMaterialCategoryName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料状态 1:激活 2:禁止采购 3:售后专用 4:冻结 5:完全弃用
|
* 物料状态 1:激活 2:禁止采购 3:售后专用 4:冻结 5:完全弃用
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "物料状态")
|
@ApiModelProperty(value = "物料状态(系统)")
|
||||||
private Integer systemMaterialState;
|
private Integer materialState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料信息表中的物料单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "物料单位(系统)")
|
||||||
|
private String systemMaterialUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料大类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "物料大类别")
|
||||||
|
private String relCategoryCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否跟节点 0-否 1-是
|
* 是否跟节点 0-否 1-是
|
||||||
*/
|
*/
|
||||||
@TableField(value = "root_is")
|
|
||||||
@ApiModelProperty(value = "是否跟节点")
|
@ApiModelProperty(value = "是否跟节点")
|
||||||
private Integer rootIs;
|
private Integer rootIs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否用户跟节点 0-否 1-是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否用户跟节点")
|
||||||
|
private Integer userRootIs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子级bom
|
* 子级bom
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ public class BomNewDQbomExceptionCheckService {
|
||||||
List<BomNewDQbomChildEntity> cc = children.stream()
|
List<BomNewDQbomChildEntity> cc = children.stream()
|
||||||
.filter(c -> Objects.equals(c.getParentRowId(), parent.getRowId()))
|
.filter(c -> Objects.equals(c.getParentRowId(), parent.getRowId()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
Set<String> cm = cc.stream().map(BomNewDQbomChildEntity::getMaterialNo).distinct().collect(Collectors.toSet());
|
Set<String> cm = cc.stream().map(BomNewDQbomChildEntity::getMaterialNo).collect(Collectors.toSet());
|
||||||
List<BomNewDQbomParentEntity> pp = parents.stream().filter(p -> cm.contains(p.getMaterialNo())).collect(Collectors.toList());
|
List<BomNewDQbomParentEntity> pp = parents.stream().filter(p -> cm.contains(p.getMaterialNo())).collect(Collectors.toList());
|
||||||
|
|
||||||
boolean hasError;
|
boolean hasError;
|
||||||
|
|
@ -123,6 +123,7 @@ public class BomNewDQbomExceptionCheckService {
|
||||||
|
|
||||||
private void checkParent(BomNewDQbomParentEntity parent) {
|
private void checkParent(BomNewDQbomParentEntity parent) {
|
||||||
EBomExceptionStatusEnum status = EBomExceptionStatusEnum.OK;
|
EBomExceptionStatusEnum status = EBomExceptionStatusEnum.OK;
|
||||||
|
if (parent.getRootIs() == 1 || parent.getUserRootIs() == 1) {
|
||||||
if ("T".equals(parent.getProjectType())) {
|
if ("T".equals(parent.getProjectType())) {
|
||||||
parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||||
} else if (parent.getMaterialNo().startsWith(BomConstant.MATERIAL_NO_TEMPORARY_PREFIX)) {
|
} else if (parent.getMaterialNo().startsWith(BomConstant.MATERIAL_NO_TEMPORARY_PREFIX)) {
|
||||||
|
|
@ -143,14 +144,13 @@ public class BomNewDQbomExceptionCheckService {
|
||||||
status = EBomExceptionStatusEnum.EXCEPT_NO_16;
|
status = EBomExceptionStatusEnum.EXCEPT_NO_16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//检查下级节点
|
//检查下级节点
|
||||||
boolean hasError = children.stream().anyMatch(c -> c.getParentRowId().equals(parent.getRowId())
|
boolean hasError = children.stream().anyMatch(c -> c.getParentRowId().equals(parent.getRowId())
|
||||||
&& !Objects.equals(c.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue()));
|
&& !Objects.equals(c.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue()));
|
||||||
if (status == EBomExceptionStatusEnum.OK && hasError) {
|
if (status == EBomExceptionStatusEnum.OK && hasError) {
|
||||||
status = EBomExceptionStatusEnum.EXCEPT_NO_14;
|
status = EBomExceptionStatusEnum.EXCEPT_NO_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent.setExceptionStatus(status.getValue());
|
parent.setExceptionStatus(status.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Struct;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
@ -330,7 +329,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
//排除项目类别的赋值
|
//排除项目类别的赋值
|
||||||
materialMainService.intiMaterialInfoInPattern(parentChild, "^21 | ^31", EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
materialMainService.intiMaterialInfoInPattern(parentChild, "^21 | ^31", EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
if (CollUtil.isNotEmpty(parentChild)) {
|
if (CollUtil.isNotEmpty(parentChild)) {
|
||||||
List<String> materialNos = parentChild.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialNo())).map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
List<String> materialNos = parentChild.stream().map(BaseMaterialVO::getMaterialNo).filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(materialNos)) {
|
if (CollUtil.isNotEmpty(materialNos)) {
|
||||||
List<BomNewEbomParentEntity> list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos)
|
List<BomNewEbomParentEntity> list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos)
|
||||||
.eq(!EBomStatusEnum.PUBLISHED.equalsValue(parent.getStatus()), BomNewEbomParentEntity::getLastVersionIs, 1)
|
.eq(!EBomStatusEnum.PUBLISHED.equalsValue(parent.getStatus()), BomNewEbomParentEntity::getLastVersionIs, 1)
|
||||||
|
|
@ -373,7 +372,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
child.setNoticeNums(parentEntity.getNoticeNums());
|
child.setNoticeNums(parentEntity.getNoticeNums());
|
||||||
child.setSuperMaterialStatus(parentEntity.getSuperMaterialStatus());
|
child.setSuperMaterialStatus(parentEntity.getSuperMaterialStatus());
|
||||||
|
|
||||||
if (parentEntity.getStatus().equals(EBomStatusEnum.PUBLISHED.getValue())) {
|
if (!Objects.equals(child.getStatus(), EBomStatusEnum.PUBLISHED.getValue())
|
||||||
|
&& parentEntity.getStatus().equals(EBomStatusEnum.PUBLISHED.getValue())) {
|
||||||
child.setStatus(EBomStatusEnum.BORROWED_PARTS.getValue());
|
child.setStatus(EBomStatusEnum.BORROWED_PARTS.getValue());
|
||||||
}
|
}
|
||||||
// //非本人则为借用件
|
// //非本人则为借用件
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.product.bomnew.service;
|
package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
|
@ -54,8 +55,11 @@ public class DQBomImportService {
|
||||||
@Resource
|
@Resource
|
||||||
UserRoleService userRoleService;
|
UserRoleService userRoleService;
|
||||||
|
|
||||||
|
// @Resource
|
||||||
|
// MaterialMainService materialMainService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
MaterialMainService materialMainService;
|
DQBomService dQBomService;
|
||||||
|
|
||||||
public List<OperationErrorMsgVO> importBom(MultipartFile file) throws IOException {
|
public List<OperationErrorMsgVO> importBom(MultipartFile file) throws IOException {
|
||||||
try {
|
try {
|
||||||
|
|
@ -72,6 +76,7 @@ public class DQBomImportService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Pair<List<BomNewDQbomParentEntity>, List<BomNewDQbomChildEntity>> pcs = convertToBom(datas);
|
Pair<List<BomNewDQbomParentEntity>, List<BomNewDQbomChildEntity>> pcs = convertToBom(datas);
|
||||||
|
VUtils.isTure(CollUtil.isEmpty(pcs.getLeft())).throwMessage("所有数据都已经导入过了,请勿重复导入");
|
||||||
try {
|
try {
|
||||||
checkInconsistentData(pcs.getLeft().get(0), pcs.getLeft(), pcs.getRight());
|
checkInconsistentData(pcs.getLeft().get(0), pcs.getLeft(), pcs.getRight());
|
||||||
} catch (NflgBusinessException ex) {
|
} catch (NflgBusinessException ex) {
|
||||||
|
|
@ -87,21 +92,21 @@ public class DQBomImportService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long save() {
|
public void save() {
|
||||||
Pair<List<BomNewDQbomParentEntity>, List<BomNewDQbomChildEntity>> pcs = BOMMAP.get(SessionUtil.getUserCode());
|
Pair<List<BomNewDQbomParentEntity>, List<BomNewDQbomChildEntity>> pcs = BOMMAP.get(SessionUtil.getUserCode());
|
||||||
VUtils.isTure(pcs == null).throwMessage("数据已丢失,请重新导入");
|
VUtils.isTure(pcs == null).throwMessage("数据已丢失,请重新导入");
|
||||||
BOMMAP.remove(SessionUtil.getUserCode());
|
BOMMAP.remove(SessionUtil.getUserCode());
|
||||||
return save(pcs.getLeft(), pcs.getRight());
|
save(pcs.getLeft(), pcs.getRight());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long save(List<BomNewDQbomParentEntity> parents, List<BomNewDQbomChildEntity> children) {
|
public void save(List<BomNewDQbomParentEntity> parents, List<BomNewDQbomChildEntity> children) {
|
||||||
// checkExceptionStatus(parents, children);
|
// checkExceptionStatus(parents, children);
|
||||||
dQBomParentService.setLastVersionIs0(parents.stream().map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList()));
|
dQBomParentService.setLastVersionIs0(parents.stream().map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList()));
|
||||||
dQBomParentService.saveBatch(parents);
|
dQBomParentService.saveBatch(parents);
|
||||||
dQBomChildService.saveBatch(children);
|
dQBomChildService.saveBatch(children);
|
||||||
BomNewDQbomParentEntity root = parents.stream().filter(p -> p.getRootIs() == 1).findFirst().orElseThrow(() -> new NflgBusinessException(STATE.BusinessError, "根节点不存在"));
|
BomNewDQbomParentEntity root = parents.stream().filter(p -> p.getRootIs() == 1).findFirst().orElseThrow(() -> new NflgBusinessException(STATE.BusinessError, "根节点不存在"));
|
||||||
return root.getRowId();
|
dQBomService.checkException(root.getRowId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void checkExceptionStatus(List<BomNewDQbomParentEntity> parents, List<BomNewDQbomChildEntity> children) {
|
// private void checkExceptionStatus(List<BomNewDQbomParentEntity> parents, List<BomNewDQbomChildEntity> children) {
|
||||||
|
|
@ -186,7 +191,8 @@ public class DQBomImportService {
|
||||||
.list()
|
.list()
|
||||||
.stream().findFirst().orElse(null)
|
.stream().findFirst().orElse(null)
|
||||||
);
|
);
|
||||||
if (parent == null && (count - 1 != index || datas.get(index + 1).getLevel() > data.getLevel())) {
|
//if (parent == null && (count - 1 != index || datas.get(index + 1).getLevel() > data.getLevel())) {
|
||||||
|
if (parent == null && count - 1 > index && datas.get(index + 1).getLevel() > data.getLevel()) {
|
||||||
parent = new BomNewDQbomParentEntity();
|
parent = new BomNewDQbomParentEntity();
|
||||||
parent.setRowId(IdWorker.getId());
|
parent.setRowId(IdWorker.getId());
|
||||||
parent.setLevel(data.getLevel());
|
parent.setLevel(data.getLevel());
|
||||||
|
|
@ -200,8 +206,8 @@ public class DQBomImportService {
|
||||||
parent.setTotalWeight(BomUtil.calculateTotalWeight(data.getNum(), data.getUnitWeight()));
|
parent.setTotalWeight(BomUtil.calculateTotalWeight(data.getNum(), data.getUnitWeight()));
|
||||||
parent.setProjectType(data.getProjectType());
|
parent.setProjectType(data.getProjectType());
|
||||||
parent.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
parent.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||||
parent.setRootIs(parentRowIdMap.containsKey(data.getLevel() - 1) ? 0 : 1);
|
parent.setRootIs(index == 0 ? 1 : 0);
|
||||||
parent.setUserRootIs(parentRowIdMap.containsKey(data.getLevel() - 1) ? 0 : 1);
|
parent.setUserRootIs(index == 0 ? 1 : 0);
|
||||||
parent.setLastVersionIs(1);
|
parent.setLastVersionIs(1);
|
||||||
parent.setEditStatus(1);
|
parent.setEditStatus(1);
|
||||||
parent.setStatus(1);
|
parent.setStatus(1);
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,8 @@ public class DQBomParentService extends ServiceImpl<BomNewDQbomParentMapper, Bom
|
||||||
.list();
|
.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BomNewDQbomVO> getBom(String materialNo, String drawingNo, String materialName) {
|
public List<BomNewDQbomVO> getBom(int status, String materialNo, String drawingNo, String materialName) {
|
||||||
return this.getBaseMapper().getBom(materialNo, drawingNo, materialName);
|
return this.getBaseMapper().getBom(status, materialNo, drawingNo, materialName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BomNewDQbomVO> getVOById(Long parentRowId) {
|
public List<BomNewDQbomVO> getVOById(Long parentRowId) {
|
||||||
|
|
|
||||||
|
|
@ -5,23 +5,31 @@ import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
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.google.common.collect.Sets;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
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;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewDQbomChildEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewDQbomChildEntity;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewDQbomParentEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewDQbomParentEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentEntity;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewDQbomPageQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewDQbomPageQuery;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.BomNewDQbomQuery;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewDQbomSaveQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewDQbomSaveQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.*;
|
import com.nflg.product.bomnew.pojo.vo.BaseMaterialVO;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.BomDQbomEditDetailVO;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.DQbomExcelVO;
|
||||||
import com.nflg.product.bomnew.util.BomUtil;
|
import com.nflg.product.bomnew.util.BomUtil;
|
||||||
import com.nflg.product.bomnew.util.VUtils;
|
import com.nflg.product.bomnew.util.VUtils;
|
||||||
|
import com.nflg.product.bomnew.util.VersionUtil;
|
||||||
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;
|
||||||
|
|
@ -53,6 +61,12 @@ public class DQBomService {
|
||||||
@Resource
|
@Resource
|
||||||
UserRoleService userRoleService;
|
UserRoleService userRoleService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BomNewPbomParentService bomNewPbomParentService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BomNewPbomChildService bomNewPbomChildService;
|
||||||
|
|
||||||
public Page<BomNewDQbomVO> getPageList(BomNewDQbomPageQuery query) {
|
public Page<BomNewDQbomVO> getPageList(BomNewDQbomPageQuery query) {
|
||||||
Page<BomNewDQbomVO> result = dQBomParentService.getBaseMapper().getPageList(new Page<>(query.getPage(), query.getPageSize()), query, SessionUtil.getUserCode());
|
Page<BomNewDQbomVO> result = dQBomParentService.getBaseMapper().getPageList(new Page<>(query.getPage(), query.getPageSize()), query, SessionUtil.getUserCode());
|
||||||
initMaterialInfo(result.getRecords());
|
initMaterialInfo(result.getRecords());
|
||||||
|
|
@ -69,12 +83,25 @@ public class DQBomService {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
roots.forEach(this::buildChildren);
|
roots.forEach(this::buildChildren);
|
||||||
//从子级开始查找
|
//从子级开始查找
|
||||||
List<BomNewDQbomVO> boms = dQBomParentService.getBom(query.getMaterialNo(), query.getDrawingNo(), query.getMaterialName());
|
List<BomNewDQbomVO> boms = dQBomParentService.getBom(query.getStatus(), query.getMaterialNo(), query.getDrawingNo(), query.getMaterialName());
|
||||||
boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0));
|
boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0));
|
||||||
boms.forEach(this::buildChildren);
|
boms.forEach(this::buildChildren);
|
||||||
roots.addAll(boms.stream().filter(b -> b.getRootIs() == 0).map(this::buildParent).flatMap(List::stream).collect(Collectors.toList()));
|
roots.addAll(boms.stream().filter(b -> b.getRootIs() == 0).map(this::buildParent).flatMap(List::stream).collect(Collectors.toList()));
|
||||||
|
|
||||||
Map<String, List<BomNewDQbomVO>> map = roots.stream().collect(Collectors.groupingBy(BomNewDQbomVO::getMaterialNo));
|
List<BomNewDQbomVO> results = mergeTree(roots);
|
||||||
|
|
||||||
|
results.sort((r1, r2) -> r1.getBomRowId() >= r2.getBomRowId() ? r1.getBomRowId() > r2.getBomRowId() ? 1 : 0 : -1);
|
||||||
|
|
||||||
|
Page<BomNewDQbomVO> pageResult = new Page<>();
|
||||||
|
pageResult.setPages(1);
|
||||||
|
pageResult.setCurrent(1);
|
||||||
|
pageResult.setTotal(results.size());
|
||||||
|
pageResult.setRecords(results);
|
||||||
|
return pageResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<BomNewDQbomVO> mergeTree(List<BomNewDQbomVO> list) {
|
||||||
|
Map<Long, List<BomNewDQbomVO>> map = list.stream().collect(Collectors.groupingBy(BomNewDQbomVO::getRowId));
|
||||||
List<BomNewDQbomVO> results = new ArrayList<>();
|
List<BomNewDQbomVO> results = new ArrayList<>();
|
||||||
map.forEach((k, v) -> {
|
map.forEach((k, v) -> {
|
||||||
if (v.size() == 1) {
|
if (v.size() == 1) {
|
||||||
|
|
@ -87,19 +114,25 @@ public class DQBomService {
|
||||||
results.add(f1);
|
results.add(f1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return results;
|
||||||
results.sort((r1, r2) -> r1.getBomRowId() >= r2.getBomRowId() ? r1.getBomRowId() > r2.getBomRowId() ? 1 : 0 : -1);
|
|
||||||
|
|
||||||
Page<BomNewDQbomVO> pageResult = new Page<>();
|
|
||||||
pageResult.setPages(1);
|
|
||||||
pageResult.setCurrent(1);
|
|
||||||
pageResult.setTotal(results.size());
|
|
||||||
pageResult.setRecords(results);
|
|
||||||
return pageResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void merge(BomNewDQbomVO v1, BomNewDQbomVO v2) {
|
private void merge(BomNewDQbomVO v1, BomNewDQbomVO v2) {
|
||||||
v1.getChildNodes().addAll(v2.getChildNodes());
|
v1.getChildNodes().addAll(v2.getChildNodes());
|
||||||
|
Map<Long, List<BomNewDQbomVO>> map = v1.getChildNodes().stream().collect(Collectors.groupingBy(BomNewDQbomVO::getRowId));
|
||||||
|
v1.getChildNodes().clear();
|
||||||
|
map.forEach((k, v) -> {
|
||||||
|
if (v.size() == 1) {
|
||||||
|
v1.getChildNodes().add(v.get(0));
|
||||||
|
} else {
|
||||||
|
BomNewDQbomVO f1 = v.get(0);
|
||||||
|
for (int i = 1; i < v.size(); i++) {
|
||||||
|
merge(f1, v.get(i));
|
||||||
|
}
|
||||||
|
v1.getChildNodes().add(f1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
v1.getChildNodes().sort(Comparator.comparingInt(c -> Integer.parseInt(c.getOrderNumber())));
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<BomNewDQbomVO> buildParent(BomNewDQbomVO vo) {
|
private List<BomNewDQbomVO> buildParent(BomNewDQbomVO vo) {
|
||||||
|
|
@ -142,7 +175,7 @@ public class DQBomService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BomNewDQbomVO> getChild(Long bomRowId) {
|
public List<BomNewDQbomVO> getChild(Long bomRowId) {
|
||||||
VUtils.isTure(bomRowId == 0).throwMessage("无效的参数");
|
if (bomRowId == 0) return Collections.emptyList();
|
||||||
List<BomNewDQbomVO> data = dQBomParentService.getBaseMapper().getChild(bomRowId);
|
List<BomNewDQbomVO> data = dQBomParentService.getBaseMapper().getChild(bomRowId);
|
||||||
initMaterialInfo(data);
|
initMaterialInfo(data);
|
||||||
return data;
|
return data;
|
||||||
|
|
@ -155,9 +188,12 @@ public class DQBomService {
|
||||||
data.forEach(d -> {
|
data.forEach(d -> {
|
||||||
BaseMaterialVO bm = materialBaseInfos.stream().filter(m -> m.getMaterialNo().equals(d.getMaterialNo())).findFirst().orElse(null);
|
BaseMaterialVO bm = materialBaseInfos.stream().filter(m -> m.getMaterialNo().equals(d.getMaterialNo())).findFirst().orElse(null);
|
||||||
if (bm != null) {
|
if (bm != null) {
|
||||||
d.setSystemMaterialState(bm.getMaterialState());
|
d.setMaterialState(bm.getMaterialState());
|
||||||
d.setSystemMaterialName(bm.getMaterialName());
|
d.setSystemMaterialName(bm.getMaterialName());
|
||||||
d.setSystemMaterialCategoryName(bm.getCategoryName());
|
d.setSystemMaterialCategoryName(bm.getCategoryName());
|
||||||
|
d.setSystemMaterialUnit(bm.getMaterialUnit());
|
||||||
|
d.setMaterialRowId(bm.getMaterialRowId());
|
||||||
|
d.setRelCategoryCode(bm.getRelCategoryCode());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +223,7 @@ public class DQBomService {
|
||||||
public void save(BomNewDQbomSaveQuery query) {
|
public void save(BomNewDQbomSaveQuery query) {
|
||||||
BomNewDQbomParentEntity parent = new BomNewDQbomParentEntity();
|
BomNewDQbomParentEntity parent = new BomNewDQbomParentEntity();
|
||||||
BeanUtil.copyProperties(query.getParent(), parent);
|
BeanUtil.copyProperties(query.getParent(), parent);
|
||||||
BomNewDQbomChildEntity child;
|
//BomNewDQbomChildEntity child;
|
||||||
|
|
||||||
List<BomNewDQbomParentEntity> liParents = new ArrayList<>();
|
List<BomNewDQbomParentEntity> liParents = new ArrayList<>();
|
||||||
|
|
||||||
|
|
@ -221,55 +257,65 @@ public class DQBomService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//删除
|
//删除
|
||||||
dQBomChildService.deleteNotIn(parent.getRowId(), query.getChildren().stream().map(BomNewDQbomSaveVO::getRowId)
|
// dQBomChildService.deleteNotIn(parent.getRowId(),
|
||||||
.filter(d -> ObjectUtil.isNotNull(d) && d > 0L)
|
// query.getChildren().stream()
|
||||||
.collect(Collectors.toList()));
|
// .map(BomNewDQbomSaveVO::getRowId)
|
||||||
|
// .filter(d -> ObjectUtil.isNotNull(d) && d > 0L)
|
||||||
|
// .collect(Collectors.toList()));
|
||||||
|
dQBomChildService.deleteAllChildren(parent.getRowId());
|
||||||
parent.setBomExist(1);
|
parent.setBomExist(1);
|
||||||
parent.setModifyTime(LocalDateTime.now());
|
parent.setModifyTime(LocalDateTime.now());
|
||||||
|
|
||||||
child = dQBomChildService.getById(query.getParent().getBomChildRowId());
|
//child = dQBomChildService.getById(query.getParent().getBomChildRowId());
|
||||||
}
|
}
|
||||||
//处理child
|
//处理child
|
||||||
List<BomNewDQbomChildEntity> children = Convert.toList(BomNewDQbomChildEntity.class, query.getChildren());
|
List<BomNewDQbomChildEntity> children = Convert.toList(BomNewDQbomChildEntity.class, query.getChildren());
|
||||||
for (int index = 0, count = children.size(); index < count; index++) {
|
for (int index = 0, count = children.size(); index < count; index++) {
|
||||||
BomNewDQbomChildEntity c = children.get(index);
|
BomNewDQbomChildEntity c = children.get(index);
|
||||||
|
if (Objects.isNull(c.getRowId()) || c.getRowId() == 0) {
|
||||||
c.setRowId(IdWorker.getId());
|
c.setRowId(IdWorker.getId());
|
||||||
|
c.setCreatedBy(SessionUtil.getUserCode());
|
||||||
|
c.setCreatedName(SessionUtil.getRealName());
|
||||||
|
} else {
|
||||||
|
c.setModifyTime(LocalDateTime.now());
|
||||||
|
}
|
||||||
c.setLevel(parent.getLevel() + 1);
|
c.setLevel(parent.getLevel() + 1);
|
||||||
c.setParentRowId(parent.getRowId());
|
c.setParentRowId(parent.getRowId());
|
||||||
c.setIdentityNo(c.getParentRowId() + "_" + c.getRowId());
|
c.setIdentityNo(c.getParentRowId() + "_" + c.getRowId());
|
||||||
c.setOrderNumber(StrUtil.padPre(String.valueOf(index + 1), 3, '0'));
|
c.setOrderNumber(StrUtil.padPre(String.valueOf(index + 1), 3, '0'));
|
||||||
c.setTotalWeight(BomUtil.calculateTotalWeight(c.getNum(), query.getChildren().get(index).getUnitWeight()));
|
c.setTotalWeight(BomUtil.calculateTotalWeight(c.getNum(), query.getChildren().get(index).getUnitWeight()));
|
||||||
c.setCreatedBy(SessionUtil.getUserCode());
|
|
||||||
c.setCreatedName(SessionUtil.getRealName());
|
|
||||||
}
|
}
|
||||||
dQBomChildService.saveBatch(children);
|
dQBomChildService.saveBatch(children);
|
||||||
//处理parent
|
// //处理parent
|
||||||
List<BomNewDQbomParentEntity> parents = Convert.toList(BomNewDQbomParentEntity.class, query.getChildren());
|
// List<BomNewDQbomParentEntity> parents = Convert.toList(BomNewDQbomParentEntity.class, query.getChildren());
|
||||||
List<String> materialNos = dQBomParentService.lambdaQuery()
|
// List<String> materialNos = dQBomParentService.lambdaQuery()
|
||||||
.in(BomNewDQbomParentEntity::getMaterialNo, parents.stream().map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList()))
|
// .in(BomNewDQbomParentEntity::getMaterialNo, parents.stream().map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList()))
|
||||||
.eq(BomNewDQbomParentEntity::getStatus, DQBomStatusEnum.WAIT_CONVERT.getValue())
|
// .eq(BomNewDQbomParentEntity::getStatus, DQBomStatusEnum.WAIT_CONVERT.getValue())
|
||||||
.list()
|
// .list()
|
||||||
.stream()
|
// .stream()
|
||||||
.map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList());
|
// .map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList());
|
||||||
parents.removeIf(p -> materialNos.contains(p.getMaterialNo()));
|
// parents.removeIf(p -> materialNos.contains(p.getMaterialNo()));
|
||||||
dQBomParentService.lambdaUpdate().in(BomNewDQbomParentEntity::getMaterialNo, parents.stream().map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList()))
|
// List<String> materialNos1 = parents.stream().map(BomNewDQbomParentEntity::getMaterialNo).collect(Collectors.toList());
|
||||||
.set(BomNewDQbomParentEntity::getLastVersionIs, 0)
|
// if (CollUtil.isNotEmpty(materialNos1)) {
|
||||||
.set(BomNewDQbomParentEntity::getModifyTime, LocalDateTime.now())
|
// dQBomParentService.lambdaUpdate().in(BomNewDQbomParentEntity::getMaterialNo, materialNos1)
|
||||||
.update();
|
// .set(BomNewDQbomParentEntity::getLastVersionIs, 0)
|
||||||
parents.stream().filter(p -> Objects.isNull(p.getRowId())).forEach(p -> {
|
// .set(BomNewDQbomParentEntity::getModifyTime, LocalDateTime.now())
|
||||||
p.setRowId(IdWorker.getId());
|
// .update();
|
||||||
p.setCreatedBy(SessionUtil.getUserCode());
|
// }
|
||||||
p.setStatus(DQBomStatusEnum.WAIT_CONVERT.getValue());
|
// parents.stream().filter(p -> Objects.isNull(p.getRowId())).forEach(p -> {
|
||||||
p.setRootIs(0);
|
// p.setRowId(IdWorker.getId());
|
||||||
p.setUserRootIs(0);
|
// p.setCreatedBy(SessionUtil.getUserCode());
|
||||||
p.setBomExist(0);
|
// p.setStatus(DQBomStatusEnum.WAIT_CONVERT.getValue());
|
||||||
p.setEditStatus(1);
|
// p.setRootIs(0);
|
||||||
p.setCreatedName(SessionUtil.getRealName());
|
// p.setUserRootIs(0);
|
||||||
p.setCreatedJob(userRoleService.technician() ? UserJobEnum.ENGINEER.getValue() : UserJobEnum.DESIGNER.getValue());
|
// p.setBomExist(0);
|
||||||
p.setSource(2);
|
// p.setEditStatus(1);
|
||||||
});
|
// p.setCreatedName(SessionUtil.getRealName());
|
||||||
liParents.addAll(parents);
|
// p.setCreatedJob(userRoleService.technician() ? UserJobEnum.ENGINEER.getValue() : UserJobEnum.DESIGNER.getValue());
|
||||||
dQBomParentService.saveOrUpdateBatch(liParents);
|
// p.setSource(2);
|
||||||
|
// });
|
||||||
|
// liParents.addAll(parents);
|
||||||
|
// dQBomParentService.saveOrUpdateBatch(liParents);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteBom(Long rowId) {
|
public void deleteBom(Long rowId) {
|
||||||
|
|
@ -326,7 +372,7 @@ public class DQBomService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getChildren(List<BomNewDQbomVO> datas, BomNewDQbomVO parent) {
|
private void getChildren(List<BomNewDQbomVO> datas, BomNewDQbomVO parent) {
|
||||||
if (parent.getBomRowId() == 0) return;
|
if (Objects.isNull(parent) || parent.getBomRowId() == 0) return;
|
||||||
List<BomNewDQbomVO> cc = dQBomParentService.getBaseMapper().getChildren(parent.getBomRowId());
|
List<BomNewDQbomVO> cc = dQBomParentService.getBaseMapper().getChildren(parent.getBomRowId());
|
||||||
if (CollUtil.isNotEmpty(cc)) {
|
if (CollUtil.isNotEmpty(cc)) {
|
||||||
cc.forEach(c -> {
|
cc.forEach(c -> {
|
||||||
|
|
@ -338,11 +384,17 @@ public class DQBomService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void importToSAP(Long rootBomRowId) {
|
public void importToSAP(Long rootBomRowId) {
|
||||||
|
BomNewDQbomParentEntity root = dQBomParentService.getById(rootBomRowId);
|
||||||
|
VUtils.isTure(Objects.isNull(root)).throwMessage("数据不存在");
|
||||||
|
VUtils.isTure(root.getRootIs() == 0).throwMessage("请选择根节点");
|
||||||
|
VUtils.isTure(root.getSapState() == 3).throwMessage("已导入过了,请勿重复操作");
|
||||||
|
|
||||||
List<BomNewDQbomVO> datas = getAll(rootBomRowId);
|
List<BomNewDQbomVO> datas = getAll(rootBomRowId);
|
||||||
ImportSapParamDTO sapDto = new ImportSapParamDTO();
|
ImportSapParamDTO sapDto = new ImportSapParamDTO();
|
||||||
sapDto.setZID(RandomUtil.randomNumbers(5));
|
sapDto.setZID(RandomUtil.randomNumbers(5));
|
||||||
sapDto.setI_WERKS(FactoryCodeEnum.FACTORY_1010.getValue());
|
sapDto.setI_WERKS(FactoryCodeEnum.FACTORY_1010.getValue());
|
||||||
sapDto.setI_STLAN("2");
|
sapDto.setI_STLAN("2");
|
||||||
|
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 -> {
|
||||||
T1DTO t1 = new T1DTO();
|
T1DTO t1 = new T1DTO();
|
||||||
|
|
@ -353,8 +405,9 @@ public class DQBomService {
|
||||||
t1.setMENGE("1");
|
t1.setMENGE("1");
|
||||||
t1.setPOSTP(d.getProjectType());
|
t1.setPOSTP(d.getProjectType());
|
||||||
t1.setDATUM(dateYMD);
|
t1.setDATUM(dateYMD);
|
||||||
sapDto.getT1().add(t1);
|
t1s.add(t1);
|
||||||
});
|
});
|
||||||
|
sapDto.setT1(t1s);
|
||||||
ResultVO<Boolean> resultVO = SpringUtil.getBean(SapOpUtilService.class).importToSapV2(sapDto, null);
|
ResultVO<Boolean> resultVO = SpringUtil.getBean(SapOpUtilService.class).importToSapV2(sapDto, null);
|
||||||
if (resultVO.getState().equals(STATE.Success.getState())) {
|
if (resultVO.getState().equals(STATE.Success.getState())) {
|
||||||
BomNewDQbomParentEntity parentEntity = new BomNewDQbomParentEntity();
|
BomNewDQbomParentEntity parentEntity = new BomNewDQbomParentEntity();
|
||||||
|
|
@ -378,4 +431,145 @@ public class DQBomService {
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<BomNewDQbomVO> changeMaterial(BomNewDQbomQuery query) {
|
||||||
|
VUtils.isTure(Objects.isNull(query.getParent())).throwMessage("父级节点不能为空");
|
||||||
|
if (CollUtil.isNotEmpty(query.getDatas())) return query.getDatas();
|
||||||
|
|
||||||
|
List<String> materialNos = query.getDatas().stream()
|
||||||
|
.map(BomNewDQbomVO::getMaterialNo)
|
||||||
|
.filter(StrUtil::isNotBlank)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<BaseMaterialVO> materialBaseInfos = materialMainService.getMaterialBaseInfo(materialNos);
|
||||||
|
query.getDatas().forEach(c -> {
|
||||||
|
BaseMaterialVO vo = materialBaseInfos.stream()
|
||||||
|
.filter(m -> m.getMaterialNo().equals(c.getMaterialNo()))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
if (vo != null) {
|
||||||
|
c.setUnitWeight(vo.getMaterialWeight());
|
||||||
|
c.setTotalWeight(BomUtil.calculateTotalWeight(c.getNum(), c.getUnitWeight()));
|
||||||
|
c.setMaterialName(vo.getMaterialName());
|
||||||
|
c.setMaterialUnit(vo.getMaterialUnit());
|
||||||
|
c.setMaterialTexture(vo.getMaterialTexture());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return query.getDatas();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void convertToPbom(Long rootBomRowId) {
|
||||||
|
VUtils.isTure(rootBomRowId == 0).throwMessage("无效的编号");
|
||||||
|
|
||||||
|
BomNewDQbomParentEntity root = dQBomParentService.getById(rootBomRowId);
|
||||||
|
VUtils.isTure(Objects.isNull(root)).throwMessage("未找到数据");
|
||||||
|
VUtils.isTure(!Objects.equals(root.getExceptionStatus(), EBomExceptionStatusEnum.OK.getValue()))
|
||||||
|
.throwMessage("异常状态不能转pbom");
|
||||||
|
VUtils.isTure(root.getStatus() == 2).throwMessage("已转pbom不能再次转换");
|
||||||
|
|
||||||
|
List<BomNewDQbomParentEntity> parents = new ArrayList<>();
|
||||||
|
List<BomNewDQbomChildEntity> children = new ArrayList<>();
|
||||||
|
buildPbom(root, parents, children);
|
||||||
|
dQBomParentService.updateBatchById(parents);
|
||||||
|
dQBomChildService.updateBatchById(children);
|
||||||
|
savePbomParents(parents);
|
||||||
|
savePbomChildren(children, parents);
|
||||||
|
importToSAP(root.getRowId());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void savePbomChildren(List<BomNewDQbomChildEntity> children, List<BomNewDQbomParentEntity> parents) {
|
||||||
|
List<BomNewPbomChildEntity> pchildren = Convert.toList(BomNewPbomChildEntity.class, children);
|
||||||
|
List<String> materialNos = pchildren.stream().map(BomNewPbomChildEntity::getMaterialNo).collect(Collectors.toList());
|
||||||
|
List<BaseMaterialVO> materialBaseInfos = new ArrayList<>();
|
||||||
|
if (CollUtil.isNotEmpty(materialNos)) {
|
||||||
|
materialBaseInfos.addAll(materialMainService.getMaterialBaseInfo(materialNos));
|
||||||
|
}
|
||||||
|
pchildren.forEach(c -> {
|
||||||
|
c.setCreatedTime(LocalDateTime.now());
|
||||||
|
c.setModifyTime(null);
|
||||||
|
c.setIdentityNo(c.getParentRowId() + "_" + c.getRowId());
|
||||||
|
if (CollUtil.isNotEmpty(materialBaseInfos)) {
|
||||||
|
BaseMaterialVO materialVO = materialBaseInfos.stream().filter(m -> m.getMaterialNo().equals(c.getMaterialNo())).findFirst().orElse(null);
|
||||||
|
if (!Objects.isNull(materialVO)) {
|
||||||
|
c.setMaterialCategoryCode(materialVO.getMaterialCategoryCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BomNewDQbomParentEntity parent = parents.stream().filter(p -> p.getMaterialNo().equals(c.getMaterialNo())).findFirst().orElse(null);
|
||||||
|
if (!Objects.isNull(parent)) {
|
||||||
|
c.setBomVersionRowId(parent.getRowId());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
bomNewPbomChildService.saveBatch(pchildren);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void savePbomParents(List<BomNewDQbomParentEntity> parents) {
|
||||||
|
List<BomNewPbomParentEntity> pparents = Convert.toList(BomNewPbomParentEntity.class, parents);
|
||||||
|
pparents.forEach(p -> {
|
||||||
|
p.setCreatedTime(LocalDateTime.now());
|
||||||
|
p.setModifyTime(null);
|
||||||
|
p.setEditStatus(PBomEditStatusEnum.HANDLER_FINISHED.getValue());
|
||||||
|
p.setStatus(PBomStatusEnum.WAIT_FACTORY.getValue());
|
||||||
|
p.setFacCode(FactoryCodeEnum.FACTORY_1010.getValue());
|
||||||
|
p.setSourceRowId(p.getRowId());
|
||||||
|
p.setLevelNum(parents.stream().filter(ps -> Objects.equals(ps.getRowId(), p.getRowId())).findFirst().get().getLevel());
|
||||||
|
});
|
||||||
|
bomNewPbomParentService.saveBatch(pparents);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildPbom(BomNewDQbomParentEntity parent, List<BomNewDQbomParentEntity> parents, List<BomNewDQbomChildEntity> children) {
|
||||||
|
parent.setStatus(2);
|
||||||
|
parent.setConvertToPbomTime(LocalDateTime.now());
|
||||||
|
parents.add(parent);
|
||||||
|
LambdaQueryWrapper<BomNewDQbomParentEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(BomNewDQbomParentEntity::getMaterialNo, parent.getMaterialNo());
|
||||||
|
wrapper.ne(BomNewDQbomParentEntity::getRowId, parent.getRowId());
|
||||||
|
dQBomParentService.getBaseMapper().delete(wrapper);
|
||||||
|
List<BomNewDQbomChildEntity> cc = dQBomChildService.getByParentRowId(parent.getRowId());
|
||||||
|
children.addAll(cc);
|
||||||
|
|
||||||
|
BomNewPbomParentEntity pp = bomNewPbomParentService.lambdaQuery().eq(BomNewPbomParentEntity::getMaterialNo, parent.getMaterialNo())
|
||||||
|
.orderByDesc(BomNewPbomParentEntity::getRowId)
|
||||||
|
.last(" limit 1")
|
||||||
|
.one();
|
||||||
|
if (!Objects.isNull(pp)) {
|
||||||
|
if (versionCompare(parent.getCurrentVersion(), pp.getCurrentVersion()) < 0) {
|
||||||
|
VUtils.isTure(true).throwMessage(StrUtil.format("{}的当前版本为{},比pbom中版本{}低", parent.getMaterialNo()
|
||||||
|
, parent.getCurrentVersion(), pp.getCurrentVersion()));
|
||||||
|
} else {
|
||||||
|
if (pp.getStatus() == 4) {
|
||||||
|
List<BomNewDQbomVO> dqChildren = getChild(parent.getRowId());
|
||||||
|
Set<String> pChildren = bomNewPbomChildService.lambdaQuery()
|
||||||
|
.select(BomNewPbomChildEntity::getMaterialNo)
|
||||||
|
.eq(BomNewPbomChildEntity::getParentRowId, pp.getRowId())
|
||||||
|
.list()
|
||||||
|
.stream()
|
||||||
|
.map(BomNewPbomChildEntity::getMaterialNo)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
if (dqChildren.size() != pChildren.size()
|
||||||
|
|| !Sets.difference(dqChildren.stream().map(BomNewDQbomVO::getMaterialNo).collect(Collectors.toSet()), pChildren).isEmpty()) {
|
||||||
|
parent.setCurrentVersion(VersionUtil.getNextVersion(parent.getCurrentVersion()));
|
||||||
|
pp.setLastVersionIs(0);
|
||||||
|
bomNewPbomParentService.updateById(pp);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bomNewPbomParentService.getBaseMapper().deleteById(pp.getRowId());
|
||||||
|
bomNewPbomChildService.getBaseMapper().delete(new LambdaQueryWrapper<BomNewPbomChildEntity>()
|
||||||
|
.eq(BomNewPbomChildEntity::getParentRowId, pp.getRowId()));
|
||||||
|
}
|
||||||
|
//处理子级
|
||||||
|
dQBomParentService.lambdaQuery()
|
||||||
|
.in(BomNewDQbomParentEntity::getMaterialNo, cc.stream().map(BomNewDQbomChildEntity::getMaterialNo).collect(Collectors.toList()))
|
||||||
|
.eq(BomNewDQbomParentEntity::getStatus, 1)
|
||||||
|
.list()
|
||||||
|
.forEach(p -> buildPbom(p, parents, children));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int versionCompare(String version1, String version2) {
|
||||||
|
if (StrUtil.isBlank(version1)) return 1;
|
||||||
|
if (StrUtil.isBlank(version2)) return -1;
|
||||||
|
return Integer.parseInt(version1.substring(1)) - Integer.parseInt(version2.substring(1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
AND p.material_no = #{query.materialNo}
|
AND p.material_no = #{query.materialNo}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.materialName != null and query.materialName!=''">
|
<if test="query.materialName != null and query.materialName!=''">
|
||||||
AND p.material_name like concat('%', ${query.materialName}, '%')
|
AND c.project_type='T' AND p.material_name like concat('%', #{query.materialName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="query.startDate != null and query.startDate!=''">
|
<if test="query.startDate != null and query.startDate!=''">
|
||||||
AND p.created_time <![CDATA[ >= ]]> #{query.startDate}
|
AND p.created_time <![CDATA[ >= ]]> #{query.startDate}
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
<select id="getChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO">
|
<select id="getChild" resultType="com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO">
|
||||||
SELECT ifnull(p.row_id, 0) bomRowId,
|
SELECT ifnull(p.row_id, 0) bomRowId,
|
||||||
ifnull(p.created_by, c.created_by) bomCreateBy,
|
ifnull(p.created_by, c.created_by) bomCreateBy,
|
||||||
ifnull(p.exception_status, c.exception_status) exception_status,
|
if(c.exception_status = 1, ifnull(p.exception_status, 1), c.exception_status) exception_status,
|
||||||
ifnull(p.exception_tag, c.exception_tag) exception_tag,
|
ifnull(p.exception_tag, c.exception_tag) exception_tag,
|
||||||
ifnull(p.bom_exist, 0) bom_exist,
|
ifnull(p.bom_exist, 0) bom_exist,
|
||||||
c.*
|
c.*
|
||||||
|
|
@ -79,17 +79,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRootBomByRowId" resultType="com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO">
|
<select id="getRootBomByRowId" resultType="com.nflg.product.bomnew.pojo.vo.BomNewDQbomVO">
|
||||||
SELECT level,
|
SELECT *, row_id bomRowId
|
||||||
material_no,
|
|
||||||
drawing_no,
|
|
||||||
material_name,
|
|
||||||
material_texture,
|
|
||||||
num,
|
|
||||||
material_unit,
|
|
||||||
project_type,
|
|
||||||
current_version,
|
|
||||||
unit_weight,
|
|
||||||
remark
|
|
||||||
FROM t_bom_new_dqbom_parent
|
FROM t_bom_new_dqbom_parent
|
||||||
WHERE row_id = #{rootBomRowId}
|
WHERE row_id = #{rootBomRowId}
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -109,8 +99,9 @@
|
||||||
ifnull(p.unit_weight, c.unit_weight) unit_weight,
|
ifnull(p.unit_weight, c.unit_weight) unit_weight,
|
||||||
c.remark
|
c.remark
|
||||||
FROM t_bom_new_dqbom_child c
|
FROM t_bom_new_dqbom_child c
|
||||||
LEFT JOIN t_bom_new_dqbom_parent p ON c.material_no = p.material_no AND p.last_version_is = 1
|
INNER JOIN t_bom_new_dqbom_parent p2 ON p2.row_id = c.parent_row_id
|
||||||
WHERE c.parent_row_id = #{rootBomRowId}
|
LEFT JOIN t_bom_new_dqbom_parent p ON c.material_no = p.material_no AND (p2.status = 1 OR p.status = 2)
|
||||||
|
WHERE p2.row_id = #{rootBomRowId}
|
||||||
order by c.order_number
|
order by c.order_number
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -123,21 +114,15 @@
|
||||||
c.*
|
c.*
|
||||||
FROM t_bom_new_dqbom_parent p
|
FROM t_bom_new_dqbom_parent p
|
||||||
RIGHT JOIN t_bom_new_dqbom_child c ON p.material_no = c.material_no
|
RIGHT JOIN t_bom_new_dqbom_child c ON p.material_no = c.material_no
|
||||||
WHERE c.status = #{query.status}
|
WHERE c.status = #{status}
|
||||||
<if test="query.drawingNo != null and query.drawingNo!=''">
|
<if test="drawingNo != null and drawingNo!=''">
|
||||||
AND c.drawing_no = #{query.drawingNo}
|
AND c.drawing_no = #{drawingNo}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.materialNo != null and query.materialNo!=''">
|
<if test="materialNo != null and materialNo!=''">
|
||||||
AND c.material_no = #{query.materialNo}
|
AND c.material_no = #{materialNo}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.materialName != null and query.materialName!=''">
|
<if test="materialName != null and materialName!=''">
|
||||||
AND c.material_name like concat('%', ${query.materialName}, '%')
|
AND c.project_type='T' AND c.material_name like concat('%', #{materialName}, '%')
|
||||||
</if>
|
|
||||||
<if test="query.startDate != null and query.startDate!=''">
|
|
||||||
AND c.created_time <![CDATA[ >= ]]> #{query.startDate}
|
|
||||||
</if>
|
|
||||||
<if test="query.endDate != null and query.endDate!=''">
|
|
||||||
AND c.created_time <![CDATA[ <= ]]> #{query.endDate}
|
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -152,6 +137,7 @@
|
||||||
, IFNULL(b.modify_time, a.modify_time) modify_time
|
, IFNULL(b.modify_time, a.modify_time) modify_time
|
||||||
, IFNULL(b.parent_row_id, 0) parent_row_id
|
, IFNULL(b.parent_row_id, 0) parent_row_id
|
||||||
, a.row_id bomRowId
|
, a.row_id bomRowId
|
||||||
|
, b.order_number
|
||||||
, a.*
|
, a.*
|
||||||
FROM t_bom_new_dqbom_parent a
|
FROM t_bom_new_dqbom_parent a
|
||||||
LEFT JOIN t_bom_new_dqbom_child b ON a.material_no = b.material_no
|
LEFT JOIN t_bom_new_dqbom_child b ON a.material_no = b.material_no
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.nflg.product.bomnew.constant.EBomStatusEnum;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
||||||
import com.nflg.product.bomnew.util.BomUtil;
|
import com.nflg.product.bomnew.util.BomUtil;
|
||||||
import com.nflg.product.bomnew.util.StringUtil;
|
import com.nflg.product.bomnew.util.StringUtil;
|
||||||
|
import com.nflg.product.bomnew.util.VersionUtil;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
@ -136,4 +137,9 @@ public class OtherTest {
|
||||||
System.out.println("显示结果:" + BomUtil.totalWeightToDisplay(totalWeight));
|
System.out.println("显示结果:" + BomUtil.totalWeightToDisplay(totalWeight));
|
||||||
Assert.assertEquals("70.6577", Objects.requireNonNull(BomUtil.totalWeightToDisplay(totalWeight)).toString());
|
Assert.assertEquals("70.6577", Objects.requireNonNull(BomUtil.totalWeightToDisplay(totalWeight)).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test16() {
|
||||||
|
System.out.println("下一个版本:" + VersionUtil.getNextVersionForSmallVersion("A00"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public enum STATE {
|
||||||
PageError(114, "页面异常"),
|
PageError(114, "页面异常"),
|
||||||
BusinessError(115, "业务异常"),
|
BusinessError(115, "业务异常"),
|
||||||
RequestMethodError(116, "请求方式错误"),
|
RequestMethodError(116, "请求方式错误"),
|
||||||
InconsistentDataError(117, "数据不一致")
|
InconsistentDataError(117, "需要用户确认")
|
||||||
;
|
;
|
||||||
@Getter
|
@Getter
|
||||||
private final Integer state;
|
private final Integer state;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue