Sfoglia il codice sorgente

计划停电-列表查询

jichaobo 3 anni fa
parent
commit
031b239bfe

+ 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[]{"devops_work_order"});  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        strategy.setInclude(new String[]{"site_archives"});  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
         mpg.setStrategy(strategy);
 
         // 关闭默认 xml 生成,调整生成 至 根目录

+ 6 - 9
fiveep-controller/src/main/java/com/bizmatics/controller/web/SitedtlController.java

@@ -1,24 +1,21 @@
 package com.bizmatics.controller.web;
 
 
-import com.bizmatics.service.SitedtlService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RestController;
 
 /**
- * 现场档案-未开发
+ * <p>
+ *  前端控制器
+ * </p>
+ *
  * @author ya
- * @since 2021-07-07
+ * @since 2021-10-26
  */
-@RestController
+@Controller
 @RequestMapping("/sitedtl")
 public class SitedtlController {
 
-
-    @Autowired
-    private SitedtlService sitedtlService;
 }
 

+ 6 - 11
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcBlackoutPlanController.java

@@ -2,7 +2,9 @@ package com.bizmatics.controller.web;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.model.WcBlackoutPlan;
+import com.bizmatics.model.vo.PlannedOutageVo;
 import com.bizmatics.model.vo.WcBlackoutPlanVo;
 import com.bizmatics.service.WcBlackoutPlanService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -62,19 +64,12 @@ public class WcBlackoutPlanController {
 
     /**
      * 停电计划-查询
-     *
-     * @param startTime 开始时间
-     * @param endTime   结束时间
-     * @param type      状态 1.未执行 2.执行中 3.已执行
-     * @param id        停电计划ID
+     * @param plannedOutageVo
      * @return
      */
-    @GetMapping("plannedOutageList")
-    public ApiResult<List<WcBlackoutPlanVo>> plannedOutageList(@RequestParam(required = false) String startTime,
-                                                               @RequestParam(required = false) String endTime,
-                                                               @RequestParam(value = "type", required = false, defaultValue = "0") int type,
-                                                               @RequestParam(value = "id", required = false, defaultValue = "0") int id) {
-        return ApiResult.success(wcBlackoutPlanService.plannedOutageList(startTime, endTime, type, id));
+    @PostMapping("plannedOutageList")
+    public ApiResult<CommonPage<WcBlackoutPlanVo>> plannedOutageList(@RequestBody PlannedOutageVo plannedOutageVo) {
+        return ApiResult.success(wcBlackoutPlanService.plannedOutageList(plannedOutageVo));
     }
 
 }

+ 45 - 8
fiveep-model/src/main/java/com/bizmatics/model/Sitedtl.java

@@ -1,9 +1,11 @@
 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;
@@ -14,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author ya
- * @since 2021-07-07
+ * @since 2021-10-26
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -44,6 +46,11 @@ public class Sitedtl implements Serializable {
      */
     private Integer powerCapacity;
 
+    /**
+     * 所属线路
+     */
+    private Integer routeId;
+
     /**
      * 所属站点
      */
@@ -75,9 +82,14 @@ public class Sitedtl implements Serializable {
     private Boolean annihilatorInsufficientConfiguration;
 
     /**
-     * 灭火器超期(0 否,1 是
+     * 灭火器超期(时间
      */
-    private Boolean annihilatorOverdue;
+    private String annihilatorOverdue;
+
+    /**
+     * 缺失门挡板(0 否,1 是)
+     */
+    private Boolean doorBaffle;
 
     /**
      * 堆放杂物(0 否,1 是)
@@ -115,14 +127,29 @@ public class Sitedtl implements Serializable {
     private Boolean overdueElectricianCertificate;
 
     /**
-     * 电试超期(0 否,1 是)
+     * 电试超期(标明电试日期)
+     */
+    private String electricTestOverdue;
+
+    /**
+     * 高压柜年份
+     */
+    private String highVoltageCabinet;
+
+    /**
+     * 变压器年份(标明出厂或投运日期)
+     */
+    private String oldEquipment;
+
+    /**
+     * 带电显示器损坏(0 否  1 是)
      */
-    private Boolean electricTestOverdue;
+    private Boolean chargedDisplay;
 
     /**
-     * 设备老旧(标明出厂或投运日期)
+     * 缺失照明(0 否 ,1 是
      */
-    private LocalDate oldEquipment;
+    private Boolean lighting;
 
     /**
      * 绝缘毯配置不足(0 否,1 是)
@@ -144,5 +171,15 @@ public class Sitedtl implements Serializable {
      */
     private String remarks;
 
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
 
 }

+ 58 - 0
fiveep-model/src/main/java/com/bizmatics/model/vo/PlannedOutageVo.java

@@ -0,0 +1,58 @@
+package com.bizmatics.model.vo;
+
+import com.bizmatics.model.Device;
+import com.bizmatics.model.DeviceAttribute;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-07-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PlannedOutageVo{
+    /**
+     * 开始时间
+     */
+    private String startTime;
+
+    /**
+     * 结束时间
+     */
+    private String endTime;
+
+    /**
+     * 状态 1.未执行 2.执行中 3.已执行
+     */
+    @ApiModelProperty(value = "0", readOnly = true)
+    private Integer type;
+
+    /**
+     * 停电计划ID
+     */
+    @ApiModelProperty(value = "0", readOnly = true)
+    private Integer id;
+
+    /**
+     * 条数
+     */
+    @ApiModelProperty(value = "15", readOnly = true)
+    private Integer size;
+
+    /**
+     * 当前页
+     */
+    @ApiModelProperty(value = "1", readOnly = true)
+    private Integer current;
+}

+ 1 - 1
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/SitedtlMapper.java

@@ -9,7 +9,7 @@ import com.bizmatics.common.mvc.base.CrudMapper;
  * </p>
  *
  * @author ya
- * @since 2021-07-07
+ * @since 2021-10-26
  */
 public interface SitedtlMapper extends CrudMapper<Sitedtl> {
 

+ 4 - 2
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/WcBlackoutPlanMapper.java

@@ -20,6 +20,8 @@ public interface WcBlackoutPlanMapper extends CrudMapper<WcBlackoutPlan> {
 
     List<WcBlackoutPlanVo> plannedOutageList(@Param("startTime") String startTime,
                                              @Param("endTime") String endTime,
-                                             @Param("type") int type,
-                                             @Param("id") int id);
+                                             @Param("type") Integer type,
+                                             @Param("id") Integer id,
+                                             @Param("size") Integer size,
+                                             @Param("startCurrent") Integer startCurrent);
 }

+ 2 - 2
fiveep-persistence/src/main/resources/mapper/mysql/DeviceMapper.xml

@@ -140,10 +140,10 @@
         a.*
         FROM
         device_analog_variable_list AS a
-        JOIN device AS b ON a.communication_equipment = b.id
+        JOIN device_attribute AS b ON a.monitoring_equipment = b.id
         <where>
             a.status = 1
-            AND b.enable = 1
+            AND b.status = 1
             AND a.data_area = 1
             <if test="siteId != null and siteId != 0">
                 AND b.site_id = #{siteId}

+ 7 - 0
fiveep-persistence/src/main/resources/mapper/mysql/SitedtlMapper.xml

@@ -8,6 +8,7 @@
         <result column="account_number" property="accountNumber" />
         <result column="rheological_change" property="rheologicalChange" />
         <result column="power_capacity" property="powerCapacity" />
+        <result column="route_id" property="routeId" />
         <result column="site_id" property="siteId" />
         <result column="supervision_department_id" property="supervisionDepartmentId" />
         <result column="cable_hole" property="cableHole" />
@@ -15,6 +16,7 @@
         <result column="water_leakage" property="waterLeakage" />
         <result column="annihilator_insufficient_configuration" property="annihilatorInsufficientConfiguration" />
         <result column="annihilator_overdue" property="annihilatorOverdue" />
+        <result column="door_baffle" property="doorBaffle" />
         <result column="pile_up_sundries" property="pileUpSundries" />
         <result column="serious_ash_deposition" property="seriousAshDeposition" />
         <result column="around_environment_humid" property="aroundEnvironmentHumid" />
@@ -23,11 +25,16 @@
         <result column="electrician_lack" property="electricianLack" />
         <result column="overdue_electrician_certificate" property="overdueElectricianCertificate" />
         <result column="electric_test_overdue" property="electricTestOverdue" />
+        <result column="high_voltage_cabinet" property="highVoltageCabinet" />
         <result column="old_equipment" property="oldEquipment" />
+        <result column="charged_display" property="chargedDisplay" />
+        <result column="lighting" property="lighting" />
         <result column="blanket_insufficient_configuration" property="blanketInsufficientConfiguration" />
         <result column="ground_wire" property="groundWire" />
         <result column="analog_screen" property="analogScreen" />
         <result column="remarks" property="remarks" />
+        <result column="creator" property="creator" />
+        <result column="create_time" property="createTime" />
     </resultMap>
 
 </mapper>

+ 1 - 1
fiveep-service/src/main/java/com/bizmatics/service/SitedtlService.java

@@ -9,7 +9,7 @@ import com.bizmatics.common.mvc.base.CrudService;
  * </p>
  *
  * @author ya
- * @since 2021-07-07
+ * @since 2021-10-26
  */
 public interface SitedtlService extends CrudService<Sitedtl> {
 

+ 3 - 1
fiveep-service/src/main/java/com/bizmatics/service/WcBlackoutPlanService.java

@@ -1,7 +1,9 @@
 package com.bizmatics.service;
 
+import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.common.mvc.base.CrudService;
 import com.bizmatics.model.WcBlackoutPlan;
+import com.bizmatics.model.vo.PlannedOutageVo;
 import com.bizmatics.model.vo.WcBlackoutPlanVo;
 
 import java.util.List;
@@ -20,5 +22,5 @@ public interface WcBlackoutPlanService extends CrudService<WcBlackoutPlan> {
 
     void plannedOutageDel(int id);
 
-    List<WcBlackoutPlanVo> plannedOutageList(String startTime, String endTime, int type, int id);
+    CommonPage<WcBlackoutPlanVo> plannedOutageList(PlannedOutageVo plannedOutageVo);
 }

+ 3 - 5
fiveep-service/src/main/java/com/bizmatics/service/impl/SitedtlServiceImpl.java

@@ -1,18 +1,16 @@
 package com.bizmatics.service.impl;
 
+import com.bizmatics.common.mvc.base.AbstractCrudService;
 import com.bizmatics.model.Sitedtl;
 import com.bizmatics.persistence.mapper.SitedtlMapper;
 import com.bizmatics.service.SitedtlService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
 import org.springframework.stereotype.Service;
 
 /**
- * <p>
- *  服务实现类
- * </p>
+ * 运维管理-现场档案
  *
  * @author ya
- * @since 2021-07-07
+ * @since 2021-10-26
  */
 @Service
 public class SitedtlServiceImpl extends AbstractCrudService<SitedtlMapper, Sitedtl> implements SitedtlService {

+ 13 - 3
fiveep-service/src/main/java/com/bizmatics/service/impl/WcBlackoutPlanServiceImpl.java

@@ -1,8 +1,11 @@
 package com.bizmatics.service.impl;
 
+import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.common.mvc.base.AbstractCrudService;
 import com.bizmatics.model.WcBlackoutPlan;
 import com.bizmatics.model.system.SysUser;
+import com.bizmatics.model.vo.CorrespondDeviceVO;
+import com.bizmatics.model.vo.PlannedOutageVo;
 import com.bizmatics.model.vo.WcBlackoutPlanVo;
 import com.bizmatics.persistence.mapper.WcBlackoutPlanMapper;
 import com.bizmatics.service.WcBlackoutPlanService;
@@ -44,8 +47,15 @@ public class WcBlackoutPlanServiceImpl extends AbstractCrudService<WcBlackoutPla
     }
 
     @Override
-    public List<WcBlackoutPlanVo> plannedOutageList(String startTime, String endTime, int type, int id) {
-        List<WcBlackoutPlanVo> plannedOutageList = baseMapper.plannedOutageList(startTime, endTime, type, id);
-        return plannedOutageList;
+    public CommonPage<WcBlackoutPlanVo> plannedOutageList(PlannedOutageVo plannedOutageVo) {
+        List<WcBlackoutPlanVo> wcBlackoutPlanVoListOne = baseMapper.plannedOutageList(plannedOutageVo.getStartTime(), plannedOutageVo.getEndTime(), plannedOutageVo.getType(), plannedOutageVo.getId(),plannedOutageVo.getSize(),null);
+        int total = 0;
+        if (wcBlackoutPlanVoListOne.size() > 0) {
+            total = wcBlackoutPlanVoListOne.size();
+        }
+        int startCurrent = (plannedOutageVo.getCurrent() - 1) * plannedOutageVo.getSize();
+
+        List<WcBlackoutPlanVo> plannedOutageList = baseMapper.plannedOutageList(plannedOutageVo.getStartTime(), plannedOutageVo.getEndTime(), plannedOutageVo.getType(), plannedOutageVo.getId(),plannedOutageVo.getSize(),startCurrent);
+        return new CommonPage<>(plannedOutageList, total, plannedOutageVo.getSize(), plannedOutageVo.getCurrent());
     }
 }