|
@ -504,8 +504,8 @@ public class RuleServiceImpl implements RuleService { |
|
|
List<HashMap<String, Object>> list = new ArrayList<>(); |
|
|
List<HashMap<String, Object>> list = new ArrayList<>(); |
|
|
for (String code : reqVO.getItemCodes()) { |
|
|
for (String code : reqVO.getItemCodes()) { |
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
RuleRespVO RespVO = management(null, null, code, reqVO.getLocationCode(), null, null); |
|
|
RuleRespVO respVO = management(null, null, code, reqVO.getLocationCode(), null, null); |
|
|
JSONObject entries = JSONUtil.parseObj(RespVO.getConfiguration()); |
|
|
JSONObject entries = JSONUtil.parseObj(respVO.getConfiguration()); |
|
|
map.put("ManagementPrecision", entries.get("ManagementPrecision")); |
|
|
map.put("ManagementPrecision", entries.get("ManagementPrecision")); |
|
|
map.put("itemCode", code); |
|
|
map.put("itemCode", code); |
|
|
list.add(map); |
|
|
list.add(map); |
|
@ -518,8 +518,8 @@ public class RuleServiceImpl implements RuleService { |
|
|
List<HashMap<String, Object>> list = new ArrayList<>(); |
|
|
List<HashMap<String, Object>> list = new ArrayList<>(); |
|
|
for (PrecisionStrategyReqVO2 reqVO2 : reqVO2List) { |
|
|
for (PrecisionStrategyReqVO2 reqVO2 : reqVO2List) { |
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
RuleRespVO RespVO = management(null, null, reqVO2.getItemCode(), reqVO2.getLocationCode(), null, null); |
|
|
RuleRespVO respVO = management(null, null, reqVO2.getItemCode(), reqVO2.getLocationCode(), null, null); |
|
|
JSONObject entries = JSONUtil.parseObj(RespVO.getConfiguration()); |
|
|
JSONObject entries = JSONUtil.parseObj(respVO.getConfiguration()); |
|
|
map.put("ManagementPrecision", entries.get("ManagementPrecision")); |
|
|
map.put("ManagementPrecision", entries.get("ManagementPrecision")); |
|
|
map.put("itemCode", reqVO2.getItemCode()); |
|
|
map.put("itemCode", reqVO2.getItemCode()); |
|
|
map.put("locationCode", reqVO2.getLocationCode()); |
|
|
map.put("locationCode", reqVO2.getLocationCode()); |
|
@ -528,6 +528,34 @@ public class RuleServiceImpl implements RuleService { |
|
|
return list; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<RuleRespVO> getGroundingList(String itemCode, String inventoryStatus) { |
|
|
|
|
|
List<RuleRespVO> ruleRespVOList = new ArrayList<>(); |
|
|
|
|
|
QueryWrapper<RuleDO> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
queryWrapper.eq("strategy_code", "S005"); |
|
|
|
|
|
queryWrapper.orderByDesc("priority"); |
|
|
|
|
|
List<RuleDO> ruleDOList = ruleMapper.selectList(queryWrapper); |
|
|
|
|
|
for (RuleDO ruleDO : ruleDOList) { |
|
|
|
|
|
String condition = ruleDO.getCondition(); |
|
|
|
|
|
if (condition == null || condition.isEmpty()) { |
|
|
|
|
|
ruleRespVOList.add(RuleConvert.INSTANCE.convert(ruleDO)); |
|
|
|
|
|
} else { |
|
|
|
|
|
JSONArray conditionArray = JSONUtil.parseArray(condition); |
|
|
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
|
|
if (itemCode != null && !itemCode.isEmpty()) { |
|
|
|
|
|
params.put("ItemCode", itemCode); |
|
|
|
|
|
} |
|
|
|
|
|
if (inventoryStatus != null && !inventoryStatus.isEmpty()) { |
|
|
|
|
|
params.put("InventoryStatus", inventoryStatus); |
|
|
|
|
|
} |
|
|
|
|
|
if (this.forEachParams(params, conditionArray)) { |
|
|
|
|
|
ruleRespVOList.add(RuleConvert.INSTANCE.convert(ruleDO)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return ruleRespVOList; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 循环校验参数 |
|
|
* 循环校验参数 |
|
|
* |
|
|
* |
|
|