diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java new file mode 100644 index 0000000..47cee30 --- /dev/null +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java @@ -0,0 +1,110 @@ +package cn.estsh.i3plus.pojo.base.enumutil; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * @Description : sweb枚举类 + * @Reference : + * @Author : jack.lv + * @CreateDate : 2019-04-02 20:21 + * @Modify: + **/ +public class SwebEnumUtil { + + /** + * 单据主表状态(ASN,PO,MOVE,QC) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ORDER_MASTER_STATUS { + CREATE(10, "新建"), + RECEIPT(20, "已发布"), + RECEIPT_FINISH(30, "已确认"), + CLOSED(40, "已打印"), + CANCELLED(50, "已发货"); + + private int value; + private String description; + + ORDER_MASTER_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 订单明细状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ORDER_DETAILS_STATUS { + CREATE(10, "新建"), + RECEIPT(20, "已发布"), + RECEIPT_FINISH(30, "已确认"), + CLOSED(40, "已打印"), + CANCELLED(50, "已发货"); + + private int value; + private String description; + + ORDER_DETAILS_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseChangeLog.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseChangeLog.java index 8ab6d57..5f2434f 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseChangeLog.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseChangeLog.java @@ -29,9 +29,13 @@ import javax.persistence.Table; @Api("订单修改日志记录表") public class SwebPurchaseChangeLog extends BaseBean { - @Column(name = "ORDER_ITEM_NO") + @Column(name = "ORDER_NO") @ApiParam("单据明细编号") - public String orderItemNo; + public String orderNo; + + @ApiParam(value = "零件号") + @Column(name = "PART_NO") + private String partNo; @ApiParam(value = "订单当前状态") @Column(name = "ITEM_STATUS") diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java index 0eb0740..1c0f96d 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java @@ -81,7 +81,7 @@ public class SwebPurchaseOrder extends BaseBean { public String deliveryTime; @Column(name = "REC_TIME") - @ApiParam(value = "交货时间") + @ApiParam(value = "收货时间") public String recTime; @Column(name = "IS_SYN") diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java index 4935cf0..70f8a1c 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java @@ -155,9 +155,9 @@ public class SwebPurchaseOrderDetails extends BaseBean { @ApiParam(value = "行号", example = "0") private Integer itemNo; - @Column(name = "COMFIRM_TIME") + @Column(name = "CONFIRM_TIME") @ApiParam(value = "确认时间") - public String comfirmTime; + public String confirmTime; @Column(name = "DELIVERY_TIME") @ApiParam(value = "交货时间") diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPODetailsUpdateHistoryModel.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPODetailsUpdateHistoryModel.java new file mode 100644 index 0000000..7abfb33 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPODetailsUpdateHistoryModel.java @@ -0,0 +1,39 @@ +package cn.estsh.i3plus.pojo.sweb.modelbean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.bean.ListPager; +import cn.estsh.i3plus.pojo.sweb.bean.SwebPurchaseChangeLog; +import io.swagger.annotations.ApiParam; +import lombok.Data; + +/** + * @Description : 查看订单明细修改历史 + * @Reference : + * @Author : jack.lv + * @CreateDate : 2019-04-02 13:13 + * @Modify: + **/ +@Data +public class SwebPODetailsUpdateHistoryModel extends BaseBean { + + @ApiParam("单据号") + private String orderNo; + + @ApiParam("供应商编号") + private String vendorCode; + + @ApiParam(value = "零件号") + private String partNo; + + @ApiParam(value = "零件名称") + private String partName; + + @ApiParam(value = "订单数量") + private Double refQty; + + @ApiParam(value = "确认到货数量") + private Double confirmQty; + + @ApiParam(value = "变更列表") + private ListPager history; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPOForPubListEnterModel.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPOForPubListEnterModel.java new file mode 100644 index 0000000..6d17e46 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPOForPubListEnterModel.java @@ -0,0 +1,34 @@ +package cn.estsh.i3plus.pojo.sweb.modelbean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.ApiParam; +import lombok.Data; + +/** + * @Description : 待发布订单列表输入模型 + * @Reference : + * @Author : jack.lv + * @CreateDate : 2019-04-02 13:13 + * @Modify: + **/ +@Data +public class SwebPOForPubListEnterModel extends BaseBean { + + @ApiParam("单据号") + private String orderNo; + + @ApiParam("供应商编号") + private String vendorCode; + + @ApiParam(value = "订单类型", example = "1") + public Integer orderType; + + @ApiParam(value = "预计到货日期开始日期") + public String recTimeStart; + + @ApiParam(value = "预计到货日期结束日期") + public String recTimeEnd; + + @ApiParam(value = "零件号") + private String partNo; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPOForPubListResultModel.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPOForPubListResultModel.java new file mode 100644 index 0000000..4f28ae4 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPOForPubListResultModel.java @@ -0,0 +1,48 @@ +package cn.estsh.i3plus.pojo.sweb.modelbean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import org.hibernate.annotations.ColumnDefault; + +import javax.persistence.Column; +import java.util.List; +import java.util.Map; + +/** + * @Description : 待发布订单列表输出模型 + * @Reference : + * @Author : jack.lv + * @CreateDate : 2019-04-02 13:13 + * @Modify: + **/ +@Data +public class SwebPOForPubListResultModel extends BaseBean { + + @Column(name = "ORDER_NO") + @ApiParam("单据号") + public String orderNo; + + @Column(name = "PART_NO") + @ApiParam(value = "零件号") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam(value = "零件名称") + private String partName; + + @ApiParam(value = "单位") + @Column(name = "UNIT") + private String unit; + + @ApiParam(value = "订单状态", example = "1") + @Column(name = "ITEM_STATUS") + private Integer itemStatus; + + @ApiParam(value = "订单类型", example = "1") + @Column(name = "ORDER_TYPE") + public Integer orderType; + + @ApiParam(value = "时间数量列表", example = "1") + public List> timeList; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPurchaseForPubListModel.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPurchaseForPubListModel.java deleted file mode 100644 index 4dca685..0000000 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebPurchaseForPubListModel.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.estsh.i3plus.pojo.sweb.modelbean; - -import lombok.Data; - -/** - * @Description : - * @Reference : - * @Author : jack.lv - * @CreateDate : 2019-04-02 13:13 - * @Modify: - **/ -@Data -public class SwebPurchaseForPubListModel { -} 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 48f0d78..23cb872 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 @@ -30,7 +30,13 @@ public class SwebHqlPack { } // 封装有效状态和删除状态 - SqlPack.getNumEqualPack(bean.getIsValid(), "isValid", hqlStr); + Integer isValid = bean.getIsValid(); + //默认查有效数据 + if (isValid != null && isValid != 0) { + SqlPack.getNumEqualPack(isValid, "isValid", hqlStr); + } else { + SqlPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", hqlStr); + } SqlPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "isDeleted", hqlStr); return hqlStr.toString(); } @@ -70,4 +76,10 @@ public class SwebHqlPack { HqlPack.getStringLikerPack(vendorRel.getPlannerCode(), "plannerCode", result); return buildHql(vendorRel, result); } + + /*public static String getPurchaseOrderDetailsWhereHql(SwebPurchaseOrderDetails swebPurchaseOrderDetails) { + StringBuffer result = new StringBuffer(); + HqlPack.getStringLikerPack(swebPurchaseOrderDetails.getOrderNo(), "orderNo", result); + return buildHql(swebPurchaseOrderDetails, result); + }*/ }