zhaoyun hace 3 meses
padre
commit
8c4385afe6

+ 4 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmBranchLine.java

@@ -232,6 +232,10 @@ public class PdmBranchLine extends BaseEntity
     private  String faultFreeDuration;
     @Excel(name = "停电次数 ", width = 30)
     private Long poweroffNum;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date faultPoweroffTm;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date poweroffTm;
 
     /** 最新更新时间  */
     @JsonFormat(pattern = "yyyy-MM-dd")

+ 6 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmLine.java

@@ -2,6 +2,7 @@ package com.ruoyi.powerdistribution.domain;
 
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2024-12-24
  */
+@Data
 public class PdmLine extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -123,6 +125,10 @@ public class PdmLine extends BaseEntity
     /** 数据日期  */
     @Excel(name = "数据日期 ")
     private String dataDt;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date faultPoweroffTm;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date poweroffTm;
 
     /** etl时间戳  */
     @JsonFormat(pattern = "yyyy-MM-dd")

+ 2 - 2
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmBranchLineMapper.xml

@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectPdmBranchLineVo">
         select id, big_feeder_branch_line_id, line_nm, eqp_no, run_no, blg_big_feeder_id, blg_big_feeder_nm, volt_lvl_cd, volt_lvl_dsc, erect_mode_cd, erect_mode_dsc, overhd_line_len, cable_line_len, line_tol_len, start_eqp_id, start_eqp_nm, start_eqp_typ_cd, start_eqp_typ_dsc, line_nature_cd, line_nature_dsc, blg_super_line_id, blg_super_line_nm, blg_city_id, blg_city_nm, op_maint_org_id, op_maint_org_nm, maint_team_id, maint_team_nm, run_st_cd, run_st_dsc, release_st_dsc, repmaint_line_len, is_have_figur, std_eqp_master_id, std_eqp_master_nm, ship_dt, std_org_no, std_org_nm, SUBSTRING_INDEX(std_city_org_nm, '国网湖南省电力有限公司', -1)std_city_org_nm , std_county_org_no, SUBSTRING_INDEX(std_county_org_nm, '国网湖南省电力有限公司', -1)std_county_org_nm, data_dt, etl_tm, std_city_org_no, start_pos, eqp_master_id, eqp_master_nm, battalion_id, battalion_nm, retrogres_dt, create_tm, latest_upd_tm,bouns as reward_amount,fault_free_duration
-        , (SELECT count(1) from ads_cst_hywzqlc_pdmstopbranchrecords_df t1 where t1.branch_line_id=t.big_feeder_branch_line_id)poweroff_num
+        , (SELECT count(1) from ads_cst_hywzqlc_pdmstopbranchrecords_df t1 where t1.branch_line_id=t.big_feeder_branch_line_id)poweroff_num, t.fault_poweroff_tm,t.poweroff_tm
         from pdm_branch_line t
     </sql>
 
@@ -309,7 +309,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </delete>
 
-    <select id="selectBranchLineCompleteList" parameterType="com.ruoyi.powerdistribution.domain.vo.PdmBranchLineComplete" resultType="com.ruoyi.powerdistribution.domain.vo.PdmBranchLineComplete">
+    <select id="selectBranchLineCompleteList" parameterType="com.ruoyi.powerdistribution.domain.vo.PdmBranchLineComplete" resultType="com.ruoyi.powerdistribution.domain.PdmBranchLine">
         <include refid="selectPdmBranchLineVo"/>
         <where>
             <if test="lineNm != null  and lineNm != ''"> and line_nm like concat('%', #{lineNm}, '%')</if>

+ 2 - 1
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmLineMapper.xml

@@ -191,7 +191,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         t1.maint_team_id, t1.maint_team_nm, t1.org_no, t1.org_nm, t1.std_creator_no, t1.std_creator_nm,
         t1.std_updator_no, t1.std_updator_nm, t1.std_org_no, t1.std_org_nm, t1.std_city_org_no,
         SUBSTRING_INDEX(t1.std_city_org_nm, '国网湖南省电力有限公司', -1)std_city_org_nm, t1.std_county_org_no, SUBSTRING_INDEX(t1.std_county_org_nm, '国网湖南省电力有限公司', -1) std_county_org_nm, t1.data_dt, t1.etl_tm,t1.bouns as reward_amount,t1.fault_free_duration,
-        (SELECT count(1) from ads_cst_hywzqlc_pdmstoprecords_df where line_id=t1.rec_id)poweroff_num
+        (SELECT count(1) from ads_cst_hywzqlc_pdmstoprecords_df where line_id=t1.rec_id)poweroff_num,
+        t1.fault_poweroff_tm,t1.poweroff_tm
         from pdm_line t1
         <where>
             <if test="recId != null  and recId != ''"> and t1.rec_id = #{recId}</if>