Browse Source

财务付款设置其他的金额

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
761cffd526

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
     <javaClientGenerator  targetPackage="com.goafanti.common.dao"  type="XMLMAPPER" targetProject="kede-server"  />
-    <table schema="aft" tableName="financial_payment"/>
+    <table schema="aft" tableName="t_task_mid"/>
   </context>
 </generatorConfiguration>

+ 96 - 0
src/main/java/com/goafanti/common/dao/TTaskMidMapper.java

@@ -0,0 +1,96 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TTaskMid;
+import com.goafanti.common.model.TTaskMidExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TTaskMidMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    long countByExample(TTaskMidExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int deleteByExample(TTaskMidExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int insert(TTaskMid record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int insertSelective(TTaskMid record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    List<TTaskMid> selectByExample(TTaskMidExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    TTaskMid selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int updateByExampleSelective(@Param("record") TTaskMid record, @Param("example") TTaskMidExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int updateByExample(@Param("record") TTaskMid record, @Param("example") TTaskMidExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int updateByPrimaryKeySelective(TTaskMid record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    int updateByPrimaryKey(TTaskMid record);
+}

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

@@ -296,7 +296,9 @@
   </select>
   
   <select id="updateOrderCost">
-  update t_order_mid x ,(select a.id,b.order_no from t_order_payment a left join t_order_task b on a.tid=b.id 
-	where a.id=#{pid})y set x.cost_amount= x.cost_amount+#{partyAmount}	where x.order_no=y.order_no
+  update t_order_mid x ,(select a.id,a.tid,b.order_no from t_order_payment a left join t_order_task b on a.tid=b.id 
+	where a.id=#{pid})y,t_task_mid z set x.cost_amount= x.cost_amount+ #{partyAmount}, z.party_amount=z.party_amount+ #{partyAmount}
+  where x.order_no=y.order_no and y.tid=z.tid
   </select>
+  
 </mapper>

+ 3 - 3
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1422,15 +1422,15 @@
   
   
    <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
-  	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
+	  	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
 a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
 e.approval,l.refund_status outsourceStatus,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
-ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType
+ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType,ttm.cost_amount costAmount,ttm.party_amount partyAmount
     from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id 
   	left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
     left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress 
     group by task_id) i on a.id=i.task_id left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
-    on a.id=l.tid where  e.delete_sign in (0,2,3)  and e.order_status in (2,4) 
+    on a.id=l.tid  left join t_task_mid ttm  on a.id=ttm.tid where  e.delete_sign in (0,2,3)  and e.order_status in (2,4) 
     and a.outsource= #{outsource,jdbcType=INTEGER}
     <if test="role == 0 ">
     and a.task_receiver= #{aid,jdbcType=VARCHAR}

+ 286 - 0
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -0,0 +1,286 @@
+<?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.TTaskMidMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="tid" jdbcType="INTEGER" property="tid" />
+    <result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
+    <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    id, tid, cost_amount, party_amount, create_time
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TTaskMidExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_task_mid
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_task_mid
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    delete from t_task_mid
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TTaskMidExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    delete from t_task_mid
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    insert into t_task_mid (id, tid, cost_amount, 
+      party_amount, create_time)
+    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, 
+      #{partyAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    insert into t_task_mid
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="tid != null">
+        tid,
+      </if>
+      <if test="costAmount != null">
+        cost_amount,
+      </if>
+      <if test="partyAmount != null">
+        party_amount,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="tid != null">
+        #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="costAmount != null">
+        #{costAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyAmount != null">
+        #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TTaskMidExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    select count(*) from t_task_mid
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    update t_task_mid
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.tid != null">
+        tid = #{record.tid,jdbcType=INTEGER},
+      </if>
+      <if test="record.costAmount != null">
+        cost_amount = #{record.costAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.partyAmount != null">
+        party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    update t_task_mid
+    set id = #{record.id,jdbcType=INTEGER},
+      tid = #{record.tid,jdbcType=INTEGER},
+      cost_amount = #{record.costAmount,jdbcType=DECIMAL},
+      party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    update t_task_mid
+    <set>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="costAmount != null">
+        cost_amount = #{costAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyAmount != null">
+        party_amount = #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jun 18 15:57:30 CST 2020.
+    -->
+    update t_task_mid
+    set tid = #{tid,jdbcType=INTEGER},
+      cost_amount = #{costAmount,jdbcType=DECIMAL},
+      party_amount = #{partyAmount,jdbcType=DECIMAL},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

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

@@ -0,0 +1,180 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class TTaskMid {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_task_mid.id
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_task_mid.tid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    private Integer tid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_task_mid.cost_amount
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    private BigDecimal costAmount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_task_mid.party_amount
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    private BigDecimal partyAmount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column t_task_mid.create_time
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    private Date createTime;
+
+    
+    
+    public TTaskMid() {}
+    
+    public TTaskMid(Integer tid,BigDecimal costAmount) {
+    	this.tid=tid;
+    	if(costAmount!=null)this.costAmount=costAmount;
+    }
+    
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_task_mid.id
+     *
+     * @return the value of t_task_mid.id
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_task_mid.id
+     *
+     * @param id the value for t_task_mid.id
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_task_mid.tid
+     *
+     * @return the value of t_task_mid.tid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public Integer getTid() {
+        return tid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_task_mid.tid
+     *
+     * @param tid the value for t_task_mid.tid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_task_mid.cost_amount
+     *
+     * @return the value of t_task_mid.cost_amount
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_task_mid.cost_amount
+     *
+     * @param costAmount the value for t_task_mid.cost_amount
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_task_mid.party_amount
+     *
+     * @return the value of t_task_mid.party_amount
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public BigDecimal getPartyAmount() {
+        return partyAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_task_mid.party_amount
+     *
+     * @param partyAmount the value for t_task_mid.party_amount
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setPartyAmount(BigDecimal partyAmount) {
+        this.partyAmount = partyAmount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column t_task_mid.create_time
+     *
+     * @return the value of t_task_mid.create_time
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column t_task_mid.create_time
+     *
+     * @param createTime the value for t_task_mid.create_time
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 604 - 0
src/main/java/com/goafanti/common/model/TTaskMidExample.java

@@ -0,0 +1,604 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class TTaskMidExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public TTaskMidExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidIsNull() {
+            addCriterion("tid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidIsNotNull() {
+            addCriterion("tid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidEqualTo(Integer value) {
+            addCriterion("tid =", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotEqualTo(Integer value) {
+            addCriterion("tid <>", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidGreaterThan(Integer value) {
+            addCriterion("tid >", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidGreaterThanOrEqualTo(Integer value) {
+            addCriterion("tid >=", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidLessThan(Integer value) {
+            addCriterion("tid <", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidLessThanOrEqualTo(Integer value) {
+            addCriterion("tid <=", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidIn(List<Integer> values) {
+            addCriterion("tid in", values, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotIn(List<Integer> values) {
+            addCriterion("tid not in", values, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidBetween(Integer value1, Integer value2) {
+            addCriterion("tid between", value1, value2, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotBetween(Integer value1, Integer value2) {
+            addCriterion("tid not between", value1, value2, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountIsNull() {
+            addCriterion("cost_amount is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountIsNotNull() {
+            addCriterion("cost_amount is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountEqualTo(BigDecimal value) {
+            addCriterion("cost_amount =", value, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountNotEqualTo(BigDecimal value) {
+            addCriterion("cost_amount <>", value, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountGreaterThan(BigDecimal value) {
+            addCriterion("cost_amount >", value, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("cost_amount >=", value, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountLessThan(BigDecimal value) {
+            addCriterion("cost_amount <", value, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("cost_amount <=", value, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountIn(List<BigDecimal> values) {
+            addCriterion("cost_amount in", values, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountNotIn(List<BigDecimal> values) {
+            addCriterion("cost_amount not in", values, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("cost_amount between", value1, value2, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCostAmountNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("cost_amount not between", value1, value2, "costAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountIsNull() {
+            addCriterion("party_amount is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountIsNotNull() {
+            addCriterion("party_amount is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountEqualTo(BigDecimal value) {
+            addCriterion("party_amount =", value, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountNotEqualTo(BigDecimal value) {
+            addCriterion("party_amount <>", value, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountGreaterThan(BigDecimal value) {
+            addCriterion("party_amount >", value, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("party_amount >=", value, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountLessThan(BigDecimal value) {
+            addCriterion("party_amount <", value, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("party_amount <=", value, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountIn(List<BigDecimal> values) {
+            addCriterion("party_amount in", values, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountNotIn(List<BigDecimal> values) {
+            addCriterion("party_amount not in", values, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("party_amount between", value1, value2, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartyAmountNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("party_amount not between", value1, value2, "partyAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_task_mid
+     *
+     * @mbg.generated do_not_delete_during_merge Thu Jun 18 15:57:30 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_task_mid
+     *
+     * @mbg.generated Thu Jun 18 15:57:30 CST 2020
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 14 - 1
src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java

@@ -42,7 +42,8 @@ public class TOrderTaskListBo {
 	//判断是不是自己的单 0 是 1否
 	//private Integer distributeSign;
 	
-	
+	private String costAmount;
+	private String partyAmount;
 	public String getSplitSuper() {
 		return splitSuper;
 	}
@@ -241,6 +242,18 @@ public class TOrderTaskListBo {
 	public void setProjectType(Integer projectType) {
 		this.projectType = projectType;
 	}
+	public String getCostAmount() {
+		return costAmount;
+	}
+	public void setCostAmount(String costAmount) {
+		this.costAmount = costAmount;
+	}
+	public String getPartyAmount() {
+		return partyAmount;
+	}
+	public void setPartyAmount(String partyAmount) {
+		this.partyAmount = partyAmount;
+	}
 	
 	
 }

+ 19 - 1
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -57,6 +57,8 @@ import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderOutsourceMapper;
 import com.goafanti.common.dao.TOrderRefundMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.dao.TTaskMidMapper;
+import com.goafanti.common.dao.ThirdPartyCompanyMapper;
 import com.goafanti.common.dao.UserLockReleaseMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.enums.NoticeStatus;
@@ -82,6 +84,7 @@ import com.goafanti.common.model.TOrderNewWithBLOBs;
 import com.goafanti.common.model.TOrderOutsource;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.model.TTaskMid;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.LoggerUtils;
@@ -117,6 +120,7 @@ import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderService;
 import com.goafanti.organization.bo.OrganizationListOut;
 import com.goafanti.organization.bo.OutPaymentNode;
+import com.goafanti.organization.bo.OutThirdPartyCompany;
 import com.goafanti.order.service.OrderProjectService;
 
 @Service
@@ -168,6 +172,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	private OutsourceLogMapper	outsourceLogMapper;
 	@Autowired
 	private PaymentNodeMapper	paymentNodeMapper;
+	@Autowired
+	private ThirdPartyCompanyMapper	thirdPartyCompanyMapper;
+	@Autowired
+	private TTaskMidMapper	tTaskMidMapper;
 	@Value(value = "${mobileRemindCodeTemplate}")
 	private String					mobileRemindCodeTemplate	= null;
 	@Value(value = "${upload.path}")
@@ -222,7 +230,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if(t.getCommodityPrice()!=null)order.setTotalAmount(order.getTotalAmount());
 		String str=tOrderTaskMapper.selectByidGetCname(t.getCommodityId());
 		t.setCname(str);
-		return tOrderTaskMapper.insertSelective(t);
+		tOrderTaskMapper.insertSelectiveGetId(t);
+		TTaskMid tm=new TTaskMid(t.getId(),null);
+		tTaskMidMapper.insertSelective(tm);
+		return 1;
 	}
 
 	public void checkOrder(TOrderNew order,TOrderTask t){
@@ -1293,6 +1304,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			outsourceLogMapper.insertSelective(ol);
 			pushGeneralSendNoticeAndEmail(aids, NoticeStatus.PROJECT_OUTSOURCE_START.getCode(),o.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
 		}
+		List<OutThirdPartyCompany>tpcs= thirdPartyCompanyMapper.selectByTid(o.getTid());
+		BigDecimal costAmount=new BigDecimal(0);
+		for (OutThirdPartyCompany tpc : tpcs) {
+			costAmount.add(tpc.getTotalAmount());
+		}
+		TTaskMid ttm=new TTaskMid(o.getTid(),costAmount);
+		tTaskMidMapper.updateByPrimaryKeySelective(ttm);
 		List<OutPaymentNode> list=paymentNodeMapper.selectByStatus(0);
 		for (OutPaymentNode outPaymentNode : list) {
 			if (outPaymentNode.getDunType()==1) {