yun-zuoyi
shiyanghuan 6 years ago
commit 2be5f29a63

@ -1724,7 +1724,8 @@ public class WmsEnumUtil {
WAREHOUSE(10, "WAREHOUSE", "仓库对象"),
ZONE(20, "ZONE", "存储区对象"),
LOCATE(30, "LOCATE", "库位对象"),
MATERIAL(40, "MATERIAL", "物料对象");
MATERIAL(40, "MATERIAL", "物料对象"),
TRANS_TYPE(50,"TRANS_TYPE","交易代码对象");
private String code;
private String description;
@ -2376,4 +2377,69 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IMPORT_ORDER_TYPE {
PO("PO", "要货计划"),
ASN("ASN", "ASN"),
SCATTERED_OUT("C00", "零星出库指令"),
SCATTERED_INT("C01", "零星入指令"),
NC_DISMANTLING_PICKING("C02", "NC拆解领料"),
NC_DISMANTLING_RETURN("C03", "NC拆解退料"),
NC_SCRAPPED("C04", "NC报废指令"),
NOT_JIS("NOTJIS", "非JIS指令"),
STOCK_DUMP("D00", "库存转储指令"),
NC_INSTOCK("D01", "NC入库指令"),
SMRR("B00", "SMRR退货"),
DMR("B01", "DMR退货"),
OUT_SOURCING("A00", "委外发料指令"),
OUT_REBACK("A01", "委外退料指令"),
OUT_RETURN_SOURCING("A02", "委外返工发料指令"),
OUT_RETURN_("A03", "委外返工退料指令"),
SALES_RETURN_REBACK("SALES_RETURN", "销售退货指令"),
CS("CS", "盘点指令"),
CS_ADUJUST("CS_ADUJUST", "盘点调差指令");
private String value;
private String description;
IMPORT_ORDER_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getDescription() {
return description;
}
public String getCode() {
return value;
}
public String getValue() {
return value;
}
public static IMPORT_ORDER_TYPE codeOf(String value) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(value)) {
return values()[i];
}
}
return null;
}
public static String getDes(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -22,7 +22,7 @@ import java.util.UUID;
**/
@Data
@Api(value="要货计划",description = "要货计划")
public class SapDspo {
public class SapDspo extends SapBase{
@ApiParam(value = "SA编号或PO号",example = "1")
@AnnoOutputColumn
@ -92,58 +92,58 @@ public class SapDspo {
@AnnoOutputColumn
private Double prnnum;
//公共字段 ++++++++++++++++++++++++++++++++++++++++++
@ApiParam(value = "处理人",example = "-1")
@AnnoOutputColumn
private String actusr = "导入";
@ApiParam(value = "SID",example = "-1")
@AnnoOutputColumn
private String sid = UUID.randomUUID().toString()+UUID.randomUUID().toString();
/*@ApiParam(value = "接收数据日期",example = "-1")
@AnnoOutputColumn
private String recymd;
@ApiParam(value = "接收数据时间",example = "-1")
@AnnoOutputColumn
private String rechms;
@ApiParam(value = "同步标志",example = "-1")
@AnnoOutputColumn
private String synflg;*/
@ApiParam(value = "同步日期",example = "-1")
@AnnoOutputColumn
private String synymd;
@ApiParam(value = "同步时间",example = "-1")
@AnnoOutputColumn
private String synhms;
/*@ApiParam(value = "处理标志",example = "-1")
@AnnoOutputColumn
private String actflg;*/
@ApiParam(value = "处理日期",example = "-1")
@AnnoOutputColumn
private String actymd;
@ApiParam(value = "处理时间",example = "-1")
@AnnoOutputColumn
private String acthms;
@ApiParam(value = "状态标志",example = "-1")
@AnnoOutputColumn
private String staflg;
@ApiParam(value = "顺序号",example = "-1")
@AnnoOutputColumn
private Integer seq;
@ApiParam(value = "GUID",example = "-1")
@AnnoOutputColumn
private String guid;
// //公共字段 ++++++++++++++++++++++++++++++++++++++++++
// @ApiParam(value = "处理人",example = "-1")
// @AnnoOutputColumn
// private String actusr = "导入";
//
// @ApiParam(value = "SID",example = "-1")
// @AnnoOutputColumn
// private String sid = UUID.randomUUID().toString()+UUID.randomUUID().toString();
//
// /*@ApiParam(value = "接收数据日期",example = "-1")
// @AnnoOutputColumn
// private String recymd;
//
// @ApiParam(value = "接收数据时间",example = "-1")
// @AnnoOutputColumn
// private String rechms;
//
// @ApiParam(value = "同步标志",example = "-1")
// @AnnoOutputColumn
// private String synflg;*/
//
// @ApiParam(value = "同步日期",example = "-1")
// @AnnoOutputColumn
// private String synymd;
//
// @ApiParam(value = "同步时间",example = "-1")
// @AnnoOutputColumn
// private String synhms;
//
// /*@ApiParam(value = "处理标志",example = "-1")
// @AnnoOutputColumn
// private String actflg;*/
//
// @ApiParam(value = "处理日期",example = "-1")
// @AnnoOutputColumn
// private String actymd;
//
// @ApiParam(value = "处理时间",example = "-1")
// @AnnoOutputColumn
// private String acthms;
//
// @ApiParam(value = "状态标志",example = "-1")
// @AnnoOutputColumn
// private String staflg;
//
// @ApiParam(value = "顺序号",example = "-1")
// @AnnoOutputColumn
// private Integer seq;
//
// @ApiParam(value = "GUID",example = "-1")
// @AnnoOutputColumn
// private String guid;
}

@ -0,0 +1,66 @@
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-19 13:21
* @Modify:
**/
@Data
@Api(value="零星领料(退)料结果",description = "零星领料(退)料结果")
public class WmsMiscr extends SapBase{
@ApiParam(value = "编号",example = "1")
@AnnoOutputColumn
private String refid;
@ApiParam(value = "行号",example = "1")
@AnnoOutputColumn
private Double zeile;
@ApiParam(value = "工厂",example = "1")
@AnnoOutputColumn
private String werks;
@ApiParam(value = "发出库存地点(退回库存地点)",example = "1")
@AnnoOutputColumn
private String lgort;
@ApiParam(value = "物料编码",example = "1")
@AnnoOutputColumn
private String matnr;
@ApiParam(value = "数量",example = "1")
@AnnoOutputColumn
private Double erfmg;
@ApiParam(value = "计量单位",example = "1")
@AnnoOutputColumn
private String erfme;
@ApiParam(value = "业务类型",example = "1")
@AnnoOutputColumn
private String zaction;
@ApiParam(value = "交易日期",example = "1")
@AnnoOutputColumn
private String zpost;
@ApiParam(value = "交易时间",example = "1")
@AnnoOutputColumn
private String ztime;
public Double getZeileVal() {
return zeile== null ? 0D : this.zeile.doubleValue();
}
public Double getErfmgVal() {
return erfmg== null ? 0D : this.erfmg.doubleValue();
}
}

@ -9,10 +9,7 @@ import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.*;
/**
* @Description :
@ -62,6 +59,24 @@ public class WmsStockQuan extends BaseBean {
@ApiParam(value = "客户编码")
private String custNo;
@Transient
@ApiParam(value = "项目代码")
private String prodCfgTypeCode;
@Transient
@ApiParam(value = "含0库存显示")
private Boolean includeZeroStock = false;
@Transient
@ColumnDefault("0")
@ApiParam(value = "库存数量总和")
private Double sumQty;
@Transient
@ApiParam(value = "库位信息")
private WmsLocate wmsLocate;
@Column(name = "QTY")
@ColumnDefault("0")
@ApiParam(value = "可用数量", example = "0")
@ -146,6 +161,22 @@ public class WmsStockQuan extends BaseBean {
public WmsStockQuan() {
}
public WmsStockQuan(String whNo, String zoneNo, String unit, String partNo, String partName,
Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty) {
this.whNo = whNo;
this.zoneNo = zoneNo;
this.partNo = partNo;
this.partNameRdd = partName;
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;
}
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;

@ -40,6 +40,9 @@ public class WmsDataAuthModel extends BaseBean {
@ApiParam("存储区列表")
private List<String> zoneList;
@ApiParam("交易代码列表")
private List<String> transTypeList;
@ApiParam(
value = "新增操作",
example = "0"

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

@ -859,7 +859,57 @@ public class WmsHqlPack {
return result;
}
/**
*
*
* @param wmsStockQuan
* @return
*/
public static String packWmsStoreQuanForReport(WmsStockQuan wmsStockQuan) {
StringBuffer findWhere = new StringBuffer();
HqlPack.getStringEqualPack(wmsStockQuan.getWhNo(), "whNo", findWhere);
HqlPack.getStringEqualPack(wmsStockQuan.getProdCfgTypeCode(), "prodCfgTypeCode", findWhere);
HqlPack.getStringEqualPack(wmsStockQuan.getLocateNo(), "locateNo", findWhere);
if(wmsStockQuan.getZoneNo() != null){
HqlPack.getInPack(StringUtils.join(new ArrayList<String>(Arrays.asList(wmsStockQuan.getZoneNo().split(","))),","),"",findWhere);
//DdlPreparedPack.getInPackArray(wmsStockQuan.getZoneNo().split(","), "zoneNo", result);
}
if(wmsStockQuan.getPartNo() != null){
HqlPack.getInPack(StringUtils.join(new ArrayList<String>(Arrays.asList(wmsStockQuan.getPartNo().split(","))),","),"partNo",findWhere);
}
if(!wmsStockQuan.getIncludeZeroStock()){
//含0库存显示默认为否
//自定义条件,各汇总数量相加。为否时添加>0的条件判断
findWhere.append(" and (qty + failQty + holdQty + qcQty + rinQty + freezeQty + consignQty + lockQty) > 0 ");
}
return findWhere.toString();
}
public static DdlPackBean packWmsStoreQuanForReport1(WmsStockQuan wmsStockQuan) {
DdlPackBean result = new DdlPackBean();
//查询参数封装
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getWhNo(), "whNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getProdCfgTypeCode(), "prodCfgTypeCode", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getLocateNo(), "locateNo", result);
if(wmsStockQuan.getZoneNo() != null){
DdlPreparedPack.getInPackList(Arrays.asList(wmsStockQuan.getZoneNo().split(",")), "zoneNo", result);
}
if(wmsStockQuan.getPartNo() != null){
DdlPreparedPack.getInPackList(Arrays.asList(wmsStockQuan.getPartNo().split(",")), "partNo", result);
}
if(!wmsStockQuan.getIncludeZeroStock()){
//含0库存显示默认为否
//自定义条件,各汇总数量相加。为否时添加>0的条件判断
result.setWhereAppend(result.getWhereAppend()+" and (qty + failQty + holdQty + qcQty + rinQty + freezeQty + consignQty + lockQty) > 0 ");
}
getStringBuilderPack(wmsStockQuan, result);
return result;
}
/**
*
*
@ -1454,9 +1504,10 @@ public class WmsHqlPack {
Integer index = 1;
for (Map item : mapList) {
packBean.addColumnQuery(columnName," or model." +
columnName + " = :m_" + columnName + (index++).toString(),
packBean.addColumnQuery(columnName + index.toString()," or model." +
columnName + " = :m_" + columnName + index.toString(),
item.get(keyName).toString());
index++;
}
}
@ -1467,8 +1518,34 @@ public class WmsHqlPack {
* @param orderList
* @return
*/
public static DdlPackBean packHqlAndIn(WmsTaskInfo bean, String columnName, List<String> orderList) {
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);
break;
}
}
}
String hqlString = " and ( 1=1 " + packBean.getPackedHql() + ") ";
packBean.setWhereAppend(hqlString);
DdlPreparedPack.getInPackList(orderList, columnName, packBean);
DdlPreparedPack.getStringRightLikerPack(bean.getOrderNo(), "orderNo", packBean);
DdlPreparedPack.getNumNOEqualPack(bean.getTaskStatus(), "taskStatus", packBean);
@ -1695,6 +1772,41 @@ public class WmsHqlPack {
return result;
}
/**
*
*
* @param wmsStockSn
* @return
*/
public static DdlPackBean packHqlWmsStockSnReport(WmsStockSn wmsStockSn) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(wmsStockSn.getWhNo(), "whNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockSn.getZoneNo(), "zoneNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockSn.getPartNo(), "partNo", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getSnStatus(), "snStatus", result);
DdlPreparedPack.getNumEqualPack(wmsStockSn.getQcStatus(), "qcStatus", result);
DdlPreparedPack.getStringNotNullPack("locateNo", result);
result.setWhereAppend(result.getWhereAppend()+" and locateNo != ''");
getStringBuilderPack(wmsStockSn, result);
return result;
}
public static DdlPackBean packWmsStoreQuanForLocateReport(WmsStockQuan wmsStockQuan) {
DdlPackBean result = new DdlPackBean();
//查询参数封装
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getWhNo(), "whNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getPartNo(), "partNo", result);
DdlPreparedPack.getStringEqualPack(wmsStockQuan.getZoneNo(), "zoneNo", result);
result.setWhereAppend(result.getWhereAppend()+" and (qty + failQty + holdQty + qcQty + rinQty + freezeQty + consignQty + lockQty) > 0 ");
getStringBuilderPack(wmsStockQuan, result);
return result;
}
/**
* 线
@ -1740,7 +1852,22 @@ public class WmsHqlPack {
getStringBuilderPack(wmsVendorPart, result);
return result;
}
/**
*
*
* @param wmsProdCfgType
* @return
*/
public static DdlPackBean packHqlWmsProdCfgType(WmsProdCfgType wmsProdCfgType) {
DdlPackBean result = new DdlPackBean();
//查询参数封装
DdlPreparedPack.getStringLikerPack(wmsProdCfgType.getProdCfgTypeName(), "prodCfgTypeName", result);
DdlPreparedPack.getStringLikerPack(wmsProdCfgType.getProdCfgTypeCode(), "prodCfgTypeCode", result);
DdlPreparedPack.getNumEqualPack(wmsProdCfgType.getIsValid(),"isValid",result);
DdlPreparedPack.getNumEqualPack(wmsProdCfgType.getIsDeleted(),"isDeleted",result);
// getStringBuilderPack(wmsProdCfgType, result);
return result;
}
/**
*
@ -1760,5 +1887,4 @@ public class WmsHqlPack {
return result;
}
}

Loading…
Cancel
Save