Просмотр исходного кода

修改订单审核营销管理员

anderx лет назад: 3
Родитель
Сommit
10877fb0fe

+ 19 - 6
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -39,6 +39,7 @@
     <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="stop_type" jdbcType="INTEGER" property="stopType" />
     <result column="stop_status" jdbcType="INTEGER" property="stopStatus" />
   </resultMap>
   <sql id="Base_Column_List">
@@ -48,7 +49,7 @@
     dispatch_province, duty_dep, set_up_count, spot_check_count, fail_count, last_year,
     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, stop_status
+    expect_profit, actual_profit, stop_type, stop_status
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -73,7 +74,7 @@
       patent_cost_actual, soft_cost, soft_cost_actual,
       audit_cost, audit_cost_actual, other_cost,
       other_cost_actual, expect_profit, actual_profit,
-      stop_status)
+      stop_type, stop_status)
     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},
@@ -86,7 +87,7 @@
       #{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})
+      #{stopType,jdbcType=INTEGER}, #{stopStatus,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskMid" useGeneratedKeys="true">
     insert into t_task_mid
@@ -199,6 +200,9 @@
       <if test="actualProfit != null">
         actual_profit,
       </if>
+      <if test="stopType != null">
+        stop_type,
+      </if>
       <if test="stopStatus != null">
         stop_status,
       </if>
@@ -312,6 +316,9 @@
       <if test="actualProfit != null">
         #{actualProfit,jdbcType=DECIMAL},
       </if>
+      <if test="stopType != null">
+        #{stopType,jdbcType=INTEGER},
+      </if>
       <if test="stopStatus != null">
         #{stopStatus,jdbcType=INTEGER},
       </if>
@@ -428,6 +435,9 @@
       <if test="actualProfit != null">
         actual_profit = #{actualProfit,jdbcType=DECIMAL},
       </if>
+      <if test="stopType != null">
+        stop_type = #{stopType,jdbcType=INTEGER},
+      </if>
       <if test="stopStatus != null">
         stop_status = #{stopStatus,jdbcType=INTEGER},
       </if>
@@ -472,6 +482,7 @@
       other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
       expect_profit = #{expectProfit,jdbcType=DECIMAL},
       actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      stop_type = #{stopType,jdbcType=INTEGER},
       stop_status = #{stopStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -578,10 +589,12 @@
       <if test="lastYearIncome != null">
         last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
       </if>
-        <if test="stopStatus != null">
-          stop_status = #{stopStatus,jdbcType=INTEGER}
+      <if test="stopType != null">
+        stop_type = #{stopType,jdbcType=INTEGER},
+      </if>
+      <if test="stopStatus != null">
+        stop_status = #{stopStatus,jdbcType=INTEGER},
       </if>
-
     </set>
     where tid = #{tid,jdbcType=INTEGER}
   </update>

+ 14 - 1
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -195,7 +195,12 @@ public class TTaskMid implements Serializable {
     private BigDecimal actualProfit;
 
     /**
-     * 项目暂停状态 0否 1已发起
+     * 类型 0=项目暂停,1=项目重启
+     */
+    private Integer stopType;
+
+    /**
+     * 审核状态 0=发起,1=通过,2=拒绝
      */
     private Integer stopStatus;
 
@@ -497,6 +502,14 @@ public class TTaskMid implements Serializable {
         this.actualProfit = actualProfit;
     }
 
+    public Integer getStopType() {
+        return stopType;
+    }
+
+    public void setStopType(Integer stopType) {
+        this.stopType = stopType;
+    }
+
     public Integer getStopStatus() {
         return stopStatus;
     }

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

@@ -1489,10 +1489,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			taskStopLogMapper.insertSelective(log);
 			TTaskMid tt=new TTaskMid();
 			tt.setTid(id);
-			tt.setStopStatus(1);
+			tt.setStopStatus(0);
+			tt.setStopType(in.getType());
 			tTaskMidMapper.updateByTid(tt);
 		}
-
 		asyncUtils.addProjectSotpNotic(0, in.getType(),in.getIds(),null);
 		return 1;
 	}
@@ -1515,6 +1515,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		log.setCreateBy(adminId);
 		log.setCreateTime(date);
 		taskStopLogMapper.insertSelective(log);
+		TTaskMid tt=new TTaskMid();
+		tt.setTid(use.getTid());
+		tt.setStopStatus(0);
+		tTaskMidMapper.updateByTid(tt);
 		asyncUtils.addProjectSotpNotic(0, in.getType(),use.getTid().toString(),null);
 		return 1;
 	}
@@ -1582,10 +1586,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			task2.setId(task.getId());
 			task2.setProjectStatus(task.getProjectStatus());
 			tOrderTaskMapper.updateByPrimaryKeySelective(task2);
-			TTaskMid tt=new TTaskMid();
-			tt.setTid(use.getTid());
-			tt.setStopStatus(0);
-			tTaskMidMapper.updateByTid(tt);
 			TOrderMid tOrderMid = new TOrderMid();
 			tOrderMid.setOrderNo(task.getOrderNo());
 			tOrderMid.setStopProject(stopProject);
@@ -1602,6 +1602,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			t.setStatus(2);
 			examineProjectSotpAddNotice(task,2,use.getType());
 		}
+		TTaskMid tt=new TTaskMid();
+		tt.setTid(use.getTid());
+		tt.setStopStatus(in.getStatus());
+		tTaskMidMapper.updateByTid(tt);
 		TaskStopLog tsl=new TaskStopLog();
 		tsl.setTaskStopId(in.getTaskStopId());
 		tsl.setReason(in.getReason());