liuyaowen 10 месяцев назад
Родитель
Сommit
8559c12b2c

+ 5 - 2
src/main/java/com/yunfeiyun/agmp/fms/controller/FmsBlockController.java

@@ -212,12 +212,13 @@ public class FmsBlockController extends BaseController
                 return AjaxResult.success();
             }
         }
+        // 查询地块列表
         FmsBlock blockQuery = new FmsBlock();
         blockQuery.setBlockIds(blockIds);
         blockQuery.setBlockId(blockId);
         blockQuery.setLandId(landId);
         List<FmsBlock> fmsBlocks = fmsBlockService.selectFmsBlockList(blockQuery);
-
+        // 初始化辅助查询集合
         Map<String, FmsBlockPlanResVo> fmsBlockPlanResVoMap = new HashMap<>();
         blockIds = new ArrayList<>();
         for(FmsBlock fmsBlock : fmsBlocks){
@@ -227,13 +228,14 @@ public class FmsBlockController extends BaseController
             fmsBlockPlanResVoMap.put(fmsBlockPlanResVo.getBlockId(),fmsBlockPlanResVo);
             blockIds.add(fmsBlock.getBlockId());
         }
+        // 查询地块种植计划
         FmsPlanReqVo fmsPlanQuery = new FmsPlanReqVo();
         fmsPlanQuery.setBlockIds(blockIds);
         fmsPlanQuery.setTid(SecurityUtils.getTid());
         fmsPlanQuery.setPlanStatusArray(Arrays.asList(CommonEnums.PLAN_STATUS_START.getCode(), CommonEnums.PLAN_STATUS_NOT_START.getCode()));
         List<FmsPlanCropResVo> fmsPlanCropResVoList = fmsPlanService.selectFmsCropPlanResVoList(fmsPlanQuery);
         Map<String,FmsPlanCropResVo> cropMap = new HashMap<>();
-
+        // 填充返回数据
         for(FmsPlanCropResVo fmsPlanCropResVo : fmsPlanCropResVoList){
             cropMap.put(fmsPlanCropResVo.getCropId(),fmsPlanCropResVo);
             FmsBlockPlanResVo fmsBlockPlanResVo = fmsBlockPlanResVoMap.get(fmsPlanCropResVo.getBlockId());
@@ -241,6 +243,7 @@ public class FmsBlockController extends BaseController
                 fmsBlockPlanResVo.getFmsPlanCropResVoList().add(fmsPlanCropResVo);
             }
         }
+        // 查询作物图片
         List<SysRes> sysResList = resManager.queryRes(new ArrayList<>(cropMap.keySet()), ResConstants.BizType.CROP.getKey());
         Map<String,SysRes> resMap = sysResList.stream().collect(Collectors.toMap(SysRes::getResBusId,item->item));
         for(FmsPlanCropResVo fmsPlanCropResVo :fmsPlanCropResVoList){