فهرست منبع

巡检管理-巡检计划相关接口上传

jichaobo 3 سال پیش
والد
کامیت
6ec608397a
42فایلهای تغییر یافته به همراه2137 افزوده شده و 1 حذف شده
  1. 1 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/MybatisGeneratorUtils.java
  2. 151 0
      fiveep-controller/src/main/java/com/bizmatics/controller/web/PatrolInspectionSchemeController.java
  3. 21 0
      fiveep-controller/src/main/java/com/bizmatics/controller/web/PatrolInspectionTeamController.java
  4. 21 0
      fiveep-controller/src/main/java/com/bizmatics/controller/web/PatrolInspectorsController.java
  5. 65 0
      fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectionRoute.java
  6. 111 0
      fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectionScheme.java
  7. 75 0
      fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectionTeam.java
  8. 72 0
      fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectors.java
  9. 60 0
      fiveep-model/src/main/java/com/bizmatics/model/PatrolRouteContent.java
  10. 60 0
      fiveep-model/src/main/java/com/bizmatics/model/PatrolTeamInspection.java
  11. 81 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolCheckEntryVo.java
  12. 68 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionRouteVo.java
  13. 115 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionSchemeListVo.java
  14. 114 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionSchemeOneVo.java
  15. 113 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionSchemeVo.java
  16. 77 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionTeamVo.java
  17. 63 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolRouteContentVo.java
  18. 60 0
      fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolTeamInspectionVo.java
  19. 16 0
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectionRouteMapper.java
  20. 33 0
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectionSchemeMapper.java
  21. 16 0
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectionTeamMapper.java
  22. 16 0
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectorsMapper.java
  23. 16 0
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolRouteContentMapper.java
  24. 16 0
      fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolTeamInspectionMapper.java
  25. 16 0
      fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectionRouteMapper.xml
  26. 106 0
      fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectionSchemeMapper.xml
  27. 18 0
      fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectionTeamMapper.xml
  28. 18 0
      fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectorsMapper.xml
  29. 15 0
      fiveep-persistence/src/main/resources/mapper/mysql/PatrolRouteContentMapper.xml
  30. 15 0
      fiveep-persistence/src/main/resources/mapper/mysql/PatrolTeamInspectionMapper.xml
  31. 16 0
      fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectionRouteService.java
  32. 41 0
      fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectionSchemeService.java
  33. 16 0
      fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectionTeamService.java
  34. 16 0
      fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectorsService.java
  35. 16 0
      fiveep-service/src/main/java/com/bizmatics/service/PatrolRouteContentService.java
  36. 16 0
      fiveep-service/src/main/java/com/bizmatics/service/PatrolTeamInspectionService.java
  37. 20 0
      fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectionRouteServiceImpl.java
  38. 287 0
      fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectionSchemeServiceImpl.java
  39. 20 0
      fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectionTeamServiceImpl.java
  40. 20 0
      fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectorsServiceImpl.java
  41. 20 0
      fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolRouteContentServiceImpl.java
  42. 20 0
      fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolTeamInspectionServiceImpl.java

+ 1 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/MybatisGeneratorUtils.java

@@ -70,7 +70,7 @@ public class MybatisGeneratorUtils {
         // strategy.setTablePrefix("t_"); // 表名前缀
         strategy.setEntityLombokModel(true); //使用lombok
         //修改自己想要生成的表
-        strategy.setInclude(new String[]{"device_attribute"});  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        strategy.setInclude(new String[]{"patrol_route_content"});  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
         mpg.setStrategy(strategy);
 
         // 关闭默认 xml 生成,调整生成 至 根目录

+ 151 - 0
fiveep-controller/src/main/java/com/bizmatics/controller/web/PatrolInspectionSchemeController.java

@@ -0,0 +1,151 @@
+package com.bizmatics.controller.web;
+
+
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.model.PatrolInspectionContent;
+import com.bizmatics.model.PatrolInspectionScheme;
+import com.bizmatics.model.vo.PatrolCheckEntryVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeListVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeOneVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeVo;
+import com.bizmatics.service.PatrolInspectionSchemeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 巡检管理-巡检计划
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@RestController
+@RequestMapping("/patrolInspectionScheme")
+public class PatrolInspectionSchemeController {
+
+    @Autowired
+    private PatrolInspectionSchemeService patrolInspectionSchemeService;
+
+    /**
+     * 巡检管理-巡检计划-计划新增
+     *
+     * @param patrolInspectionSchemeVo
+     * @return
+     */
+    @GetMapping("patrolInspectionSchemeAdd")
+    public ApiResult<Void> patrolInspectionSchemeAdd(@RequestBody PatrolInspectionSchemeVo patrolInspectionSchemeVo
+    ) {
+        patrolInspectionSchemeService.patrolInspectionSchemeAdd(patrolInspectionSchemeVo);
+        return ApiResult.success();
+    }
+
+    /**
+     * 巡检管理-巡检计划-计划修改
+     *
+     * @param patrolInspectionSchemeVo
+     * @return
+     */
+    @GetMapping("patrolInspectionSchemeUpdate")
+    public ApiResult<Void> patrolInspectionSchemeUpdate(@RequestBody PatrolInspectionSchemeVo patrolInspectionSchemeVo
+    ) {
+        patrolInspectionSchemeService.patrolInspectionSchemeUpdate(patrolInspectionSchemeVo);
+        return ApiResult.success();
+    }
+
+    /**
+     * 巡检管理-巡检计划-计划暂停
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("patrolInspectionSchemeDel")
+    public ApiResult<Void> patrolInspectionSchemeDel(@RequestParam Integer id
+    ) {
+        patrolInspectionSchemeService.patrolInspectionSchemeDel(id);
+        return ApiResult.success();
+    }
+
+    /**
+     * 巡检管理-巡检计划-计划列表查询
+     *
+     * @param status               0 暂停 1 启用 2 完成
+     * @param inspectionSchemeName 巡检名称
+     * @param size                 页数默认 1
+     * @param current              条数默认15
+     * @return
+     */
+    @GetMapping("patrolInspectionSchemeList")
+    public ApiResult<CommonPage<PatrolInspectionScheme>> patrolInspectionSchemeList(@RequestParam(value = "status", required = false, defaultValue = "1") Integer status,
+                                                                                    @RequestParam(required = false) String inspectionSchemeName,
+                                                                                    @RequestParam(value = "size", required = false, defaultValue = "1") Integer size,
+                                                                                    @RequestParam(value = "current", required = false, defaultValue = "15") Integer current
+    ) {
+        return ApiResult.success(patrolInspectionSchemeService.patrolInspectionSchemeList(inspectionSchemeName, status, size, current));
+    }
+
+    /**
+     * 巡检管理-巡检计划-修改回显/查看详情
+     *
+     * @param id 计划ID
+     * @return
+     */
+    @GetMapping("PatrolInspectionScheme")
+    public ApiResult<List<PatrolInspectionSchemeOneVo>> PatrolInspectionScheme(@RequestParam Integer id
+    ) {
+        return ApiResult.success(patrolInspectionSchemeService.PatrolInspectionScheme(id));
+    }
+
+    /**
+     * 巡检管理-巡检计划-检查项查看
+     *
+     * @param inspectionContentId 巡检内容ID
+     * @return
+     */
+    @GetMapping("checkItemList")
+    public ApiResult<List<PatrolCheckEntryVo>> checkItemList(@RequestParam Integer inspectionContentId
+    ) {
+        return ApiResult.success(patrolInspectionSchemeService.checkItemList(inspectionContentId));
+    }
+
+    /**
+     * 巡检管理-巡检计划-巡检内容下拉框
+     *
+     * @param siteId 站点ID
+     * @return
+     */
+    @GetMapping("patrolInspectionContentDroplist")
+    public ApiResult<List<PatrolInspectionContent>> patrolInspectionContentDroplist(@RequestParam Integer siteId
+    ) {
+        return ApiResult.success(patrolInspectionSchemeService.patrolInspectionContentDroplist(siteId));
+    }
+
+    /**
+     * 巡检管理-巡检计划-线路注销
+     *
+     * @param id 巡检线路ID
+     * @return
+     */
+    @GetMapping("patrolInspectionRouteDel")
+    public ApiResult<Void> patrolInspectionRouteDel(@RequestParam Integer id
+    ) {
+        patrolInspectionSchemeService.patrolInspectionRouteDel(id);
+        return ApiResult.success();
+    }
+
+    /**
+     * 巡检管理-巡检计划-计划日历/站点巡检日历数据查询
+     * @param id 计划ID
+     * @return
+     */
+    @GetMapping("patrolInspectionSchemeCalendar")
+    public ApiResult<List<PatrolInspectionSchemeListVo>> patrolInspectionSchemeCalendar(@RequestParam(value = "id", required = false, defaultValue = "0") Integer id
+    ) {
+        return ApiResult.success(patrolInspectionSchemeService.patrolInspectionSchemeCalendar(id));
+    }
+
+}
+

+ 21 - 0
fiveep-controller/src/main/java/com/bizmatics/controller/web/PatrolInspectionTeamController.java

@@ -0,0 +1,21 @@
+package com.bizmatics.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Controller
+@RequestMapping("/patrolInspectionTeam")
+public class PatrolInspectionTeamController {
+
+}
+

+ 21 - 0
fiveep-controller/src/main/java/com/bizmatics/controller/web/PatrolInspectorsController.java

@@ -0,0 +1,21 @@
+package com.bizmatics.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Controller
+@RequestMapping("/patrolInspectors")
+public class PatrolInspectorsController {
+
+}
+

+ 65 - 0
fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectionRoute.java

@@ -0,0 +1,65 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionRoute implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检路线id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 站点id
+     */
+    private Integer siteId;
+
+    /**
+     * 巡检路线名称
+     */
+    private String inspectionRouteName;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+    /**
+     * 巡检计划
+     */
+    private Integer inspectionSchemeId;
+
+
+}

+ 111 - 0
fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectionScheme.java

@@ -0,0 +1,111 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionScheme implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检计划id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 巡检计划名称
+     */
+    private String inspectionSchemeName;
+
+    /**
+     * 巡检班组id
+     */
+    private Integer inspectionTeamId;
+
+    /**
+     * 巡检方式配置(1 多次巡检,2 单次巡检)
+     */
+    private Integer inspectionMode;
+
+    /**
+     * 计划开始日期
+     */
+    private Date schemeStartDate;
+
+    /**
+     * 计划结束日期
+     */
+    private Date schemeEndDate;
+
+    /**
+     * 巡检周期数目
+     */
+    private Integer inspectionCycleNumber;
+
+    /**
+     * 巡检周期类型(1 日,2 周,3 月,4 年)
+     */
+    private Integer inspectionCycleType;
+
+    /**
+     * 执行时间
+     */
+    private String executionTime;
+
+    /**
+     * 遇到周末:1 照常执行,2 不执行,3 提前到周五执行,4 推迟到下周一执行
+     */
+    private Integer encounterWeekend;
+
+    /**
+     * 工单创建时间(0 巡检日当天,1 提前1天,2 提前2天,3 提前3天,4 提前4天......)
+     */
+    private Integer workOrderTime;
+
+    /**
+     * 巡检工单截止时间(0 当天,1 3天内,2 一周内,3 两周内,4 一个月内,5 两个月内)
+     */
+    private Integer workOrderDeadline;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用,2 已完成)
+     */
+    private Integer status;
+
+    /**
+     * 执行次数
+     */
+    private Integer executions;
+
+
+}

+ 75 - 0
fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectionTeam.java

@@ -0,0 +1,75 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionTeam implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检团队id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 姓名
+     */
+    private String teamName;
+
+    /**
+     * 责任人:人员id
+     */
+    private Integer inspectorsId;
+
+    /**
+     * 所属用户id
+     */
+    private Integer userId;
+
+    /**
+     * 团队类型(预留字段)
+     */
+    private Integer teamType;
+
+    /**
+     * 预留字段
+     */
+    private String reservedField;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+
+}

+ 72 - 0
fiveep-model/src/main/java/com/bizmatics/model/PatrolInspectors.java

@@ -0,0 +1,72 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectors implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 姓名
+     */
+    private String inspectorsName;
+
+    /**
+     * 手机号
+     */
+    private String inspectorsPhone;
+
+    /**
+     * 所属用户id
+     */
+    private Integer userId;
+
+    /**
+     * 角色(预留字段)
+     */
+    private String inspectRole;
+
+    /**
+     * 职能(预留字段)
+     */
+    private Integer function;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+
+}

+ 60 - 0
fiveep-model/src/main/java/com/bizmatics/model/PatrolRouteContent.java

@@ -0,0 +1,60 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolRouteContent implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检路线与巡检内容关联id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 巡检路线id
+     */
+    private Integer inspectionRouteId;
+
+    /**
+     * 巡检内容id
+     */
+    private Integer inspectionContentId;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+
+}

+ 60 - 0
fiveep-model/src/main/java/com/bizmatics/model/PatrolTeamInspection.java

@@ -0,0 +1,60 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolTeamInspection implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 团队人员关联表id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 团队id
+     */
+    private Integer teamId;
+
+    /**
+     * 人员id
+     */
+    private Integer inspectorsId;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+
+}

+ 81 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolCheckEntryVo.java

@@ -0,0 +1,81 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolCheckEntryVo implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 检查条目检查项id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 设备类型id
+     */
+    private Integer deviceTypeId;
+
+    /**
+     * 检查项名称
+     */
+    private String checkEntryName;
+
+    /**
+     * 参考关系
+     */
+    private String referringToRelation;
+
+    /**
+     * 参考值
+     */
+    private String referenceValue;
+
+    /**
+     * 步骤描述
+     */
+    private String stepsDescribe;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+    private Integer inspectionContentId;
+
+
+}

+ 68 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionRouteVo.java

@@ -0,0 +1,68 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionRouteVo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检路线id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 站点id
+     */
+    private Integer siteId;
+
+    /**
+     * 巡检路线名称
+     */
+    private String inspectionRouteName;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+    /**
+     * 巡检计划
+     */
+    private Integer inspectionSchemeId;
+
+    private List<PatrolRouteContentVo> patrolRouteContentVo;
+
+
+}

+ 115 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionSchemeListVo.java

@@ -0,0 +1,115 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionSchemeListVo implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检计划id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 巡检计划名称
+     */
+    private String inspectionSchemeName;
+
+    /**
+     * 巡检班组id
+     */
+    private Integer inspectionTeamId;
+
+    /**
+     * 巡检方式配置(1 多次巡检,2 单次巡检)
+     */
+    private Integer inspectionMode;
+
+    /**
+     * 计划开始日期
+     */
+    private Date schemeStartDate;
+
+    /**
+     * 计划结束日期
+     */
+    private Date schemeEndDate;
+
+    /**
+     * 巡检周期数目
+     */
+    private Integer inspectionCycleNumber;
+
+    /**
+     * 巡检周期类型(1 日,2 周,3 月,4 年)
+     */
+    private Integer inspectionCycleType;
+
+    /**
+     * 执行时间
+     */
+    private String executionTime;
+
+    /**
+     * 遇到周末:1 照常执行,2 不执行,3 提前到周五执行,4 推迟到下周一执行
+     */
+    private Integer encounterWeekend;
+
+    /**
+     * 工单创建时间(0 巡检日当天,1 提前1天,2 提前2天,3 提前3天,4 提前4天......)
+     */
+    private Integer workOrderTime;
+
+    /**
+     * 巡检工单截止时间(0 当天,1 3天内,2 一周内,3 两周内,4 一个月内,5 两个月内)
+     */
+    private Integer workOrderDeadline;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用,2 已完成)
+     */
+    private Integer status;
+
+    /**
+     * 执行次数
+     */
+    private Integer executions;
+
+    private String teamName;
+
+    private Integer siteId;
+
+    private String siteName;
+
+
+}

+ 114 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionSchemeOneVo.java

@@ -0,0 +1,114 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Builder
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionSchemeOneVo {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 巡检计划id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 巡检计划名称
+     */
+    private String inspectionSchemeName;
+
+    /**
+     * 巡检班组id
+     */
+    private Integer inspectionTeamId;
+
+    /**
+     * 巡检方式配置(1 多次巡检,2 单次巡检)
+     */
+    private Integer inspectionMode;
+
+    /**
+     * 计划开始日期
+     */
+    private Date schemeStartDate;
+
+    /**
+     * 计划结束日期
+     */
+    private Date schemeEndDate;
+
+    /**
+     * 巡检周期数目
+     */
+    private Integer inspectionCycleNumber;
+
+    /**
+     * 巡检周期类型(1 日,2 周,3 月,4 年)
+     */
+    private Integer inspectionCycleType;
+
+    /**
+     * 执行时间
+     */
+    private String executionTime;
+
+    /**
+     * 遇到周末:1 照常执行,2 不执行,3 提前到周五执行,4 推迟到下周一执行
+     */
+    private Integer encounterWeekend;
+
+    /**
+     * 工单创建时间(0 巡检日当天,1 提前1天,2 提前2天,3 提前3天,4 提前4天......)
+     */
+    private Integer workOrderTime;
+
+    /**
+     * 巡检工单截止时间(0 当天,1 3天内,2 一周内,3 两周内,4 一个月内,5 两个月内)
+     */
+    private Integer workOrderDeadline;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用,2 已完成)
+     */
+    private Integer status;
+
+    /**
+     * 执行次数
+     */
+    private Integer executions;
+
+    private PatrolInspectionRouteVo patrolInspectionRouteVo;
+
+    private PatrolInspectionTeamVo patrolInspectionTeamVo;
+
+
+}

+ 113 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionSchemeVo.java

@@ -0,0 +1,113 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionSchemeVo {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 巡检计划id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 巡检计划名称
+     */
+    private String inspectionSchemeName;
+
+    /**
+     * 巡检班组id
+     */
+    private Integer inspectionTeamId;
+
+    /**
+     * 巡检方式配置(1 多次巡检,2 单次巡检)
+     */
+    private Integer inspectionMode;
+
+    /**
+     * 计划开始日期
+     */
+    private Date schemeStartDate;
+
+    /**
+     * 计划结束日期
+     */
+    private Date schemeEndDate;
+
+    /**
+     * 巡检周期数目
+     */
+    private Integer inspectionCycleNumber;
+
+    /**
+     * 巡检周期类型(1 日,2 周,3 月,4 年)
+     */
+    private Integer inspectionCycleType;
+
+    /**
+     * 执行时间
+     */
+    private String executionTime;
+
+    /**
+     * 遇到周末:1 照常执行,2 不执行,3 提前到周五执行,4 推迟到下周一执行
+     */
+    private Integer encounterWeekend;
+
+    /**
+     * 工单创建时间(0 巡检日当天,1 提前1天,2 提前2天,3 提前3天,4 提前4天......)
+     */
+    private Integer workOrderTime;
+
+    /**
+     * 巡检工单截止时间(0 当天,1 3天内,2 一周内,3 两周内,4 一个月内,5 两个月内)
+     */
+    private Integer workOrderDeadline;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用,2 已完成)
+     */
+    private Integer status;
+
+    /**
+     * 执行次数
+     */
+    private Integer executions;
+
+    private PatrolInspectionRouteVo patrolInspectionRouteVo;
+
+    private PatrolInspectionTeamVo patrolInspectionTeamVo;
+
+
+}

+ 77 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolInspectionTeamVo.java

@@ -0,0 +1,77 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.bizmatics.model.PatrolInspectors;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolInspectionTeamVo {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 巡检团队id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 姓名
+     */
+    private String teamName;
+
+    /**
+     * 责任人:人员id
+     */
+    private Integer inspectorsId;
+
+    /**
+     * 所属用户id
+     */
+    private Integer userId;
+
+    /**
+     * 团队类型(预留字段)
+     */
+    private Integer teamType;
+
+    /**
+     * 预留字段
+     */
+    private String reservedField;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+    private List<PatrolInspectors> patrolInspectors;
+
+}

+ 63 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolRouteContentVo.java

@@ -0,0 +1,63 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolRouteContentVo implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 巡检路线与巡检内容关联id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 巡检路线id
+     */
+    private Integer inspectionRouteId;
+
+    /**
+     * 巡检内容id
+     */
+    private Integer inspectionContentId;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+    private String inspectionContentName;
+
+
+
+}

+ 60 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PatrolTeamInspectionVo.java

@@ -0,0 +1,60 @@
+package com.bizmatics.model.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PatrolTeamInspectionVo implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 团队人员关联表id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 团队id
+     */
+    private Integer teamId;
+
+    /**
+     * 人员id
+     */
+    private Integer inspectorsId;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 启用状态(0 未启用,1 启用)
+     */
+    private Integer status;
+
+
+}

+ 16 - 0
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectionRouteMapper.java

@@ -0,0 +1,16 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.model.PatrolInspectionRoute;
+import com.bizmatics.common.mvc.base.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+public interface PatrolInspectionRouteMapper extends CrudMapper<PatrolInspectionRoute> {
+
+}

+ 33 - 0
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectionSchemeMapper.java

@@ -0,0 +1,33 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.common.mvc.base.CrudMapper;
+import com.bizmatics.model.PatrolInspectionContent;
+import com.bizmatics.model.PatrolInspectionScheme;
+import com.bizmatics.model.PatrolInspectors;
+import com.bizmatics.model.vo.PatrolCheckEntryVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeListVo;
+import com.bizmatics.model.vo.PatrolRouteContentVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolInspectionSchemeMapper extends CrudMapper<PatrolInspectionScheme> {
+
+    List<PatrolRouteContentVo> patrolRouteContent(@Param("inspectionRouteId") Integer inspectionRouteId);
+
+    List<PatrolCheckEntryVo> checkItemList(@Param("inspectionContentId") Integer inspectionContentId);
+
+    List<PatrolInspectionContent> patrolInspectionContentDroplist(@Param("siteId") Integer siteId);
+
+    List<PatrolInspectors> patrolInspectorsList(@Param("teamId") Integer teamId);
+
+    List<PatrolInspectionSchemeListVo> patrolInspectionSchemeList(@Param("id") Integer id);
+}

+ 16 - 0
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectionTeamMapper.java

@@ -0,0 +1,16 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.model.PatrolInspectionTeam;
+import com.bizmatics.common.mvc.base.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolInspectionTeamMapper extends CrudMapper<PatrolInspectionTeam> {
+
+}

+ 16 - 0
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolInspectorsMapper.java

@@ -0,0 +1,16 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.model.PatrolInspectors;
+import com.bizmatics.common.mvc.base.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolInspectorsMapper extends CrudMapper<PatrolInspectors> {
+
+}

+ 16 - 0
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolRouteContentMapper.java

@@ -0,0 +1,16 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.model.PatrolRouteContent;
+import com.bizmatics.common.mvc.base.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+public interface PatrolRouteContentMapper extends CrudMapper<PatrolRouteContent> {
+
+}

+ 16 - 0
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/PatrolTeamInspectionMapper.java

@@ -0,0 +1,16 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.model.PatrolTeamInspection;
+import com.bizmatics.common.mvc.base.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolTeamInspectionMapper extends CrudMapper<PatrolTeamInspection> {
+
+}

+ 16 - 0
fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectionRouteMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bizmatics.persistence.mapper.PatrolInspectionRouteMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.PatrolInspectionRoute">
+        <id column="id" property="id" />
+        <result column="site_id" property="siteId" />
+        <result column="inspection_route_name" property="inspectionRouteName" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
+        <result column="status" property="status" />
+        <result column="inspection_scheme_id" property="inspectionSchemeId" />
+    </resultMap>
+
+</mapper>

+ 106 - 0
fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectionSchemeMapper.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bizmatics.persistence.mapper.PatrolInspectionSchemeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.PatrolInspectionScheme">
+        <id column="id" property="id" />
+        <result column="inspection_scheme_name" property="inspectionSchemeName" />
+        <result column="inspection_team_id" property="inspectionTeamId" />
+        <result column="inspection_mode" property="inspectionMode" />
+        <result column="scheme_start_date" property="schemeStartDate" />
+        <result column="scheme_end_date" property="schemeEndDate" />
+        <result column="inspection_cycle_number" property="inspectionCycleNumber" />
+        <result column="inspection_cycle_type" property="inspectionCycleType" />
+        <result column="execution_time" property="executionTime" />
+        <result column="encounter_weekend" property="encounterWeekend" />
+        <result column="work_order_time" property="workOrderTime" />
+        <result column="work_order_deadline" property="workOrderDeadline" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
+        <result column="status" property="status" />
+    </resultMap>
+
+    <select id="patrolRouteContent" resultType="com.bizmatics.model.vo.PatrolRouteContentVo">
+        SELECT
+        a.*, b.inspection_content_name
+        FROM
+        patrol_route_content AS a
+        JOIN patrol_inspection_content AS b ON a.inspection_content_id = b.id
+        <where>
+            a.status = 1
+            <if test="inspectionRouteId != null and inspectionRouteId != 0">
+                AND a.inspection_route_id = #{inspectionRouteId}
+            </if>
+        </where>
+    </select>
+
+    <select id="checkItemList" resultType="com.bizmatics.model.vo.PatrolCheckEntryVo">
+        SELECT
+        d.*,
+        a.inspection_content_id
+        FROM
+        patrol_route_content AS a
+        JOIN patrol_inspection_content AS b ON a.inspection_content_id = b.id
+        JOIN patrol_content_entry AS c ON b.id = c.inspection_content_id
+        JOIN patrol_check_entry AS d ON c.check_entry_id = d.id
+        <where>
+            a.status = 1
+            <if test="inspectionContentId != null and inspectionContentId != 0">
+                AND a.inspection_content_id = #{inspectionContentId}
+            </if>
+        </where>
+        GROUP BY
+        d.id
+    </select>
+
+    <select id="patrolInspectionContentDroplist" resultType="com.bizmatics.model.PatrolInspectionContent">
+        SELECT
+        a.*
+        FROM
+        patrol_inspection_content AS a
+        JOIN patrol_inspection_device AS b ON a.inspection_device_id = b.id
+        <where>
+            a.status = 1
+            <if test="siteId != null and siteId != 0">
+                AND b.site_id = #{siteId}
+            </if>
+        </where>
+        GROUP BY
+        a.id
+    </select>
+
+    <select id="patrolInspectorsList" resultType="com.bizmatics.model.PatrolInspectors">
+        SELECT
+        b.*
+        FROM
+        patrol_team_inspection AS a
+        JOIN patrol_inspectors AS b ON a.inspectors_id = b.id
+        <where>
+            a.status = 1
+            <if test="teamId != null and teamId != 0">
+                AND a.team_id = #{teamId}
+            </if>
+        </where>
+    </select>
+
+    <select id="patrolInspectionSchemeList" resultType="com.bizmatics.model.vo.PatrolInspectionSchemeListVo">
+        SELECT
+        a.*, b.team_name,
+        c.site_id,
+        d.site_name
+        FROM
+        patrol_inspection_scheme AS a
+        JOIN patrol_inspection_team AS b ON a.inspection_team_id = b.id
+        JOIN patrol_inspection_route AS c ON c.inspection_scheme_id = a.id
+        JOIN site AS d ON c.site_id = d.id
+        <where>
+            <if test="id != null and id != 0">
+                a.id = #{id}
+            </if>
+        </where>
+        group by a.id
+        ORDER BY
+        a.id DESC
+    </select>
+</mapper>

+ 18 - 0
fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectionTeamMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bizmatics.persistence.mapper.PatrolInspectionTeamMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.PatrolInspectionTeam">
+        <id column="id" property="id" />
+        <result column="team_name" property="teamName" />
+        <result column="inspectors_id" property="inspectorsId" />
+        <result column="user_id" property="userId" />
+        <result column="team_type" property="teamType" />
+        <result column="reserved_field" property="reservedField" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
+        <result column="status" property="status" />
+    </resultMap>
+
+</mapper>

+ 18 - 0
fiveep-persistence/src/main/resources/mapper/mysql/PatrolInspectorsMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bizmatics.persistence.mapper.PatrolInspectorsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.PatrolInspectors">
+        <id column="id" property="id" />
+        <result column="inspectors_name" property="inspectorsName" />
+        <result column="inspectors_phone" property="inspectorsPhone" />
+        <result column="user_id" property="userId" />
+        <result column="inspect_role" property="inspectRole" />
+        <result column="function" property="function" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
+        <result column="status" property="status" />
+    </resultMap>
+
+</mapper>

+ 15 - 0
fiveep-persistence/src/main/resources/mapper/mysql/PatrolRouteContentMapper.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bizmatics.persistence.mapper.PatrolRouteContentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.PatrolRouteContent">
+        <id column="id" property="id" />
+        <result column="inspection_route_id" property="inspectionRouteId" />
+        <result column="inspection_content_id" property="inspectionContentId" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
+        <result column="status" property="status" />
+    </resultMap>
+
+</mapper>

+ 15 - 0
fiveep-persistence/src/main/resources/mapper/mysql/PatrolTeamInspectionMapper.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bizmatics.persistence.mapper.PatrolTeamInspectionMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.PatrolTeamInspection">
+        <id column="id" property="id" />
+        <result column="team_id" property="teamId" />
+        <result column="inspectors_id" property="inspectorsId" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
+        <result column="status" property="status" />
+    </resultMap>
+
+</mapper>

+ 16 - 0
fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectionRouteService.java

@@ -0,0 +1,16 @@
+package com.bizmatics.service;
+
+import com.bizmatics.model.PatrolInspectionRoute;
+import com.bizmatics.common.mvc.base.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+public interface PatrolInspectionRouteService extends CrudService<PatrolInspectionRoute> {
+
+}

+ 41 - 0
fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectionSchemeService.java

@@ -0,0 +1,41 @@
+package com.bizmatics.service;
+
+import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.model.PatrolInspectionContent;
+import com.bizmatics.model.PatrolInspectionScheme;
+import com.bizmatics.common.mvc.base.CrudService;
+import com.bizmatics.model.vo.PatrolCheckEntryVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeListVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeOneVo;
+import com.bizmatics.model.vo.PatrolInspectionSchemeVo;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolInspectionSchemeService extends CrudService<PatrolInspectionScheme> {
+
+    void patrolInspectionSchemeAdd(PatrolInspectionSchemeVo patrolInspectionSchemeVo);
+
+    void patrolInspectionSchemeUpdate(PatrolInspectionSchemeVo patrolInspectionSchemeVo);
+
+    void patrolInspectionSchemeDel(Integer id);
+
+    CommonPage<PatrolInspectionScheme> patrolInspectionSchemeList(String inspectionSchemeName, Integer status, Integer size, Integer current);
+
+    List<PatrolInspectionSchemeOneVo> PatrolInspectionScheme(Integer id);
+
+    List<PatrolCheckEntryVo> checkItemList(Integer inspectionContentId);
+
+    List<PatrolInspectionContent> patrolInspectionContentDroplist(Integer siteId);
+
+    void patrolInspectionRouteDel(Integer id);
+
+    List<PatrolInspectionSchemeListVo> patrolInspectionSchemeCalendar(Integer id);
+}

+ 16 - 0
fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectionTeamService.java

@@ -0,0 +1,16 @@
+package com.bizmatics.service;
+
+import com.bizmatics.model.PatrolInspectionTeam;
+import com.bizmatics.common.mvc.base.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolInspectionTeamService extends CrudService<PatrolInspectionTeam> {
+
+}

+ 16 - 0
fiveep-service/src/main/java/com/bizmatics/service/PatrolInspectorsService.java

@@ -0,0 +1,16 @@
+package com.bizmatics.service;
+
+import com.bizmatics.model.PatrolInspectors;
+import com.bizmatics.common.mvc.base.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolInspectorsService extends CrudService<PatrolInspectors> {
+
+}

+ 16 - 0
fiveep-service/src/main/java/com/bizmatics/service/PatrolRouteContentService.java

@@ -0,0 +1,16 @@
+package com.bizmatics.service;
+
+import com.bizmatics.model.PatrolRouteContent;
+import com.bizmatics.common.mvc.base.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+public interface PatrolRouteContentService extends CrudService<PatrolRouteContent> {
+
+}

+ 16 - 0
fiveep-service/src/main/java/com/bizmatics/service/PatrolTeamInspectionService.java

@@ -0,0 +1,16 @@
+package com.bizmatics.service;
+
+import com.bizmatics.model.PatrolTeamInspection;
+import com.bizmatics.common.mvc.base.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+public interface PatrolTeamInspectionService extends CrudService<PatrolTeamInspection> {
+
+}

+ 20 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectionRouteServiceImpl.java

@@ -0,0 +1,20 @@
+package com.bizmatics.service.impl;
+
+import com.bizmatics.model.PatrolInspectionRoute;
+import com.bizmatics.persistence.mapper.PatrolInspectionRouteMapper;
+import com.bizmatics.service.PatrolInspectionRouteService;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+@Service
+public class PatrolInspectionRouteServiceImpl extends AbstractCrudService<PatrolInspectionRouteMapper, PatrolInspectionRoute> implements PatrolInspectionRouteService {
+
+}

+ 287 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectionSchemeServiceImpl.java

@@ -0,0 +1,287 @@
+package com.bizmatics.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import com.bizmatics.model.*;
+import com.bizmatics.model.system.SysUser;
+import com.bizmatics.model.vo.*;
+import com.bizmatics.persistence.mapper.PatrolInspectionSchemeMapper;
+import com.bizmatics.service.*;
+import com.bizmatics.service.util.SecurityUtils;
+import com.bizmatics.service.vo.CommonIcoVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 巡检管理-巡检计划
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Service
+public class PatrolInspectionSchemeServiceImpl extends AbstractCrudService<PatrolInspectionSchemeMapper, PatrolInspectionScheme> implements PatrolInspectionSchemeService {
+    @Autowired
+    private PatrolInspectionRouteService patrolInspectionRouteService;
+    @Autowired
+    private PatrolRouteContentService patrolRouteContentService;
+    @Autowired
+    private PatrolInspectionTeamService patrolInspectionTeamService;
+    @Autowired
+    private PatrolTeamInspectionService patrolTeamInspectionService;
+
+    @Override
+    public void patrolInspectionSchemeAdd(PatrolInspectionSchemeVo patrolInspectionSchemeVo) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        PatrolInspectionScheme patrolInspectionScheme = new PatrolInspectionScheme();
+        patrolInspectionScheme.setInspectionSchemeName(patrolInspectionSchemeVo.getInspectionSchemeName());
+        patrolInspectionScheme.setInspectionTeamId(patrolInspectionSchemeVo.getInspectionTeamId());
+        patrolInspectionScheme.setInspectionMode(patrolInspectionSchemeVo.getInspectionMode());
+        patrolInspectionScheme.setSchemeStartDate(patrolInspectionSchemeVo.getSchemeStartDate());
+        patrolInspectionScheme.setSchemeEndDate(patrolInspectionSchemeVo.getSchemeEndDate());
+        patrolInspectionScheme.setInspectionCycleNumber(patrolInspectionSchemeVo.getInspectionCycleNumber());
+        patrolInspectionScheme.setInspectionCycleType(patrolInspectionSchemeVo.getInspectionCycleType());
+        patrolInspectionScheme.setExecutionTime(patrolInspectionSchemeVo.getExecutionTime());
+        patrolInspectionScheme.setEncounterWeekend(patrolInspectionSchemeVo.getEncounterWeekend());
+        patrolInspectionScheme.setWorkOrderTime(patrolInspectionSchemeVo.getWorkOrderTime());
+        patrolInspectionScheme.setWorkOrderDeadline(patrolInspectionSchemeVo.getWorkOrderDeadline());
+        patrolInspectionScheme.setStatus(patrolInspectionSchemeVo.getStatus());
+        patrolInspectionScheme.setCreator(user.getUserName());
+        patrolInspectionScheme.setCreateTime(new Date());
+        patrolInspectionScheme.setExecutions(0);
+        this.save(patrolInspectionScheme);
+        Integer inspectionSchemeId = patrolInspectionScheme.getId();
+        PatrolInspectionRoute patrolInspectionRoute = new PatrolInspectionRoute();
+
+        patrolInspectionRoute.setInspectionRouteName(patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getInspectionRouteName());
+        patrolInspectionRoute.setInspectionSchemeId(inspectionSchemeId);
+        patrolInspectionRoute.setSiteId(patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getSiteId());
+        patrolInspectionRoute.setCreator(user.getUserName());
+        patrolInspectionRoute.setCreateTime(new Date());
+        patrolInspectionRoute.setStatus(1);
+        patrolInspectionRouteService.save(patrolInspectionRoute);
+        Integer inspectionRouteId = patrolInspectionRoute.getId();
+        if (patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getPatrolRouteContentVo().size() > 0) {
+            for (int j = 0; j < patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getPatrolRouteContentVo().size(); j++) {
+                PatrolRouteContent patrolRouteContent = new PatrolRouteContent();
+                patrolRouteContent.setInspectionContentId(patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getPatrolRouteContentVo().get(j).getInspectionContentId());
+                patrolRouteContent.setInspectionRouteId(inspectionRouteId);
+                patrolRouteContent.setCreator(user.getUserName());
+                patrolRouteContent.setCreateTime(new Date());
+                patrolRouteContent.setStatus(1);
+                patrolRouteContentService.save(patrolRouteContent);
+            }
+        }
+    }
+
+    @Override
+    public void patrolInspectionSchemeUpdate(PatrolInspectionSchemeVo patrolInspectionSchemeVo) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        PatrolInspectionScheme patrolInspectionScheme = new PatrolInspectionScheme();
+        patrolInspectionScheme.setInspectionSchemeName(patrolInspectionSchemeVo.getInspectionSchemeName());
+        patrolInspectionScheme.setInspectionTeamId(patrolInspectionSchemeVo.getInspectionTeamId());
+        patrolInspectionScheme.setInspectionMode(patrolInspectionSchemeVo.getInspectionMode());
+        patrolInspectionScheme.setSchemeStartDate(patrolInspectionSchemeVo.getSchemeStartDate());
+        patrolInspectionScheme.setSchemeEndDate(patrolInspectionSchemeVo.getSchemeEndDate());
+        patrolInspectionScheme.setInspectionCycleNumber(patrolInspectionSchemeVo.getInspectionCycleNumber());
+        patrolInspectionScheme.setInspectionCycleType(patrolInspectionSchemeVo.getInspectionCycleType());
+        patrolInspectionScheme.setExecutionTime(patrolInspectionSchemeVo.getExecutionTime());
+        patrolInspectionScheme.setEncounterWeekend(patrolInspectionSchemeVo.getEncounterWeekend());
+        patrolInspectionScheme.setWorkOrderTime(patrolInspectionSchemeVo.getWorkOrderTime());
+        patrolInspectionScheme.setWorkOrderDeadline(patrolInspectionSchemeVo.getWorkOrderDeadline());
+        patrolInspectionScheme.setStatus(patrolInspectionSchemeVo.getStatus());
+        patrolInspectionScheme.setId(patrolInspectionSchemeVo.getId());
+        this.updateById(patrolInspectionScheme);
+        Integer inspectionSchemeId = patrolInspectionScheme.getId();
+        //注销旧数据
+        LambdaQueryWrapper<PatrolInspectionRoute> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(PatrolInspectionRoute::getInspectionSchemeId, inspectionSchemeId);
+        List<PatrolInspectionRoute> patrolInspectionRouteList = patrolInspectionRouteService.list(queryWrapper);
+        if (patrolInspectionRouteList.size() > 0) {
+            List<Object> inspectionRouteIdList = new ArrayList<>();
+            for (int i = 0; i < patrolInspectionRouteList.size(); i++) {
+                PatrolInspectionRoute patrolInspectionRoute = new PatrolInspectionRoute();
+                patrolInspectionRoute.setStatus(0);
+                patrolInspectionRoute.setId(patrolInspectionRouteList.get(i).getId());
+                patrolInspectionRouteService.updateById(patrolInspectionRoute);
+                inspectionRouteIdList.add(patrolInspectionRouteList.get(i).getId());
+            }
+            LambdaQueryWrapper<PatrolRouteContent> queryWrapperone = Wrappers.lambdaQuery();
+            queryWrapperone.in(PatrolRouteContent::getInspectionRouteId, inspectionRouteIdList);
+            List<PatrolRouteContent> patrolRouteContentList = patrolRouteContentService.list(queryWrapperone);
+            if (patrolRouteContentList.size() > 0) {
+                for (int i = 0; i < patrolRouteContentList.size(); i++) {
+                    PatrolRouteContent patrolRouteContent = new PatrolRouteContent();
+                    patrolRouteContent.setStatus(0);
+                    patrolRouteContent.setId(patrolRouteContentList.get(i).getId());
+                    patrolRouteContentService.updateById(patrolRouteContent);
+                }
+            }
+        }
+        //重新添加新数据
+        PatrolInspectionRoute patrolInspectionRoute = new PatrolInspectionRoute();
+        patrolInspectionRoute.setInspectionRouteName(patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getInspectionRouteName());
+        patrolInspectionRoute.setInspectionSchemeId(inspectionSchemeId);
+        patrolInspectionRoute.setSiteId(patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getSiteId());
+        patrolInspectionRoute.setCreator(user.getUserName());
+        patrolInspectionRoute.setCreateTime(new Date());
+        patrolInspectionRoute.setStatus(1);
+        patrolInspectionRouteService.save(patrolInspectionRoute);
+        Integer inspectionRouteId = patrolInspectionRoute.getId();
+        if (patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getPatrolRouteContentVo().size() > 0) {
+            for (int j = 0; j < patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getPatrolRouteContentVo().size(); j++) {
+                PatrolRouteContent patrolRouteContent = new PatrolRouteContent();
+                patrolRouteContent.setInspectionContentId(patrolInspectionSchemeVo.getPatrolInspectionRouteVo().getPatrolRouteContentVo().get(j).getInspectionContentId());
+                patrolRouteContent.setInspectionRouteId(inspectionRouteId);
+                patrolRouteContent.setCreator(user.getUserName());
+                patrolRouteContent.setCreateTime(new Date());
+                patrolRouteContent.setStatus(1);
+                patrolRouteContentService.save(patrolRouteContent);
+            }
+        }
+    }
+
+    @Override
+    public void patrolInspectionSchemeDel(Integer id) {
+        PatrolInspectionScheme patrolInspectionScheme = new PatrolInspectionScheme();
+        patrolInspectionScheme.setStatus(0);
+        patrolInspectionScheme.setId(id);
+        this.updateById(patrolInspectionScheme);
+    }
+
+    @Override
+    public CommonPage<PatrolInspectionScheme> patrolInspectionSchemeList(String inspectionSchemeName, Integer status, Integer size, Integer current) {
+        IPage<PatrolInspectionScheme> page = new Page<PatrolInspectionScheme>(size, current);
+        LambdaQueryWrapper<PatrolInspectionScheme> queryWrapper = Wrappers.lambdaQuery();
+        if (!inspectionSchemeName.equals("") && !inspectionSchemeName.equals(null)) {
+            queryWrapper.like(PatrolInspectionScheme::getInspectionSchemeName, inspectionSchemeName);
+        }
+        if (status != 0) {
+            queryWrapper.eq(PatrolInspectionScheme::getStatus, status);
+        }
+        page = this.page(page, queryWrapper);
+        this.ToCommonPage(page);
+        return new CommonPage<>(page.getRecords(), page.getTotal(), page.getCurrent(), page.getSize());
+    }
+
+    @Override
+    public List<PatrolInspectionSchemeOneVo> PatrolInspectionScheme(Integer id) {
+//        PatrolInspectionSchemeVo patrolInspectionSchemeVo = new PatrolInspectionSchemeVo();
+        PatrolInspectionRouteVo patrolInspectionRouteVo = new PatrolInspectionRouteVo();
+        PatrolInspectionTeamVo patrolInspectionTeamVo = new PatrolInspectionTeamVo();
+        LambdaQueryWrapper<PatrolInspectionScheme> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(PatrolInspectionScheme::getId, id);
+        List<PatrolInspectionScheme> patrolInspectionSchemeList = this.list(queryWrapper);
+
+        //线路查询
+        LambdaQueryWrapper<PatrolInspectionRoute> queryWrapperOne = Wrappers.lambdaQuery();
+        queryWrapperOne.eq(PatrolInspectionRoute::getInspectionSchemeId, id).eq(PatrolInspectionRoute::getStatus, 1);
+        List<PatrolInspectionRoute> patrolInspectionRouteList = patrolInspectionRouteService.list(queryWrapperOne);
+        if (patrolInspectionRouteList.size() > 0) {
+//            for (int i = 0; i < patrolInspectionRouteList.size(); i++) {
+            List<PatrolRouteContentVo> patrolRouteContentList = baseMapper.patrolRouteContent(patrolInspectionRouteList.get(0).getId());
+            Integer inspectionSchemeId = patrolInspectionRouteList.get(0).getInspectionSchemeId();
+
+            patrolInspectionRouteVo.setInspectionSchemeId(inspectionSchemeId);
+            patrolInspectionRouteVo.setInspectionRouteName(patrolInspectionRouteList.get(0).getInspectionRouteName());
+            patrolInspectionRouteVo.setCreator(patrolInspectionRouteList.get(0).getCreator());
+            patrolInspectionRouteVo.setCreateTime(patrolInspectionRouteList.get(0).getCreateTime());
+            patrolInspectionRouteVo.setId(patrolInspectionRouteList.get(0).getId());
+            patrolInspectionRouteVo.setStatus(patrolInspectionRouteList.get(0).getStatus());
+            patrolInspectionRouteVo.setPatrolRouteContentVo(patrolRouteContentList);
+//            }
+        }
+
+        //团队查询
+        LambdaQueryWrapper<PatrolInspectionTeam> queryWrapperTwo = Wrappers.lambdaQuery();
+        queryWrapperTwo.eq(PatrolInspectionTeam::getId, patrolInspectionSchemeList.get(0).getInspectionTeamId()).eq(PatrolInspectionTeam::getStatus, 1);
+        List<PatrolInspectionTeam> patrolInspectionTeamList = patrolInspectionTeamService.list(queryWrapperTwo);
+        if (patrolInspectionTeamList.size() > 0) {
+//            for (int i = 0; i < patrolInspectionTeamList.size(); i++) {
+            List<PatrolInspectors> patrolInspectorsList = baseMapper.patrolInspectorsList(patrolInspectionTeamList.get(0).getId());
+            patrolInspectionTeamVo.setId(patrolInspectionTeamList.get(0).getId());
+            patrolInspectionTeamVo.setTeamName(patrolInspectionTeamList.get(0).getTeamName());
+            patrolInspectionTeamVo.setInspectorsId(patrolInspectionTeamList.get(0).getInspectorsId());
+            patrolInspectionTeamVo.setUserId(patrolInspectionTeamList.get(0).getUserId());
+            patrolInspectionTeamVo.setTeamType(patrolInspectionTeamList.get(0).getTeamType());
+            patrolInspectionTeamVo.setReservedField(patrolInspectionTeamList.get(0).getReservedField());
+            patrolInspectionTeamVo.setCreator(patrolInspectionTeamList.get(0).getCreator());
+            patrolInspectionTeamVo.setCreateTime(patrolInspectionTeamList.get(0).getCreateTime());
+            patrolInspectionTeamVo.setStatus(patrolInspectionTeamList.get(0).getStatus());
+            patrolInspectionTeamVo.setPatrolInspectors(patrolInspectorsList);
+//            }
+        }
+
+        List<PatrolInspectionSchemeOneVo> list = new ArrayList<>();
+        list.add(PatrolInspectionSchemeOneVo.builder()
+                .inspectionSchemeName(patrolInspectionSchemeList.get(0).getInspectionSchemeName())
+                .inspectionMode(patrolInspectionSchemeList.get(0).getInspectionMode())
+                .inspectionTeamId(patrolInspectionSchemeList.get(0).getInspectionTeamId())
+                .schemeEndDate(patrolInspectionSchemeList.get(0).getSchemeEndDate())
+                .schemeStartDate(patrolInspectionSchemeList.get(0).getSchemeStartDate())
+                .inspectionCycleNumber(patrolInspectionSchemeList.get(0).getInspectionCycleNumber())
+                .inspectionCycleType(patrolInspectionSchemeList.get(0).getInspectionCycleType())
+                .executionTime(patrolInspectionSchemeList.get(0).getExecutionTime())
+                .encounterWeekend(patrolInspectionSchemeList.get(0).getEncounterWeekend())
+                .workOrderTime(patrolInspectionSchemeList.get(0).getWorkOrderTime())
+                .workOrderDeadline(patrolInspectionSchemeList.get(0).getWorkOrderDeadline())
+                .status(patrolInspectionSchemeList.get(0).getStatus())
+                .creator(patrolInspectionSchemeList.get(0).getCreator())
+                .createTime(patrolInspectionSchemeList.get(0).getCreateTime())
+                .executions(patrolInspectionSchemeList.get(0).getExecutions())
+                .id(patrolInspectionSchemeList.get(0).getId())
+                .patrolInspectionTeamVo(patrolInspectionTeamVo)
+                .patrolInspectionRouteVo(patrolInspectionRouteVo)
+                .build()
+        );
+        return list;
+    }
+
+    @Override
+    public List<PatrolCheckEntryVo> checkItemList(Integer inspectionContentId) {
+        List<PatrolCheckEntryVo> list = baseMapper.checkItemList(inspectionContentId);
+        return list;
+    }
+
+    @Override
+    public List<PatrolInspectionContent> patrolInspectionContentDroplist(Integer siteId) {
+        List<PatrolInspectionContent> list = baseMapper.patrolInspectionContentDroplist(siteId);
+        return list;
+    }
+
+    @Override
+    public void patrolInspectionRouteDel(Integer id) {
+        PatrolInspectionRoute patrolInspectionRoute = new PatrolInspectionRoute();
+        patrolInspectionRoute.setId(id);
+        patrolInspectionRoute.setStatus(0);
+        patrolInspectionRouteService.updateById(patrolInspectionRoute);
+        LambdaQueryWrapper<PatrolRouteContent> queryWrapperOne = Wrappers.lambdaQuery();
+        queryWrapperOne.eq(PatrolRouteContent::getInspectionRouteId, id).eq(PatrolRouteContent::getStatus, 1);
+        List<PatrolRouteContent> patrolRouteContentList = patrolRouteContentService.list(queryWrapperOne);
+        if (patrolRouteContentList.size() > 0) {
+            for (int i = 0; i < patrolRouteContentList.size(); i++) {
+                PatrolRouteContent patrolRouteContent = new PatrolRouteContent();
+                patrolRouteContent.setStatus(0);
+                patrolRouteContent.setId(patrolRouteContentList.get(i).getId());
+                patrolRouteContentService.updateById(patrolRouteContent);
+            }
+        }
+    }
+
+    @Override
+    public List<PatrolInspectionSchemeListVo> patrolInspectionSchemeCalendar(Integer id) {
+        List<PatrolInspectionSchemeListVo> list = baseMapper.patrolInspectionSchemeList(id);
+        return list;
+    }
+
+
+}

+ 20 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectionTeamServiceImpl.java

@@ -0,0 +1,20 @@
+package com.bizmatics.service.impl;
+
+import com.bizmatics.model.PatrolInspectionTeam;
+import com.bizmatics.persistence.mapper.PatrolInspectionTeamMapper;
+import com.bizmatics.service.PatrolInspectionTeamService;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Service
+public class PatrolInspectionTeamServiceImpl extends AbstractCrudService<PatrolInspectionTeamMapper, PatrolInspectionTeam> implements PatrolInspectionTeamService {
+
+}

+ 20 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolInspectorsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.bizmatics.service.impl;
+
+import com.bizmatics.model.PatrolInspectors;
+import com.bizmatics.persistence.mapper.PatrolInspectorsMapper;
+import com.bizmatics.service.PatrolInspectorsService;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Service
+public class PatrolInspectorsServiceImpl extends AbstractCrudService<PatrolInspectorsMapper, PatrolInspectors> implements PatrolInspectorsService {
+
+}

+ 20 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolRouteContentServiceImpl.java

@@ -0,0 +1,20 @@
+package com.bizmatics.service.impl;
+
+import com.bizmatics.model.PatrolRouteContent;
+import com.bizmatics.persistence.mapper.PatrolRouteContentMapper;
+import com.bizmatics.service.PatrolRouteContentService;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-19
+ */
+@Service
+public class PatrolRouteContentServiceImpl extends AbstractCrudService<PatrolRouteContentMapper, PatrolRouteContent> implements PatrolRouteContentService {
+
+}

+ 20 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/PatrolTeamInspectionServiceImpl.java

@@ -0,0 +1,20 @@
+package com.bizmatics.service.impl;
+
+import com.bizmatics.model.PatrolTeamInspection;
+import com.bizmatics.persistence.mapper.PatrolTeamInspectionMapper;
+import com.bizmatics.service.PatrolTeamInspectionService;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-10-18
+ */
+@Service
+public class PatrolTeamInspectionServiceImpl extends AbstractCrudService<PatrolTeamInspectionMapper, PatrolTeamInspection> implements PatrolTeamInspectionService {
+
+}