From 15a3d95c61aab385666c7270b3fe652f044a8646 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 27 May 2020 21:13:40 +0800 Subject: [PATCH] Start Task #1968 Cost:3h --- .../pojo/sweb/bean/SwebDocMovementDetails.java | 154 +++++++++++++++++++++ .../pojo/sweb/bean/SwebDocMovementMaster.java | 141 +++++++++++++++++++ .../i3plus/pojo/sweb/bean/SwebDocMovementSn.java | 77 +++++++++++ .../pojo/sweb/modelbean/SwebMovementModel.java | 20 +++ .../SwebDocMovementDetailsRepository.java | 9 ++ .../SwebDocMovementMasterRepository.java | 9 ++ .../repository/SwebDocMovementSnRepository.java | 9 ++ .../i3plus/pojo/sweb/sqlpack/SwebHqlPack.java | 14 ++ 8 files changed, 433 insertions(+) create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementDetails.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementMaster.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementSn.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebMovementModel.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementDetailsRepository.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementMasterRepository.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementSnRepository.java diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementDetails.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementDetails.java new file mode 100644 index 0000000..70857ba --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementDetails.java @@ -0,0 +1,154 @@ +package cn.estsh.i3plus.pojo.sweb.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Version; + +/** + * @Description : + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-05-27 + * @Modify: + **/ +@Data +@Table(name = "SWEB_DOC_MOVEMENT_DETAILS") +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api("移库单-明细") +public class SwebDocMovementDetails extends BaseBean { + private static final long serialVersionUID = -1232334350341792942L; + + @Column(name = "DEST_AREA_NO") + @ApiParam("目的库存地代码") + public String destAreaNo; + + @Column(name = "DEST_WH_NO") + @ApiParam("目标仓库代码") + public String destWhNo; + + @Column(name = "DEST_ZONE_NO") + @ApiParam("目标存储区代码") + public String destZoneNo; + + @Column(name = "DEST_LOCATE_NO") + @ApiParam("目标库位代码") + public String destLocateNo; + + @Column(name = "ORDER_NO") + @ApiParam(value = "移库单单号") + private String orderNo; + + @Column(name = "PART_NO") + @ApiParam("物料编码") + public String partNo; + + @Column(name = "PART_NAME_RDD") + @ApiParam("物料名称") + public String partNameRdd; + + @Column(name = "ITEM") + @ApiParam("行号") + public String item; + + /** + * 是否免费:0=计费,1=免费 + */ + @Column(name = "IS_FREE") + @ApiParam(value = "是否免费", example = "1") + public Integer isFree; + + /** + * 状态:N=正常,C=行取消 + */ + @Column(name = "ITEM_STATUS") + @ApiParam(value = "状态", example = "1") + private Integer itemStatus; + + @Column(name = "PICK_QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "已拣货数量", example = "1") + private Double pickQty; + + @Column(name = "OUT_QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "已出库数量", example = "1") + private Double outQty; + + @Column(name = "REC_QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "已收货数量", example = "1") + private Double recQty; + + @Column(name = "MOVE_QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "已移库数量", example = "1") + private Double moveQty; + + @Column(name = "PLAN_DATE") + @ApiParam(value = "计划日期") + private String planDate; + + @Column(name = "PLAN_TIME") + @ApiParam(value = "计划时间") + private String planTime; + + @Column(name = "PRINT_QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "条码打印数量", example = "1") + private Double printQty; + + @Column(name = "QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "需求数量", example = "0") + public Double qty; + + @Column(name = "REMARK") + @ApiParam(value = "操作原因") + private String remark; + + @Column(name = "SRC_AREA_NO") + @ApiParam("源库存地代码") + public String srcAreaNo; + + @Column(name = "SRC_WH_NO") + @ApiParam("源仓库代码") + public String srcWhNo; + + @Column(name = "SRC_ZONE_NO") + @ApiParam("源存储区代码") + public String srcZoneNo; + + @Column(name = "SRC_LOCATE_NO") + @ApiParam("源库位代码") + public String srcLocateNo; + + @Column(name = "UNIT") + @ApiParam("单位") + public String unit; + + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public transient Integer lockVersion; + + @Column(name = "IS_SN") + @ApiParam(value = "条码生成状态", example = "20") + public Integer isSn; + + @Column(name = "LOT_NO") + @ApiParam("批次") + public String lotNo; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementMaster.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementMaster.java new file mode 100644 index 0000000..434d615 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementMaster.java @@ -0,0 +1,141 @@ +package cn.estsh.i3plus.pojo.sweb.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-05-27 + * @Modify: + **/ +@Data +@Table(name = "SWEB_DOC_MOVEMENT_MASTER") +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api("移库单-主表") +public class SwebDocMovementMaster extends BaseBean { + + private static final long serialVersionUID = -4539662053206835169L; + @Column(name = "ORDER_NO") + @ApiParam(value = "移库单单号") + private String orderNo; + + @Column(name = "BUSI_TYPE") + @ApiParam("业务类型") + public String busiType; + + @Column(name = "CAR_NO") + @ApiParam(value = "车牌号") + private String carNo; + + @Column(name = "CUST_NO") + @ApiParam(value = "客户编号") + private String custNo; + + @Column(name = "CUST_ORDER_NO") + @ApiParam(value = "客户单号") + private String custOrderNo; + + @Column(name = "ERP_SRC_NO") + @ApiParam(value = "ERP单号") + private String erpSrcNo; + + @Column(name = "IS_TASK") + @ApiParam(value = "是否生产任务", example = "1") + public Integer isTask; + + @Column(name = "IS_PART") + @ApiParam(value = "是否散件", example = "1") + private Integer isPart; + + /** + * 移动类型:IN=入库,OUT=出库,MOVE=移库 + */ + @Column(name = "MOVE_TYPE") + @ApiParam("移动类型") + public Integer moveType; + + /** + * 状态:0=新建,10=处理中 + * ,20=已完成,90=已关闭,91=已取消 + */ + @Column(name = "ORDER_STATUS") + @ApiParam(value = "状态", example = "1") + public Integer orderStatus; + + @Column(name = "PRIORITY") + @ApiParam(value = "优先级", example = "1") + public Integer priority; + + /** + * 关联单据类型:1=ASN,10=PO,20=SO + */ + @Column(name = "REF_TYPE") + @ApiParam(value = "关联单据类型") + private String refType; + + @Column(name = "REF_NO") + @ApiParam(value = "关联单据") + private String refNo; + + @Column(name = "VENDOR_NO") + @ApiParam(value = "供应商编号") + private String vendorNo; + + @Column(name = "VERSION") + @ApiParam(value = "版本", example = "1") + private Integer version; + + @Column(name = "TAG") + @ApiParam(value = "标签") + private String tag; + + @Column(name = "FLAG_NO") + @ApiParam(value = "客户发往地编号") + private String flagNo; + + @Column(name = "PRINT_STATUS") + @ApiParam("打印状态") + private Integer printStatus; + + @Column(name = "PRINT_STATUS") + @ApiParam("打印状态") + private Integer isSn; + + @Column(name = "DEST_WH_NO") + @ApiParam("目的仓库代码") + private String destWhNo; + + @Column(name = "DEST_ZONE_NO") + @ApiParam("目的存储区代码") + private String destZoneNo; + + @Column(name = "PLAN_DATE") + @ApiParam("计划日期") + private String planDate; + + @Column(name = "PLAN_TIME") + @ApiParam("计划时间") + private String planTime; + + @Column(name = "SRC_WH_NO") + @ApiParam("源仓库代码") + private String srcWhNo; + + @Column(name = "SRC_ZONE_NO") + @ApiParam("源存储区代码") + private String srcZoneNo; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementSn.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementSn.java new file mode 100644 index 0000000..335f38e --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebDocMovementSn.java @@ -0,0 +1,77 @@ +package cn.estsh.i3plus.pojo.sweb.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-05-27 + * @Modify: + **/ +@Data +@Table(name = "SWEB_DOC_MOVEMENT_SN") +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api("移库单-条码") +public class SwebDocMovementSn extends BaseBean { + + private static final long serialVersionUID = -8545031740048178867L; + @Column(name="ORDER_NO") + @ApiParam("订单号") + public String orderNo; + + @Column(name="ITEM") + @ApiParam("行号") + public String item; + + @Column(name="PART_NO") + @ApiParam("物料编码") + public String partNo; + + @Column(name="PART_NAME_RDD") + @ApiParam("物料名称") + public String partNameRdd; + + @Column(name="QTY", columnDefinition = "decimal(18,8)") + @ColumnDefault("0") + @ApiParam(value = "数量", example = "0") + public Double qty; + + + @Column(name="UNIT") + @ApiParam("单位") + public String unit; + + /** + * 状态:操作状态 itemStatus + */ + @Column(name="SN_STATUS") + @ApiParam(value = "操作状态", example = "10") + public Integer snStatus; + + @Column(name="SN") + @ApiParam("条码") + public String sn; + + @Column(name = "VENDOR_NO") + @ApiParam(value = "供应商编码") + public String vendorNo; + + @Column(name = "SN_TYPE") + @ApiParam(value = "条码类型") + private Integer snType; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebMovementModel.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebMovementModel.java new file mode 100644 index 0000000..ce5dc84 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebMovementModel.java @@ -0,0 +1,20 @@ +package cn.estsh.i3plus.pojo.sweb.modelbean; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +@Data +public class SwebMovementModel { + + @ApiParam(value = "工厂代码") + private String organizeCode; + + @ApiParam(value = "物料号") + private String partNo; + + @ApiParam(value = "物料名称") + private String partName; + + @ApiParam(value = "需求数量") + private Double qty; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementDetailsRepository.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementDetailsRepository.java new file mode 100644 index 0000000..c59a9b4 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementDetailsRepository.java @@ -0,0 +1,9 @@ +package cn.estsh.i3plus.pojo.sweb.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.sweb.bean.SwebDocMovementDetails; +import org.springframework.stereotype.Repository; + +@Repository +public interface SwebDocMovementDetailsRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementMasterRepository.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementMasterRepository.java new file mode 100644 index 0000000..e1a6a0f --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementMasterRepository.java @@ -0,0 +1,9 @@ +package cn.estsh.i3plus.pojo.sweb.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.sweb.bean.SwebDocMovementMaster; +import org.springframework.stereotype.Repository; + +@Repository +public interface SwebDocMovementMasterRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementSnRepository.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementSnRepository.java new file mode 100644 index 0000000..889f5b5 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebDocMovementSnRepository.java @@ -0,0 +1,9 @@ +package cn.estsh.i3plus.pojo.sweb.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.sweb.bean.SwebDocMovementSn; +import org.springframework.stereotype.Repository; + +@Repository +public interface SwebDocMovementSnRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java index a504867..e2d1ac2 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java @@ -171,4 +171,18 @@ public class SwebHqlPack { DdlPreparedPack.getNumNOEqualPack(SwebEnumUtil.ORDER_DETAILS_STATUS.CREATE.getValue(), "itemStatus", result); return buildHql(details, result); } + + public static DdlPackBean getDocMovementMaster(SwebDocMovementMaster master) { + DdlPackBean result = new DdlPackBean(); + DdlPreparedPack.getStringLikerPack(master.getOrderNo(), "orderNo", result); + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, result); + return buildHql(master, result); + } + + public static DdlPackBean getDocMovementDetails(SwebDocMovementDetails details) { + DdlPackBean result = new DdlPackBean(); + DdlPreparedPack.getStringLikerPack(details.getOrderNo(), "orderNo", result); + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, result); + return buildHql(details, result); + } }