Commit 6722d0cc authored by zhangsen's avatar zhangsen

巡检左侧树bug修改

parent bb6af3f3
......@@ -451,12 +451,14 @@ public class EquipmentCategoryController extends AbstractBaseController {
Map<String, List<EquipmentCategory>> tmpMap = new HashMap<String, List<EquipmentCategory>>();
final Integer[] countAll = {0};
equipmentCategorys.forEach(action -> {
String beginName = action.getName();
String subCode = action.getCode().replaceAll("0+$", "");
int count = equipmentCategoryMapper.countByCategoryCode(subCode);
action.setName(action.getName() + "(" + count + ")");
countAll[0] = count + countAll[0];
if (action.getName().equals("消防设施") ||action.getName().equals("消防系统")) {
if (beginName.equals("消防设施") || beginName.equals("消防系统")) {
action.setPatrolNum(count);
action.setParentId(-1L);
list.add(action);
} else {
if (tmpMap.get(action.getParentId().toString()) == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment