Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom
This commit is contained in:
commit
017646bd95
|
|
@ -4,7 +4,9 @@ import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.nflg.product.base.core.api.BaseApi;
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
|
import com.nflg.product.bomnew.constant.FactoryCodeEnum;
|
||||||
import com.nflg.product.bomnew.constant.MBomConstantEnum;
|
import com.nflg.product.bomnew.constant.MBomConstantEnum;
|
||||||
|
import com.nflg.product.bomnew.constant.ValueEnum;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewMbomDetailVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewMbomDetailVO;
|
||||||
import com.nflg.product.bomnew.pojo.vo.BomNewMbomParentVO;
|
import com.nflg.product.bomnew.pojo.vo.BomNewMbomParentVO;
|
||||||
|
|
@ -29,7 +31,7 @@ import java.util.Objects;
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2024-01-01 10:53:24
|
* @since 2024-01-01 10:53:24
|
||||||
*/
|
*/
|
||||||
@Api(tags = "接口")
|
@Api(tags = "Mbom接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("mbom")
|
@RequestMapping("mbom")
|
||||||
public class MBomApi extends BaseApi {
|
public class MBomApi extends BaseApi {
|
||||||
|
|
@ -57,6 +59,17 @@ public class MBomApi extends BaseApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("factoryList")
|
||||||
|
@ApiOperation("工厂列表")
|
||||||
|
public ResultVO<List> factoryList() {
|
||||||
|
|
||||||
|
List list= EnumUtils.listEnum( FactoryCodeEnum.class);
|
||||||
|
return ResultVO.success(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("superSaterialList")
|
@PostMapping("superSaterialList")
|
||||||
@ApiOperation("设置超级物料列表")
|
@ApiOperation("设置超级物料列表")
|
||||||
public ResultVO<List<BomNewMbomDetailVO>> superSaterialList(@RequestParam(value = "rowId") Long rowId ) {
|
public ResultVO<List<BomNewMbomDetailVO>> superSaterialList(@RequestParam(value = "rowId") Long rowId ) {
|
||||||
|
|
@ -81,8 +94,8 @@ public class MBomApi extends BaseApi {
|
||||||
if(StrUtil.isEmpty(EnumUtils.getEnumDescription(MBomConstantEnum.MBomSuperMaterialStatusEnum.class,status))){
|
if(StrUtil.isEmpty(EnumUtils.getEnumDescription(MBomConstantEnum.MBomSuperMaterialStatusEnum.class,status))){
|
||||||
throw new NflgBusinessException(STATE.ParamErr,"status 不在范围内");
|
throw new NflgBusinessException(STATE.ParamErr,"status 不在范围内");
|
||||||
}
|
}
|
||||||
|
bomNewMbomDetailService.superSaterialStatusTag(rowId,status);
|
||||||
return ResultVO.success();
|
return ResultVO.success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.nflg.product.bomnew.constant;
|
package com.nflg.product.bomnew.constant;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum FactoryCodeEnum {
|
|
||||||
|
public enum FactoryCodeEnum implements ValueEnum<String> {
|
||||||
FACTORY_1010 ("1010", "泉州工厂"),
|
FACTORY_1010 ("1010", "泉州工厂"),
|
||||||
FACTORY_1020("1020", "仙桃工厂");
|
FACTORY_1020("1020", "仙桃工厂");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,15 @@ package com.nflg.product.bomnew.mapper.master;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity;
|
import com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
|
||||||
|
import com.nflg.product.bomnew.pojo.query.OriginalBomQuery;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO;
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.BomOriginalListVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* t_bom_new_mbom_parent 表数据库访问层
|
* t_bom_new_mbom_parent 表数据库访问层
|
||||||
|
|
@ -12,4 +20,25 @@ import com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity;
|
||||||
* @since 2024-01-01 10:53:24
|
* @since 2024-01-01 10:53:24
|
||||||
*/
|
*/
|
||||||
public interface BomNewMbomParentMapper extends BaseMapper<BomNewMbomParentEntity> {
|
public interface BomNewMbomParentMapper extends BaseMapper<BomNewMbomParentEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
Page<BomNewMbomMiddleVO> getMBomListPage(Page<BomNewMbomMiddleVO> page, @Param("query") BomNewMbomParentQuery query );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询索引
|
||||||
|
* @param page
|
||||||
|
* @param query
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<BomNewMbomMiddleVO> indexListPage(Page<BomNewMbomMiddleVO> page, @Param("query") BomNewMbomParentQuery query );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归向上查找所有数据
|
||||||
|
* @param rowId 当前行
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BomNewMbomMiddleVO> searchList(@Param("rowId") Long rowId );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,18 @@ public class BomNewMbomBackMaterialEntity implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 退回的row_id(和ebom表row_id 关联)
|
* 退回的row_id(和ebom表row_id 关联)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "source_id")
|
@TableField(value = "source_row_id")
|
||||||
@ApiModelProperty(value = "退回的row_id(和ebom表row_id 关联)")
|
@ApiModelProperty(value = "退回的row_id pbom表")
|
||||||
private Long sourceId;
|
private Long sourceRowId;
|
||||||
|
|
||||||
|
@TableField(value = "detail_row_id")
|
||||||
|
@ApiModelProperty(value = "detail行id)")
|
||||||
|
private Long detailRowId;
|
||||||
|
|
||||||
|
@TableField(value = "bom_row_id")
|
||||||
|
@ApiModelProperty(value = "mbom_parent表row_id关联)")
|
||||||
|
private Long bomRowId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退回人名称
|
* 退回人名称
|
||||||
|
|
|
||||||
|
|
@ -20,19 +20,7 @@ import java.time.LocalDate;
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ApiModel(value="com-nflg-product-bomnew-pojo-new-query-BomNewMbomParentEntityQuery")
|
@ApiModel(value="com-nflg-product-bomnew-pojo-new-query-BomNewMbomParentEntityQuery")
|
||||||
public class BomNewMbomParentQuery implements Serializable {
|
public class BomNewMbomParentQuery extends BasePageQuery implements Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键行ID-雪花
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "主键行ID-雪花")
|
|
||||||
private Long rowId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批号-来自plm-临时
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "批号-来自plm-临时")
|
|
||||||
private String batchNo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图号
|
* 图号
|
||||||
|
|
@ -52,185 +40,8 @@ public class BomNewMbomParentQuery implements Serializable {
|
||||||
@ApiModelProperty(value = "物料编码")
|
@ApiModelProperty(value = "物料编码")
|
||||||
private String materialNo;
|
private String materialNo;
|
||||||
|
|
||||||
/**
|
|
||||||
* 排序号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "排序号")
|
|
||||||
private String orderNumber;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "物料名称")
|
|
||||||
private String materialName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料描述
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "物料描述")
|
|
||||||
private String materialDesc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 材质,材料
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "材质,材料")
|
|
||||||
private String materialTexture;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "单位")
|
|
||||||
private String materialUnit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单重
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "单重")
|
|
||||||
private BigDecimal unitWeight;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 总重
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "总重")
|
|
||||||
private BigDecimal totalWeight;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "版本号")
|
|
||||||
private String currentVersion;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数量
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "数量")
|
|
||||||
private BigDecimal num;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否最新版:0-否 1-是
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "是否最新版:0-否 1-是")
|
|
||||||
private Integer lastVersionIs;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1、待发布(sap)、3=已发布
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "1、待发布(sap)、3=已发布")
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布sap人员
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "发布sap人员")
|
|
||||||
private String sysnSapUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发布sap时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "发布sap时间")
|
|
||||||
private LocalDateTime sysnSapTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开始发布sap时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "发布sap时间开始时间")
|
|
||||||
private LocalDateTime sysnSapTimeStart;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结束发布sap时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "发布sap时间结束时间")
|
|
||||||
private LocalDateTime sysnSapTimeEnd;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 来源行ID(PBOM中parent的行ID)
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "来源行ID(PBOM中parent的行ID)")
|
|
||||||
private Long sourceRowId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设计人员编码
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设计人员编码")
|
|
||||||
private String deviseUserCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设计人员名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设计人员名称")
|
|
||||||
private String deviseName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建人编码
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建人编码")
|
|
||||||
private String createdBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
private LocalDateTime createdTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开始创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建时间开始时间")
|
|
||||||
private LocalDateTime createdTimeStart;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结束创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建时间结束时间")
|
|
||||||
private LocalDateTime createdTimeEnd;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本过期时间=下个版本的创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间")
|
|
||||||
private LocalDateTime expireEndTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开始版本过期时间=下个版本的创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间开始时间")
|
|
||||||
private LocalDateTime expireEndTimeStart;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结束版本过期时间=下个版本的创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间结束时间")
|
|
||||||
private LocalDateTime expireEndTimeEnd;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设计维护部门名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设计维护部门名称")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bom树的高度
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "bom树的高度")
|
|
||||||
private Integer levelNum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 升版说明
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "升版说明")
|
|
||||||
private String changeDesc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通知单号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "通知单号")
|
|
||||||
private String noticeNums;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单号
|
* 订单号
|
||||||
|
|
@ -238,35 +49,34 @@ public class BomNewMbomParentQuery implements Serializable {
|
||||||
@ApiModelProperty(value = "订单号")
|
@ApiModelProperty(value = "订单号")
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改时间
|
|
||||||
*/
|
@ApiModelProperty(value = "开始时间")
|
||||||
@ApiModelProperty(value = "修改时间")
|
private String startDate;
|
||||||
private LocalDateTime modifyTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始修改时间
|
*
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "修改时间开始时间")
|
@ApiModelProperty(value = "结束时间")
|
||||||
private LocalDateTime modifyTimeStart;
|
private String endDate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "前端忽略,创建人编码")
|
||||||
|
private String createdBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结束修改时间
|
* 1、待发布(sap)、3=已发布
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "修改时间结束时间")
|
@ApiModelProperty(value = "前端忽略,状态")
|
||||||
private LocalDateTime modifyTimeEnd;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置每页显示条数
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设置每页显示条数")
|
|
||||||
private Long pageSize = 20L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前页
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "当前页")
|
|
||||||
private Long page = 1L;
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,223 @@
|
||||||
|
package com.nflg.product.bomnew.pojo.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* t_bom_new_mbom_parent
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-01 10:53:26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="com-nflg-product-bomnew-pojo-new-vo-BomNewMbomMiddleVO")
|
||||||
|
public class BomNewMbomMiddleVO extends BaseMaterialVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键行ID-雪花
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主键行ID-雪花")
|
||||||
|
private Long rowId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bom版本行ID,和mbom_parent表row_id关联
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "bom版本行ID,和mbom_parent表row_id关联")
|
||||||
|
private Long bomRowId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级行ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "父级行ID")
|
||||||
|
private Long parentRowId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批号-来自plm-临时
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "批号-来自plm-临时")
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工厂编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "工厂编码")
|
||||||
|
private String facCode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
private String orderNumber;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "版本号")
|
||||||
|
private String currentVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
private BigDecimal num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否最新版:0-否 1-是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否最新版:0-否 1-是")
|
||||||
|
private Integer lastVersionIs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1、待发布(sap)、3=已发布
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "1、待发布(sap)、3=已发布")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布sap人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布sap人员")
|
||||||
|
private String sysnSapUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布sap时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布sap时间")
|
||||||
|
private LocalDateTime sysnSapTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源行ID(PBOM中parent的行ID)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "来源行ID(PBOM中parent的行ID)")
|
||||||
|
private Long sourceRowId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计人员编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设计人员编码")
|
||||||
|
private String deviseUserCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计人员名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设计人员名称")
|
||||||
|
private String deviseName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人编码")
|
||||||
|
private String createdBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本过期时间=下个版本的创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间")
|
||||||
|
private LocalDateTime expireEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计维护部门名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设计维护部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bom树的高度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "bom树的高度")
|
||||||
|
private Integer levelNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 升版说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "升版说明")
|
||||||
|
private String changeDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知单号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "通知单号")
|
||||||
|
private String noticeNums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "订单号")
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime modifyTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 超级物料 0-否 1-是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "超级物料 0-否 1-是")
|
||||||
|
private Integer superMaterialStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否虚拟件 0-否 1-是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否虚拟件 0-否 1-是")
|
||||||
|
private Integer virtualPartIs;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否有下级 0-否 1-是")
|
||||||
|
private Integer bomExist;
|
||||||
|
public Integer getBomExist(){
|
||||||
|
if(Objects.isNull(bomExist)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if(bomExist>0){return 1;}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private List<BomNewMbomMiddleVO> childNodes = Collections.emptyList();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -417,8 +417,19 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
//保存异常
|
//保存异常
|
||||||
saveException(checkEBomException);
|
saveException(checkEBomException);
|
||||||
|
// initBomException(list,new String[]{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initBomException(List<BomNewEbomParentVO> list, String ... ignorePropertyList) {
|
||||||
|
CheckEBomException checkEBomException = new CheckEBomException(list);
|
||||||
|
checkEBomException.initException(ignorePropertyList);
|
||||||
|
|
||||||
|
//保存异常
|
||||||
|
saveException(checkEBomException);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void checkBomException(List<BomNewEbomParentVO> list) {
|
public void checkBomException(List<BomNewEbomParentVO> list) {
|
||||||
CheckEBomException checkEBomException = new CheckEBomException(list);
|
CheckEBomException checkEBomException = new CheckEBomException(list);
|
||||||
checkEBomException.checkException();
|
checkEBomException.checkException();
|
||||||
|
|
@ -1337,7 +1348,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
// CheckEBomException checkEBomException = new CheckEBomException(checkBom);
|
// CheckEBomException checkEBomException = new CheckEBomException(checkBom);
|
||||||
// checkEBomException.checkException();
|
// checkEBomException.checkException();
|
||||||
this.initBomException(checkBom);
|
// this.initBomException(checkBom);
|
||||||
|
checkBomException(checkBom);
|
||||||
if(CollectionUtil.isNotEmpty(dto.getDatas())){
|
if(CollectionUtil.isNotEmpty(dto.getDatas())){
|
||||||
for (BomNewEbomParentVO vo:
|
for (BomNewEbomParentVO vo:
|
||||||
dto.getDatas()) {
|
dto.getDatas()) {
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,15 @@ import java.util.Objects;
|
||||||
public class BomNewMbomDetailService extends ServiceImpl<BomNewMbomDetailMapper, BomNewMbomDetailEntity> {
|
public class BomNewMbomDetailService extends ServiceImpl<BomNewMbomDetailMapper, BomNewMbomDetailEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退回
|
||||||
|
* @param rowId
|
||||||
|
*/
|
||||||
|
public void back(List<Long> rowId){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,14 @@
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
<!--@Table t_bom_new_mbom_back_material -->
|
<!--@Table t_bom_new_mbom_back_material -->
|
||||||
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
|
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
|
||||||
<result column="source_id" property="sourceId" jdbcType="BIGINT"/>
|
<result column="detail_row_id" property="sourceRowId" jdbcType="BIGINT"/>
|
||||||
|
|
||||||
|
|
||||||
|
<result column="bom_row_id" property="bomRowId" jdbcType="BIGINT"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<result column="detail_row_id" property="detailRowId" jdbcType="BIGINT"/>
|
||||||
<result column="back_user_name" property="backUserName" jdbcType="VARCHAR"/>
|
<result column="back_user_name" property="backUserName" jdbcType="VARCHAR"/>
|
||||||
<result column="back_user_code" property="backUserCode" jdbcType="VARCHAR"/>
|
<result column="back_user_code" property="backUserCode" jdbcType="VARCHAR"/>
|
||||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,95 @@
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
row_id, batch_no, drawing_no, fac_code, material_no, order_number, material_name, material_desc, material_texture, material_unit, unit_weight, total_weight, current_version, num, last_version_is, status, sysn_sap_user_name, sysn_sap_time, source_row_id, devise_user_code, devise_name, created_by, created_time, expire_end_time, remark, dept_name, level_num, change_desc, notice_nums, order_no, modify_time </sql>
|
row_id, batch_no, drawing_no, fac_code, material_no, order_number, material_name, material_desc,
|
||||||
|
material_texture, material_unit, unit_weight, total_weight, current_version, num, last_version_is, status,
|
||||||
|
sysn_sap_user_name, sysn_sap_time, source_row_id, devise_user_code, devise_name, created_by, created_time,
|
||||||
|
expire_end_time, remark, dept_name, level_num, change_desc, notice_nums, order_no, modify_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<sql id="whr">
|
||||||
|
|
||||||
|
|
||||||
|
<if test="query.drawingNo!=null and query.drawingNo!=''">
|
||||||
|
and drawing_no=#{query.drawingNo}
|
||||||
|
</if>
|
||||||
|
<if test="query.materialNo!=null and query.materialNo!=''">
|
||||||
|
and material_no=#{query.materialNo}
|
||||||
|
</if>
|
||||||
|
<if test="query.facCode!=null and query.facCode!=''">
|
||||||
|
and fac_code=#{query.facCode}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="query.status!=null and query.status==1">
|
||||||
|
<if test="query.startDate!=null and query.startDate!='' and query.endDate!=null and query.endDate!=''">
|
||||||
|
<![CDATA[ and created_time >= #{query.startDate} and created_time <=#{query.endDate}]]>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="whrMore">
|
||||||
|
<include refid="whr"></include>
|
||||||
|
<if test="query.orderNo!=null and query.orderNo!=''">
|
||||||
|
and order_no=#{query.orderNo}
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getMBomListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
|
||||||
|
select * from t_bom_new_mbom_parent
|
||||||
|
where `status`=#{query.status}
|
||||||
|
<include refid="whrMore"/>
|
||||||
|
|
||||||
|
<if test="query.status!=null and query.status==3">
|
||||||
|
<if test="query.startDate!=null and query.startDate!='' and query.endDate!=null and query.endDate!=''">
|
||||||
|
<![CDATA[ and sysn_sap_time >= #{query.startDate} and sysn_sap_time <=#{query.endDate}]]>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getMBomSapListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
|
||||||
|
select * from t_bom_new_mbom_parent
|
||||||
|
where `status`=#{query.status}
|
||||||
|
<include refid="whrMore"/>
|
||||||
|
|
||||||
|
<if test="query.startDate!=null and query.startDate!='' and query.endDate!=null and query.endDate!=''">
|
||||||
|
<![CDATA[ and sysn_sap_time >= #{query.startDate} and sysn_sap_time <=#{query.endDate}]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="indexListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
|
||||||
|
SELECT max(row_id) row_id ,bom_row_id from t_bom_new_mbom_detail GROUP BY bom_row_id
|
||||||
|
where `status`=#{status}
|
||||||
|
<include refid="whr"/>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="searchList" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomMiddleVO">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT t2.*,(SELECT count(1) from t_bom_new_mbom_detail where parent_id=t2.row_id) as bomExist
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@r AS _row_id,
|
||||||
|
(SELECT @r := parent_row_id FROM t_bom_new_mbom_detail WHERE row_id = _row_id) AS parent_row_id
|
||||||
|
FROM
|
||||||
|
(SELECT @r := #{rowId}) vars, t_bom_new_mbom_detail AS h
|
||||||
|
WHERE @r <> 0
|
||||||
|
) t1
|
||||||
|
JOIN t_bom_new_mbom_detail t2
|
||||||
|
ON t1._row_id = t2.row_id
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue