ソースを参照

原生MapperBUG修复

jichaobo 2 年 前
コミット
e14453b1c6
22 ファイル変更86 行追加121 行削除
  1. 4 4
      service-fire/service-fire-biz/pom.xml
  2. 12 1
      service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/AppPatrolInspectionController.java
  3. 9 4
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/PatrolInspectionPlanSonService.java
  4. 51 4
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanSonServiceImpl.java
  5. 10 0
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/vo/PatrolInspectionSiteVo.java
  6. 0 108
      service-fire/service-fire-biz/src/main/resources/doc/index.adoc
  7. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/AlarmFireMapper.xml
  8. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionAreaMapper.xml
  9. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionContentMapper.xml
  10. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionContentOptionMapper.xml
  11. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPersonnelMapper.xml
  12. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanMapper.xml
  13. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanScheduleMapper.xml
  14. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanSiteMapper.xml
  15. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanSiteSonMapper.xml
  16. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanSonMapper.xml
  17. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionRecordMapper.xml
  18. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionRecordOptionMapper.xml
  19. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionRecordPictureMapper.xml
  20. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionSiteContentMapper.xml
  21. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionSiteMapper.xml
  22. 0 0
      service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionSpecialRestDayMapper.xml

+ 4 - 4
service-fire/service-fire-biz/pom.xml

@@ -20,10 +20,10 @@
             <scope>test</scope>
         </dependency>
         <!-- Pagehelper -->
-        <dependency>
-            <groupId>com.github.pagehelper</groupId>
-            <artifactId>pagehelper-spring-boot-starter</artifactId>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.github.pagehelper</groupId>-->
+<!--            <artifactId>pagehelper-spring-boot-starter</artifactId>-->
+<!--        </dependency>-->
         <dependency>
             <groupId>com.usky</groupId>
             <artifactId>ruoyi-common-core</artifactId>

+ 12 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/AppPatrolInspectionController.java

@@ -4,6 +4,7 @@ package com.usky.fire.controller.web;
 import com.usky.common.core.bean.ApiResult;
 import com.usky.fire.service.PatrolInspectionPlanSonService;
 import com.usky.fire.service.vo.PatrolInspectionPlanSonVo;
+import com.usky.fire.service.vo.PatrolInspectionSiteVo;
 import com.usky.fire.service.vo.PlanRecordVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -79,7 +80,6 @@ public class AppPatrolInspectionController {
         return ApiResult.success(patrolInspectionPlanSonService.siteDetails(siteId, siteNubmber));
     }
 
-
     /**
      * 手机端-巡检自检-巡检上报-提交
      *
@@ -91,4 +91,15 @@ public class AppPatrolInspectionController {
         patrolInspectionPlanSonService.updatePlan(planRecordVo);
         return ApiResult.success();
     }
+
+
+    /**
+     * 手机端-巡检自检-巡检扫码地点详情
+     * @param planSonId 子计划ID
+     * @return
+     */
+    @GetMapping("planSonSiteDetails")
+    public ApiResult<List<PatrolInspectionSiteVo>> planSonSiteDetails(@RequestParam(value = "planSonId") Integer planSonId) {
+        return ApiResult.success(patrolInspectionPlanSonService.planSonSiteDetails(planSonId));
+    }
 }

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

@@ -2,10 +2,7 @@ package com.usky.fire.service;
 
 import com.usky.common.mybatis.core.CrudService;
 import com.usky.fire.domain.PatrolInspectionPlanSon;
-import com.usky.fire.service.vo.DataCountVo;
-import com.usky.fire.service.vo.PatrolInspectionContentVo;
-import com.usky.fire.service.vo.PatrolInspectionPlanSonVo;
-import com.usky.fire.service.vo.PlanRecordVo;
+import com.usky.fire.service.vo.*;
 
 import java.util.List;
 import java.util.Map;
@@ -66,6 +63,14 @@ public interface PatrolInspectionPlanSonService extends CrudService<PatrolInspec
     void updatePlan(PlanRecordVo planRecordVo);
 
 
+    /**
+     *  手机端-巡检自检-巡检上报-根据子计划ID查询站点
+     * @param planSonId 子计划ID
+     * @return
+     */
+    List<PatrolInspectionSiteVo> planSonSiteDetails(Integer planSonId);
+
+
     /**
      * 手机端-巡检自检-子计划巡检点位统计
      *

+ 51 - 4
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionPlanSonServiceImpl.java

@@ -11,10 +11,7 @@ import com.usky.fire.mapper.PatrolInspectionPlanSonMapper;
 import com.usky.fire.mapper.PatrolInspectionRecordMapper;
 import com.usky.fire.service.*;
 import com.usky.fire.service.util.OnlineMethod;
-import com.usky.fire.service.vo.DataCountVo;
-import com.usky.fire.service.vo.PatrolInspectionContentVo;
-import com.usky.fire.service.vo.PatrolInspectionPlanSonVo;
-import com.usky.fire.service.vo.PlanRecordVo;
+import com.usky.fire.service.vo.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -278,6 +275,56 @@ public class PatrolInspectionPlanSonServiceImpl extends AbstractCrudService<Patr
     }
 
 
+    @Override
+    public List<PatrolInspectionSiteVo> planSonSiteDetails(Integer planSonId) {
+        LambdaQueryWrapper<PatrolInspectionPlanSiteSon> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(PatrolInspectionPlanSiteSon::getPlanId, planSonId);
+        List<PatrolInspectionPlanSiteSon> planSiteSonList = patrolInspectionPlanSiteSonService.list(queryWrapper);
+        if (planSiteSonList.size() <= 0) {
+            throw new BusinessException("子计划不存在地点,请联系管理人员");
+        }
+
+        List<Integer> siteIdList = new ArrayList<>();
+        for (int i = 0; i < planSiteSonList.size(); i++) {
+            siteIdList.add(planSiteSonList.get(i).getSiteId());
+        }
+        LambdaQueryWrapper<PatrolInspectionSite> queryWrapperTwo = Wrappers.lambdaQuery();
+        queryWrapperTwo.in(PatrolInspectionSite::getId, siteIdList)
+                .eq(PatrolInspectionSite::getEnable, 1);
+        List<PatrolInspectionSite> siteList = patrolInspectionSiteService.list(queryWrapperTwo);
+        List<PatrolInspectionSiteVo> list = new ArrayList<>();
+        for (int i = 0; i < siteList.size(); i++) {
+            PatrolInspectionSiteVo SiteVo = new PatrolInspectionSiteVo();
+            SiteVo.setId(siteList.get(i).getId());
+            SiteVo.setSiteName(siteList.get(i).getSiteName());
+            SiteVo.setSiteNubmber(siteList.get(i).getSiteNubmber());
+            SiteVo.setSiteDescribe(siteList.get(i).getSiteDescribe());
+            SiteVo.setSiteType(siteList.get(i).getSiteType());
+            SiteVo.setCollector(siteList.get(i).getCollector());
+            SiteVo.setCollectTime(siteList.get(i).getCollectTime());
+            SiteVo.setLongitude(siteList.get(i).getLongitude());
+            SiteVo.setLatitude(siteList.get(i).getLatitude());
+            SiteVo.setAreaId(siteList.get(i).getAreaId());
+            SiteVo.setPictureUrl(siteList.get(i).getPictureUrl());
+            SiteVo.setCreateTime(siteList.get(i).getCreateTime());
+            SiteVo.setCreator(siteList.get(i).getCreator());
+            SiteVo.setEnable(siteList.get(i).getEnable());
+            SiteVo.setDistanceRange(siteList.get(i).getDistanceRange());
+            SiteVo.setTenantId(siteList.get(i).getTenantId());
+            SiteVo.setCompanyId(siteList.get(i).getCompanyId());
+            for (int j = 0; j < planSiteSonList.size(); j++) {
+                if (siteList.get(i).getId() == planSiteSonList.get(j).getSiteId()) {
+                    SiteVo.setInspectionTime(planSiteSonList.get(j).getCreateTime());
+                    SiteVo.setInspectionStatus(planSiteSonList.get(j).getInspectionStatus());
+                }
+            }
+            list.add(SiteVo);
+        }
+        return list;
+
+    }
+
+
     @Override
     public Integer planSiteSonCount(Integer planSonId, Integer inspectionStatus) {
         LambdaQueryWrapper<PatrolInspectionPlanSiteSon> queryWrapper = Wrappers.lambdaQuery();

+ 10 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/vo/PatrolInspectionSiteVo.java

@@ -120,6 +120,16 @@ public class PatrolInspectionSiteVo implements Serializable {
      */
     private String areaName;
 
+    /**
+     * 巡检时间
+     */
+    private LocalDateTime inspectionTime;
+
+    /**
+     * 巡检状态(1 未巡检,2 已巡检)
+     */
+    private Integer inspectionStatus;
+
 
 
 }

+ 0 - 108
service-fire/service-fire-biz/src/main/resources/doc/index.adoc

@@ -1,108 +0,0 @@
-= 安防项目
-
-[width="100%",options="header"]
-[stripes=even]
-|====================
-|Version |  Update Time  | Status | Author |  Description
-|v2022-04-21 16:57:08|2022-04-21 16:57:08|auto|@yq|Created by smart-doc
-|====================
-
-
-== &lt;p&gt;参数配置表 前端控制器&lt;/p&gt;
-== &lt;p&gt;部门信息&lt;/p&gt;
-=== 查看部门信息
-*URL:* http:10.23.39.1:8082/sysDept/list
-
-*Type:* POST
-
-*Author:* ya
-
-*Content-Type:* application/json; charset=utf-8
-
-
-
-
-*Body-parameters:*
-
-[width="100%",options="header"]
-[stripes=even]
-|====================
-|Parameter | Type|Description|Required|Since
-|deptId|int64|部门id|false|-
-|parentId|int64|父部门id|false|-
-|ancestors|string|祖级列表|false|-
-|deptName|string|部门名称|false|-
-|orderNum|int32|显示顺序|false|-
-|leader|string|负责人|false|-
-|phone|string|联系电话|false|-
-|email|string|邮箱|false|-
-|status|string|部门状态(0正常 1停用)|false|-
-|delFlag|string|删除标志(0代表存在 2代表删除)|false|-
-|createBy|string|创建者|false|-
-|createTime|string|创建时间|false|-
-|updateBy|string|更新者|false|-
-|updateTime|string|更新时间|false|-
-|bId|int64|建筑id|false|-
-|====================
-
-*Response-fields:*
-
-[width="100%",options="header"]
-[stripes=even]
-|====================
-|Field | Type|Description|Since
-|status|object|No comments found.|-
-|code|string|No comments found.|-
-|msg|string|No comments found.|-
-|data|object|No comments found.|-
-|└─deptId|int64|部门id|-
-|└─parentId|int64|父部门id|-
-|└─ancestors|string|祖级列表|-
-|└─deptName|string|部门名称|-
-|└─orderNum|int32|显示顺序|-
-|└─leader|string|负责人|-
-|└─phone|string|联系电话|-
-|└─email|string|邮箱|-
-|└─status|string|部门状态(0正常 1停用)|-
-|└─delFlag|string|删除标志(0代表存在 2代表删除)|-
-|└─createBy|string|创建者|-
-|└─createTime|string|创建时间|-
-|└─updateBy|string|更新者|-
-|└─updateTime|string|更新时间|-
-|└─bId|int64|建筑id|-
-|exception|string|No comments found.|-
-|====================
-
-*Response-example:*
-----
-{
-	"status": {
-		
-	},
-	"code": "97564",
-	"msg": "wnr5qt",
-	"data": [
-		{
-			"deptId": 540,
-			"parentId": 858,
-			"ancestors": "o5lg60",
-			"deptName": "文.沈",
-			"orderNum": 260,
-			"leader": "ufz93p",
-			"phone": "17852835049",
-			"email": "智渊.徐@yahoo.com",
-			"status": "nu6cnp",
-			"delFlag": "72oiji",
-			"createBy": "5fxr6j",
-			"createTime": "2022-04-21 16:57:10",
-			"updateBy": "4kcs4e",
-			"updateTime": "2022-04-21 16:57:10",
-			"bId": 977
-		}
-	],
-	"exception": "53u6bg"
-}
-----
-
-== &lt;p&gt;用户信息表 前端控制器&lt;/p&gt;
-

+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/AlarmFireMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/AlarmFireMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionAreaMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionAreaMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionContentMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionContentMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionContentOptionMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionContentOptionMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPersonnelMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPersonnelMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPlanMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPlanScheduleMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanScheduleMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPlanSiteMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanSiteMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPlanSiteSonMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanSiteSonMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionPlanSonMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionPlanSonMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionRecordMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionRecordMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionRecordOptionMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionRecordOptionMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionRecordPictureMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionRecordPictureMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionSiteContentMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionSiteContentMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionSiteMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionSiteMapper.xml


+ 0 - 0
service-fire/service-fire-biz/src/main/resources/mapper.fire/PatrolInspectionSpecialRestDayMapper.xml → service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionSpecialRestDayMapper.xml