Mbom
This commit is contained in:
parent
e091b61255
commit
d7a8764d26
|
|
@ -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;
|
||||||
|
|
@ -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 ) {
|
||||||
|
|
|
||||||
|
|
@ -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", "仙桃工厂");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,36 @@ 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 = "来源行ID(PBOM中parent的行ID)")
|
||||||
|
private Long sourceRowId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@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;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,53 @@
|
||||||
|
|
||||||
<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=#{facCode}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getMBomListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomParentVO">
|
||||||
|
select * from t_bom_new_mbom_parent
|
||||||
|
where `status`=#{query.status}
|
||||||
|
<include refid="whr"/>
|
||||||
|
|
||||||
|
<if test="query.startDate!=null and query.startDate!=''">
|
||||||
|
<![CDATA[ and created_time >= #{query.startDate} and created_time <=#{query.endDate}]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getMBomSapListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomParentVO">
|
||||||
|
select * from t_bom_new_mbom_parent
|
||||||
|
where `status`=#{query.status}
|
||||||
|
<include refid="whr"/>
|
||||||
|
|
||||||
|
<if test="query.startDate!=null and query.startDate!=''">
|
||||||
|
<![CDATA[ and sysn_sap_time >= #{query.startDate} and sysn_sap_time <=#{query.endDate}]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue