amy 7 years ago
commit 477f6c5ff1

@ -10,16 +10,150 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @Modify:
**/
public class WmsEnumUtil {
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IS_FREE {
CHARGING(0, "计费"), GRATIS(1, "免费");
private int value;
private String description;
private IS_FREE(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;
}
}
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORDER_DETAILS_STATUS {
NORMAL(10, "N", "正常"),
ANCEL(20, "C", "行取消");
private int value;
private String code;
private String description;
private ORDER_DETAILS_STATUS(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 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;
}
}
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_ORDER_SRC {
MNU(1, "MNU", "手工"),
ERP(2, "ERP", "ERP接口");
private int value;
private String code;
private String description;
private PO_ORDER_SRC(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 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;
}
}
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_ORDER_TYPE {
REG(1, "REG", "原物料采购"),
SUB(2, "SUB", "委外采购"),
TAR(3, "TAR", "多角贸易采购"),
TAP(4, "TAP", "多角代采购");
SUB(10, "SUB", "委外采购"),
TAR(20, "TAR", "多角贸易采购"),
TAP(30, "TAP", "多角代采购");
private int value;
private String code;
@ -68,7 +202,7 @@ public class WmsEnumUtil {
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_ORDER_STATUS {
public enum ORDER_STATUS {
CREATE(0, "新建"),
RECEIPT(10, "收货中"),
RECEIPT_FINISH(20, "收货完成"),
@ -80,7 +214,7 @@ public class WmsEnumUtil {
private int value;
private String description;
private PO_ORDER_STATUS(int value, String description) {
private ORDER_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
@ -117,6 +251,7 @@ public class WmsEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TRANS_STATUS {
CREATE(1, "创建"), FINISH(2, "完成"),FAIL(3,"失败");

@ -881,7 +881,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
public int deleteWeaklyByPropertyIn(String propName, Object[] propValues,String username) {
if(propValues != null && propValues.length > 0){
String hql = "update " + persistentClass.getName()
+ " model set model.isValid = :isValid,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where model."
+ " model set model.isDeleted = :isDeleted,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where model."
+ propName + " in(:"+propName+") ";
Query query = entityManager.createQuery(hql);
query.setParameter("isDeleted",CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
@ -903,7 +903,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
public int deleteWeaklyByProperties(String[] propName, Object[] propValue,String username) {
if ((propName != null) && (propName.length > 0) && (propValue != null) && (propValue.length > 0) && (propValue.length == propName.length)) {
StringBuffer sb = new StringBuffer("update " + persistentClass.getName()
+ " model set model.isValid = :isValid,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where 1=1 ");
+ " model set model.isDeleted = :isDeleted,model.modifyUser= :modifyUser,model.modifyDatetime=:modifyDatetime where 1=1 ");
appendQL(sb,propName,propValue);
Query query = entityManager.createQuery(sb.toString());
query.setParameter("modifyUser",username);

@ -0,0 +1,119 @@
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 : dragon.xu
* @CreateDate : 2018-11-13 16:06
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_DOC_MOVEMENT_DETAILS")
@Api("移库单详情表")
public class WmsDocMovementDetails extends BaseBean {
@Column(name = "ORDER_NO")
@ApiParam(value = "单号")
private String orderNo;
@Column(name = "ITEM")
@ApiParam(value = "行号", example = "1")
private Integer item;
@Column(name = "PART_NO")
@ApiParam(value = "物料编码")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam(value = "物料名称")
private String partName;
@Column(name = "UNIT")
@ApiParam(value = "单位")
private String unit;
@Column(name = "SRC_WH")
@ApiParam(value = "发出库仓库")
private String srcWh;
@Column(name = "DEST_WH")
@ApiParam(value = "接收库仓库")
private String destWh;
@Column(name = "QTY")
@ApiParam(value = "需求数量", example = "1")
private Double qty;
@Column(name = "PRINT_QTY")
@ApiParam(value = "条码打印数量", example = "1")
private Double printQty;
@Column(name = "FACT_QTY")
@ApiParam(value = "操作完成数量", example = "1")
private Double factQty;
@Column(name = "ZDATE")
@ApiParam(value = "计划日期")
private String zdate;
@Column(name = "ZTIME")
@ApiParam(value = "计划时间")
private String ztime;
@Column(name = "SRC_NO")
@ApiParam(value = "源单号")
private String srcNo;
/**
* :N=,C=
*/
@Column(name = "ITEM_STATUS")
@ApiParam(value = "状态", example = "1")
private Integer itemStatus;
/**
* :0=,1=
*/
@Column(name = "IS_FREE")
@ApiParam(value = "是否免费", example = "1")
public Integer isFree;
@Column(name = "REMARK")
@ApiParam(value = "操作原因")
private String remark;
@Column(name = "PICK_QTY")
@ApiParam(value = "已配数量", example = "1")
private Double pickQty;
@Column(name = "OUT_QTY")
@ApiParam(value = "已提交数量", example = "1")
private Double outQty;
@Column(name = "INLINE_QTY")
@ApiParam(value = "已上线数量", example = "1")
private Double inlineQty;
@Column(name = "REJECT_QTY")
@ApiParam(value = "退料数量", example = "1")
private Double rejectQty;
@Column(name = "REJECT_POST_QTY")
@ApiParam(value = "退料提交数量", example = "1")
private Double rejectPostQty;
}

@ -0,0 +1,102 @@
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 : dragon.xu
* @CreateDate : 2018-11-13 16:06
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_DOC_MOVEMENT_MASTER")
@Api("移库单表")
public class WmsDocMovementMaster extends BaseBean {
@Column(name = "ORDER_NO")
@ApiParam(value = "移库单单号")
private String orderNo;
/**
* :IN=,OUT=,MOVE=
*/
@Column(name = "MOVE_TYPE")
@ApiParam("移动类型")
public String moveType;
/**
* :RC=,QC=,IN=,ZI=,ZO=,
* VJ=退,CJ=退,WP=,WJ=退,
* MI=,MO=,SO=
*/
@Column(name = "BUSI_TYPE")
@ApiParam(value = "业务类型", example = "1")
public Integer busiType;
/**
* :0=,10=
* ,20=,90=,91=
*/
@Column(name = "ORDER_STATUS")
@ApiParam(value = "状态", example = "1")
public Integer orderStatus;
@Column(name = "CUSTOMER_NO")
@ApiParam(value = "客户编号")
private String customerNo;
@Column(name = "VENDOR_NO")
@ApiParam(value = "供应商编号")
private String vendorNo;
@Column(name = "VERSION")
@ApiParam(value = "版本", example = "1")
private Integer version;
/**
* ::1=
*/
@Column(name = "REF_TYPE")
@ApiParam(value = "关联单据类型")
private String refType;
@Column(name = "REF_NO")
@ApiParam(value = "关联单据")
private String refNo;
@Column(name = "ERP_SRC_NO")
@ApiParam(value = "ERP单号")
private String erpSrcNo;
/**
* ::1=
*/
@Column(name = "ORDER_TYPE")
@ApiParam(value = "单据类型")
private String orderType;
@Column(name = "PART_NO")
@ApiParam(value = "物料编码")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam(value = "物料名称")
private String partName;
@Column(name = "QTY")
@ApiParam(value = "数量", example = "1")
private Double qty;
}

@ -1,120 +0,0 @@
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 : silliter.yuan
* @CreateDate : 2018-11-06 15:58
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_DOC_MOVEMENT_DETAILS")
@Api("库存移动单明细信息")
public class WmsMoveMentDetails extends BaseBean {
@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")
@ApiParam(value = "需求数量", example = "0")
public Double qty;
@Column(name="UNIT")
@ApiParam("单位")
public String unit;
@Column(name="SRC_WH")
@ApiParam("发出库仓库")
public String srcWh;
@Column(name="DEST_WH")
@ApiParam("接收库仓库")
public String destWh;
@Column(name="PRINT_QTY")
@ApiParam("条码打印数量")
public String printQty;
@Column(name="FACT_QTY")
@ApiParam("操作完成数量")
public String factQty;
@Column(name="ZDATE")
@ApiParam("计划交货日期")
public String zDate;
@Column(name="ZTIME")
@ApiParam("计划交货时间")
public String zTime;
@Column(name="SRC_NO")
@ApiParam("源单号")
public String srcNo;
/**
* :N=,C=
*/
@Column(name="STATUS")
@ApiParam(value = "状态", example = "1")
public Integer status;
@Column(name="REMARK")
@ApiParam("备注")
public String reMark;
/**
* :0=,1=
*/
@Column(name="IS_FREE")
@ApiParam(value = "是否免费", example = "1")
public Integer isFree;
@Column(name="PICK_QTY")
@ApiParam(value = "已配数量", example = "0")
public Double pickQty;
@Column(name="OUT_QTY")
@ApiParam(value = "已提交数量", example = "0")
public Double outQty;
@Column(name="INLINE_QTY")
@ApiParam(value = "已上线数量", example = "0")
public Double inLineQty;
@Column(name="REJECT_QTY")
@ApiParam(value = "退料数量", example = "0")
public Double rejectQty;
@Column(name="REJECT_POST_QTY")
@ApiParam(value = "退料提交数量", example = "0")
public Double rejectPostQty;
}

@ -1,101 +0,0 @@
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 : silliter.yuan
* @CreateDate : 2018-11-06 15:58
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_DOC_MOVEMENT_MASTER")
@Api("库存移动单主表信息")
public class WmsMoveMentMaster extends BaseBean {
@Column(name="ORDER_NO")
@ApiParam("单号")
public String orderNo;
/**
* :IN=,OUT=,MOVE=
*/
@Column(name="MOVE_TYPE")
@ApiParam("移动类型")
public String moveType;
/**
* :RC=,QC=,IN=,ZI=,ZO=,
* VJ=退,CJ=退,WP=,WJ=退,
* MI=,MO=,SO=
*/
@Column(name="TYPE")
@ApiParam("业务类型")
public String type;
/**
* :0=,10=
* ,20=,90=,91=
*/
@Column(name="STATUS")
@ApiParam(value = "状态", example = "0")
public Integer status;
@Column(name="CUSTOMER_NO")
@ApiParam("客户编号")
public String customerNo;
@Column(name="VENDOR_NO")
@ApiParam("供应商编号")
public String vendorNo;
@Column(name="VERSION")
@ApiParam("版本")
public String version;
@Column(name="SRC")
@ApiParam("单据来源")
public String src;
@Column(name="SRC_NO")
@ApiParam("关联单据")
public String srcNo;
@Column(name="ERP_ORDERNO")
@ApiParam("ERP单号")
public String erpOrderNo;
/**
* :WO=
*/
@Column(name="ORDER_TYPE")
@ApiParam("单据类型")
public String orderType;
@Column(name="PART_NO")
@ApiParam("物料编码")
public String partNo;
@Column(name="PART_NAME_RDD")
@ApiParam("物料名称")
public String partNameRdd;
@Column(name="QTY")
@ApiParam(value = "需求数量", example = "0")
public Double qty;
}

@ -33,20 +33,20 @@ public class WmsPOMaster extends BaseBean {
public String orderNo;
/**
* :1 REG=,
* 2 SUB=,3 TAR=,4 TAP=
* :
* 1 REG=,10 SUB=,20 TAR=,30 TAP=
*/
@Column(name="TYPE")
@Column(name="PO_TYPE")
@ApiParam("单据类型")
public String type;
public String poType;
/**
* :0=,10=,20=,
* :1=,10=,20=,
* 30=,40=,90=,91=
*/
@Column(name="STATUS")
@ApiParam(value = "状态", example = "0")
public Integer status;
@Column(name="PO_STATUS")
@ApiParam(value = "状态", example = "1")
public Integer poStatus;
@Column(name="VENDOR_NO")
@ApiParam("供应商编号")
@ -56,6 +56,9 @@ public class WmsPOMaster extends BaseBean {
@ApiParam("版本")
public String version;
/**
* 1 MNU=,2 ERP=ERP
*/
@Column(name="SRC")
@ApiParam("单据来源")
public String src;

@ -49,20 +49,20 @@ public class WmsPOMasterDetails extends BaseBean {
public Double qty;
@Column(name="PRINT_QTY")
@ApiParam("条码打印数量")
public String printQty;
@ApiParam(value = "条码打印数量", example = "0")
public Double printQty;
@Column(name="RC_QTY")
@ApiParam("收货数量")
public String rcQty;
@ApiParam(value = "收货数量", example = "0")
public Double rcQty;
@Column(name="PASS_QTY")
@ApiParam("质检合格数量")
public String passQty;
@ApiParam(value = "质检合格数量", example = "0")
public Double passQty;
@Column(name="NG_QTY")
@ApiParam("质检不合格数量")
public String ngQty;
@ApiParam(value = "质检不合格数量", example = "0")
public Double ngQty;
@Column(name="UNIT")
@ApiParam("单位")
@ -81,11 +81,11 @@ public class WmsPOMasterDetails extends BaseBean {
public String whNo;
/**
* :N=,C=
* :10 N=,20 C=
*/
@Column(name="STATUS")
@Column(name="ITEM_STATUS")
@ApiParam("状态")
public String status;
public String itemStatus;
@Column(name="SNP")
@ApiParam("标准包装")

@ -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.WmsDocMovementDetails;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : dragon.xu
* @CreateDate : 2018-11-13 10:19
* @Modify:
**/
@Repository
public interface WmsDocMovementDetailsRepository extends BaseRepository<WmsDocMovementDetails, 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.WmsDocMovementMaster;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : dragon.xu
* @CreateDate : 2018-11-13 10:19
* @Modify:
**/
@Repository
public interface WmsDocMovementMasterRepository extends BaseRepository<WmsDocMovementMaster, Long> {
}

@ -1,16 +0,0 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsMoveMentDetails;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : silliter.yuan
* @CreateDate : 2018-11-06 9:47
* @Modify:
**/
@Repository
public interface WmsMoveMentDetailsRepository extends BaseRepository<WmsMoveMentDetails, Long> {
}

@ -1,16 +0,0 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsMoveMentMaster;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : silliter.yuan
* @CreateDate : 2018-11-06 9:47
* @Modify:
**/
@Repository
public interface WmsMoveMentMasterRepository extends BaseRepository<WmsMoveMentMaster, Long> {
}

@ -12,7 +12,60 @@ import cn.estsh.i3plus.pojo.wms.bean.*;
* @Modify:
**/
public class WmsHqlPack {
/**
* PO
*
* @param wmsPOMasterDetails
* @return
*/
public static String packHqlWmsPOMasterDetails(WmsPOMasterDetails wmsPOMasterDetails) {
StringBuffer result = new StringBuffer();
//查询参数封装
HqlPack.getStringLikerPack(wmsPOMasterDetails.getOrderNo(), "orderNo", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getItem(), "item", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getPartNo(), "partNo", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getPartNameRdd(), "partNameRdd", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getZTime(), "zTime", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getZDate(), "zDate", result);
return result.toString();
}
/**
*
*
* @param wmsDocMovementDetails
* @return
*/
public static String packWmsDocMovementDetails(WmsDocMovementDetails wmsDocMovementDetails) {
StringBuffer result = new StringBuffer();
//查询参数封装
HqlPack.getStringLikerPack(wmsDocMovementDetails.getOrderNo(), "orderNo", result);
HqlPack.getStringEqualPack(wmsDocMovementDetails.getOrganizeCode(), "organizeCode", result);
return result.toString();
}
/**
*
*
* @param wmsDocMovementMaster
* @return
*/
public static String packWmsDocMovementMaster(WmsDocMovementMaster wmsDocMovementMaster) {
StringBuffer result = new StringBuffer();
//查询参数封装
HqlPack.getStringLikerPack(wmsDocMovementMaster.getOrderNo(), "orderNo", result);
HqlPack.getStringLikerPack(wmsDocMovementMaster.getMoveType(), "moveType", result);
HqlPack.getNumEqualPack(wmsDocMovementMaster.getOrderStatus(), "orderStatus", result);
HqlPack.getNumEqualPack(wmsDocMovementMaster.getPartNo(), "partNo", result);
HqlPack.timeBuilder(wmsDocMovementMaster.getCreateDateTimeStart(), wmsDocMovementMaster.getCreateDateTimeEnd(), "createDatetime", result, true);
HqlPack.getNumEqualPack(wmsDocMovementMaster.getIsValid(), "isValid", result);
return result.toString();
}
/**
* PO
*
@ -24,11 +77,12 @@ public class WmsHqlPack {
//查询参数封装
HqlPack.getStringLikerPack(wmsPOMaster.getOrderNo(), "orderNo", result);
HqlPack.getStringLikerPack(wmsPOMaster.getType(), "type", result);
HqlPack.getNumEqualPack(wmsPOMaster.getStatus(), "status", result);
HqlPack.getStringLikerPack(wmsPOMaster.getPoType(), "poType", result);
HqlPack.getNumEqualPack(wmsPOMaster.getPoStatus(), "poStatus", result);
HqlPack.getStringLikerPack(wmsPOMaster.getVendorNo(), "vendorNo", result);
HqlPack.getStringLikerPack(wmsPOMaster.getSrc(), "src", result);
HqlPack.getNumEqualPack(wmsPOMaster.getIsValid(), "isValid", result);
HqlPack.getNumEqualPack(wmsPOMaster.getIsDeleted(), "isDeleted", result);
return result.toString();
}

Loading…
Cancel
Save