Procházet zdrojové kódy

工程量新增字段-批次类型

zx před 1 měsícem
rodič
revize
5914e9bf4b

binární
ruoyi-admin/src/main/resources/excelTemplate/workComple.xlsx


+ 18 - 1
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmWorkCompleStatistics.java

@@ -271,6 +271,11 @@ public class PdmWorkCompleStatistics extends BaseEntity
     @Excel(name = "作业总数")
     private BigDecimal workTotal;
 
+    /**
+     * 批次类型
+     */
+    private String batchType;
+
     public void setBatchId(String batchId)
     {
         this.batchId = batchId;
@@ -841,6 +846,14 @@ public class PdmWorkCompleStatistics extends BaseEntity
         this.poleTabAccuQtExcType = poleTabAccuQtExcType;
     }
 
+    public String getBatchType() {
+        return batchType;
+    }
+
+    public void setBatchType(String batchType) {
+        this.batchType = batchType;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -924,6 +937,10 @@ public class PdmWorkCompleStatistics extends BaseEntity
         }else if("30".equals(workComple.getProCategory())){
             workComple.setProCategory("技改");
         }
-
+        if("00".equals(workComple.getBatchType())){
+            workComple.setBatchType("默认");
+        }else if("30".equals(workComple.getBatchType())){
+            workComple.setBatchType("业扩");
+        }
     }
 }

+ 13 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmWorkCompleStatisticsTmp.java

@@ -155,6 +155,11 @@ public class PdmWorkCompleStatisticsTmp extends BaseEntity
     @Excel(name = "处理状态 0未处理 1已处理")
     private String dealStatus;
 
+    /**
+     * 批次类型
+     */
+    private String batchType;
+
     public void setBatchId(String batchId)
     {
         this.batchId = batchId;
@@ -471,6 +476,14 @@ public class PdmWorkCompleStatisticsTmp extends BaseEntity
         return dealStatus;
     }
 
+    public String getBatchType() {
+        return batchType;
+    }
+
+    public void setBatchType(String batchType) {
+        this.batchType = batchType;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 1 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmWorkCompleStatisticsServiceImpl.java

@@ -167,6 +167,7 @@ public class PdmWorkCompleStatisticsServiceImpl implements IPdmWorkCompleStatist
      * @param tmp
      */
     private void setWorkCompleData(PdmWorkCompleStatistics work,PdmWorkCompleStatisticsTmp tmp){
+        work.setBatchType(tmp.getBatchType());
 
         if(work.getLineCableNewAccuQt().compareTo(tmp.getLineCableNewAccuQt())!=0){
             work.setLineCableNewAccuQtWeek(tmp.getLineCableNewAccuQt().subtract(work.getLineCableNewAccuQt()));

+ 6 - 3
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmWorkCompleStatisticsMapper.xml

@@ -62,7 +62,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="poleTabAccuQtWorkWeek"    column="pole_tab_accu_qt_work_week"    />
         <result property="excType"    column="exc_type"    />
         <result property="workTotal"  column="work_total"    />
-
         <result property="lineCableNewAccuQtExcType"  column="line_cable_new_accu_qt_exc_type"    />
         <result property="lineOverhdNewAccuQtExcType"  column="line_overhd_new_accu_qt_exc_type"    />
         <result property="distTransNewAccuQtExcType"  column="dist_trans_new_accu_qt_exc_type"    />
@@ -70,12 +69,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="towerAccuQtExcType"  column="tower_accu_qt_exc_type"    />
         <result property="ringCabinetAccuQtExcType"  column="ring_cabinet_accu_qt_exc_type"    />
         <result property="poleTabAccuQtExcType"  column="pole_tab_accu_qt_exc_type"    />
-
+        <result property="batchType"  column="batch_type"    />
     </resultMap>
 
     <sql id="selectPdmWorkCompleStatisticsVo">
         select batch_id, batch_name, batch_code, plan_year, id, pro_code, pro_name, sort_serial, small_village_name, village_name, complete_flag, pro_category, line_cable_new_plan_qt, line_cable_new_accu_qt, line_overhd_new_plan_qt, line_overhd_new_accu_qt, dist_trans_new_plan_qt, dist_trans_new_accu_qt, low_volt_line_plan_qt, low_volt_line_accu_qt, tower_plan_qt, tower_accu_qt, ring_cabinet_plan_qt, ring_cabinet_accu_qt, pole_tab_plan_qt, pole_tab_accu_qt, std_org_no, std_org_nm, std_city_org_no, std_city_org_nm, std_county_org_no, std_county_org_nm, data_dt, etl_tm, line_cable_new_accu_qt_week, line_overhd_new_accu_qt_week, dist_trans_new_accu_qt_week, low_volt_line_accu_qt_week, tower_accu_qt_week, ring_cabinet_accu_qt_week, pole_tab_accu_qt_week, line_cable_new_accu_qt_work, line_overhd_new_accu_qt_work, dist_trans_new_accu_qt_work, low_volt_line_accu_qt_work, tower_accu_qt_work, ring_cabinet_accu_qt_work, pole_tab_accu_qt_work, line_cable_new_accu_qt_work_week, line_overhd_new_accu_qt_work_week, dist_trans_new_accu_qt_work_week, low_volt_line_accu_qt_work_week, tower_accu_qt_work_week, ring_cabinet_accu_qt_work_week, pole_tab_accu_qt_work_week, exc_type,work_total,
-               line_cable_new_accu_qt_exc_type,line_overhd_new_accu_qt_exc_type,dist_trans_new_accu_qt_exc_type,low_volt_line_accu_qt_exc_type,tower_accu_qt_exc_type,ring_cabinet_accu_qt_exc_type,pole_tab_accu_qt_exc_type
+               line_cable_new_accu_qt_exc_type,line_overhd_new_accu_qt_exc_type,dist_trans_new_accu_qt_exc_type,low_volt_line_accu_qt_exc_type,tower_accu_qt_exc_type,ring_cabinet_accu_qt_exc_type,pole_tab_accu_qt_exc_type,batch_type
                from pdm_work_comple_statistics
     </sql>
 
@@ -137,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ringCabinetAccuQtWorkWeek != null "> and ring_cabinet_accu_qt_work_week = #{ringCabinetAccuQtWorkWeek}</if>
             <if test="poleTabAccuQtWorkWeek != null "> and pole_tab_accu_qt_work_week = #{poleTabAccuQtWorkWeek}</if>
             <if test="excType != null  and excType != ''"> and exc_type = #{excType}</if>
+            <if test="batchType != null  and batchType != ''"> and batch_type = #{batchType}</if>
         </where>
     </select>
 
@@ -212,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="towerAccuQtExcType != null">tower_accu_qt_exc_type,</if>
             <if test="ringCabinetAccuQtExcType != null">ring_cabinet_accu_qt_exc_type,</if>
             <if test="poleTabAccuQtExcType != null">pole_tab_accu_qt_exc_type,</if>
+            <if test="batchType != null">batch_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="batchId != null">#{batchId},</if>
@@ -278,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="towerAccuQtExcType != null">#{towerAccuQtExcType},</if>
             <if test="ringCabinetAccuQtExcType != null">#{ringCabinetAccuQtExcType},</if>
             <if test="poleTabAccuQtExcType != null">#{poleTabAccuQtExcType},</if>
+            <if test="batchType != null">#{batchType},</if>
          </trim>
     </insert>
 
@@ -348,6 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="towerAccuQtExcType != null">tower_accu_qt_exc_type = #{towerAccuQtExcType},</if>
             <if test="ringCabinetAccuQtExcType != null">ring_cabinet_accu_qt_exc_type = #{ringCabinetAccuQtExcType},</if>
             <if test="poleTabAccuQtExcType != null">pole_tab_accu_qt_exc_type = #{poleTabAccuQtExcType},</if>
+            <if test="batchType != null">batch_type = #{batchType},</if>
         </trim>
         where id = #{id}
     </update>

+ 3 - 1
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmWorkCompleStatisticsTmpMapper.xml

@@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="dataDt"    column="data_dt"    />
         <result property="etlTm"    column="etl_tm"    />
         <result property="dealStatus"    column="deal_status"    />
+        <result property="batchType"  column="batch_type"    />
     </resultMap>
 
     <sql id="selectPdmWorkCompleStatisticsTmpVo">
@@ -51,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                tower_plan_qt, IFNULL(tower_accu_qt,0) tower_accu_qt,
                ring_cabinet_plan_qt, IFNULL(ring_cabinet_accu_qt,0) ring_cabinet_accu_qt,
                pole_tab_plan_qt, IFNULL(pole_tab_accu_qt,0) pole_tab_accu_qt,
-               std_org_no, std_org_nm, std_city_org_no, std_city_org_nm, std_county_org_no, std_county_org_nm, data_dt, etl_tm, deal_status
+               std_org_no, std_org_nm, std_city_org_no, std_city_org_nm, std_county_org_no, std_county_org_nm, data_dt, etl_tm, deal_status,batch_type
         from ads_cst_hygszdbb_pdmworkcomplestatistics_wf
     </sql>
 
@@ -92,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dataDt != null  and dataDt != ''"> and data_dt = #{dataDt}</if>
             <if test="etlTm != null  and etlTm != ''"> and etl_tm = #{etlTm}</if>
             <if test="dealStatus != null  and dealStatus != ''"> and deal_status = #{dealStatus}</if>
+            <if test="batchType != null  and batchType != ''"> and batchType = #{batch_type}</if>
         </where>
     </select>