刘小明
2024-08-29 3f6229dcb3e1aa75c7882729c04e45bfc382e08a
优化查询任务计划列表接口(id以string格式传给前端)
1个文件已修改
6 ■■■■ 已修改文件
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleSv.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleSv.java
@@ -125,11 +125,11 @@
    public List<JSONObject> selectPlan(QueryVo vo) {
        List<JSONObject> list = assemblyPlanDao.selectByPlanName(vo.planName);
        Map<Long, JSONObject> map = new ConcurrentHashMap<>(); // 使用并发安全的Map
        Map<String, JSONObject> map = new ConcurrentHashMap<>(); // 使用并发安全的Map
        for(JSONObject item:list){
            Long planId = (Long) item.getObj("planId");
            String planId = String.valueOf(item.getObj("planId"));
            JSONObject innerObject = new JSONObject()
                    .set("nodeId", item.getObj("nodeId"))
                    .set("nodeId", String.valueOf(item.getObj("nodeId")))
                    .set("content", item.getObj("content"));
            if(map.containsKey(planId)){
                JSONArray array = (JSONArray)map.get(planId).get("nodes");