Kaynağa Gözat

修改项目进度计算逻辑修改,新增判空

anderx 1 yıl önce
ebeveyn
işleme
8b18536963

+ 4 - 4
src/main/java/com/goafanti/common/mapper/TaskDetailsLogMapper.xml

@@ -24,7 +24,7 @@
         <result property="rdBudgetRate" column="rd_budget_rate" jdbcType="NUMERIC"/>
         <result property="threeYearsRdBudgetRate" column="three_years_rd_budget_rate" jdbcType="NUMERIC"/>
         <result property="rdSalesAmount" column="rd_sales_amount" jdbcType="VARCHAR"/>
-        <result property="dataCycle" column="data_cycle" jdbcType="VARCHAR"/>
+        <result property="dataCycle" column="data_cycle" jdbcType="INTEGER"/>
         <result property="actualSalesAmount" column="actual_sales_amount" jdbcType="VARCHAR"/>
         <result property="actualRdNumber" column="actual_rd_number" jdbcType="INTEGER"/>
         <result property="actualOutsourcingNumber" column="actual_outsourcing_number" jdbcType="INTEGER"/>
@@ -299,7 +299,7 @@ create_time = values(create_time)
             <if test="rdSalesAmount != null">
                 rd_sales_amount = #{rdSalesAmount},
             </if>
-            <if test="dataCycle != null and dataCycle != ''">
+            <if test="dataCycle != null">
                 data_cycle = #{dataCycle},
             </if>
             <if test="actualSalesAmount != null">
@@ -604,7 +604,7 @@ create_time = values(create_time)
             <if test="rdSalesAmount != null">
                 and rd_sales_amount = #{rdSalesAmount}
             </if>
-            <if test="dataCycle != null and dataCycle != ''">
+            <if test="dataCycle != null">
                 and data_cycle = #{dataCycle}
             </if>
             <if test="actualSalesAmount != null">
@@ -909,7 +909,7 @@ create_time = values(create_time)
             <if test="rdSalesAmount != null">
                 and rd_sales_amount = #{rdSalesAmount}
             </if>
-            <if test="dataCycle != null and dataCycle != ''">
+            <if test="dataCycle != null">
                 and data_cycle = #{dataCycle}
             </if>
             <if test="actualSalesAmount != null">

+ 4 - 4
src/main/java/com/goafanti/common/mapper/TaskDetailsMapper.xml

@@ -24,7 +24,7 @@
         <result property="rdBudgetRate" column="rd_budget_rate" jdbcType="NUMERIC"/>
         <result property="threeYearsRdBudgetRate" column="three_years_rd_budget_rate" jdbcType="NUMERIC"/>
         <result property="rdSalesAmount" column="rd_sales_amount" jdbcType="VARCHAR"/>
-        <result property="dataCycle" column="data_cycle" jdbcType="VARCHAR"/>
+        <result property="dataCycle" column="data_cycle" jdbcType="INTEGER"/>
         <result property="actualSalesAmount" column="actual_sales_amount" jdbcType="VARCHAR"/>
         <result property="actualRdNumber" column="actual_rd_number" jdbcType="INTEGER"/>
         <result property="actualOutsourcingNumber" column="actual_outsourcing_number" jdbcType="INTEGER"/>
@@ -301,7 +301,7 @@ create_time = values(create_time)
             <if test="rdSalesAmount != null">
                 rd_sales_amount = #{rdSalesAmount},
             </if>
-            <if test="dataCycle != null and dataCycle != ''">
+            <if test="dataCycle != null">
                 data_cycle = #{dataCycle},
             </if>
             <if test="actualSalesAmount != null">
@@ -609,7 +609,7 @@ create_time = values(create_time)
             <if test="rdSalesAmount != null">
                 and rd_sales_amount = #{rdSalesAmount}
             </if>
-            <if test="dataCycle != null and dataCycle != ''">
+            <if test="dataCycle != null">
                 and data_cycle = #{dataCycle}
             </if>
             <if test="actualSalesAmount != null">
@@ -917,7 +917,7 @@ create_time = values(create_time)
             <if test="rdSalesAmount != null">
                 and rd_sales_amount = #{rdSalesAmount}
             </if>
-            <if test="dataCycle != null and dataCycle != ''">
+            <if test="dataCycle != null">
                 and data_cycle = #{dataCycle}
             </if>
             <if test="actualSalesAmount != null">

+ 6 - 9
src/main/java/com/goafanti/common/model/TaskDetails.java

@@ -1,7 +1,5 @@
 package com.goafanti.common.model;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
-
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
@@ -11,10 +9,10 @@ import java.util.Date;
  * 项目申报详情(TaskDetails)实体类
  *
  * @author makejava
- * @since 2025-01-08 17:00:21
+ * @since 2025-01-09 09:58:37
  */
 public class TaskDetails implements Serializable {
-    private static final long serialVersionUID = -45589086664775730L;
+    private static final long serialVersionUID = -30309793401305115L;
 
     private Integer id;
 /**
@@ -100,7 +98,7 @@ public class TaskDetails implements Serializable {
 /**
      * 数据周期 0=第一季度,1=上半年,2=前三季度,3=全年
      */
-    private String dataCycle;
+    private Integer dataCycle;
 /**
      * 实际销售额
      */
@@ -579,11 +577,11 @@ public class TaskDetails implements Serializable {
         this.rdSalesAmount = rdSalesAmount;
     }
 
-    public String getDataCycle() {
+    public Integer getDataCycle() {
         return dataCycle;
     }
 
-    public void setDataCycle(String dataCycle) {
+    public void setDataCycle(Integer dataCycle) {
         this.dataCycle = dataCycle;
     }
 
@@ -1178,7 +1176,7 @@ public class TaskDetails implements Serializable {
     public void setRemarks(String remarks) {
         this.remarks = remarks;
     }
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+
     public Date getUpdateTime() {
         return updateTime;
     }
@@ -1195,7 +1193,6 @@ public class TaskDetails implements Serializable {
         this.downloadTime = downloadTime;
     }
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     public Date getCreateTime() {
         return createTime;
     }

+ 5 - 5
src/main/java/com/goafanti/common/model/TaskDetailsLog.java

@@ -9,10 +9,10 @@ import java.util.Date;
  * 项目申报详情日志(TaskDetailsLog)实体类
  *
  * @author makejava
- * @since 2025-01-08 17:00:27
+ * @since 2025-01-09 09:58:44
  */
 public class TaskDetailsLog implements Serializable {
-    private static final long serialVersionUID = 235148310992838950L;
+    private static final long serialVersionUID = -49067883905913137L;
 
     private Integer id;
 /**
@@ -98,7 +98,7 @@ public class TaskDetailsLog implements Serializable {
 /**
      * 数据周期 0=第一季度,1=上半年,2=前三季度,3=全年
      */
-    private String dataCycle;
+    private Integer dataCycle;
 /**
      * 实际销售额
      */
@@ -573,11 +573,11 @@ public class TaskDetailsLog implements Serializable {
         this.rdSalesAmount = rdSalesAmount;
     }
 
-    public String getDataCycle() {
+    public Integer getDataCycle() {
         return dataCycle;
     }
 
-    public void setDataCycle(String dataCycle) {
+    public void setDataCycle(Integer dataCycle) {
         this.dataCycle = dataCycle;
     }