Merge remote-tracking branch 'origin/dev' into dev

yun-zuoyi
汪云昊 6 years ago
commit 8e39e6d9fb

@ -247,7 +247,9 @@ public class CommonEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_TYPE {
USER(1, "user", "普通用户"), ADMIN(2, "admin", "系统管理员"), SA(3, "sa", "超级管理员");
USER(1, "user", "普通用户"),
ADMIN(2, "admin", "系统管理员"),
SA(3, "sa", "超级管理员");
private int value;
private String code;
@ -281,6 +283,26 @@ public class CommonEnumUtil {
return tmp;
}
public static USER_TYPE valueOfCode(String code) {
USER_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i];
}
}
return tmp;
}
public static USER_TYPE valueOfDescription(String description) {
USER_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i];
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {

@ -502,7 +502,11 @@ public class WmsEnumUtil {
SUPPLIER_RETURN_SMRR(190, "SUPPLIER_RETURN_SMRR", "供应商退货(SMRR)"),
NC_DISMANTLING_PICKING(160, "NC_DISMANTLING_PICKING", "NC拆解领料"),
NC_DISMANTLING_RETREAT(170, "NC_DISMANTLING_RETREAT", "NC拆解退料"),
LINE_EDGE_SCRAPPING_OUT(180, "LINE_EDGE_SCRAPPING_OUT", "线边报废出库");
LINE_EDGE_SCRAPPING_OUT(180, "LINE_EDGE_SCRAPPING_OUT", "线边报废出库"),
ASN(190, "ASN", "ASN"),
PO(200, "PO", "PO"),
QC(210, "QC", "QC"),
AMPR(220, "AMPR", "AMPR");
private int value;
@ -2902,6 +2906,7 @@ public class WmsEnumUtil {
ASSIST("ASSIST", "辅助"),
NC("NC", "NC"),
CS("CS", "盘点");
private String value;
private String description;

@ -8,6 +8,7 @@ import cn.estsh.i3plus.pojo.platform.bean.*;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description :
@ -97,14 +98,19 @@ public class CoreHqlPack {
* @return
*/
public static DdlPackBean packHqlSysPosition(SysPosition position){
DdlPackBean result = new DdlPackBean();
return packHqlSysPosition(position,null);
}
public static DdlPackBean packHqlSysPosition(SysPosition position,List<Long> idList){
DdlPackBean result = new DdlPackBean();
// 查询参数封装
DdlPreparedPack.getNumEqualPack(position.getParentId(),"parentId",result);
DdlPreparedPack.getStringEqualPack(position.getName(),"name",result);
DdlPreparedPack.getStringEqualPack(position.getPositionCode(),"positionCode",result);
DdlPreparedPack.getStringEqualPack(position.getOrganizeCode(),"organizeCode",result);
// String Like
DdlPreparedPack.getStringLikerPack(position.getName(),"name",result);
DdlPreparedPack.getStringLikerPack(position.getPositionCode(),"positionCode",result);
// In
DdlPreparedPack.getInPackList(idList,"id",result);
return result;
}
@ -146,6 +152,17 @@ public class CoreHqlPack {
return result.toString();
}
public static DdlPackBean packHqlSysOrganize(SysOrganize organize,List<Long> idList){
DdlPackBean result = new DdlPackBean();
// String Like
DdlPreparedPack.getStringLikerPack(organize.getName(),"name",result);
DdlPreparedPack.getStringLikerPack(organize.getName(),"organizeCode",result);
// Number In
DdlPreparedPack.getInPackList(idList,"id",result);
return result;
}
public static String packHqlSysOrganize(Long[] ids, Integer typeId){
StringBuffer result = new StringBuffer();
@ -205,6 +222,7 @@ public class CoreHqlPack {
* @param role
* @return
*/
@Deprecated
public static String packHqlSysRole(SysRole role){
StringBuffer result = new StringBuffer();
@ -219,6 +237,27 @@ public class CoreHqlPack {
}
/**
*
* @param role
* @return
*/
public static DdlPackBean packDdlBeanSysRole(SysRole role){
return packDdlBeanSysRole(role,null);
}
public static DdlPackBean packDdlBeanSysRole(SysRole role,List<Long> idList){
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),"isDeleted",result);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(),"isValid",result);
DdlPreparedPack.getNumEqualPack(role.getRoleStatus(),"roleStatus",result);
DdlPreparedPack.getStringLikerPack(role.getName(),"name",result);
DdlPreparedPack.getInPackList(idList,"id",result);
return result;
}
/**
*
* @param config
* @return
@ -784,4 +823,31 @@ public class CoreHqlPack {
return ddlPackBean;
}
public static DdlPackBean packDdlBeanSysRefUserRole(SysRefUserRole ref){
DdlPackBean result = new DdlPackBean();
// Number Eq
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),"isDeleted",result);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(),"isValid",result);
DdlPreparedPack.getNumEqualPack(ref.getUserId(),"userId",result);
// String Eq
DdlPreparedPack.getStringEqualPack(ref.getOrganizeCode(),"organizeCode",result);
return result;
}
/**
*
* @param sysRefUserDepartments
* @return
*/
public static DdlPackBean packHqlSysOrganize(List<SysRefUserDepartment> sysRefUserDepartments){
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getInPackList(sysRefUserDepartments.stream().map(d -> d.getOrganizeId()).collect(Collectors.toList()),"id",packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(),"isValid",packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(),"isDeleted",packBean);
return packBean;
}
}

@ -36,7 +36,7 @@ public class WmsASNMaster extends BaseBean {
@Column(name = "ASN_TYPE")
@ApiParam("单据类型")
public String asnType;
public Integer asnType;
@Column(name = "ASN_STATUS")
@ApiParam(value = "状态", example = "0")

@ -105,6 +105,10 @@ public class WmsMoveDetails extends BaseBean {
@ApiParam(value = "状态", example = "0")
public Integer itemStatus;
@Column(name="REF_ITEM")
@ApiParam("关联单据行号")
public String refItem;
/**
* ASN,PO,SO
*/
@ -124,6 +128,18 @@ public class WmsMoveDetails extends BaseBean {
@Transient
private Long finishedCounts;
@Transient
@ApiParam("交易类型")
private String transTypeCode;
@Transient
@ApiParam("erp库存地")
private String ZoneNo;
@Transient
@ApiParam("条码")
private String sn;
public WmsMoveDetails(){}
public WmsMoveDetails(String partNo, Long waitingCounts ,Long finishedCounts){
@ -148,4 +164,32 @@ public class WmsMoveDetails extends BaseBean {
public Long getFinishedCounts() {
return finishedCounts == null ? 0L : this.finishedCounts;
}
public WmsMoveDetails(String organizeCode,String orderNo,Integer item,String partNo,String partNameRdd,String transTypeCode,
Integer itemStatus,String unit,String srcWhNo,
String srcZoneNo,String srcLocateNo,String destWhNo, String destZoneNo, String destLocateNo,
Double transQty,Double rejectQty,String refSrc,String vendorNo, String custNo){
this.organizeCode = organizeCode;
this.partNo = partNo;
this.orderNo = orderNo;
this.item = item;
this.partNameRdd = partNameRdd;
this.transTypeCode = transTypeCode;
this.itemStatus = itemStatus;
this.unit = unit;
this.srcWhNo = srcWhNo;
this.srcZoneNo = srcZoneNo;
this.srcLocateNo = srcLocateNo;
this.destWhNo = destWhNo;
this.destZoneNo = destZoneNo;
this.destLocateNo = destLocateNo;
this.transQty = transQty;
this.rejectQty = rejectQty;
this.refSrc = refSrc;
this.vendorNo = vendorNo;
this.custNo = custNo;
}
}

@ -65,4 +65,90 @@ public class WmsMoveMaster extends BaseBean {
@Column(name = "BUSI_TYPE_CODE")
@ApiParam(value = "业务类型编码")
private Integer busiTypeCode;
@Transient
@ApiParam("物料编码")
private String partNo;
@Transient
@ApiParam("状态")
private Integer itemStatus;
@Transient
@ApiParam("erp库存地")
private String ZoneNo;
@Transient
@ApiParam("关联单号")
private String refSrc;
@Transient
@ApiParam("目标仓库")
private String destWhNo;
@Transient
@ApiParam("存储区")
private String destZoneNo;
@Transient
@ApiParam("供应商编码")
private String vendorNo;
@Transient
@ApiParam("条码")
private String sn;
@Transient
@ApiParam("物料名称")
private String partNameRdd;
@Transient
@ApiParam("单位")
private String unit;
@Transient
@ApiParam("源仓库")
private String srcWhNo;
@Transient
@ApiParam("源存储区代码")
private String srcZoneNo;
@Transient
@ApiParam("处理数量")
private Double transQty;
@Transient
@ApiParam("不合格处理数量")
private Double rejectQty;
@Transient
@ApiParam("库位")
private String destLocateNo;
public WmsMoveMaster(){};
public WmsMoveMaster(String organizeCode,String partNo,String partNameRdd,String transTypeCode,Integer itemStatus,
String unit,String srcWhNo,String srcZoneNo,String destWhNo,String destZoneNo,Double transQty, Double rejectQty) {
this.organizeCode = organizeCode;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.transTypeCode = transTypeCode;
this.itemStatus = itemStatus;
this.unit = unit;
this.srcWhNo = srcWhNo;
this.srcZoneNo = srcZoneNo;
this.destWhNo = destWhNo;
this.destZoneNo = destZoneNo;
this.transQty = transQty;
this.rejectQty = rejectQty;
}
}

@ -165,6 +165,14 @@ public class WmsMoveSn extends BaseBean {
@ApiParam("关联单号")
public String refSrc;
@Transient
@ApiParam("erp库存地")
private String ZoneNo;
@Transient
@ApiParam("供应商编码")
private String vendorNo;
public WmsMoveSn(){}
public WmsMoveSn(String partNo, Long finishedCounts ,Long waitingCounts){
@ -196,4 +204,28 @@ public class WmsMoveSn extends BaseBean {
this.transTypeCode = transTypeCode;
this.refSrc = refSrc;
}
public WmsMoveSn( String organizeCode,String orderNo,Integer item,String partNo,String partNameRdd,
String transTypeCode,Integer itemStatus,String unit, String srcLocateNo,String destLocateNo,Double srcQty,Double destQty,Integer srcQcStatus,Integer descQcStatus,Integer srcSnStatus,
Integer destSnStatus, String lotNo,String dateCode){
this.organizeCode=organizeCode;
this.orderNo=orderNo;
this.item=item;
this.partNo=partNo;
this.partNameRdd=partNameRdd;
this.transTypeCode=transTypeCode;
this.itemStatus=itemStatus;
this.unit=unit;
this.srcLocateNo=srcLocateNo;
this.destLocateNo=destLocateNo;
this.srcQty=srcQty;
this.srcQty=srcQty;
this.destQty=destQty;
this.srcQcStatus=srcQcStatus;
this.descQcStatus=descQcStatus;
this.srcSnStatus=srcSnStatus;
this.destSnStatus=destSnStatus;
this.lotNo=lotNo;
this.dateCode=dateCode;
}
}

@ -141,7 +141,7 @@ public class WmsPart extends BaseBean {
@Column(name = "OUT_CLOSE_FLAG")
@ApiParam("項目结算标识")
private String outCloseFlag;
private String outCloseFlag = "2";
@Transient
@ApiParam("总数量")
@ -153,7 +153,7 @@ public class WmsPart extends BaseBean {
@Column(name = "IS_PROD_LOT")
@ApiParam(value = "是否录入生产批次", example = "1")
private Integer isProdLot;
private Integer isProdLot = 2;
public int getIqcValue(){
return this.iqc == null ? 0 : this.iqc.intValue();

@ -10,6 +10,7 @@ import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.util.List;
/**
* @Description :
@ -126,6 +127,31 @@ public class WmsStockQuan extends BaseBean {
@ApiParam(value = "总数量")
private Double totalQty;
@Transient
@ApiParam(value = "项目名称")
private String prodCfgTypeName;
@Transient
@ApiParam(value = "箱数", example = "-1")
private Integer boxQty;
@Transient
@ApiParam(value = "零件数", example = "-1")
private Double partQty;
@Transient
@ApiParam(value = "ERP库存地")
private String areaNo;
@Transient
@ApiParam(value = "存储区集合")
private List<String> zoneList;
public String getAreaNo() {
return areaNo;
}
public Double getQtyVal() {
return this.qty == null ? 0 : this.qty;
}
@ -166,6 +192,14 @@ public class WmsStockQuan extends BaseBean {
return this.totalQty == null ? 0 : this.totalQty;
}
public Double getPartQtyVal() {
return this.partQty == null ? 0 : this.partQty;
}
public Integer getBoxQtyVal() {
return this.boxQty == null ? 0 : this.boxQty;
}
public WmsStockQuan() {
}
@ -196,4 +230,45 @@ public class WmsStockQuan extends BaseBean {
this.lockQty = lockQty;
this.scrapQty = scrapQty;
}
public WmsStockQuan(String locateNo,Integer boxQty,Double partQty,String partNo,String partNameRdd, String unit,
Double sumQty, Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty, Double scrapQty) {
this.locateNo = locateNo;
this.boxQty = boxQty;
this.partQty = partQty;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.unit = unit;
this.sumQty = sumQty;
this.qty = qty;
this.failQty = failQty;
this.holdQty = holdQty;
this.qcQty = qcQty;
this.rinQty = rinQty;
this.freezeQty = freezeQty;
this.consignQty = consignQty;
this.lockQty = lockQty;
this.scrapQty = scrapQty;
}
public WmsStockQuan(String whNo, String zoneNo, String locateNo,Integer boxQty,Double partQty,String partNo,String partNameRdd, String unit,
Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty, Double scrapQty) {
this.whNo = whNo;
this.zoneNo = zoneNo;
this.locateNo = locateNo;
this.boxQty = boxQty;
this.partQty = partQty;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.unit = unit;
this.qty = qty;
this.failQty = failQty;
this.holdQty = holdQty;
this.qcQty = qcQty;
this.rinQty = rinQty;
this.freezeQty = freezeQty;
this.consignQty = consignQty;
this.lockQty = lockQty;
this.scrapQty = scrapQty;
}
}

@ -521,7 +521,7 @@ public class WmsHqlPack {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringRightLikerPack(wmsASNMaster.getOrderNo(), "orderNo", result);
DdlPreparedPack.getStringEqualPack(wmsASNMaster.getAsnType(), "asnType", result);
DdlPreparedPack.getNumEqualPack(wmsASNMaster.getAsnType(), "asnType", result);
DdlPreparedPack.getNumEqualPack(wmsASNMaster.getAsnStatus(), "asnStatus", result);
DdlPreparedPack.getStringEqualPack(wmsASNMaster.getVendorNo(), "vendorNo", result);
DdlPreparedPack.getStringEqualPack(wmsASNMaster.getVersion(), "version", result);
@ -807,6 +807,9 @@ public class WmsHqlPack {
DdlPreparedPack.getStringEqualPack(wmsStockSn.getSn(), "sn", result);
DdlPreparedPack.getStringEqualPack(wmsStockSn.getRefSrc(), "refSrc", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getPrinted(), "printed", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getSnStatus(), "snStatus", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getQcStatus(), "qcStatus", result);
getStringBuilderPack(wmsStockSn, result);
return result;
@ -821,9 +824,9 @@ public class WmsHqlPack {
public static DdlPackBean packWmsStockQuan(WmsStockQuan wmsStockQuan) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getInPackList(wmsStockQuan.getZoneList(),"zoneNo",result);
//查询参数封装
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getWhNo(), "whNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getZoneNo(), "zoneNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getLocateNo(), "locateNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getPartNo(), "partNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getCustNo(), "custNo", result);
@ -2003,8 +2006,8 @@ public class WmsHqlPack {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(wmsUnit.getOrganizeCode(), "organizeCode", result);
DdlPreparedPack.getStringEqualPack(wmsUnit.getUnitCode(), "unitCode", result);
DdlPreparedPack.getStringEqualPack(wmsUnit.getUnitName(), "unitName", result);
DdlPreparedPack.getStringLikerPack(wmsUnit.getUnitCode(), "unitCode", result);
DdlPreparedPack.getStringLikerPack(wmsUnit.getUnitName(), "unitName", result);
DdlPreparedPack.getNumEqualPack(wmsUnit.getUnitPrecision(), "unitPrecision", result);
getStringBuilderPack(wmsUnit, result);

Loading…
Cancel
Save