Commit fbfebb1e sunke

Merge remote-tracking branch 'origin/master'

2 个父辈 9f353c5f 73b47153
......@@ -93,6 +93,9 @@ public class MenuInit {
//设备看板
addDefaultFunctionMenu(1,null,"设备看板","lockMaterial", "lockMaterial/material/index","kanban",DEFAULT_SHOW_MENU);
//20031锡膏料仓菜单
addDefaultFunctionMenu(1,null,"设备概览","spKanban", "neolight/spKanban/index","sKanban");
//物料管理:工单出库,查找出库(UID出库,PN出库),物料标签,料盒操作,出库策略,工单设置
Menu poutOut = Menu.CreatePMenu("物料管理", 1, "order", "workOrder", null);
......
......@@ -32,7 +32,7 @@ public class MicronController {
@GetMapping("/posUsedData")
@AnonymousAccess
public Map<String,List<PosRowDto>> posUsedData(String storageId ) {
if(ObjectUtil.isEmpty(storageId)){
if (ObjectUtil.isEmpty(storageId)) {
return new HashMap<>();
}
Query query = new Query(Criteria.where("storageId").is(storageId));
......@@ -40,55 +40,42 @@ public class MicronController {
Map<String, List<PosRowDto>> resultMap = new HashMap<>();
List<StoragePos> posList = storagePosManager.findByQuery(query);
Sort sort = Sort.by(Sort.Direction.ASC, "labelName", "posName");
String currPos = "";
Map<Integer, Integer> currMap = new HashMap<>();
Map<String,Map< String,Map<Integer,Integer>>> allMap =new HashMap<>();
//labelName, posN
Map<String, Map<String, Map<Integer, Integer>>> allMap = new HashMap<>();
for (StoragePos pos :
posList) {
String posName = pos.getPosName();
String posN = posName.substring(0, 2);
Integer num = Convert.toInt(posName.substring(2, posName.length() ));
Integer num = Convert.toInt(posName.substring(2, posName.length()));
Integer used = 0;
if (pos.isUsed()) {
used = 1;
}
// used=1;
if (currPos.equals(posN)) {
currMap.put(num, used);
} else {
if(ObjectUtil.isNotEmpty(currPos)){
String labelName=pos.getLabelName();
if(!allMap.containsKey(labelName)){
allMap.put(labelName,new HashMap<>());
}
if(allMap.get(labelName).containsKey(currPos)){
allMap.get(labelName).get(currPos).putAll(currMap);
}
else{
allMap.get(labelName).put(currPos,currMap);
}
}
// used=1;
//开始新的
currPos = posN;
currMap = new HashMap<>();
currMap.put(num, used);
String labelName = pos.getLabelName();
if (!allMap.containsKey(labelName)) {
allMap.put(labelName, new HashMap<>());
}
if (allMap.get(labelName).containsKey(posN)) {
allMap.get(labelName).get(posN).put(num, used);
} else {
Map<Integer, Integer> map = new HashMap<>();
map.put(num, used);
allMap.get(labelName).put(posN, map);
}
}
Map<Integer, Integer> currMap = new HashMap<>();
for (String lableName :
allMap.keySet()) {
Map<String, Map<Integer, Integer>> labelMap =allMap.get(lableName);
Map<String, Map<Integer, Integer>> labelMap = allMap.get(lableName);
List<PosRowDto> posRowDtos = new ArrayList<>();
for (String name : labelMap.keySet()) {
//记录此列
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!