创建波次计划规则实体类和规则明细实体类

yun-zuoyi
袁津哲 5 years ago
parent eed24e0297
commit 14cfa5fa47

@ -5301,4 +5301,193 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WAVE_MERGE_RULE {
IS_SAME_CUSTOMER("同客户", "isSameCustomer", 2, 10),
IS_SAME_WAREHOUSE("同仓库", "isSameWareHouse", 1, 10),
IS_SAME_PRIORITY("同优先级", "isSamePriority", 1, 10),
IS_SAME_SRC_ZONE("同来源存储区", "isSameSrcZone", 2, 10),
IS_SAME_DEST_ZONE("同目标存储区", "isSameDestZone", 2, 10),
IS_SAME_PART("同物料", "isSamePart", 2, 10),
IS_SAME_PART_GROUP("同物料组", "isSamePartGroup", 2, 10),
IS_SAME_DELIVERY_TIME("同发货时间", "isSameDeliveryTime", 2, 10),
IS_SAME_BUSI_TYPE("同业务类型", "isSameBusiType", 1, 10),
IS_SAME_ORDER_STATUS("同单据状态", "isSameOrderStatus", 1, 10),
IS_CROSS_AREA("允许跨区", "isCrossArea", 2, 10),
IS_COLLECTION("物料整箱归集", "isCollection", 2, 10);
private String chName;
private String enName;
private int waveMergeType;
private int value;
WAVE_MERGE_RULE(String chName, String enName, int value, int waveMergeType) {
this.chName = chName;
this.enName = enName;
this.value = value;
this.waveMergeType = waveMergeType;
}
public String getChName() {
return chName;
}
public String getEnName() {
return enName;
}
public int getValue() {
return value;
}
public int getWaveMergeType() {
return waveMergeType;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WAVE_MERGE_RANGE {
CUST_NO("客户代码", "custNo", "cn.estsh.i3plus.pojo.wms.bean.BasCustomer",
"custNo, custName", "custNo, custName", "custNo", 20),
WAREHOUSE_CODE("仓库代码", "srcWhNo", "cn.estsh.i3plus.pojo.wms.bean.WareHouse",
"code, name", "code, name", "code", 20),
PRIORITY("优先级", "priority", "PRIORITY_NEW", "",
"", "", 20),
SRC_ZONE_NO("来源存储区代码", "srcZoneNo", "cn.estsh.i3plus.pojo.wms.bean.WmsZones",
"zoneNo, zoneName", "zoneNo", "zoneNo", 20),
DEST_ZONE_NO("目标存储区代码", "destZoneNo", "cn.estsh.i3plus.pojo.wms.bean.WmsZones",
"zoneNo, zoneName", "zoneNo", "zoneNo", 20),
PART_NO("物料号", "partNo", "cn.estsh.i3plus.pojo.wms.bean.WmsPart",
"partNo, partName", "partNo", "partNo", 20),
PART_GROUP_NO("物料组代码", "partGroupNo", "", "",
"", "", 20),
BUSI_TYPE("业务类型", "busiType", "OUT_MOVEMENT_BUSI_TYPE", "",
"", "", 20),
ORDER_STATUS("单据状态", "orderStatus", "MASTER_ORDER_STATUS", "",
"", "", 20);
// 中文名称
String chName;
// 英文名称
String enName;
// 下拉枚举名称
String entityName;
// 下拉列表显示列名称,多个列名需要根据逗号分隔
String listColumnName;
// 下拉搜索列名称,多个列名需要根据逗号分隔
String searchColumnName;
// 回显列名
String explicitColumnName;
// 合并操作类型
private int waveMergeType;
WAVE_MERGE_RANGE(String chName, String enName, String entityName, String listColumnName,
String searchColumnName, String explicitColumnName, int waveMergeType) {
this.chName = chName;
this.enName = enName;
this.entityName = entityName;
this.listColumnName = listColumnName;
this.searchColumnName = searchColumnName;
this.explicitColumnName = explicitColumnName;
this.waveMergeType = waveMergeType;
}
public String getChName() {
return chName;
}
public String getEnName() {
return enName;
}
public String getEntityName() {
return entityName;
}
public String getListColumnName() {
return listColumnName;
}
public String getSearchColumnName() {
return searchColumnName;
}
public String getExplicitColumnName() {
return explicitColumnName;
}
public int getWaveMergeType() {
return waveMergeType;
}
}
/**
* 10-20-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WAVE_MERGE_TYPE {
WAVE_MERGE_RULE(10, "WAVE_MERGE_RULE", "合并规则"),
WAVE_MERGE_RANGE(20, "WAVE_MERGE_RANGE", "合并范围");
private int value;
private String code;
private String description;
WAVE_MERGE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static WAVE_MERGE_TYPE codeOf(int value) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value == value) {
return values()[i];
}
}
return null;
}
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;
}
}
}

@ -0,0 +1,109 @@
package cn.estsh.i3plus.pojo.wms.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;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-03-25 10:10
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_WAVE_RULE")
@Api(value = "波次规则数据表")
public class WmsWaveRule extends BaseBean {
private static final long serialVersionUID = 8664373854844368961L;
@Column(name = "RULE_CODE")
@ApiParam(value = "波次规则代码")
public String ruleCode;
@Column(name = "RULE_DESC")
@ApiParam(value = "波次规则描述")
public String ruleDesc;
/**
* 2-() 1-
*/
@Column(name = "ALLOCATE_RULE")
@ApiParam(value = "分配规则", example = "1")
public Integer allocateRule;
@Column(name = "EXTEND_SQL")
@ApiParam(value = "扩展脚本")
public String extendSql;
@Column(name = "START_EFFECT_DATE")
@ApiParam(value = "开始生效时间")
public String startEffectDate;
@Column(name = "END_EFFECT_DATE")
@ApiParam(value = "结束生效时间")
public String endEffectDate;
@Column(name = "SORT_CONDITIONS")
@ApiParam(value = "单据排序条件")
public String sortConditions;
@Column(name = "ORDER_CONTROL_TIME")
@ApiParam(value = "单据控制时间")
public String orderControlTime;
@Column(name = "FIXED_ORDER_QTY")
@ApiParam(value = "固定单据数量", example = "0")
public Integer fixedOrderQty;
@Column(name = "FIXED_PART_QTY")
@ApiParam(value = "固定物料箱数", example = "0")
public Integer fixedPartQty;
@Column(name = "WAVE_QTY")
@ApiParam(value = "波次数量", example = "0")
public Integer waveQty;
@Column(name = "ORDER_MAX_QTY")
@ApiParam(value = "最大单据数量", example = "0")
public Integer orderMaxQty;
@Column(name = "PART_MAX_QTY")
@ApiParam(value = "最大物料数量", example = "0")
public Double partMaxQty;
@Column(name = "ORDER_TIMEOUT_TIME")
@ApiParam(value = "单据等待时间", example = "0")
public Integer orderTimeOutTime;
@Column(name = "NEXT_WAVE_TIME")
@ApiParam(value = "下次波次时间")
public String nextWaveTime;
@Column(name = "IS_CROSS_AREA")
@ApiParam(value = "允许跨区", example = "0")
public Integer isCrossArea;
@Column(name = "IS_COLLECTION")
@ApiParam(value = "允许整箱归集")
public Integer isCollection;
@Transient
@ApiParam(value = "波次规则明细信息")
private List<WmsWaveRuleDetails> waveRuleDetailsList;
}

@ -0,0 +1,56 @@
package cn.estsh.i3plus.pojo.wms.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 : siliter.yuan
* @CreateDate : 2020-03-25 10:10
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_WAVE_RULE_DETAILS")
@Api(value = "波次规则明细数据表")
public class WmsWaveRuleDetails extends BaseBean {
private static final long serialVersionUID = 8664373954844368961L;
@Column(name = "RULE_ID")
@ApiParam(value = "波次规则编号", example = "0")
public Long ruleId;
@Column(name = "FIELD_CH_NAME")
@ApiParam(value = "字段中文名称")
public String fieldChName;
@Column(name = "FIELD_EN_NAME")
@ApiParam(value = "字段英文名称")
public String fieldEnName;
@Column(name = "MERGE_OPERATOR_TYPE")
@ApiParam(value = "合并操作类型", example = "0")
public Integer mergeOperatorType;
@Column(name = "FILED_VALUE")
@ApiParam(value = "字段值")
public String fieldValue;
public Long getRuleId() {
return ruleId == null ? 0L : ruleId.longValue();
}
}

@ -0,0 +1,84 @@
package cn.estsh.i3plus.pojo.wms.modelbean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.hibernate.annotations.ColumnDefault;
/**
* @Description : Model
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-03-26 11:18
* @Modify:
**/
@Data
@AllArgsConstructor
@Api("移库单数据模型")
public class WmsDocMovementModel {
@ApiParam("订单号")
private String orderNo;
@ApiParam(value = "业务类型", example = "1")
private Integer busiType;
@ApiParam("客户代码")
private String custNo;
@ApiParam("来源仓库代码")
private String srcWhNo;
@ApiParam("来源存储区代码")
private String srcZoneNo;
@ApiParam("目标仓库代码")
private String destWhNo;
@ApiParam("目标存储区代码")
private String destZoneNo;
@ApiParam("物料组代码")
private String partGroupNo;
@ApiParam("订单状态")
private String orderStatus;
@ApiParam(value = "优先级", example = "1")
public Integer priority;
@ApiParam("物料号")
private String partNo;
@ColumnDefault("0")
@ApiParam(value = "已拣货数量", example = "1")
private Double pickQty;
@ColumnDefault("0")
@ApiParam(value = "已出库数量", example = "1")
private Double outQty;
@ColumnDefault("0")
@ApiParam(value = "已移库数量", example = "1")
private Double moveQty;
@ColumnDefault("0")
@ApiParam(value = "需求数量", example = "0")
public Double qty;
@ApiParam("源单行号")
public String srcItem;
@ApiParam(value = "源单号")
private String srcNo;
@ApiParam("物料号")
private String partNameRdd;
@ApiParam("单位")
private String unit;
@ApiParam(value = "标准包装", example = "1")
private Double snp;
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsWaveRuleDetails;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-03-25 11:29
* @Modify:
**/
@Repository
public interface WmsWaveRuleDetailsRepository extends BaseRepository<WmsWaveRuleDetails, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsWaveRule;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-03-25 11:29
* @Modify:
**/
@Repository
public interface WmsWaveRuleRepository extends BaseRepository<WmsWaveRule, Long> {
}
Loading…
Cancel
Save