Browse Source

审核接口开发

anderx 3 years ago
parent
commit
2c42c900ab

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

@@ -28,13 +28,27 @@
     <result column="last_year" jdbcType="VARCHAR" property="lastYear" />
     <result column="last_year_capital" jdbcType="DECIMAL" property="lastYearCapital" />
     <result column="last_year_income" jdbcType="DECIMAL" property="lastYearIncome" />
+    <result column="cost_actual" jdbcType="DECIMAL" property="costActual" />
+    <result column="patent_cost" jdbcType="DECIMAL" property="patentCost" />
+    <result column="patent_cost_actual" jdbcType="DECIMAL" property="patentCostActual" />
+    <result column="soft_cost" jdbcType="DECIMAL" property="softCost" />
+    <result column="soft_cost_actual" jdbcType="DECIMAL" property="softCostActual" />
+    <result column="audit_cost" jdbcType="DECIMAL" property="auditCost" />
+    <result column="audit_cost_actual" jdbcType="DECIMAL" property="auditCostActual" />
+    <result column="other_cost" jdbcType="DECIMAL" property="otherCost" />
+    <result column="other_cost_actual" jdbcType="DECIMAL" property="otherCostActual" />
+    <result column="expect_profit" jdbcType="DECIMAL" property="expectProfit" />
+    <result column="actual_profit" jdbcType="DECIMAL" property="actualProfit" />
+    <result column="stopStatus" jdbcType="INTEGER" property="stopstatus" />
   </resultMap>
   <sql id="Base_Column_List">
     id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day,
     if_material, reject_count, accept_count, end_count, authorize_count, apply_count,
     high_new_retrial, dispatch_count, stock_count, complete_count, promulgate_count,
     dispatch_province, duty_dep, set_up_count, spot_check_count, fail_count, last_year,
-    last_year_capital, last_year_income
+    last_year_capital, last_year_income, cost_actual, patent_cost, patent_cost_actual,
+    soft_cost, soft_cost_actual, audit_cost, audit_cost_actual, other_cost, other_cost_actual,
+    expect_profit, actual_profit, stopStatus
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -55,7 +69,11 @@
       complete_count, promulgate_count, dispatch_province,
       duty_dep, set_up_count, spot_check_count,
       fail_count, last_year, last_year_capital,
-      last_year_income)
+      last_year_income, cost_actual, patent_cost,
+      patent_cost_actual, soft_cost, soft_cost_actual,
+      audit_cost, audit_cost_actual, other_cost,
+      other_cost_actual, expect_profit, actual_profit,
+      stopStatus)
     values (#{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, #{partyAmount,jdbcType=DECIMAL},
       #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}, #{urgentDay,jdbcType=INTEGER},
       #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER}, #{acceptCount,jdbcType=INTEGER},
@@ -64,7 +82,11 @@
       #{completeCount,jdbcType=INTEGER}, #{promulgateCount,jdbcType=INTEGER}, #{dispatchProvince,jdbcType=INTEGER},
       #{dutyDep,jdbcType=VARCHAR}, #{setUpCount,jdbcType=INTEGER}, #{spotCheckCount,jdbcType=INTEGER},
       #{failCount,jdbcType=INTEGER}, #{lastYear,jdbcType=VARCHAR}, #{lastYearCapital,jdbcType=DECIMAL},
-      #{lastYearIncome,jdbcType=DECIMAL})
+      #{lastYearIncome,jdbcType=DECIMAL}, #{costActual,jdbcType=DECIMAL}, #{patentCost,jdbcType=DECIMAL},
+      #{patentCostActual,jdbcType=DECIMAL}, #{softCost,jdbcType=DECIMAL}, #{softCostActual,jdbcType=DECIMAL},
+      #{auditCost,jdbcType=DECIMAL}, #{auditCostActual,jdbcType=DECIMAL}, #{otherCost,jdbcType=DECIMAL},
+      #{otherCostActual,jdbcType=DECIMAL}, #{expectProfit,jdbcType=DECIMAL}, #{actualProfit,jdbcType=DECIMAL},
+      #{stopstatus,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskMid" useGeneratedKeys="true">
     insert into t_task_mid
@@ -144,6 +166,42 @@
       <if test="lastYearIncome != null">
         last_year_income,
       </if>
+      <if test="costActual != null">
+        cost_actual,
+      </if>
+      <if test="patentCost != null">
+        patent_cost,
+      </if>
+      <if test="patentCostActual != null">
+        patent_cost_actual,
+      </if>
+      <if test="softCost != null">
+        soft_cost,
+      </if>
+      <if test="softCostActual != null">
+        soft_cost_actual,
+      </if>
+      <if test="auditCost != null">
+        audit_cost,
+      </if>
+      <if test="auditCostActual != null">
+        audit_cost_actual,
+      </if>
+      <if test="otherCost != null">
+        other_cost,
+      </if>
+      <if test="otherCostActual != null">
+        other_cost_actual,
+      </if>
+      <if test="expectProfit != null">
+        expect_profit,
+      </if>
+      <if test="actualProfit != null">
+        actual_profit,
+      </if>
+      <if test="stopstatus != null">
+        stopStatus,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="tid != null">
@@ -221,6 +279,42 @@
       <if test="lastYearIncome != null">
         #{lastYearIncome,jdbcType=DECIMAL},
       </if>
+      <if test="costActual != null">
+        #{costActual,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCost != null">
+        #{patentCost,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCostActual != null">
+        #{patentCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="softCost != null">
+        #{softCost,jdbcType=DECIMAL},
+      </if>
+      <if test="softCostActual != null">
+        #{softCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCost != null">
+        #{auditCost,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCostActual != null">
+        #{auditCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCost != null">
+        #{otherCost,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCostActual != null">
+        #{otherCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="expectProfit != null">
+        #{expectProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="actualProfit != null">
+        #{actualProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="stopstatus != null">
+        #{stopstatus,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
@@ -301,6 +395,42 @@
       <if test="lastYearIncome != null">
         last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
       </if>
+      <if test="costActual != null">
+        cost_actual = #{costActual,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCost != null">
+        patent_cost = #{patentCost,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCostActual != null">
+        patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="softCost != null">
+        soft_cost = #{softCost,jdbcType=DECIMAL},
+      </if>
+      <if test="softCostActual != null">
+        soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCost != null">
+        audit_cost = #{auditCost,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCostActual != null">
+        audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCost != null">
+        other_cost = #{otherCost,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCostActual != null">
+        other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="expectProfit != null">
+        expect_profit = #{expectProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="actualProfit != null">
+        actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="stopstatus != null">
+        stopStatus = #{stopstatus,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -330,7 +460,19 @@
       fail_count = #{failCount,jdbcType=INTEGER},
       last_year = #{lastYear,jdbcType=VARCHAR},
       last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
-      last_year_income = #{lastYearIncome,jdbcType=DECIMAL}
+      last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
+      cost_actual = #{costActual,jdbcType=DECIMAL},
+      patent_cost = #{patentCost,jdbcType=DECIMAL},
+      patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
+      soft_cost = #{softCost,jdbcType=DECIMAL},
+      soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
+      audit_cost = #{auditCost,jdbcType=DECIMAL},
+      audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
+      other_cost = #{otherCost,jdbcType=DECIMAL},
+      other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
+      expect_profit = #{expectProfit,jdbcType=DECIMAL},
+      actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      stopStatus = #{stopstatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 157 - 0
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -139,6 +139,66 @@ public class TTaskMid implements Serializable {
      */
     private BigDecimal lastYearIncome;
 
+    /**
+     * 成本实付
+     */
+    private BigDecimal costActual;
+
+    /**
+     * 专利成本
+     */
+    private BigDecimal patentCost;
+
+    /**
+     * 专利成本实付
+     */
+    private BigDecimal patentCostActual;
+
+    /**
+     * 软著成本
+     */
+    private BigDecimal softCost;
+
+    /**
+     * 软著成本实付
+     */
+    private BigDecimal softCostActual;
+
+    /**
+     * 审计成本
+     */
+    private BigDecimal auditCost;
+
+    /**
+     * 审计成本实付
+     */
+    private BigDecimal auditCostActual;
+
+    /**
+     * 其他成本
+     */
+    private BigDecimal otherCost;
+
+    /**
+     * 其他成本实付
+     */
+    private BigDecimal otherCostActual;
+
+    /**
+     * 预计毛利
+     */
+    private BigDecimal expectProfit;
+
+    /**
+     * 实际毛利
+     */
+    private BigDecimal actualProfit;
+
+    /**
+     * 项目暂停状态 0否 1已发起
+     */
+    private Integer stopstatus;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -349,6 +409,103 @@ public class TTaskMid implements Serializable {
         this.lastYearIncome = lastYearIncome;
     }
 
+    public BigDecimal getCostActual() {
+        return costActual;
+    }
+
+    public void setCostActual(BigDecimal costActual) {
+        this.costActual = costActual;
+    }
+
+    public BigDecimal getPatentCost() {
+        return patentCost;
+    }
+
+    public void setPatentCost(BigDecimal patentCost) {
+        this.patentCost = patentCost;
+    }
+
+    public BigDecimal getPatentCostActual() {
+        return patentCostActual;
+    }
+
+    public void setPatentCostActual(BigDecimal patentCostActual) {
+        this.patentCostActual = patentCostActual;
+    }
+
+    public BigDecimal getSoftCost() {
+        return softCost;
+    }
+
+    public void setSoftCost(BigDecimal softCost) {
+        this.softCost = softCost;
+    }
+
+    public BigDecimal getSoftCostActual() {
+        return softCostActual;
+    }
+
+    public void setSoftCostActual(BigDecimal softCostActual) {
+        this.softCostActual = softCostActual;
+    }
+
+    public BigDecimal getAuditCost() {
+        return auditCost;
+    }
+
+    public void setAuditCost(BigDecimal auditCost) {
+        this.auditCost = auditCost;
+    }
+
+    public BigDecimal getAuditCostActual() {
+        return auditCostActual;
+    }
+
+    public void setAuditCostActual(BigDecimal auditCostActual) {
+        this.auditCostActual = auditCostActual;
+    }
+
+    public BigDecimal getOtherCost() {
+        return otherCost;
+    }
+
+    public void setOtherCost(BigDecimal otherCost) {
+        this.otherCost = otherCost;
+    }
+
+    public BigDecimal getOtherCostActual() {
+        return otherCostActual;
+    }
+
+    public void setOtherCostActual(BigDecimal otherCostActual) {
+        this.otherCostActual = otherCostActual;
+    }
+
+    public BigDecimal getExpectProfit() {
+        return expectProfit;
+    }
+
+    public void setExpectProfit(BigDecimal expectProfit) {
+        this.expectProfit = expectProfit;
+    }
+
+    public BigDecimal getActualProfit() {
+        return actualProfit;
+    }
+
+    public void setActualProfit(BigDecimal actualProfit) {
+        this.actualProfit = actualProfit;
+    }
+
+    public Integer getStopstatus() {
+        return stopstatus;
+    }
+
+    public void setStopstatus(Integer stopstatus) {
+        this.stopstatus = stopstatus;
+    }
+
+
     public TTaskMid(Integer tid, BigDecimal costAmount) {
         this.tid = tid;
         this.costAmount = costAmount;

+ 10 - 1
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1468,7 +1468,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				throw new BusinessException(String.format("项目[%s]暂停流程已存在,请先走完流程",id));
 			}
 			TaskSopt taskSopt = new TaskSopt();
-			taskSopt.setTid(Integer.valueOf(s));
+			taskSopt.setTid(id);
 			taskSopt.setType(in.getType());
 			taskSopt.setStatus(0);
 			taskSopt.setReason(in.getReason());
@@ -1482,7 +1482,12 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			log.setCreateBy(adminId);
 			log.setCreateTime(date);
 			taskSoptLogMapper.insertSelective(log);
+			TTaskMid tt=new TTaskMid();
+			tt.setTid(id);
+			tt.setStopstatus(1);
+			tTaskMidMapper.updateByTid(tt);
 		}
+
 		asyncUtils.addProjectSotpNotic(0, in.getType(),in.getIds(),null);
 		return 1;
 	}
@@ -1570,6 +1575,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			task2.setId(task.getId());
 			task2.setProjectStatus(NewProjectStatus.ZT.getCode());
 			tOrderTaskMapper.updateByPrimaryKeySelective(task2);
+			TTaskMid tt=new TTaskMid();
+			tt.setTid(use.getTid());
+			tt.setStopstatus(0);
+			tTaskMidMapper.updateByTid(tt);
 		}else if(in.getStatus()==2) {
 			t.setStatus(2);
 		}