Ver código fonte

移动端-巡检自检-巡检记录调整

jichaobo 2 anos atrás
pai
commit
fdc45cab8d

+ 5 - 3
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/AppPatrolInspectionController.java

@@ -70,7 +70,7 @@ public class AppPatrolInspectionController {
      *
      * @param siteId      地点ID
      * @param siteNubmber 地点号码
-     * @param planSonId 子计划Id
+     * @param planSonId   子计划Id
      * @return
      */
     @GetMapping("siteDetails")
@@ -144,8 +144,10 @@ public class AppPatrolInspectionController {
     @GetMapping("recordList")
     public ApiResult<List<PatrolInspectionRecordVo>> recordList(@RequestParam(value = "currentDate", required = false) String currentDate,
                                                                 @RequestParam(value = "sort", required = false, defaultValue = "DESC") String sort,
-                                                                @RequestParam(value = "id", required = false, defaultValue = "0") Integer id) {
-        return ApiResult.success(patrolInspectionPlanSonService.recordList(currentDate, sort, id));
+                                                                @RequestParam(value = "id", required = false, defaultValue = "0") Integer id,
+                                                                @RequestParam(value = "planSonId", required = false, defaultValue = "0") Integer planSonId,
+                                                                @RequestParam(value = "siteId", required = false, defaultValue = "0") Integer siteId) {
+        return ApiResult.success(patrolInspectionPlanSonService.recordList(currentDate, sort, id, planSonId, siteId));
     }
 
 

+ 1 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/PatrolInspectionPlanSonService.java

@@ -95,7 +95,7 @@ public interface PatrolInspectionPlanSonService extends CrudService<PatrolInspec
      * @param sort        排序 (正序:ASC 倒序:DESC)
      * @return
      */
-    List<PatrolInspectionRecordVo> recordList(String currentDate, String sort, Integer id);
+    List<PatrolInspectionRecordVo> recordList(String currentDate, String sort, Integer id,Integer planSonId,Integer siteId);
 
     /**
      * 手机端-巡检自检-巡检记录-查看巡检项

+ 9 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanSonServiceImpl.java

@@ -376,7 +376,7 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
     }
 
     @Override
-    public List<PatrolInspectionRecordVo> recordList(String currentDate, String sort, Integer id) {
+    public List<PatrolInspectionRecordVo> recordList(String currentDate, String sort, Integer id,Integer planSonId,Integer siteId) {
         List<Integer> personnelIdList = this.getpersonId();
         LambdaQueryWrapper<PatrolInspectionPlanSchedule> queryWrapper = Wrappers.lambdaQuery();
         queryWrapper.select(PatrolInspectionPlanSchedule::getPlanId)
@@ -395,6 +395,12 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
             if (id != null && id != 0) {
                 queryWrapperOne.eq(PatrolInspectionRecord::getId, id);
             }
+            if (planSonId != null && planSonId != 0) {
+                queryWrapperOne.eq(PatrolInspectionRecord::getPlanSonId, planSonId);
+            }
+            if (siteId != null && siteId != 0) {
+                queryWrapperOne.eq(PatrolInspectionRecord::getSiteId, siteId);
+            }
             if (sort.equals("ASC")) {
                 queryWrapperOne.orderByAsc(PatrolInspectionRecord::getId);
             } else {
@@ -517,6 +523,8 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
                         if (contentOptionList.get(i).getId() == recordOptionList.get(j).getContentOptionId()) {
                             contentOptionVo.setSelectStatus(true);
                             contentOptionVo.setRemarks(recordOptionList.get(j).getRemarks());
+                            contentOptionVo.setContent(recordOptionList.get(i).getContent());
+                            contentOptionVo.setContentId(recordOptionList.get(i).getContentId());
                         }
                     }
                     contentOptionVoList.add(contentOptionVo);

+ 6 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/vo/ContentOptionVo.java

@@ -66,4 +66,10 @@ public class ContentOptionVo implements Serializable {
     private String remarks;
 
 
+    /**
+     * 内容
+     */
+    private String content;
+
+
 }