|
@@ -973,29 +973,28 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
if(sbInfoCountMapList != null) {
|
|
if(sbInfoCountMapList != null) {
|
|
for (Map<String, String> map: sbInfoCountMapList) {
|
|
for (Map<String, String> map: sbInfoCountMapList) {
|
|
// 汇总厂区的,将厂区下面的车间数量累加到上面
|
|
// 汇总厂区的,将厂区下面的车间数量累加到上面
|
|
- if ("1".equals(map.get("type"))) {
|
|
|
|
- String numStr = map.get("num");
|
|
|
|
- int num = 0;
|
|
|
|
- if(StringUtils.isEmpty(numStr)){
|
|
|
|
- num = 0;
|
|
|
|
- }else{
|
|
|
|
- num = Integer.valueOf(numStr);
|
|
|
|
- }
|
|
|
|
|
|
+ if (String.valueOf(map.get("type")).equals("1")) {
|
|
|
|
+ int childNum = 0;
|
|
for (Map<String, String> child: sbInfoCountMapList) {
|
|
for (Map<String, String> child: sbInfoCountMapList) {
|
|
if (map.get("id").equals(child.get("parentId"))) {
|
|
if (map.get("id").equals(child.get("parentId"))) {
|
|
- String childNumStr = child.get("num");
|
|
|
|
- if(!StringUtils.isEmpty(numStr)){
|
|
|
|
- num = num + Integer.valueOf(childNumStr);
|
|
|
|
|
|
+ String childNumStr = String.valueOf(child.get("num"));
|
|
|
|
+ if(!StringUtils.isEmpty(childNumStr)){
|
|
|
|
+ childNum = childNum + Integer.valueOf(childNumStr);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- map.put("num", num + "");
|
|
|
|
|
|
+ map.put("childNum", childNum + "");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return sbInfoCountMapList;
|
|
return sbInfoCountMapList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 按照类型分组统计数量
|
|
|
|
+ * @param positionCode : 位置code
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@Override
|
|
@Override
|
|
public List<Map<String, String>> selectCountByPositionGroupBySbType(String positionCode) {
|
|
public List<Map<String, String>> selectCountByPositionGroupBySbType(String positionCode) {
|
|
Weekend<SbPosition> weekend = new Weekend<>(SbPosition.class);
|
|
Weekend<SbPosition> weekend = new Weekend<>(SbPosition.class);
|
|
@@ -1021,6 +1020,28 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查询某个车间下面的数据,状态分组统计数量
|
|
|
|
+ * @param positionCode : 位置code
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public List<Map<String, String>> selectCountBySbStatusGroup(String positionCode) {
|
|
|
|
+ List<Map<String, String>> result = mapper.selectCountByStatusGroup(positionCode);
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 按照自定义类型分组统计数量
|
|
|
|
+ * @param positionCode : 位置code
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public List<Map<String, String>> selectCountByUseTypeGroup(String positionCode) {
|
|
|
|
+ List<Map<String, String>> result = mapper.selectCountByUseTypeGroup(positionCode);
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public List<SbInfoVO> selectVOList(SbInfoDTO model) {
|
|
public List<SbInfoVO> selectVOList(SbInfoDTO model) {
|
|
return mapper.selectVOList(model);
|
|
return mapper.selectVOList(model);
|