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

+ 0 - 17
src/main/java/com/goafanti/common/dao/TOrderTaskDetailsMapper.java

@@ -1,17 +0,0 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.TOrderTaskDetails;
-
-public interface TOrderTaskDetailsMapper {
-    int deleteByPrimaryKey(Integer tid);
-
-    int insert(TOrderTaskDetails record);
-
-    int insertSelective(TOrderTaskDetails record);
-
-    TOrderTaskDetails selectByPrimaryKey(Integer tid);
-
-    int updateByPrimaryKeySelective(TOrderTaskDetails record);
-
-    int updateByPrimaryKey(TOrderTaskDetails record);
-}

+ 0 - 58
src/main/java/com/goafanti/common/mapper/TOrderTaskDetailsMapper.xml

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.goafanti.common.dao.TOrderTaskDetailsMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderTaskDetails">
-    <id column="tid" jdbcType="INTEGER" property="tid" />
-    <result column="change" jdbcType="INTEGER" property="change" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    tid, `change`
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from t_order_task_details
-    where tid = #{tid,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    delete from t_order_task_details
-    where tid = #{tid,jdbcType=INTEGER}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.TOrderTaskDetails">
-    insert into t_order_task_details (tid, `change`)
-    values (#{tid,jdbcType=INTEGER}, #{change,jdbcType=INTEGER})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderTaskDetails">
-    insert into t_order_task_details
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="tid != null">
-        tid,
-      </if>
-      <if test="change != null">
-        `change`,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="tid != null">
-        #{tid,jdbcType=INTEGER},
-      </if>
-      <if test="change != null">
-        #{change,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTaskDetails">
-    update t_order_task_details
-    <set>
-      <if test="change != null">
-        `change` = #{change,jdbcType=INTEGER},
-      </if>
-    </set>
-    where tid = #{tid,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderTaskDetails">
-    update t_order_task_details
-    set `change` = #{change,jdbcType=INTEGER}
-    where tid = #{tid,jdbcType=INTEGER}
-  </update>
-</mapper>

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

@@ -41,6 +41,7 @@
     <result column="actual_profit" jdbcType="DECIMAL" property="actualProfit" />
     <result column="stop_type" jdbcType="INTEGER" property="stopType" />
     <result column="stop_status" jdbcType="INTEGER" property="stopStatus" />
+    <result column="change" jdbcType="INTEGER" property="change" />
   </resultMap>
   <sql id="Base_Column_List">
     id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day,
@@ -49,7 +50,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_type, stop_status
+    expect_profit, actual_profit, stop_type, stop_status, `change`
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -74,7 +75,8 @@
       patent_cost_actual, soft_cost, soft_cost_actual,
       audit_cost, audit_cost_actual, other_cost,
       other_cost_actual, expect_profit, actual_profit,
-      stop_type, stop_status)
+      stop_type, stop_status, `change`
+      )
     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},
@@ -87,7 +89,8 @@
       #{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},
-      #{stopType,jdbcType=INTEGER}, #{stopStatus,jdbcType=INTEGER})
+      #{stopType,jdbcType=INTEGER}, #{stopStatus,jdbcType=INTEGER}, #{change,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskMid" useGeneratedKeys="true">
     insert into t_task_mid
@@ -206,6 +209,9 @@
       <if test="stopStatus != null">
         stop_status,
       </if>
+      <if test="change != null">
+        `change`,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="tid != null">
@@ -322,6 +328,9 @@
       <if test="stopStatus != null">
         #{stopStatus,jdbcType=INTEGER},
       </if>
+      <if test="change != null">
+        #{change,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
@@ -441,6 +450,9 @@
       <if test="stopStatus != null">
         stop_status = #{stopStatus,jdbcType=INTEGER},
       </if>
+      <if test="change != null">
+        `change` = #{change,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -483,7 +495,8 @@
       expect_profit = #{expectProfit,jdbcType=DECIMAL},
       actual_profit = #{actualProfit,jdbcType=DECIMAL},
       stop_type = #{stopType,jdbcType=INTEGER},
-      stop_status = #{stopStatus,jdbcType=INTEGER}
+      stop_status = #{stopStatus,jdbcType=INTEGER},
+      `change` = #{change,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -493,10 +506,10 @@
     update t_task_mid
     set party_amount = party_amount
     <if test="type == 0">
-       + #{paymentAmount,jdbcType=DECIMAL}
+      + #{paymentAmount,jdbcType=DECIMAL}
     </if>
     <if test="type == 1">
-       - #{paymentAmount,jdbcType=DECIMAL}
+      - #{paymentAmount,jdbcType=DECIMAL}
     </if>
     where tid = #{tid,jdbcType=INTEGER}
   </update>
@@ -637,3 +650,5 @@
   </select>
 
 </mapper>
+
+        </mapper>

+ 0 - 42
src/main/java/com/goafanti/common/model/TOrderTaskDetails.java

@@ -1,42 +0,0 @@
-package com.goafanti.common.model;
-
-import java.io.Serializable;
-
-/**
- * t_order_task_details
- * @author
- */
-public class TOrderTaskDetails implements Serializable {
-    private Integer tid;
-
-    /**
-     * 变更新增项目 0否 1是
-     */
-    private Integer change;
-
-    private static final long serialVersionUID = 1L;
-
-    public TOrderTaskDetails(Integer tid, Integer change) {
-        this.tid=tid;
-        this.change=change;
-    }
-
-    public TOrderTaskDetails() {
-    }
-
-    public Integer getTid() {
-        return tid;
-    }
-
-    public void setTid(Integer tid) {
-        this.tid = tid;
-    }
-
-    public Integer getChange() {
-        return change;
-    }
-
-    public void setChange(Integer change) {
-        this.change = change;
-    }
-}

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

@@ -204,6 +204,11 @@ public class TTaskMid implements Serializable {
      */
     private Integer stopStatus;
 
+    /**
+     * 变更新增项目 0否 1是
+     */
+    private Integer change;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -517,6 +522,13 @@ public class TTaskMid implements Serializable {
     public void setStopStatus(Integer stopStatus) {
         this.stopStatus = stopStatus;
     }
+    public void setChange(Integer change) {
+        this.change = change;
+    }
+
+    public Integer getChange() {
+        return change;
+    }
 
     public TTaskMid(Integer tid, BigDecimal costAmount) {
         this.tid = tid;
@@ -525,4 +537,6 @@ public class TTaskMid implements Serializable {
     public TTaskMid() {
 
     }
+
+
 }

+ 2 - 18
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -12,6 +12,7 @@ import com.goafanti.admin.service.DepartmentService;
 import com.goafanti.common.dao.*;
 import com.goafanti.common.model.*;
 import com.goafanti.common.utils.OrderUtils;
+import com.goafanti.order.bo.*;
 import com.goafanti.order.enums.*;
 import com.goafanti.order.service.*;
 import com.goafanti.organization.bo.OrganizationListOut;
@@ -37,20 +38,6 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.bo.BillBo;
-import com.goafanti.order.bo.InputNewOrderRefund;
-import com.goafanti.order.bo.InputTChangeTask;
-import com.goafanti.order.bo.InvoiceBo;
-import com.goafanti.order.bo.NewOderCahngeListBo;
-import com.goafanti.order.bo.NewOrderChangeBo;
-import com.goafanti.order.bo.OrderChangeLogBo;
-import com.goafanti.order.bo.OutNewOrderDunBo;
-import com.goafanti.order.bo.OutNewOrderRefund;
-import com.goafanti.order.bo.TChangeDunOut;
-import com.goafanti.order.bo.TChangeTaskOut;
-import com.goafanti.order.bo.TOrderLogBo;
-import com.goafanti.order.bo.TOrderNewBo;
-import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.techproject.enums.TaskState;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -108,8 +95,6 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	private OrderProjectService orderProjectService;
 	@Autowired
 	private DepartmentMapper departmentMapper;
-	@Autowired
-	private TOrderTaskDetailsMapper tOrderTaskDetailsMapper;
 
 
 
@@ -1003,8 +988,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
 				if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
 				tOrderTaskMapper.insertSelective(ot);
-
-				tOrderTaskDetailsMapper.insertSelective(new TOrderTaskDetails(ot.getId(),1));
+				orderNewService.addTaskMid(ot.getId(),ot.getCommodityId(),ot.getOrderNo());
 				if (cd.getSplitStatus()==1){
 					map.put(cd.getId(),ot.getId());
 				}