yun-zuoyi
许心洁 6 years ago
commit dfef27151d

@ -2476,6 +2476,41 @@ public class WmsEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WMS_PART_TYPE {
RAW_MATERIAL(1,"原材料"), PARTIALLY_PREPARED_PRODUCTS(2,"半成品"), FINISHED_PRODUCT(3,"成品");
private int value;
private String description;
WMS_PART_TYPE(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;
}
}
/**
*
*/

@ -2,6 +2,11 @@ package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsUnit;
import org.springframework.stereotype.Repository;
/**
* Created by Administrator on 2019/6/19.
*/
@Repository
public interface WmsUnitRepository extends BaseRepository<WmsUnit,Long> {
}

@ -1460,31 +1460,28 @@ public class WmsHqlPack {
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)) {
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);
}
}
}
String hqlString = " and ( 1=1 " + result.getPackedHql() + ") ";
//转换封装后的hql
String packedHql = result.getPackedHql();
if(packedHql.startsWith(" or")){
packedHql = " and (" + packedHql.substring(3,packedHql.length()) + ") ";
System.out.println(packedHql);
}
result.setWhereAppend(packedHql);
result.setWhereAppend(hqlString);
// 通用数据拼接
WmsDataAuth wmsDataAuth = new WmsDataAuth();
wmsDataAuth.setOrganizeCode(organizeCode);
@ -1499,14 +1496,15 @@ public class WmsHqlPack {
* @param columnName
* @param packBean
*/
private static void packMutilConditionHql(List<Map> mapList, String keyName,
String columnName, DdlPackBean packBean) {
Integer index = 1;
private static void packMutilConditionHql(List<Map> mapList, String keyName,String columnName, DdlPackBean packBean) {
int index = 1;
String columnParam = null;
for (Map item : mapList) {
packBean.addColumnQuery(columnName + index.toString()," or model." +
columnName + " = :m_" + columnName + index.toString(),
columnParam = columnName + String.valueOf(index);
packBean.addColumnQuery(columnParam,
" or model." + columnName + " = :m_" + columnParam,
item.get(keyName).toString());
index++;
}
}
@ -1542,9 +1540,14 @@ public class WmsHqlPack {
}
}
String hqlString = " and ( 1=1 " + packBean.getPackedHql() + ") ";
//转换封装后的hql
String packedHql = packBean.getPackedHql();
if(packedHql.startsWith(" or")){
packedHql = " and (" + packedHql.substring(3,packedHql.length()) + ") ";
System.out.println(packedHql);
}
packBean.setWhereAppend(hqlString);
packBean.setWhereAppend(packedHql);
DdlPreparedPack.getInPackList(orderList, columnName, packBean);
DdlPreparedPack.getStringRightLikerPack(bean.getOrderNo(), "orderNo", packBean);
@ -1864,7 +1867,7 @@ public class WmsHqlPack {
DdlPreparedPack.getStringLikerPack(wmsProdCfgType.getProdCfgTypeName(), "prodCfgTypeName", result);
DdlPreparedPack.getStringLikerPack(wmsProdCfgType.getProdCfgTypeCode(), "prodCfgTypeCode", result);
DdlPreparedPack.getNumEqualPack(wmsProdCfgType.getIsValid(),"isValid",result);
DdlPreparedPack.getNumEqualPack(wmsProdCfgType.getIsDeleted(),"isDeleted",result);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),"isDeleted",result);
// getStringBuilderPack(wmsProdCfgType, result);
return result;
}

Loading…
Cancel
Save