This commit is contained in:
jing's 2024-01-02 20:53:09 +08:00
parent e091b61255
commit d7a8764d26
7 changed files with 158 additions and 263 deletions

View File

@ -4,7 +4,9 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nflg.product.base.core.api.BaseApi;
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.ValueEnum;
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
import com.nflg.product.bomnew.pojo.vo.BomNewMbomDetailVO;
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")
@ApiOperation("设置超级物料列表")
public ResultVO<List<BomNewMbomDetailVO>> superSaterialList(@RequestParam(value = "rowId") Long rowId ) {

View File

@ -1,11 +1,13 @@
package com.nflg.product.bomnew.constant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum FactoryCodeEnum {
public enum FactoryCodeEnum implements ValueEnum<String> {
FACTORY_1010 ("1010", "泉州工厂"),
FACTORY_1020("1020", "仙桃工厂");

View File

@ -33,10 +33,19 @@ public class BomNewMbomBackMaterialEntity implements Serializable {
/**
* 退回的row_id(和ebom表row_id 关联)
*/
@TableField(value = "source_id")
@ApiModelProperty(value = "退回的row_id(和ebom表row_id 关联)")
private Long sourceId;
@TableField(value = "source_row_id")
@ApiModelProperty(value = "退回的row_id pbom表")
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;
/**
* 退回人名称
*/

View File

@ -20,20 +20,8 @@ import java.time.LocalDate;
@Data
@Accessors(chain = true)
@ApiModel(value="com-nflg-product-bomnew-pojo-new-query-BomNewMbomParentEntityQuery")
public class BomNewMbomParentQuery implements Serializable {
/**
* 主键行ID-雪花
*/
@ApiModelProperty(value = "主键行ID-雪花")
private Long rowId;
/**
* 批号-来自plm-临时
*/
@ApiModelProperty(value = "批号-来自plm-临时")
private String batchNo;
public class BomNewMbomParentQuery extends BasePageQuery implements Serializable {
/**
* 图号
*/
@ -51,222 +39,46 @@ public class BomNewMbomParentQuery implements Serializable {
*/
@ApiModelProperty(value = "物料编码")
private String materialNo;
/**
* 排序号
*/
@ApiModelProperty(value = "排序号")
private String orderNumber;
* 订单号
*/
@ApiModelProperty(value = "订单号")
private String orderNo;
/**
* 物料名称
*/
@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待发布sap3=已发布
*/
@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;
@ApiModelProperty(value = "开始时间")
private String startDate;
/**
* 结束发布sap时间
*
*/
@ApiModelProperty(value = "发布sap时间结束时间")
private LocalDateTime sysnSapTimeEnd;
@ApiModelProperty(value = "结束时间")
private String endDate;
/**
* 来源行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 = "创建人编码")
@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;
/**
* 订单号
*/
@ApiModelProperty(value = "订单号")
private String orderNo;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
private LocalDateTime modifyTime;
/**
* 开始修改时间
*/
@ApiModelProperty(value = "修改时间开始时间")
private LocalDateTime modifyTimeStart;
/**
* 结束修改时间
*/
@ApiModelProperty(value = "修改时间结束时间")
private LocalDateTime modifyTimeEnd;
/**
* 设置每页显示条数
* 1待发布sap3=已发布
*/
@ApiModelProperty(value = "设置每页显示条数")
private Long pageSize = 20L;
/**
* 当前页
*/
@ApiModelProperty(value = "当前页")
private Long page = 1L;
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "前端忽略,状态")
private Integer status;
}

View File

@ -33,10 +33,15 @@ import java.util.Objects;
public class BomNewMbomDetailService extends ServiceImpl<BomNewMbomDetailMapper, BomNewMbomDetailEntity> {
/**
* 退回
* @param rowId
*/
public void back(List<Long> rowId){
}

View File

@ -6,7 +6,14 @@
<!--@mbg.generated-->
<!--@Table t_bom_new_mbom_back_material -->
<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_code" property="backUserCode" jdbcType="VARCHAR"/>
<result column="status" property="status" jdbcType="INTEGER"/>

View File

@ -3,43 +3,90 @@
<mapper namespace="com.nflg.product.bomnew.mapper.master.BomNewMbomParentMapper">
<resultMap id="BaseResultMap" type="com.nflg.product.bomnew.pojo.entity.BomNewMbomParentEntity">
<!--@mbg.generated-->
<!--@Table t_bom_new_mbom_parent -->
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
<result column="batch_no" property="batchNo" jdbcType="VARCHAR"/>
<result column="drawing_no" property="drawingNo" jdbcType="VARCHAR"/>
<result column="fac_code" property="facCode" jdbcType="VARCHAR"/>
<result column="material_no" property="materialNo" jdbcType="VARCHAR"/>
<result column="order_number" property="orderNumber" jdbcType="VARCHAR"/>
<result column="material_name" property="materialName" jdbcType="VARCHAR"/>
<result column="material_desc" property="materialDesc" jdbcType="VARCHAR"/>
<result column="material_texture" property="materialTexture" jdbcType="VARCHAR"/>
<result column="material_unit" property="materialUnit" jdbcType="VARCHAR"/>
<result column="unit_weight" property="unitWeight" jdbcType="DECIMAL"/>
<result column="total_weight" property="totalWeight" jdbcType="DECIMAL"/>
<result column="current_version" property="currentVersion" jdbcType="VARCHAR"/>
<result column="num" property="num" jdbcType="DECIMAL"/>
<result column="last_version_is" property="lastVersionIs" jdbcType="INTEGER"/>
<result column="status" property="status" jdbcType="INTEGER"/>
<result column="sysn_sap_user_name" property="sysnSapUserName" jdbcType="VARCHAR"/>
<result column="sysn_sap_time" property="sysnSapTime" jdbcType="TIMESTAMP"/>
<result column="source_row_id" property="sourceRowId" jdbcType="BIGINT"/>
<result column="devise_user_code" property="deviseUserCode" jdbcType="VARCHAR"/>
<result column="devise_name" property="deviseName" jdbcType="VARCHAR"/>
<result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
<result column="expire_end_time" property="expireEndTime" jdbcType="TIMESTAMP"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="dept_name" property="deptName" jdbcType="VARCHAR"/>
<result column="level_num" property="levelNum" jdbcType="INTEGER"/>
<result column="change_desc" property="changeDesc" jdbcType="VARCHAR"/>
<result column="notice_nums" property="noticeNums" jdbcType="VARCHAR"/>
<result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
</resultMap>
<!--@mbg.generated-->
<!--@Table t_bom_new_mbom_parent -->
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
<result column="batch_no" property="batchNo" jdbcType="VARCHAR"/>
<result column="drawing_no" property="drawingNo" jdbcType="VARCHAR"/>
<result column="fac_code" property="facCode" jdbcType="VARCHAR"/>
<result column="material_no" property="materialNo" jdbcType="VARCHAR"/>
<result column="order_number" property="orderNumber" jdbcType="VARCHAR"/>
<result column="material_name" property="materialName" jdbcType="VARCHAR"/>
<result column="material_desc" property="materialDesc" jdbcType="VARCHAR"/>
<result column="material_texture" property="materialTexture" jdbcType="VARCHAR"/>
<result column="material_unit" property="materialUnit" jdbcType="VARCHAR"/>
<result column="unit_weight" property="unitWeight" jdbcType="DECIMAL"/>
<result column="total_weight" property="totalWeight" jdbcType="DECIMAL"/>
<result column="current_version" property="currentVersion" jdbcType="VARCHAR"/>
<result column="num" property="num" jdbcType="DECIMAL"/>
<result column="last_version_is" property="lastVersionIs" jdbcType="INTEGER"/>
<result column="status" property="status" jdbcType="INTEGER"/>
<result column="sysn_sap_user_name" property="sysnSapUserName" jdbcType="VARCHAR"/>
<result column="sysn_sap_time" property="sysnSapTime" jdbcType="TIMESTAMP"/>
<result column="source_row_id" property="sourceRowId" jdbcType="BIGINT"/>
<result column="devise_user_code" property="deviseUserCode" jdbcType="VARCHAR"/>
<result column="devise_name" property="deviseName" jdbcType="VARCHAR"/>
<result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
<result column="expire_end_time" property="expireEndTime" jdbcType="TIMESTAMP"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="dept_name" property="deptName" jdbcType="VARCHAR"/>
<result column="level_num" property="levelNum" jdbcType="INTEGER"/>
<result column="change_desc" property="changeDesc" jdbcType="VARCHAR"/>
<result column="notice_nums" property="noticeNums" jdbcType="VARCHAR"/>
<result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
<!--@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>