Merge branches 'dev' and 'master' of http://git.estsh.com/i3-IMPP/i3plus-pojo

yun-zuoyi
wei.peng 6 years ago
commit aa23889514

@ -478,4 +478,16 @@ public class AndonHqlPack {
return result;
}
/**
* ANDON_ PLC
* @param plc
* @return
*/
public static DdlPackBean packAndonPLC(AndonPLC plc) {
DdlPackBean result = new DdlPackBean();
getStringBuilderPack(plc, result);
return result;
}
}

@ -104,6 +104,10 @@ public class WmsActionLogDetails extends BaseBean {
@ApiParam(value = "回显组件方法ID", example = "1")
private Long showAmId;
@Column(name = "AGD_ID")
@ApiParam(value = "作业流程明细ID", example = "1")
private Long agdId;
public Long getAsId() {
if (asId != null) {
return asId.longValue();

@ -0,0 +1,81 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description : ASN
* @Reference :
* @Author : amy
* @CreateDate : 2019-06-17 10:50
* @Modify:
**/
@Data
@Api(value = "ASN计划", description = "ASN计划")
public class SapAsn extends SapBase {
@ApiParam(value = "ASN号")
@AnnoOutputColumn
private String zasnno;
@ApiParam(value = "供应商代码")
@AnnoOutputColumn
private String lifnr;
@ApiParam(value = "ASN item")
@AnnoOutputColumn
private Double zrnum;
@ApiParam(value = "物料编码")
@AnnoOutputColumn
private String matnr;
@ApiParam(value = "数量")
@AnnoOutputColumn
private Double zcnNum;
@ApiParam(value = "计量单位")
@AnnoOutputColumn
private String unit;
@ApiParam(value = "特殊采购标识")
@AnnoOutputColumn
private String pstyp;
@ApiParam(value = "计划交货日期")
@AnnoOutputColumn
private String zdate;
@ApiParam(value = "计划交货时间")
@AnnoOutputColumn
private String zcjsj;
@ApiParam(value = "工厂代码")
@AnnoOutputColumn
private String werks;
@ApiParam(value = "收货库存地点")
@AnnoOutputColumn
private String lgort;
@ApiParam(value = "凭证标识")
@AnnoOutputColumn
private String zdoc;
@ApiParam(value = "状态", example = "U")
@AnnoOutputColumn
private String zstasI;
@ApiParam(value = "条码信息")
@AnnoOutputColumn
private String ztxm;
@ApiParam(value = "道口")
@AnnoOutputColumn
private String zdk;
}

@ -0,0 +1,71 @@
package cn.estsh.i3plus.pojo.wms.bean;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
/**
* @Description : sap
* @Reference :
* @Author : amy
* @CreateDate : 2019-06-17 16:21
* @Modify:
**/
@Data
public class SapBase {
@ApiParam(value = "处理人", example = "-1")
private String actusr = "导入";
@ApiParam(value = "SID", example = "-1")
private String sid = UUID.randomUUID().toString() + UUID.randomUUID().toString();
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiParam(value = "接收数据日期", example = "-1")
private String recymd;
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "接收数据时间", example = "-1")
private String rechms;
@ApiParam(value = "同步标志", example = "-1")
private String synflg = "Y";
@ApiParam(value = "同步日期", example = "-1")
private String synymd;
@ApiParam(value = "同步时间", example = "-1")
private String synhms;
@ApiParam(value = "处理标志", example = "-1")
private String actflg = "Y";
@ApiParam(value = "处理日期", example = "-1")
private String actymd;
@ApiParam(value = "处理时间", example = "-1")
private String acthms;
@ApiParam(value = "状态标志", example = "-1")
private String staflg;
@ApiParam(value = "顺序号", example = "-1")
private Integer seq;
@ApiParam(value = "GUID", example = "-1")
private String guid;
public String getSynymdTime() {
SimpleDateFormat format = new SimpleDateFormat("YYYY-MM-DD");
return format.format(new Date());
}
public String getSynhmsTime() {
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
return format.format(new Date());
}
}

@ -85,4 +85,20 @@ public class WmsASNMaster extends BaseBean {
@Transient
@ApiParam(value = "发货日期")
private String sendDate;
@Transient
@ApiParam(value = "工厂名称")
public String organizeName;
@Transient
@ApiParam("联系人")
private String vendorOwner;
@Transient
@ApiParam("邮箱")
private String vendorEmail;
@Transient
@ApiParam("供应商名称")
private String vendorName;
}

@ -120,5 +120,21 @@ public class WmsASNMasterDetails extends BaseBean {
@Version
@Column(name = "LOCK_VERSION")
@ApiParam(value = "乐观锁", example = "1")
public int lockVersion;
public transient int lockVersion;
@Transient
@ApiParam("实收数量")
private Double rcQty;
@Transient
@ApiParam("ASN条码总箱数")
public Integer totalBoxes;
@Transient
@ApiParam("差异")
public Double difference;
@Transient
@ApiParam("标准包装")
public Double snp;
}

@ -197,5 +197,5 @@ public class WmsDocMovementDetails extends BaseBean {
@Version
@Column(name = "LOCK_VERSION")
@ApiParam(value = "乐观锁", example = "1")
public int lockVersion;
public transient int lockVersion;
}

@ -107,4 +107,16 @@ public class WmsPOMaster extends BaseBean {
@Column(name = "IS_SN")
@ApiParam(value = "是否生成条码", example = "1")
public Integer isSn;
@Transient
@ApiParam(value = "工厂名称")
public String organizeName;
@Transient
@ApiParam("联系人")
private String vendorOwner;
@Transient
@ApiParam("邮箱")
private String vendorEmail;
}

@ -34,8 +34,9 @@ public class WmsPOMasterDetails extends BaseBean {
@ApiParam("物料编码")
public String partNo;
@Column(name = "BOX_QTY")
@ApiParam("箱数")
@Column(name = "BOX_QTY" )
@ColumnDefault("0")
@ApiParam(value ="箱数", example = "0")
public Integer boxQty;
@Column(name = "PART_NAME_RDD")
@ -140,5 +141,14 @@ public class WmsPOMasterDetails extends BaseBean {
@Version
@Column(name = "LOCK_VERSION")
@ApiParam(value = "乐观锁", example = "1")
public int lockVersion;
public transient int lockVersion;
@Transient
@ApiParam("PO条码总箱数")
public Integer totalBoxes;
@Transient
@ApiParam("差异")
public Double difference;
}

@ -84,5 +84,5 @@ public class WmsQCDetails extends BaseBean {
@Version
@Column(name = "LOCK_VERSION")
@ApiParam(value = "乐观锁", example = "1")
public int lockVersion;
public transient int lockVersion;
}

@ -102,6 +102,11 @@ public class WmsStockQuan extends BaseBean {
@ApiParam(value = "锁定数量", example = "0")
private Double lockQty;
@Column(name = "SCRAP_QTY")
@ColumnDefault("0")
@ApiParam(value = "报废数量", example = "0")
private Double scrapQty;
public Double getQty() {
return this.qty == null ? 0 : this.qty;
}
@ -134,10 +139,14 @@ public class WmsStockQuan extends BaseBean {
return this.lockQty == null ? 0 : this.lockQty;
}
public Double getScrapQty() {
return this.scrapQty == null ? 0 : this.scrapQty;
}
public WmsStockQuan() {
}
public WmsStockQuan(Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty) {
public WmsStockQuan(Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty, Double scrapQty) {
this.qty = qty;
this.failQty = failQty;
this.holdQty = holdQty;
@ -146,5 +155,6 @@ public class WmsStockQuan extends BaseBean {
this.freezeQty = freezeQty;
this.consignQty = consignQty;
this.lockQty = lockQty;
this.scrapQty = scrapQty;
}
}

@ -28,6 +28,11 @@ public class MappingItem {
*/
public String destName;
/**
*
* 1=
*/
public Integer destPk;
/**
*
* 使 #date, #time, #guid, #Q.warehouse(#zone)
*/
@ -39,6 +44,7 @@ public class MappingItem {
+ this.srcName + ", destBeanName:"
+ this.destBeanName + ", destName"
+ this.destName + ", defaultValue:"
+ this.defaultValue;
+ this.defaultValue + ", destPk:"
+ this.destPk;
}
}

@ -89,4 +89,11 @@ public class WmsInterfaceDataMapper extends BaseBean {
*/
@Column(name = "DEST_COLUMN_MAPPING", length = 5000)
public String destColumnMapping;
/**
*
* SAP2WMS, WMS2SAP, MES2WMS
*/
@Column(name = "GROUP_NAME")
public String groupName;
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsVendorPart;
public interface WmsVendorPartRepository extends BaseRepository<WmsVendorPart, Long>{
}

@ -1394,48 +1394,72 @@ public class WmsHqlPack {
* @param groupDataAuth
* @return
*/
public static DdlPackBean packHqlWmsTaskDetail(Map<String, List<WmsDataAuth>> groupDataAuth, String refSrc) {
public static DdlPackBean packHqlWmsTaskDetail(Map<String, List<WmsDataAuth>> groupDataAuth, String refSrc, String organizeCode) {
DdlPackBean result = new DdlPackBean();
int i = 1;
Set<Map.Entry<String, List<WmsDataAuth>>> entries = groupDataAuth.entrySet();
//拼sql
entries.stream().filter(o -> !Strings.isNullOrEmpty(o.getKey()));
for (Map.Entry<String, List<WmsDataAuth>> map : entries) {
String key = map.getKey();
List<WmsDataAuth> valueList = map.getValue();
List<String> vList = valueList.stream().map(x -> x.getDataObjValue()).collect(Collectors.toList());
String data = String.join(",", vList);
if (StringUtils.isNotBlank(data)) {
List<Map> mapList = JSONObject.parseArray(data, Map.class);
if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.WAREHOUSE.getValue() + "", key)) {
for (Map whNoItem : mapList) {
// 拼接仓库查询sql
DdlPreparedPack.getStringEqualPackOr(whNoItem.get("WH_CODE").toString(), "destWhNo", result);
}
packMutilConditionHql(mapList, "WH_CODE", "destWhNo", result);
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.LOCATE.getValue() + "", key)) {
for (Map locateNoItem : mapList) {
// 拼接库位查询sql
DdlPreparedPack.getStringEqualPackOr(locateNoItem.get("LOCATE_NO").toString(), "destLocateNo", result);
}
packMutilConditionHql(mapList, "LOCATE_NO", "destLocateNo", result);
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.ZONE.getValue() + "", key)) {
for (Map zoneNoItem : mapList) {
// 拼接存储区查询sql
DdlPreparedPack.getStringEqualPackOr(zoneNoItem.get("ZONE_CODE").toString(), "destZoneNo", result);
}
packMutilConditionHql(mapList, "ZONE_CODE", "destZoneNo", result);
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.MATERIAL.getValue() + "", key)) {
for (Map partNoItem : mapList) {
// 拼接物料查询sql
DdlPreparedPack.getStringEqualPackOr(partNoItem.get("PART_NO").toString(), "partNo", result);
}
packMutilConditionHql(mapList, "PART_NO", "partNo", result);
}
}
}
String hqlString = " and ( 1=1 " + result.getPackedHql() + ") ";
result.setWhereAppend(hqlString);
// 通用数据拼接
getStringBuilderPack(new WmsDataAuth(), result);
WmsDataAuth wmsDataAuth = new WmsDataAuth();
wmsDataAuth.setOrganizeCode(organizeCode);
getStringBuilderPack(wmsDataAuth, result);
return result;
}
/**
* List<Map> HQL
* @param mapList
* @param keyName
* @param columnName
* @param packBean
*/
private static void packMutilConditionHql(List<Map> mapList, String keyName,
String columnName, DdlPackBean packBean) {
Integer index = 1;
for (Map item : mapList) {
packBean.addColumnQuery(columnName," or model." +
columnName + " = :m_" + columnName + (index++).toString(),
item.get(keyName).toString());
}
}
/**
* in sql
*
* @param columnName
@ -1687,6 +1711,32 @@ public class WmsHqlPack {
getStringBuilderPack(wmsLineLocatePart, result);
return result;
}
/**
*
*
* @param wmsTaskSrc
* @return
*/
public static DdlPackBean packHqlWmsTaskSrc(WmsTaskSrc wmsTaskSrc) {
DdlPackBean result = new DdlPackBean();
//查询参数封装
DdlPreparedPack.getStringEqualPack(wmsTaskSrc.getOpTypeCode(), "opTypeCode", result);
getStringBuilderPack(wmsTaskSrc, result);
return result;
}
/**
*
*
* @param wmsVendorPart
* @return
*/
public static DdlPackBean packHqlWmsVendorPart(WmsVendorPart wmsVendorPart) {
DdlPackBean result = new DdlPackBean();
//查询参数封装
DdlPreparedPack.getStringLikerPack(wmsVendorPart.getVendorNo(), "vendorNo", result);
DdlPreparedPack.getStringLikerPack(wmsVendorPart.getPartNo(), "partNo", result);
getStringBuilderPack(wmsVendorPart, result);
return result;
}
}

Loading…
Cancel
Save