Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom
This commit is contained in:
commit
5d74b9e8d0
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.nflg.product.bomnew.advice;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.nflg.product.bomnew.util.JsonUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import nflg.product.common.constant.STATE;
|
||||||
|
import nflg.product.common.util.JwtUtil;
|
||||||
|
import nflg.product.common.vo.ResultVO;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
|
import org.springframework.core.MethodParameter;
|
||||||
|
import org.springframework.http.HttpInputMessage;
|
||||||
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
|
import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdvice;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 曹鹏飞
|
||||||
|
* @date 2024/6/18 09:41:31
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@ControllerAdvice
|
||||||
|
@RefreshScope
|
||||||
|
public class LoggingRequestBodyAdvice implements RequestBodyAdvice {
|
||||||
|
|
||||||
|
@Value("${logging.http.detailed:false}")
|
||||||
|
private Boolean enableHttpDetailed;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||||
|
return enableHttpDetailed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpInputMessage beforeBodyRead(HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||||
|
return httpInputMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object afterBodyRead(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||||
|
try {
|
||||||
|
log.info("请求参数: {}", JsonUtil.toJson(o));
|
||||||
|
log.info("请求头: {}", JsonUtil.toJson(httpInputMessage.getHeaders()));
|
||||||
|
String token = httpInputMessage.getHeaders().getFirst("Authorization");
|
||||||
|
if (StrUtil.isNotBlank(token)) {
|
||||||
|
ResultVO result = JwtUtil.parse(token);
|
||||||
|
if (result.getState().equals(STATE.Success.getState())) {
|
||||||
|
log.info("请求用户: {}", JsonUtil.toJson(result.getData()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("读取请求体出错", ex);
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object handleEmptyBody(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.nflg.product.bomnew.advice;
|
||||||
|
|
||||||
|
import com.nflg.product.bomnew.util.JsonUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
|
import org.springframework.core.MethodParameter;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
|
import org.springframework.http.server.ServerHttpRequest;
|
||||||
|
import org.springframework.http.server.ServerHttpResponse;
|
||||||
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
|
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 曹鹏飞
|
||||||
|
* @date 2024/6/18 09:42:06
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@ControllerAdvice
|
||||||
|
@RefreshScope
|
||||||
|
public class LoggingResponseBodyAdvice implements ResponseBodyAdvice<Object> {
|
||||||
|
|
||||||
|
@Value("${logging.http.detailed:false}")
|
||||||
|
private Boolean enableHttpDetailed;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> aClass) {
|
||||||
|
return enableHttpDetailed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object beforeBodyWrite(Object o, MethodParameter methodParameter, MediaType mediaType, Class<? extends HttpMessageConverter<?>> aClass, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
|
||||||
|
try {
|
||||||
|
log.info("响应数据: {}", JsonUtil.toJson(o));
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("读取响应数据出错", ex);
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -22,194 +22,194 @@ import java.time.LocalDateTime;
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-entity-BomNewEbomChildFormalEntity")
|
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-entity-BomNewEbomChildFormalEntity")
|
||||||
@TableName(value = "t_bom_new_ebom_child_formal")
|
@TableName(value = "t_bom_new_ebom_child_formal")
|
||||||
public class BomNewEbomChildFormalEntity implements Serializable {
|
public class BomNewEbomChildFormalEntity extends BomNewEbomChildEntity {
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 主键-雪花
|
// * 主键-雪花
|
||||||
*/
|
// */
|
||||||
@TableId(value = "row_id", type = IdType.ASSIGN_ID)
|
// @TableId(value = "row_id", type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "主键-雪花")
|
// @ApiModelProperty(value = "主键-雪花")
|
||||||
private Long rowId;
|
// private Long rowId;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 父行ID
|
// * 父行ID
|
||||||
*/
|
// */
|
||||||
@TableField(value = "parent_row_id")
|
// @TableField(value = "parent_row_id")
|
||||||
@ApiModelProperty(value = "父行ID")
|
// @ApiModelProperty(value = "父行ID")
|
||||||
private Long parentRowId;
|
// private Long parentRowId;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 父级id_子级ID(原父节点ID)
|
// * 父级id_子级ID(原父节点ID)
|
||||||
*/
|
// */
|
||||||
@TableField(value = "identity_no")
|
// @TableField(value = "identity_no")
|
||||||
@ApiModelProperty(value = "父级id_子级ID(原父节点ID)")
|
// @ApiModelProperty(value = "父级id_子级ID(原父节点ID)")
|
||||||
private String identityNo;
|
// private String identityNo;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 排序号
|
// * 排序号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "order_number")
|
// @TableField(value = "order_number")
|
||||||
@ApiModelProperty(value = "排序号")
|
// @ApiModelProperty(value = "排序号")
|
||||||
private String orderNumber;
|
// private String orderNumber;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 图号
|
// * 图号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "drawing_no")
|
// @TableField(value = "drawing_no")
|
||||||
@ApiModelProperty(value = "图号")
|
// @ApiModelProperty(value = "图号")
|
||||||
private String drawingNo;
|
// private String drawingNo;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料编码
|
// * 物料编码
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_no")
|
// @TableField(value = "material_no")
|
||||||
@ApiModelProperty(value = "物料编码")
|
// @ApiModelProperty(value = "物料编码")
|
||||||
private String materialNo;
|
// private String materialNo;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料名称
|
// * 物料名称
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_name")
|
// @TableField(value = "material_name")
|
||||||
@ApiModelProperty(value = "物料名称")
|
// @ApiModelProperty(value = "物料名称")
|
||||||
private String materialName;
|
// private String materialName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料描述
|
// * 物料描述
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_desc")
|
// @TableField(value = "material_desc")
|
||||||
@ApiModelProperty(value = "物料描述")
|
// @ApiModelProperty(value = "物料描述")
|
||||||
private String materialDesc;
|
// private String materialDesc;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 材质
|
// * 材质
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_texture")
|
// @TableField(value = "material_texture")
|
||||||
@ApiModelProperty(value = "材质")
|
// @ApiModelProperty(value = "材质")
|
||||||
private String materialTexture;
|
// private String materialTexture;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 单位
|
// * 单位
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_unit")
|
// @TableField(value = "material_unit")
|
||||||
@ApiModelProperty(value = "单位")
|
// @ApiModelProperty(value = "单位")
|
||||||
private String materialUnit;
|
// private String materialUnit;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料分类编码
|
// * 物料分类编码
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_category_code")
|
// @TableField(value = "material_category_code")
|
||||||
@ApiModelProperty(value = "物料分类编码")
|
// @ApiModelProperty(value = "物料分类编码")
|
||||||
private String materialCategoryCode;
|
// private String materialCategoryCode;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 单重
|
// * 单重
|
||||||
*/
|
// */
|
||||||
@TableField(value = "unit_weight")
|
// @TableField(value = "unit_weight")
|
||||||
@ApiModelProperty(value = "单重")
|
// @ApiModelProperty(value = "单重")
|
||||||
private BigDecimal unitWeight;
|
// private BigDecimal unitWeight;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 数量
|
// * 数量
|
||||||
*/
|
// */
|
||||||
@TableField(value = "num")
|
// @TableField(value = "num")
|
||||||
@ApiModelProperty(value = "数量")
|
// @ApiModelProperty(value = "数量")
|
||||||
private BigDecimal num;
|
// private BigDecimal num;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 总重
|
// * 总重
|
||||||
*/
|
// */
|
||||||
@TableField(value = "total_weight")
|
// @TableField(value = "total_weight")
|
||||||
@ApiModelProperty(value = "总重")
|
// @ApiModelProperty(value = "总重")
|
||||||
private BigDecimal totalWeight;
|
// private BigDecimal totalWeight;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 项目类别
|
// * 项目类别
|
||||||
*/
|
// */
|
||||||
@TableField(value = "project_type")
|
// @TableField(value = "project_type")
|
||||||
@ApiModelProperty(value = "项目类别")
|
// @ApiModelProperty(value = "项目类别")
|
||||||
private String projectType;
|
// private String projectType;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 项目类别输入方式: 0-自动匹配 1-手工录入 2-来自物料主数据 3-来自历史统计
|
// * 项目类别输入方式: 0-自动匹配 1-手工录入 2-来自物料主数据 3-来自历史统计
|
||||||
*/
|
// */
|
||||||
@TableField(value = "project_type_input_type")
|
// @TableField(value = "project_type_input_type")
|
||||||
@ApiModelProperty(value = "项目类别输入方式: 0-自动匹配 1-手工录入 2-来自物料主数据 3-来自历史统计")
|
// @ApiModelProperty(value = "项目类别输入方式: 0-自动匹配 1-手工录入 2-来自物料主数据 3-来自历史统计")
|
||||||
private Integer projectTypeInputType;
|
// private Integer projectTypeInputType;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建人工号
|
// * 创建人工号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "created_by")
|
// @TableField(value = "created_by")
|
||||||
@ApiModelProperty(value = "创建人工号")
|
// @ApiModelProperty(value = "创建人工号")
|
||||||
private String createdBy;
|
// private String createdBy;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否虚拟件 0-否 1-是
|
// * 是否虚拟件 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "virtual_part_is")
|
// @TableField(value = "virtual_part_is")
|
||||||
@ApiModelProperty(value = "是否虚拟件 0-否 1-是")
|
// @ApiModelProperty(value = "是否虚拟件 0-否 1-是")
|
||||||
private Integer virtualPartIs;
|
// private Integer virtualPartIs;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建时间
|
// * 创建时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "created_time")
|
// @TableField(value = "created_time")
|
||||||
@ApiModelProperty(value = "创建时间")
|
// @ApiModelProperty(value = "创建时间")
|
||||||
private LocalDateTime createdTime;
|
// private LocalDateTime createdTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 更新时间
|
// * 更新时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "modify_time")
|
// @TableField(value = "modify_time")
|
||||||
@ApiModelProperty(value = "更新时间")
|
// @ApiModelProperty(value = "更新时间")
|
||||||
private LocalDateTime modifyTime;
|
// private LocalDateTime modifyTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 处理状态:1=待处理、2=已处理
|
// * 处理状态:1=待处理、2=已处理
|
||||||
*/
|
// */
|
||||||
@TableField(value = "edit_status")
|
// @TableField(value = "edit_status")
|
||||||
@ApiModelProperty(value = "处理状态:1=待处理、2=已处理")
|
// @ApiModelProperty(value = "处理状态:1=待处理、2=已处理")
|
||||||
private Integer editStatus;
|
// private Integer editStatus;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 异常状态:1=正常、2=冻结/完全弃用异常、3=递归异常、4=数据不完整异常、5=超级物料异常、6=重复异常
|
// * 异常状态:1=正常、2=冻结/完全弃用异常、3=递归异常、4=数据不完整异常、5=超级物料异常、6=重复异常
|
||||||
*/
|
// */
|
||||||
@TableField(value = "exception_status")
|
// @TableField(value = "exception_status")
|
||||||
@ApiModelProperty(value = "异常状态:1=正常、2=冻结/完全弃用异常、3=递归异常、4=数据不完整异常、5=超级物料异常、6=重复异常")
|
// @ApiModelProperty(value = "异常状态:1=正常、2=冻结/完全弃用异常、3=递归异常、4=数据不完整异常、5=超级物料异常、6=重复异常")
|
||||||
private Integer exceptionStatus;
|
// private Integer exceptionStatus;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 来源1-原BOM转换 2-EXCE导入 3-MDM创建
|
// * 来源1-原BOM转换 2-EXCE导入 3-MDM创建
|
||||||
*/
|
// */
|
||||||
@TableField(value = "source")
|
// @TableField(value = "source")
|
||||||
@ApiModelProperty(value = "来源1-原BOM转换 2-EXCE导入 3-MDM创建")
|
// @ApiModelProperty(value = "来源1-原BOM转换 2-EXCE导入 3-MDM创建")
|
||||||
private Integer source;
|
// private Integer source;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 来源行ID(原始BOM中的行ID)
|
// * 来源行ID(原始BOM中的行ID)
|
||||||
*/
|
// */
|
||||||
@TableField(value = "source_row_id")
|
// @TableField(value = "source_row_id")
|
||||||
@ApiModelProperty(value = "来源行ID(原始BOM中的行ID)")
|
// @ApiModelProperty(value = "来源行ID(原始BOM中的行ID)")
|
||||||
private Long sourceRowId;
|
// private Long sourceRowId;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 备注
|
// * 备注
|
||||||
*/
|
// */
|
||||||
@TableField(value = "remark")
|
// @TableField(value = "remark")
|
||||||
@ApiModelProperty(value = "备注")
|
// @ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
// private String remark;
|
||||||
|
//
|
||||||
@TableField(value = "virtual_part_type")
|
// @TableField(value = "virtual_part_type")
|
||||||
@ApiModelProperty(value = "0-非虚拟包 1-发货包 2-制作包 4-直发包 8-发货前装配包")
|
// @ApiModelProperty(value = "0-非虚拟包 1-发货包 2-制作包 4-直发包 8-发货前装配包")
|
||||||
private Integer virtualPartType;
|
// private Integer virtualPartType;
|
||||||
|
//
|
||||||
@TableField(value = "virtual_part_root_material_no")
|
// @TableField(value = "virtual_part_root_material_no")
|
||||||
@ApiModelProperty(value = "生成虚拟包跟物料编码")
|
// @ApiModelProperty(value = "生成虚拟包跟物料编码")
|
||||||
private String virtualPartRootMaterialNo;
|
// private String virtualPartRootMaterialNo;
|
||||||
|
//
|
||||||
@TableField(value = "bom_version_row_id")
|
// @TableField(value = "bom_version_row_id")
|
||||||
@ApiModelProperty("BOM-版本Row_id(parent表row_id 关联)")
|
// @ApiModelProperty("BOM-版本Row_id(parent表row_id 关联)")
|
||||||
private Long bomVersionRowId;
|
// private Long bomVersionRowId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,339 +21,339 @@ import java.time.LocalDateTime;
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-entity-BomNewEbomParentFormalEntity")
|
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-entity-BomNewEbomParentFormalEntity")
|
||||||
@TableName(value = "t_bom_new_ebom_parent_formal")
|
@TableName(value = "t_bom_new_ebom_parent_formal")
|
||||||
public class BomNewEbomParentFormalEntity implements Serializable {
|
public class BomNewEbomParentFormalEntity extends BomNewEbomParentEntity {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 主键行ID-雪花
|
// * 主键行ID-雪花
|
||||||
*/
|
// */
|
||||||
@TableId(value = "row_id", type = IdType.ASSIGN_ID)
|
// @TableId(value = "row_id", type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "主键行ID-雪花")
|
// @ApiModelProperty(value = "主键行ID-雪花")
|
||||||
private Long rowId;
|
// private Long rowId;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 批号-来自plm-临时
|
// * 批号-来自plm-临时
|
||||||
*/
|
// */
|
||||||
@TableField(value = "batch_no")
|
// @TableField(value = "batch_no")
|
||||||
@ApiModelProperty(value = "批号-来自plm-临时")
|
// @ApiModelProperty(value = "批号-来自plm-临时")
|
||||||
private String batchNo;
|
// private String batchNo;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 图号
|
// * 图号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "drawing_no")
|
// @TableField(value = "drawing_no")
|
||||||
@ApiModelProperty(value = "图号")
|
// @ApiModelProperty(value = "图号")
|
||||||
private String drawingNo;
|
// private String drawingNo;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料编码
|
// * 物料编码
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_no")
|
// @TableField(value = "material_no")
|
||||||
@ApiModelProperty(value = "物料编码")
|
// @ApiModelProperty(value = "物料编码")
|
||||||
private String materialNo;
|
// private String materialNo;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 排序号
|
// * 排序号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "order_number")
|
// @TableField(value = "order_number")
|
||||||
@ApiModelProperty(value = "排序号")
|
// @ApiModelProperty(value = "排序号")
|
||||||
private String orderNumber;
|
// private String orderNumber;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料名称
|
// * 物料名称
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_name")
|
// @TableField(value = "material_name")
|
||||||
@ApiModelProperty(value = "物料名称")
|
// @ApiModelProperty(value = "物料名称")
|
||||||
private String materialName;
|
// private String materialName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 物料描述
|
// * 物料描述
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_desc")
|
// @TableField(value = "material_desc")
|
||||||
@ApiModelProperty(value = "物料描述")
|
// @ApiModelProperty(value = "物料描述")
|
||||||
private String materialDesc;
|
// private String materialDesc;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 材质,材料
|
// * 材质,材料
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_texture")
|
// @TableField(value = "material_texture")
|
||||||
@ApiModelProperty(value = "材质,材料")
|
// @ApiModelProperty(value = "材质,材料")
|
||||||
private String materialTexture;
|
// private String materialTexture;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 单位
|
// * 单位
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_unit")
|
// @TableField(value = "material_unit")
|
||||||
@ApiModelProperty(value = "单位")
|
// @ApiModelProperty(value = "单位")
|
||||||
private String materialUnit;
|
// private String materialUnit;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 原始单位-来自cad
|
// * 原始单位-来自cad
|
||||||
*/
|
// */
|
||||||
@TableField(value = "material_original_unit")
|
// @TableField(value = "material_original_unit")
|
||||||
@ApiModelProperty(value = "原始单位-来自cad")
|
// @ApiModelProperty(value = "原始单位-来自cad")
|
||||||
private String materialOriginalUnit;
|
// private String materialOriginalUnit;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 单重
|
// * 单重
|
||||||
*/
|
// */
|
||||||
@TableField(value = "unit_weight")
|
// @TableField(value = "unit_weight")
|
||||||
@ApiModelProperty(value = "单重")
|
// @ApiModelProperty(value = "单重")
|
||||||
private BigDecimal unitWeight;
|
// private BigDecimal unitWeight;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 总重
|
// * 总重
|
||||||
*/
|
// */
|
||||||
@TableField(value = "total_weight")
|
// @TableField(value = "total_weight")
|
||||||
@ApiModelProperty(value = "总重")
|
// @ApiModelProperty(value = "总重")
|
||||||
private BigDecimal totalWeight;
|
// private BigDecimal totalWeight;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 版本号
|
// * 版本号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "current_version")
|
// @TableField(value = "current_version")
|
||||||
@ApiModelProperty(value = "版本号")
|
// @ApiModelProperty(value = "版本号")
|
||||||
private String currentVersion;
|
// private String currentVersion;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 数量
|
// * 数量
|
||||||
*/
|
// */
|
||||||
@TableField(value = "num")
|
// @TableField(value = "num")
|
||||||
@ApiModelProperty(value = "数量")
|
// @ApiModelProperty(value = "数量")
|
||||||
private BigDecimal num;
|
// private BigDecimal num;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 来源1-原BOM转换 2-EXCE导入 3-MDM创建
|
// * 来源1-原BOM转换 2-EXCE导入 3-MDM创建
|
||||||
*/
|
// */
|
||||||
@TableField(value = "source")
|
// @TableField(value = "source")
|
||||||
@ApiModelProperty(value = "来源1-原BOM转换 2-EXCE导入 3-MDM创建")
|
// @ApiModelProperty(value = "来源1-原BOM转换 2-EXCE导入 3-MDM创建")
|
||||||
private Integer source;
|
// private Integer source;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否跟节点 0-否 1-是
|
// * 是否跟节点 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "root_is")
|
// @TableField(value = "root_is")
|
||||||
@ApiModelProperty(value = "是否跟节点 0-否 1-是")
|
// @ApiModelProperty(value = "是否跟节点 0-否 1-是")
|
||||||
private Integer rootIs;
|
// private Integer rootIs;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否应该有BOM 0-否 1-是
|
// * 是否应该有BOM 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "should_bom_exist")
|
// @TableField(value = "should_bom_exist")
|
||||||
@ApiModelProperty(value = "是否应该有BOM 0-否 1-是")
|
// @ApiModelProperty(value = "是否应该有BOM 0-否 1-是")
|
||||||
private Integer shouldBomExist;
|
// private Integer shouldBomExist;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 超级物料 0-否 1-是
|
// * 超级物料 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "super_material_status")
|
// @TableField(value = "super_material_status")
|
||||||
@ApiModelProperty(value = "超级物料 0-否 1-是")
|
// @ApiModelProperty(value = "超级物料 0-否 1-是")
|
||||||
private Integer superMaterialStatus;
|
// private Integer superMaterialStatus;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否有BOM: 0-否 1-是
|
// * 是否有BOM: 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "bom_exist")
|
// @TableField(value = "bom_exist")
|
||||||
@ApiModelProperty(value = "是否有BOM: 0-否 1-是")
|
// @ApiModelProperty(value = "是否有BOM: 0-否 1-是")
|
||||||
private Integer bomExist;
|
// private Integer bomExist;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否最新版:0-否 1-是
|
// * 是否最新版:0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "last_version_is")
|
// @TableField(value = "last_version_is")
|
||||||
@ApiModelProperty(value = "是否最新版:0-否 1-是")
|
// @ApiModelProperty(value = "是否最新版:0-否 1-是")
|
||||||
private Integer lastVersionIs;
|
// private Integer lastVersionIs;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 1=待处理、2=已处理
|
// * 1=待处理、2=已处理
|
||||||
*/
|
// */
|
||||||
@TableField(value = "edit_status")
|
// @TableField(value = "edit_status")
|
||||||
@ApiModelProperty(value = "1=待处理、2=已处理")
|
// @ApiModelProperty(value = "1=待处理、2=已处理")
|
||||||
private Integer editStatus;
|
// private Integer editStatus;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)
|
// * 1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)
|
||||||
*/
|
// */
|
||||||
@TableField(value = "status")
|
// @TableField(value = "status")
|
||||||
@ApiModelProperty(value = "1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)")
|
// @ApiModelProperty(value = "1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)")
|
||||||
private Integer status;
|
// private Integer status;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否用户跟节点 0-否 1-是
|
// * 是否用户跟节点 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "user_root_is")
|
// @TableField(value = "user_root_is")
|
||||||
@ApiModelProperty(value = "是否用户跟节点 0-否 1-是")
|
// @ApiModelProperty(value = "是否用户跟节点 0-否 1-是")
|
||||||
private Integer userRootIs;
|
// private Integer userRootIs;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 已生成的虚拟包 0-无 1-发货包 2-制作包 4-直发包 8-发货前装配包
|
// * 已生成的虚拟包 0-无 1-发货包 2-制作包 4-直发包 8-发货前装配包
|
||||||
*/
|
// */
|
||||||
@TableField(value = "virtrual_package_enum")
|
// @TableField(value = "virtrual_package_enum")
|
||||||
@ApiModelProperty(value = "已生成的虚拟包 0-无 1-发货包 2-制作包 4-直发包 8-发货前装配包")
|
// @ApiModelProperty(value = "已生成的虚拟包 0-无 1-发货包 2-制作包 4-直发包 8-发货前装配包")
|
||||||
private Integer virtrualPackageEnum;
|
// private Integer virtrualPackageEnum;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* -1=初始状态 1=正常 2=冻结/完全弃用异常:物料的状态冻结或者完全弃用的状态 3=递归异常:出现子级包含父级的异常情况(打在子级物料中的那个父级物料编码)4=数据不完整异常:物料编号或数量没有填写 5=超级物料异常:超级物料待说明 6=重复异常:当前层级包含了相同的物料信息
|
// * -1=初始状态 1=正常 2=冻结/完全弃用异常:物料的状态冻结或者完全弃用的状态 3=递归异常:出现子级包含父级的异常情况(打在子级物料中的那个父级物料编码)4=数据不完整异常:物料编号或数量没有填写 5=超级物料异常:超级物料待说明 6=重复异常:当前层级包含了相同的物料信息
|
||||||
* 7=物料主数据不存在:当前的物料信息在主数据平台不存在 8=项目类别为空
|
// * 7=物料主数据不存在:当前的物料信息在主数据平台不存在 8=项目类别为空
|
||||||
* 9=项目赋值异常:当父级物料的项目类型为Q时,子级中不能存在项目类别为Q的物料
|
// * 9=项目赋值异常:当父级物料的项目类型为Q时,子级中不能存在项目类别为Q的物料
|
||||||
* <p>
|
// * <p>
|
||||||
* 10=项目赋值异常:当父级物料的项目类型为F时,子级中不能存在项目类型为F的物料
|
// * 10=项目赋值异常:当父级物料的项目类型为F时,子级中不能存在项目类型为F的物料
|
||||||
* <p>
|
// * <p>
|
||||||
* 11=未填写变更原因和技术通知单
|
// * 11=未填写变更原因和技术通知单
|
||||||
* <p>
|
// * <p>
|
||||||
* 12=数量需要用户确认
|
// * 12=数量需要用户确认
|
||||||
* <p>
|
// * <p>
|
||||||
* 13=项目类型需要用户确认
|
// * 13=项目类型需要用户确认
|
||||||
*/
|
// */
|
||||||
@TableField(value = "exception_status")
|
// @TableField(value = "exception_status")
|
||||||
@ApiModelProperty(value = "-1=初始状态 1=正常 2=冻结/完全弃用异常:物料的状态冻结或者完全弃用的状态 3=递归异常:出现子级包含父级的异常情况(打在子级物料中的那个父级物料编码)4=数据不完整异常:物料编号或数量没有填写 5=超级物料异常:超级物料待说明 6=重复异常:当前层级包含了相同的物料信息 7= 物料主数据不存在:当前的物料信息在主数据平台不存在 8=项目类别为空 9=项目赋值异常:当父级物料的项目类型为Q时,子级中不能存在项目类别为Q的物料 10=项目赋值异常:当父级物料的项目类型为F时,子级中不能存在项目类型为F的物料 11=未填写变更原因和技术通知单 12=数量需要用户确认 13=项目类型需要用户确认")
|
// @ApiModelProperty(value = "-1=初始状态 1=正常 2=冻结/完全弃用异常:物料的状态冻结或者完全弃用的状态 3=递归异常:出现子级包含父级的异常情况(打在子级物料中的那个父级物料编码)4=数据不完整异常:物料编号或数量没有填写 5=超级物料异常:超级物料待说明 6=重复异常:当前层级包含了相同的物料信息 7= 物料主数据不存在:当前的物料信息在主数据平台不存在 8=项目类别为空 9=项目赋值异常:当父级物料的项目类型为Q时,子级中不能存在项目类别为Q的物料 10=项目赋值异常:当父级物料的项目类型为F时,子级中不能存在项目类型为F的物料 11=未填写变更原因和技术通知单 12=数量需要用户确认 13=项目类型需要用户确认")
|
||||||
private Integer exceptionStatus;
|
// private Integer exceptionStatus;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否虚拟包 0-否 1-是
|
// * 是否虚拟包 0-否 1-是
|
||||||
*/
|
// */
|
||||||
@TableField(value = "virtual_package_is")
|
// @TableField(value = "virtual_package_is")
|
||||||
@ApiModelProperty(value = "是否虚拟包 0-否 1-是")
|
// @ApiModelProperty(value = "是否虚拟包 0-否 1-是")
|
||||||
private Integer virtualPackageIs;
|
// private Integer virtualPackageIs;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 来源行ID(原始BOM中的行ID)
|
// * 来源行ID(原始BOM中的行ID)
|
||||||
*/
|
// */
|
||||||
@TableField(value = "source_row_id")
|
// @TableField(value = "source_row_id")
|
||||||
@ApiModelProperty(value = "来源行ID(原始BOM中的行ID)")
|
// @ApiModelProperty(value = "来源行ID(原始BOM中的行ID)")
|
||||||
private Long sourceRowId;
|
// private Long sourceRowId;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 设计人员编码
|
// * 设计人员编码
|
||||||
*/
|
// */
|
||||||
@TableField(value = "devise_user_code")
|
// @TableField(value = "devise_user_code")
|
||||||
@ApiModelProperty(value = "设计人员编码")
|
// @ApiModelProperty(value = "设计人员编码")
|
||||||
private String deviseUserCode;
|
// private String deviseUserCode;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 设计人员名称
|
// * 设计人员名称
|
||||||
*/
|
// */
|
||||||
@TableField(value = "devise_name")
|
// @TableField(value = "devise_name")
|
||||||
@ApiModelProperty(value = "设计人员名称")
|
// @ApiModelProperty(value = "设计人员名称")
|
||||||
private String deviseName;
|
// private String deviseName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建人编码
|
// * 创建人编码
|
||||||
*/
|
// */
|
||||||
@TableField(value = "created_by")
|
// @TableField(value = "created_by")
|
||||||
@ApiModelProperty(value = "创建人编码")
|
// @ApiModelProperty(value = "创建人编码")
|
||||||
private String createdBy;
|
// private String createdBy;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建时间
|
// * 创建时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "created_time")
|
// @TableField(value = "created_time")
|
||||||
@ApiModelProperty(value = "创建时间")
|
// @ApiModelProperty(value = "创建时间")
|
||||||
private LocalDateTime createdTime;
|
// private LocalDateTime createdTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建人员所属岗位 0-设计人员 1-工艺人员 2-其他
|
// * 创建人员所属岗位 0-设计人员 1-工艺人员 2-其他
|
||||||
*/
|
// */
|
||||||
@TableField(value = "created_job")
|
// @TableField(value = "created_job")
|
||||||
@ApiModelProperty(value = "创建人员所属岗位 0-设计人员 1-工艺人员 2-其他")
|
// @ApiModelProperty(value = "创建人员所属岗位 0-设计人员 1-工艺人员 2-其他")
|
||||||
private Integer createdJob;
|
// private Integer createdJob;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 复核时间
|
// * 复核时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "audit_time")
|
// @TableField(value = "audit_time")
|
||||||
@ApiModelProperty(value = "复核时间")
|
// @ApiModelProperty(value = "复核时间")
|
||||||
private LocalDateTime auditTime;
|
// private LocalDateTime auditTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 复核人
|
// * 复核人
|
||||||
*/
|
// */
|
||||||
@TableField(value = "audit_user_name")
|
// @TableField(value = "audit_user_name")
|
||||||
@ApiModelProperty(value = "复核人")
|
// @ApiModelProperty(value = "复核人")
|
||||||
private String auditUserName;
|
// private String auditUserName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 发布时间
|
// * 发布时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "release_time")
|
// @TableField(value = "release_time")
|
||||||
@ApiModelProperty(value = "发布时间")
|
// @ApiModelProperty(value = "发布时间")
|
||||||
private LocalDateTime releaseTime;
|
// private LocalDateTime releaseTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 发布人
|
// * 发布人
|
||||||
*/
|
// */
|
||||||
@TableField(value = "release_user_name")
|
// @TableField(value = "release_user_name")
|
||||||
@ApiModelProperty(value = "发布人")
|
// @ApiModelProperty(value = "发布人")
|
||||||
private String releaseUserName;
|
// private String releaseUserName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 退回时间
|
// * 退回时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "revert_time")
|
// @TableField(value = "revert_time")
|
||||||
@ApiModelProperty(value = "退回时间")
|
// @ApiModelProperty(value = "退回时间")
|
||||||
private LocalDateTime revertTime;
|
// private LocalDateTime revertTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 退回人
|
// * 退回人
|
||||||
*/
|
// */
|
||||||
@TableField(value = "revert_user_name")
|
// @TableField(value = "revert_user_name")
|
||||||
@ApiModelProperty(value = "退回人")
|
// @ApiModelProperty(value = "退回人")
|
||||||
private String revertUserName;
|
// private String revertUserName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 版本过期时间=下个版本的创建时间
|
// * 版本过期时间=下个版本的创建时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "expire_end_time")
|
// @TableField(value = "expire_end_time")
|
||||||
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间")
|
// @ApiModelProperty(value = "版本过期时间=下个版本的创建时间")
|
||||||
private LocalDateTime expireEndTime;
|
// private LocalDateTime expireEndTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 转换pbom时间
|
// * 转换pbom时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "convert_to_ebom_time")
|
// @TableField(value = "convert_to_ebom_time")
|
||||||
@ApiModelProperty(value = "转换pbom时间")
|
// @ApiModelProperty(value = "转换pbom时间")
|
||||||
private LocalDateTime convertToEbomTime;
|
// private LocalDateTime convertToEbomTime;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 备注
|
// * 备注
|
||||||
*/
|
// */
|
||||||
@TableField(value = "remark")
|
// @TableField(value = "remark")
|
||||||
@ApiModelProperty(value = "备注")
|
// @ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
// private String remark;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 设计维护部门名称
|
// * 设计维护部门名称
|
||||||
*/
|
// */
|
||||||
@TableField(value = "dept_name")
|
// @TableField(value = "dept_name")
|
||||||
@ApiModelProperty(value = "设计维护部门名称")
|
// @ApiModelProperty(value = "设计维护部门名称")
|
||||||
private String deptName;
|
// private String deptName;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* bom树的高度
|
// * bom树的高度
|
||||||
*/
|
// */
|
||||||
@TableField(value = "level_num")
|
// @TableField(value = "level_num")
|
||||||
@ApiModelProperty(value = "bom树的高度")
|
// @ApiModelProperty(value = "bom树的高度")
|
||||||
private Integer levelNum;
|
// private Integer levelNum;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 升版说明
|
// * 升版说明
|
||||||
*/
|
// */
|
||||||
@TableField(value = "change_desc")
|
// @TableField(value = "change_desc")
|
||||||
@ApiModelProperty(value = "升版说明")
|
// @ApiModelProperty(value = "升版说明")
|
||||||
private String changeDesc;
|
// private String changeDesc;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 通知单号
|
// * 通知单号
|
||||||
*/
|
// */
|
||||||
@TableField(value = "notice_nums")
|
// @TableField(value = "notice_nums")
|
||||||
@ApiModelProperty(value = "通知单号")
|
// @ApiModelProperty(value = "通知单号")
|
||||||
private String noticeNums;
|
// private String noticeNums;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 修改时间
|
// * 修改时间
|
||||||
*/
|
// */
|
||||||
@TableField(value = "modify_time")
|
// @TableField(value = "modify_time")
|
||||||
@ApiModelProperty(value = "修改时间")
|
// @ApiModelProperty(value = "修改时间")
|
||||||
private LocalDateTime modifyTime;
|
// private LocalDateTime modifyTime;
|
||||||
|
//
|
||||||
private static final long serialVersionUID = 265246823929418418L;
|
// private static final long serialVersionUID = 265246823929418418L;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ public class BomNewEbomParentFormalVO extends BaseMaterialVO implements Serializ
|
||||||
* 来源行ID(原始BOM中的行ID)
|
* 来源行ID(原始BOM中的行ID)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "来源行ID(原始BOM中的行ID)")
|
@ApiModelProperty(value = "来源行ID(原始BOM中的行ID)")
|
||||||
private Long sourceRowId;
|
private String sourceRowId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设计人员编码
|
* 设计人员编码
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ public class BomNewPbomParentFormalVO extends BaseMaterialVO implements Serializ
|
||||||
* 来源行ID(EBOM中的行ID)
|
* 来源行ID(EBOM中的行ID)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "来源行ID(EBOM中的行ID)")
|
@ApiModelProperty(value = "来源行ID(EBOM中的行ID)")
|
||||||
private Long sourceRowId;
|
private String sourceRowId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设计人员编码
|
* 设计人员编码
|
||||||
|
|
|
||||||
|
|
@ -1932,10 +1932,10 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
checkUserRoleAuth(dto.getParent().getCreatedBy());
|
checkUserRoleAuth(dto.getParent().getCreatedBy());
|
||||||
|
|
||||||
|
|
||||||
//暂存数据为空后面不处理
|
// //暂存数据为空后面不处理
|
||||||
if (CollUtil.isEmpty(dto.getDatas())) {
|
// if (CollUtil.isEmpty(dto.getDatas())) {
|
||||||
return dto.getParent();
|
// return dto.getParent();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
EBomEdit eBomEdit = new EBomEdit(EBomSourceEnum.FROM_MDM.getValue());
|
EBomEdit eBomEdit = new EBomEdit(EBomSourceEnum.FROM_MDM.getValue());
|
||||||
|
|
@ -2511,6 +2511,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
//转移后删除
|
//转移后删除
|
||||||
this.getBaseMapper().delEBomHistory(childParentRowIds);
|
this.getBaseMapper().delEBomHistory(childParentRowIds);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.getBaseMapper().insertEBomFormalParent(exceptRowIds);
|
||||||
|
this.getBaseMapper().insertEBomFormalChild(exceptRowIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,41 +84,34 @@ public class CheckEBomException {
|
||||||
*/
|
*/
|
||||||
public void initException() {
|
public void initException() {
|
||||||
//初始化物料信息
|
//初始化物料信息
|
||||||
List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
// List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
|
|
||||||
checkException(materialBaseInfo);
|
|
||||||
|
|
||||||
|
checkException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initException(List<Integer> unCheckException) {
|
public void initException(List<Integer> unCheckException) {
|
||||||
//初始化物料信息
|
//初始化物料信息
|
||||||
List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
// List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
|
||||||
this.unCheckExcept=unCheckException;
|
this.unCheckExcept=unCheckException;
|
||||||
checkException(materialBaseInfo);
|
checkException();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initException(String... ignorePropertyList) {
|
public void initException(String... ignorePropertyList) {
|
||||||
List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList);
|
// List<BaseMaterialVO> materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList);
|
||||||
checkException(materialBaseInfo);
|
checkException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void checkException(List<BaseMaterialVO> materialBaseInfo) {
|
public void checkException() {
|
||||||
for (BomNewEbomParentVO vo : allBomDetail) {
|
for (BomNewEbomParentVO vo : allBomDetail) {
|
||||||
// if(Objects.isNull(vo.getExceptionStatus())) {
|
|
||||||
//忽略不检查的如14
|
//忽略不检查的如14
|
||||||
if (CollectionUtil.isNotEmpty(unCheckExcept)
|
if (CollectionUtil.isNotEmpty(unCheckExcept)
|
||||||
&& vo.getExceptionStatus() != null
|
&& vo.getExceptionStatus() != null
|
||||||
&& unCheckExcept.contains(vo.getExceptionStatus())) {
|
&& unCheckExcept.contains(vo.getExceptionStatus())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// BaseMaterialVO mainVO = materialBaseInfo.stream()
|
|
||||||
// .filter(u -> StrUtil.equals(u.getMaterialNo(), vo.getMaterialNo()))
|
|
||||||
// .findFirst()
|
|
||||||
// .orElse(null);
|
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||||
// }
|
|
||||||
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) {
|
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) {
|
||||||
if (StrUtil.isBlank(vo.getMaterialDesc())) {
|
if (StrUtil.isBlank(vo.getMaterialDesc())) {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue());
|
||||||
|
|
@ -137,7 +130,6 @@ public class CheckEBomException {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue());
|
||||||
} else if ((!StrUtil.equals("KG", StringUtil.toUpperCase(vo.getMaterialUnit()))
|
} else if ((!StrUtil.equals("KG", StringUtil.toUpperCase(vo.getMaterialUnit()))
|
||||||
&& !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC"))
|
&& !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC"))
|
||||||
//|| (!Objects.isNull(mainVO) && !StrUtil.equals(vo.getMaterialUnit(), mainVO.getMaterialUnit()))) {
|
|
||||||
&& (StrUtil.isBlank(vo.getExceptionTag()) || (!vo.getExceptionTag().contains("16")) && !vo.getExceptionTag().contains("12"))
|
&& (StrUtil.isBlank(vo.getExceptionTag()) || (!vo.getExceptionTag().contains("16")) && !vo.getExceptionTag().contains("12"))
|
||||||
&& Objects.equals(vo.getSource(), EBomSourceEnum.FROM_BOM.getValue())) {
|
&& Objects.equals(vo.getSource(), EBomSourceEnum.FROM_BOM.getValue())) {
|
||||||
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_12.getValue());
|
vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_12.getValue());
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import com.nflg.product.bomnew.constant.*;
|
||||||
import com.nflg.product.bomnew.pojo.dto.BomNewEBomParentEditDTO;
|
import com.nflg.product.bomnew.pojo.dto.BomNewEBomParentEditDTO;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.MaterialMainEntity;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BaseMaterialVO;
|
import com.nflg.product.bomnew.pojo.vo.BaseMaterialVO;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||||
import com.nflg.product.bomnew.service.BomNewEbomChildService;
|
import com.nflg.product.bomnew.service.BomNewEbomChildService;
|
||||||
|
|
@ -21,6 +22,7 @@ import com.nflg.product.bomnew.service.BomNewEbomParentService;
|
||||||
import com.nflg.product.bomnew.service.MaterialMainService;
|
import com.nflg.product.bomnew.service.MaterialMainService;
|
||||||
import com.nflg.product.bomnew.service.UserRoleService;
|
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.MaterialshouldBomExistUtil;
|
||||||
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;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -75,6 +77,11 @@ public class EBomEdit {
|
||||||
parent.setStatus(EBomStatusEnum.WAIT_CHECK.getValue());
|
parent.setStatus(EBomStatusEnum.WAIT_CHECK.getValue());
|
||||||
parent.setNum(new BigDecimal(1));
|
parent.setNum(new BigDecimal(1));
|
||||||
parent.setBomExist(1);
|
parent.setBomExist(1);
|
||||||
|
MaterialMainEntity materialMainEntity = SpringUtil.getBean(MaterialMainService.class).lambdaQuery()
|
||||||
|
.eq(MaterialMainEntity::getMaterialNo, parent.getMaterialNo())
|
||||||
|
.one();
|
||||||
|
parent.setShouldBomExist(MaterialshouldBomExistUtil.checkShouldBomExist(materialMainEntity.getMaterialCategoryCode()
|
||||||
|
, materialMainEntity.getMaterialGetType()) ? 1 : 0);
|
||||||
parent.setLastVersionIs(1);
|
parent.setLastVersionIs(1);
|
||||||
parent.setEditStatus(EbomEditStatusEnum.HANDLER_CREATED.getValue());
|
parent.setEditStatus(EbomEditStatusEnum.HANDLER_CREATED.getValue());
|
||||||
parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue());
|
||||||
|
|
@ -132,6 +139,7 @@ public class EBomEdit {
|
||||||
parentEntity.setRootIs(parentEntity.getMaterialNo().startsWith("31") ? 1 : 0);
|
parentEntity.setRootIs(parentEntity.getMaterialNo().startsWith("31") ? 1 : 0);
|
||||||
parentEntity.setUserRootIs(1);
|
parentEntity.setUserRootIs(1);
|
||||||
parentEntity.setDeptRowId(SessionUtil.getDepartRowId());
|
parentEntity.setDeptRowId(SessionUtil.getDepartRowId());
|
||||||
|
parentEntity.setBomExist(CollUtil.isEmpty(createDTO.getDatas()) ? 0 : 1);
|
||||||
|
|
||||||
createDTO.getDatas().forEach(k -> {
|
createDTO.getDatas().forEach(k -> {
|
||||||
k.setParentRowId(parentEntity.getRowId());
|
k.setParentRowId(parentEntity.getRowId());
|
||||||
|
|
@ -274,9 +282,9 @@ public class EBomEdit {
|
||||||
throw new NflgBusinessException(STATE.Error, "parent 数据不能为空");
|
throw new NflgBusinessException(STATE.Error, "parent 数据不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollUtil.isEmpty(dto.getDatas())) {
|
// if (CollUtil.isEmpty(dto.getDatas())) {
|
||||||
throw new NflgBusinessException(STATE.Error, "datas 数据不能为空");
|
// throw new NflgBusinessException(STATE.Error, "datas 数据不能为空");
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<String> materialNos = dto.getDatas().stream().map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
List<String> materialNos = dto.getDatas().stream().map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
||||||
if(materialNos.contains(dto.getParent().getMaterialNo())){
|
if(materialNos.contains(dto.getParent().getMaterialNo())){
|
||||||
|
|
@ -356,6 +364,7 @@ public class EBomEdit {
|
||||||
parentEntity.setModifyTime(LocalDateTime.now());
|
parentEntity.setModifyTime(LocalDateTime.now());
|
||||||
}
|
}
|
||||||
parentEntity.setEditStatus(dto.getOpType());
|
parentEntity.setEditStatus(dto.getOpType());
|
||||||
|
parentEntity.setBomExist(CollUtil.isEmpty(dto.getDatas()) ? 0 : 1);
|
||||||
//提交
|
//提交
|
||||||
if (Objects.equals(dto.getOpType(), EbomEditStatusEnum.HANDLER_FINISHED.getValue())) {
|
if (Objects.equals(dto.getOpType(), EbomEditStatusEnum.HANDLER_FINISHED.getValue())) {
|
||||||
//工艺人员
|
//工艺人员
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.product.base.core.exception;
|
package com.nflg.product.base.core.exception;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
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;
|
||||||
|
|
@ -51,7 +52,7 @@ public class BaseGlobalExceptionHandle {
|
||||||
public ResultVO<String> handleDuplicateKeyException(DuplicateKeyException e) {
|
public ResultVO<String> handleDuplicateKeyException(DuplicateKeyException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
//return ResultVO.error("已存在该记录,请勿重复操作");
|
//return ResultVO.error("已存在该记录,请勿重复操作");
|
||||||
return ResultVO.error("已存在该记录,请勿重复操作");
|
return ResultVO.error("数据库存在重复数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -59,9 +60,12 @@ public class BaseGlobalExceptionHandle {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResultVO<String> handleException(Exception e) {
|
public ResultVO<String> handleException(Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
//return ResultVO.error("操作失败,请联系系统管理员");
|
if (StrUtil.isNotBlank(e.getMessage()) && e.getMessage().contains("Deadlock")) {
|
||||||
|
return ResultVO.error("操作失败,请重试");
|
||||||
|
} else {
|
||||||
return ResultVO.error("操作失败,请联系系统管理员");
|
return ResultVO.error("操作失败,请联系系统管理员");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param e
|
* @param e
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue