yun-zuoyi
曾贞一 6 years ago
commit 8f56fc5620

@ -6,6 +6,7 @@ import lombok.Data;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.UUID;
/**
@ -22,7 +23,7 @@ public class SapBase {
private String actusr = "导入";
@ApiParam(value = "SID", example = "-1")
private String sid = UUID.randomUUID().toString() + UUID.randomUUID().toString();
private String sid = new Random().nextInt() + "";
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiParam(value = "接收数据日期", example = "-1")
@ -48,16 +49,16 @@ public class SapBase {
private String actymd;
@ApiParam(value = "处理时间", example = "-1")
private String acthms;
private String acthms ="00:00:00";
@ApiParam(value = "状态标志", example = "-1")
private String staflg;
private String staflg = "Y";
@ApiParam(value = "顺序号", example = "-1")
private Integer seq;
private Integer seq = new Random().nextInt();
@ApiParam(value = "GUID", example = "-1")
private String guid;
private String guid = UUID.randomUUID().toString();
public String getSynymdTime() {
SimpleDateFormat format = new SimpleDateFormat("YYYY-MM-DD");

@ -0,0 +1,59 @@
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 : JIS
* @Reference :
* @Author : amy
* @CreateDate : 2019-06-20 13:24
* @Modify:
**/
@Data
@Api(value="非JIS发运",description = "非JIS发运")
public class SapDn extends SapBase{
@ApiParam(value = "销售交货单号",example = "1")
@AnnoOutputColumn
private String vbeln;
@ApiParam(value = "行项目",example = "1")
@AnnoOutputColumn
private Integer posnr;
@ApiParam(value = "发货工厂",example = "1")
@AnnoOutputColumn
private String werks;
@ApiParam(value = "发货库存地",example = "1")
@AnnoOutputColumn
private String lgort;
@ApiParam(value = "计划交货日期",example = "1")
@AnnoOutputColumn
private String lfdat;
@ApiParam(value = "客户编码",example = "1")
@AnnoOutputColumn
private String kunnr;
@ApiParam(value = "物料号",example = "1")
@AnnoOutputColumn
private String matnr;
@ApiParam(value = "客户物料号",example = "1")
@AnnoOutputColumn
private String kdmat;
@ApiParam(value = "交货数量",example = "1")
@AnnoOutputColumn
private String lfimg;
@ApiParam(value = "单位",example = "1")
@AnnoOutputColumn
private String meins;
}

@ -16,7 +16,7 @@ import lombok.Data;
@Api(value="要货计划",description = "要货计划")
public class SapDspo extends SapBase{
@ApiParam(value = "SA编号或PO号",example = "1")
@ApiParam(value = "SA_PO编号",example = "1")
@AnnoOutputColumn
private String ebeln;
@ -24,18 +24,18 @@ public class SapDspo extends SapBase{
@AnnoOutputColumn
private String revno;
@ApiParam(value = "SAitem或PO item",example = "-1")
@ApiParam(value = "行项目",example = "-1")
@AnnoOutputColumn
private Integer evrtp;
@ApiParam(value = "供应商代码",example = "-1")
@AnnoOutputColumn
private String lifnr;
@ApiParam(value = "物料编码",example = "-1")
@AnnoOutputColumn
private String matnr;
@ApiParam(value = "供应商代码",example = "-1")
@AnnoOutputColumn
private String lifnr;
@ApiParam(value = "计量单位",example = "-1")
@AnnoOutputColumn
private String unit;
@ -60,7 +60,7 @@ public class SapDspo extends SapBase{
@AnnoOutputColumn
private String werks;
@ApiParam(value = "收货库存地",example = "-1")
@ApiParam(value = "收货库存地",example = "-1")
@AnnoOutputColumn
private String lgort;
@ -68,12 +68,12 @@ public class SapDspo extends SapBase{
@AnnoOutputColumn
private String zpzps;
@ApiParam(value = "状态",example = "-1")
@ApiParam(value = "行项目状态",example = "-1")
@AnnoOutputColumn
private String zstas;
@ApiParam(value = "状态",example = "-1")
@AnnoOutputColumn
@AnnoOutputColumn(hidden = true)
private String loekz;
@ApiParam(value = "最小包装数量",example = "-1")
@ -81,7 +81,7 @@ public class SapDspo extends SapBase{
private Double bstrf;
@ApiParam(value = "条码已打印的数量",example = "-1")
@AnnoOutputColumn
@AnnoOutputColumn(hidden = true)
private Double prnnum;
// //公共字段 ++++++++++++++++++++++++++++++++++++++++++

@ -14,11 +14,11 @@ import lombok.Data;
**/
@Data
@Api(value="零星领料(退)料结果",description = "零星领料(退)料结果")
public class WmsMiscr extends SapBase{
public class SapMiscr extends SapBase{
@ApiParam(value = "编号",example = "1")
@AnnoOutputColumn
private String refid;
private String zinstno;
@ApiParam(value = "行号",example = "1")
@AnnoOutputColumn
@ -44,17 +44,25 @@ public class WmsMiscr extends SapBase{
@AnnoOutputColumn
private String erfme;
@ApiParam(value = "业务类型",example = "1")
@ApiParam(value = "特殊库存标识",example = "1")
@AnnoOutputColumn
private String zaction;
private String sobkz;
@ApiParam(value = "交易日期",example = "1")
@ApiParam(value = "特殊库存描述",example = "1")
@AnnoOutputColumn
private String zpost;
private String htext;
@ApiParam(value = "交易时间",example = "1")
@ApiParam(value = "状态",example = "1")
@AnnoOutputColumn
private String ztime;
private String zzlzt;
@ApiParam(value = "业务类型",example = "1")
@AnnoOutputColumn
private String zaction;
@ApiParam(value = "领料单号",example = "1")
@AnnoOutputColumn(hidden = true)
private String sgtxt;
public Double getZeileVal() {
return zeile== null ? 0D : this.zeile.doubleValue();

@ -0,0 +1,56 @@
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 : 退
* @Reference :
* @Author : amy
* @CreateDate : 2019-06-20 13:32
* @Modify:
**/
@Data
@Api(value="销售退货",description = "销售退货")
public class SapRdn extends SapBase{
@ApiParam(value = "销售交货单",example = "1")
@AnnoOutputColumn
private String vbeln;
@ApiParam(value = "Item",example = "1")
@AnnoOutputColumn
private Integer posnr;
@ApiParam(value = "收货工厂",example = "1")
@AnnoOutputColumn
private String werks;
@ApiParam(value = "收货库存地",example = "1")
@AnnoOutputColumn
private String lgort;
@ApiParam(value = "收货日期",example = "1")
@AnnoOutputColumn
private String lfdat;
@ApiParam(value = "客户编码",example = "1")
@AnnoOutputColumn
private String kunnr;
@ApiParam(value = "物料号",example = "1")
@AnnoOutputColumn
private String matnr;
@ApiParam(value = "收货数量",example = "1")
@AnnoOutputColumn
private String lfimg;
@ApiParam(value = "物料单位",example = "1")
@AnnoOutputColumn
private String meins;
}

@ -139,4 +139,9 @@ public class WmsTransQuan extends BaseBean {
@ColumnDefault("0")
@ApiParam(value = "锁定数量", example = "0")
private Double lockQty;
@Column(name = "SCRAP_QTY")
@ColumnDefault("0")
@ApiParam(value = "报废数量", example = "0")
private Double scrapQty;
}

@ -38,6 +38,6 @@ public class WmsUnit extends BaseBean {
@Column(name = "UNIT_PRECISION")
@ApiParam(value = "单位精度")
private String unitPrecision;
private Integer unitPrecision;
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsWorkCenterZone;
/**
* @Description : 线()-
* @Reference :
* @Author : sky.meng
* @CreateDate : 2019-06-20 14:55
* @Modify:
**/
public interface WmsWorkCenterZoneRepository extends BaseRepository<WmsWorkCenterZone, Long> {
}

@ -1462,26 +1462,29 @@ public class WmsHqlPack {
if (StringUtils.isNotBlank(data)) {
List<Map> mapList = JSONObject.parseArray(data, Map.class);
if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.WAREHOUSE.getValue() + "", key)) {
packMutilConditionHql(mapList, "WH_CODE", "destWhNo", result);
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.LOCATE.getValue() + "", key)) {
packMutilConditionHql(mapList, "LOCATE_NO", "destLocateNo", result);
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.ZONE.getValue() + "", key)) {
packMutilConditionHql(mapList, "ZONE_CODE", "destZoneNo", result);
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.MATERIAL.getValue() + "", key)) {
packMutilConditionHql(mapList, "PART_NO", "partNo", result);
}
DdlPreparedPack.getInPackList(cyclicTraversal(mapList,"WH_CODE"), "destWhNo", result);
//packMutilConditionHql(mapList, "WH_CODE", "destWhNo", result);
}/* else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.LOCATE.getValue() + "", key)) {
DdlPreparedPack.getInPackList(cyclicTraversal(mapList,"LOCATE_NO"), "destLocateNo", result);
//packMutilConditionHql(mapList, "LOCATE_NO", "destLocateNo", result);
}*/ else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.ZONE.getValue() + "", key)) {
DdlPreparedPack.getInPackList(cyclicTraversal(mapList,"ZONE_CODE"), "destZoneNo", result);
//packMutilConditionHql(mapList, "ZONE_CODE", "destZoneNo", result);
} /*else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.MATERIAL.getValue() + "", key)) {
DdlPreparedPack.getInPackList(cyclicTraversal(mapList,"PART_NO"), "partNo", result);
//packMutilConditionHql(mapList, "PART_NO", "partNo", result);
}*/
}
}
//转换封装后的hql
String packedHql = result.getPackedHql();
/*String packedHql = result.getPackedHql();
if(packedHql.startsWith(" or")){
packedHql = " and (" + packedHql.substring(3,packedHql.length()) + ") ";
System.out.println(packedHql);
}
result.setWhereAppend(packedHql);
result.setWhereAppend(packedHql);*/
// 通用数据拼接
WmsDataAuth wmsDataAuth = new WmsDataAuth();
wmsDataAuth.setOrganizeCode(organizeCode);
@ -1490,6 +1493,20 @@ public class WmsHqlPack {
}
/**
* List<Map> List<String>
* @param mapList
* @param keyName
*/
private static List<String> cyclicTraversal(List<Map> mapList,String keyName) {
List<String> list = new ArrayList<String>();
for(int i=0;i<mapList.size();i++){
Map<String,String> map = mapList.get(i);
list.add(map.get(keyName));
}
return list;
}
/**
* List<Map> HQL
* @param mapList
* @param keyName
@ -1518,37 +1535,31 @@ public class WmsHqlPack {
*/
public static DdlPackBean packHqlAndIn(WmsTaskInfo bean, String columnName, List<String> orderList,Map<String, List<WmsDataAuth>> groupDataAuth) {
DdlPackBean packBean = new DdlPackBean();
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.TRANS_TYPE.getValue() + "", key)) {
packMutilConditionHql(mapList, "TRANS_TYPE_CODE", "transTypeCode", packBean);
DdlPreparedPack.getInPackList(cyclicTraversal(mapList,"TRANS_TYPE_CODE"), "transTypeCode", packBean);
//packMutilConditionHql(mapList, "TRANS_TYPE_CODE", "transTypeCode", packBean);
break;
}
}
}
//转换封装后的hql
String packedHql = packBean.getPackedHql();
/*String packedHql = packBean.getPackedHql();
if(packedHql.startsWith(" or")){
packedHql = " and (" + packedHql.substring(3,packedHql.length()) + ") ";
System.out.println(packedHql);
}
packBean.setWhereAppend(packedHql);
packBean.setWhereAppend(packedHql);*/
DdlPreparedPack.getInPackList(orderList, columnName, packBean);
DdlPreparedPack.getStringRightLikerPack(bean.getOrderNo(), "orderNo", packBean);
DdlPreparedPack.getNumNOEqualPack(bean.getTaskStatus(), "taskStatus", packBean);
@ -1827,6 +1838,28 @@ public class WmsHqlPack {
getStringBuilderPack(wmsLineLocatePart, result);
return result;
}
/**
*
*
* @param wmsTaskSrc
* @return
*/
public static DdlPackBean packHqlWmsTaskSrcIsUniq(WmsTaskSrc wmsTaskSrc) {
DdlPackBean result = new DdlPackBean();
//查询参数封装
DdlPreparedPack.getStringEqualPack(wmsTaskSrc.getOrganizeCode(), "organizeCode", result);
DdlPreparedPack.getStringEqualPack(wmsTaskSrc.getOpTypeCode(), "opTypeCode", result);
DdlPreparedPack.getStringEqualPack(wmsTaskSrc.getDataSrc(), "dataSrc", result);
DdlPreparedPack.getNumEqualPack(wmsTaskSrc.getBusiType(), "busiType", result);
DdlPreparedPack.getNumEqualPack(wmsTaskSrc.getPriority(), "priority", result);
DdlPreparedPack.getNumEqualPack(wmsTaskSrc.getIsSn(), "isSn", result);
DdlPreparedPack.getNumEqualPack(wmsTaskSrc.getIsOneStep(), "isOneStep", result);
getStringBuilderPack(wmsTaskSrc, result);
return result;
}
/**
*
*
@ -1841,6 +1874,7 @@ public class WmsHqlPack {
getStringBuilderPack(wmsTaskSrc, result);
return result;
}
/**
*
*

Loading…
Cancel
Save