Browse Source

update

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

+ 84 - 82
src/main/java/com/goafanti/common/dao/PaymentNodeMapper.java

@@ -1,83 +1,85 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.bo.paymentNodeEmailBo;
-import com.goafanti.common.model.PaymentNode;
-import com.goafanti.common.model.PaymentNodeExample;
-import com.goafanti.organization.bo.OutPaymentNode;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface PaymentNodeMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	long countByExample(PaymentNodeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int deleteByExample(PaymentNodeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int insert(PaymentNode record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int insertSelective(PaymentNode record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	List<PaymentNode> selectByExample(PaymentNodeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	PaymentNode selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") PaymentNode record, @Param("example") PaymentNodeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int updateByExample(@Param("record") PaymentNode record, @Param("example") PaymentNodeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int updateByPrimaryKeySelective(PaymentNode record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
-	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
-	 */
-	int updateByPrimaryKey(PaymentNode record);
-
-	List<OutPaymentNode> selectByTid(@Param("tid")Integer tid,@Param("status")Integer status);
-
-	List<OutPaymentNode> selectByStatus(Integer status);
-
-	paymentNodeEmailBo selectBytidGetEmail(Integer tid);
+package com.goafanti.common.dao;
+
+import com.goafanti.common.bo.paymentNodeEmailBo;
+import com.goafanti.common.model.PaymentNode;
+import com.goafanti.common.model.PaymentNodeExample;
+import com.goafanti.organization.bo.OutPaymentNode;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface PaymentNodeMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	long countByExample(PaymentNodeExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int deleteByExample(PaymentNodeExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int insert(PaymentNode record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int insertSelective(PaymentNode record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	List<PaymentNode> selectByExample(PaymentNodeExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	PaymentNode selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") PaymentNode record, @Param("example") PaymentNodeExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int updateByExample(@Param("record") PaymentNode record, @Param("example") PaymentNodeExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int updateByPrimaryKeySelective(PaymentNode record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table payment_node
+	 * @mbg.generated  Tue Jul 07 13:58:53 CST 2020
+	 */
+	int updateByPrimaryKey(PaymentNode record);
+
+	List<OutPaymentNode> selectByTid(@Param("tid")Integer tid,@Param("status")Integer status);
+
+	List<OutPaymentNode> selectByStatus(Integer status);
+
+	paymentNodeEmailBo selectBytidGetEmail(Integer tid);
+
+	List<OutPaymentNode> selectByTidAndCid(@Param("tid")Integer tid, @Param("cid")Integer cid);
 }

+ 11 - 11
src/main/java/com/goafanti/common/dao/ThirdPartyCompanyMapper.java

@@ -11,68 +11,68 @@ public interface ThirdPartyCompanyMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	long countByExample(ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int deleteByExample(ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int insert(ThirdPartyCompany record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int insertSelective(ThirdPartyCompany record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	List<ThirdPartyCompany> selectByExample(ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	ThirdPartyCompany selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int updateByExampleSelective(@Param("record") ThirdPartyCompany record,
 			@Param("example") ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int updateByExample(@Param("record") ThirdPartyCompany record, @Param("example") ThirdPartyCompanyExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int updateByPrimaryKeySelective(ThirdPartyCompany record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	int updateByPrimaryKey(ThirdPartyCompany record);
 

+ 489 - 480
src/main/java/com/goafanti/common/mapper/PaymentNodeMapper.xml

@@ -1,481 +1,490 @@
-<?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.PaymentNodeMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PaymentNode">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="tid" jdbcType="INTEGER" property="tid" />
-    <result column="cid" jdbcType="INTEGER" property="cid" />
-    <result column="company_name" jdbcType="VARCHAR" property="companyName" />
-    <result column="project_type" jdbcType="INTEGER" property="projectType" />
-    <result column="dun_type" jdbcType="INTEGER" property="dunType" />
-    <result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
-    <result column="quantity" jdbcType="INTEGER" property="quantity" />
-    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
-    <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
-    <result column="party_time" jdbcType="TIMESTAMP" property="partyTime" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="dun_status" jdbcType="INTEGER" property="dunStatus" />
-    <result column="effective_count" jdbcType="INTEGER" property="effectiveCount" />
-    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
-    <result column="status" jdbcType="INTEGER" property="status" />
-  </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 Tue Jul 07 13:58:53 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 Tue Jul 07 13:58:53 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 Tue Jul 07 13:58:53 CST 2020.
-    -->
-    id, tid, cid, company_name, project_type, dun_type, unit_price, quantity, total_amount, 
-    party_amount, party_time, create_time, dun_status, effective_count, start_time, status
-  </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.PaymentNodeExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from payment_node
-    <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 Tue Jul 07 13:58:53 CST 2020.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from payment_node
-    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 Tue Jul 07 13:58:53 CST 2020.
-    -->
-    delete from payment_node
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.PaymentNodeExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    delete from payment_node
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.PaymentNode">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    insert into payment_node (id, tid, cid, 
-      company_name, project_type, dun_type, 
-      unit_price, quantity, total_amount, 
-      party_amount, party_time, create_time, 
-      dun_status, effective_count, start_time, 
-      status)
-    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER}, 
-      #{companyName,jdbcType=VARCHAR}, #{projectType,jdbcType=INTEGER}, #{dunType,jdbcType=INTEGER}, 
-      #{unitPrice,jdbcType=DECIMAL}, #{quantity,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL}, 
-      #{partyAmount,jdbcType=DECIMAL}, #{partyTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{dunStatus,jdbcType=INTEGER}, #{effectiveCount,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, 
-      #{status,jdbcType=INTEGER})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.PaymentNode">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    insert into payment_node
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="tid != null">
-        tid,
-      </if>
-      <if test="cid != null">
-        cid,
-      </if>
-      <if test="companyName != null">
-        company_name,
-      </if>
-      <if test="projectType != null">
-        project_type,
-      </if>
-      <if test="dunType != null">
-        dun_type,
-      </if>
-      <if test="unitPrice != null">
-        unit_price,
-      </if>
-      <if test="quantity != null">
-        quantity,
-      </if>
-      <if test="totalAmount != null">
-        total_amount,
-      </if>
-      <if test="partyAmount != null">
-        party_amount,
-      </if>
-      <if test="partyTime != null">
-        party_time,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="dunStatus != null">
-        dun_status,
-      </if>
-      <if test="effectiveCount != null">
-        effective_count,
-      </if>
-      <if test="startTime != null">
-        start_time,
-      </if>
-      <if test="status != null">
-        status,
-      </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="cid != null">
-        #{cid,jdbcType=INTEGER},
-      </if>
-      <if test="companyName != null">
-        #{companyName,jdbcType=VARCHAR},
-      </if>
-      <if test="projectType != null">
-        #{projectType,jdbcType=INTEGER},
-      </if>
-      <if test="dunType != null">
-        #{dunType,jdbcType=INTEGER},
-      </if>
-      <if test="unitPrice != null">
-        #{unitPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="quantity != null">
-        #{quantity,jdbcType=INTEGER},
-      </if>
-      <if test="totalAmount != null">
-        #{totalAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="partyAmount != null">
-        #{partyAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="partyTime != null">
-        #{partyTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="dunStatus != null">
-        #{dunStatus,jdbcType=INTEGER},
-      </if>
-      <if test="effectiveCount != null">
-        #{effectiveCount,jdbcType=INTEGER},
-      </if>
-      <if test="startTime != null">
-        #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.PaymentNodeExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    select count(*) from payment_node
-    <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 Tue Jul 07 13:58:53 CST 2020.
-    -->
-    update payment_node
-    <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.cid != null">
-        cid = #{record.cid,jdbcType=INTEGER},
-      </if>
-      <if test="record.companyName != null">
-        company_name = #{record.companyName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.projectType != null">
-        project_type = #{record.projectType,jdbcType=INTEGER},
-      </if>
-      <if test="record.dunType != null">
-        dun_type = #{record.dunType,jdbcType=INTEGER},
-      </if>
-      <if test="record.unitPrice != null">
-        unit_price = #{record.unitPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.quantity != null">
-        quantity = #{record.quantity,jdbcType=INTEGER},
-      </if>
-      <if test="record.totalAmount != null">
-        total_amount = #{record.totalAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.partyAmount != null">
-        party_amount = #{record.partyAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.partyTime != null">
-        party_time = #{record.partyTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.dunStatus != null">
-        dun_status = #{record.dunStatus,jdbcType=INTEGER},
-      </if>
-      <if test="record.effectiveCount != null">
-        effective_count = #{record.effectiveCount,jdbcType=INTEGER},
-      </if>
-      <if test="record.startTime != null">
-        start_time = #{record.startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.status != null">
-        status = #{record.status,jdbcType=INTEGER},
-      </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 Tue Jul 07 13:58:53 CST 2020.
-    -->
-    update payment_node
-    set id = #{record.id,jdbcType=INTEGER},
-      tid = #{record.tid,jdbcType=INTEGER},
-      cid = #{record.cid,jdbcType=INTEGER},
-      company_name = #{record.companyName,jdbcType=VARCHAR},
-      project_type = #{record.projectType,jdbcType=INTEGER},
-      dun_type = #{record.dunType,jdbcType=INTEGER},
-      unit_price = #{record.unitPrice,jdbcType=DECIMAL},
-      quantity = #{record.quantity,jdbcType=INTEGER},
-      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
-      party_amount = #{record.partyAmount,jdbcType=DECIMAL},
-      party_time = #{record.partyTime,jdbcType=TIMESTAMP},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      dun_status = #{record.dunStatus,jdbcType=INTEGER},
-      effective_count = #{record.effectiveCount,jdbcType=INTEGER},
-      start_time = #{record.startTime,jdbcType=TIMESTAMP},
-      status = #{record.status,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PaymentNode">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    update payment_node
-    <set>
-      <if test="tid != null">
-        tid = #{tid,jdbcType=INTEGER},
-      </if>
-      <if test="cid != null">
-        cid = #{cid,jdbcType=INTEGER},
-      </if>
-      <if test="companyName != null">
-        company_name = #{companyName,jdbcType=VARCHAR},
-      </if>
-      <if test="projectType != null">
-        project_type = #{projectType,jdbcType=INTEGER},
-      </if>
-      <if test="dunType != null">
-        dun_type = #{dunType,jdbcType=INTEGER},
-      </if>
-      <if test="unitPrice != null">
-        unit_price = #{unitPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="quantity != null">
-        quantity = #{quantity,jdbcType=INTEGER},
-      </if>
-      <if test="totalAmount != null">
-        total_amount = #{totalAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="partyAmount != null">
-        party_amount = #{partyAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="partyTime != null">
-        party_time = #{partyTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="dunStatus != null">
-        dun_status = #{dunStatus,jdbcType=INTEGER},
-      </if>
-      <if test="effectiveCount != null">
-        effective_count = #{effectiveCount,jdbcType=INTEGER},
-      </if>
-      <if test="startTime != null">
-        start_time = #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="status != null">
-        status = #{status,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PaymentNode">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jul 07 13:58:53 CST 2020.
-    -->
-    update payment_node
-    set tid = #{tid,jdbcType=INTEGER},
-      cid = #{cid,jdbcType=INTEGER},
-      company_name = #{companyName,jdbcType=VARCHAR},
-      project_type = #{projectType,jdbcType=INTEGER},
-      dun_type = #{dunType,jdbcType=INTEGER},
-      unit_price = #{unitPrice,jdbcType=DECIMAL},
-      quantity = #{quantity,jdbcType=INTEGER},
-      total_amount = #{totalAmount,jdbcType=DECIMAL},
-      party_amount = #{partyAmount,jdbcType=DECIMAL},
-      party_time = #{partyTime,jdbcType=TIMESTAMP},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      dun_status = #{dunStatus,jdbcType=INTEGER},
-      effective_count = #{effectiveCount,jdbcType=INTEGER},
-      start_time = #{startTime,jdbcType=TIMESTAMP},
-      status = #{status,jdbcType=INTEGER}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  
-  <select id="selectByTid" resultType="com.goafanti.organization.bo.OutPaymentNode">
-  select id,tid,cid,company_name companyName,unit_price unitPrice,quantity,total_amount totalAmount,create_time createTime,
-   party_amount partyAmount, date_format(party_time,'%Y-%m-%d')partyTimes,project_type projectType,dun_type dunType
-   from payment_node where tid= #{tid}
-   <if test="status !=null">
-   and dun_status = #{status}
-   </if>
-  </select>
-  <select id="selectByStatus" resultType="com.goafanti.organization.bo.OutPaymentNode">
-  select id,tid,cid,company_name companyName,unit_price unitPrice,quantity,total_amount totalAmount,
-   party_amount partyAmount, date_format(party_time,'%Y-%m-%d')partyTimes,project_type projectType,dun_type dunType
-   from payment_node where dun_status = #{status}
-  </select>
-  
-  <select id="selectBytidGetEmail" resultType="com.goafanti.common.bo.paymentNodeEmailBo">
-  select a.tid,b.order_no orderNo,c.salesman_id salesmanId,c.salesman_name salesmanName,c.buyer_name userName,d.email from payment_node a 
-left join t_order_task b on a.tid=b.id
-left join t_order_mid c on b.order_no=c.order_no left join admin d on  c.salesman_id=d.id
-where a.tid= #{tid}
-  </select>
+<?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.PaymentNodeMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PaymentNode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="tid" jdbcType="INTEGER" property="tid" />
+    <result column="cid" jdbcType="INTEGER" property="cid" />
+    <result column="company_name" jdbcType="VARCHAR" property="companyName" />
+    <result column="project_type" jdbcType="INTEGER" property="projectType" />
+    <result column="dun_type" jdbcType="INTEGER" property="dunType" />
+    <result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
+    <result column="quantity" jdbcType="INTEGER" property="quantity" />
+    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
+    <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
+    <result column="party_time" jdbcType="TIMESTAMP" property="partyTime" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="dun_status" jdbcType="INTEGER" property="dunStatus" />
+    <result column="effective_count" jdbcType="INTEGER" property="effectiveCount" />
+    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+  </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 Tue Jul 07 13:58:53 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 Tue Jul 07 13:58:53 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 Tue Jul 07 13:58:53 CST 2020.
+    -->
+    id, tid, cid, company_name, project_type, dun_type, unit_price, quantity, total_amount, 
+    party_amount, party_time, create_time, dun_status, effective_count, start_time, status
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.PaymentNodeExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from payment_node
+    <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 Tue Jul 07 13:58:53 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from payment_node
+    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 Tue Jul 07 13:58:53 CST 2020.
+    -->
+    delete from payment_node
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.PaymentNodeExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    delete from payment_node
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PaymentNode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    insert into payment_node (id, tid, cid, 
+      company_name, project_type, dun_type, 
+      unit_price, quantity, total_amount, 
+      party_amount, party_time, create_time, 
+      dun_status, effective_count, start_time, 
+      status)
+    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER}, 
+      #{companyName,jdbcType=VARCHAR}, #{projectType,jdbcType=INTEGER}, #{dunType,jdbcType=INTEGER}, 
+      #{unitPrice,jdbcType=DECIMAL}, #{quantity,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL}, 
+      #{partyAmount,jdbcType=DECIMAL}, #{partyTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{dunStatus,jdbcType=INTEGER}, #{effectiveCount,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, 
+      #{status,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PaymentNode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    insert into payment_node
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="tid != null">
+        tid,
+      </if>
+      <if test="cid != null">
+        cid,
+      </if>
+      <if test="companyName != null">
+        company_name,
+      </if>
+      <if test="projectType != null">
+        project_type,
+      </if>
+      <if test="dunType != null">
+        dun_type,
+      </if>
+      <if test="unitPrice != null">
+        unit_price,
+      </if>
+      <if test="quantity != null">
+        quantity,
+      </if>
+      <if test="totalAmount != null">
+        total_amount,
+      </if>
+      <if test="partyAmount != null">
+        party_amount,
+      </if>
+      <if test="partyTime != null">
+        party_time,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="dunStatus != null">
+        dun_status,
+      </if>
+      <if test="effectiveCount != null">
+        effective_count,
+      </if>
+      <if test="startTime != null">
+        start_time,
+      </if>
+      <if test="status != null">
+        status,
+      </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="cid != null">
+        #{cid,jdbcType=INTEGER},
+      </if>
+      <if test="companyName != null">
+        #{companyName,jdbcType=VARCHAR},
+      </if>
+      <if test="projectType != null">
+        #{projectType,jdbcType=INTEGER},
+      </if>
+      <if test="dunType != null">
+        #{dunType,jdbcType=INTEGER},
+      </if>
+      <if test="unitPrice != null">
+        #{unitPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="quantity != null">
+        #{quantity,jdbcType=INTEGER},
+      </if>
+      <if test="totalAmount != null">
+        #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyAmount != null">
+        #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyTime != null">
+        #{partyTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="dunStatus != null">
+        #{dunStatus,jdbcType=INTEGER},
+      </if>
+      <if test="effectiveCount != null">
+        #{effectiveCount,jdbcType=INTEGER},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.PaymentNodeExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    select count(*) from payment_node
+    <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 Tue Jul 07 13:58:53 CST 2020.
+    -->
+    update payment_node
+    <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.cid != null">
+        cid = #{record.cid,jdbcType=INTEGER},
+      </if>
+      <if test="record.companyName != null">
+        company_name = #{record.companyName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.projectType != null">
+        project_type = #{record.projectType,jdbcType=INTEGER},
+      </if>
+      <if test="record.dunType != null">
+        dun_type = #{record.dunType,jdbcType=INTEGER},
+      </if>
+      <if test="record.unitPrice != null">
+        unit_price = #{record.unitPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="record.quantity != null">
+        quantity = #{record.quantity,jdbcType=INTEGER},
+      </if>
+      <if test="record.totalAmount != null">
+        total_amount = #{record.totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.partyAmount != null">
+        party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.partyTime != null">
+        party_time = #{record.partyTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.dunStatus != null">
+        dun_status = #{record.dunStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.effectiveCount != null">
+        effective_count = #{record.effectiveCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.startTime != null">
+        start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=INTEGER},
+      </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 Tue Jul 07 13:58:53 CST 2020.
+    -->
+    update payment_node
+    set id = #{record.id,jdbcType=INTEGER},
+      tid = #{record.tid,jdbcType=INTEGER},
+      cid = #{record.cid,jdbcType=INTEGER},
+      company_name = #{record.companyName,jdbcType=VARCHAR},
+      project_type = #{record.projectType,jdbcType=INTEGER},
+      dun_type = #{record.dunType,jdbcType=INTEGER},
+      unit_price = #{record.unitPrice,jdbcType=DECIMAL},
+      quantity = #{record.quantity,jdbcType=INTEGER},
+      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
+      party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      party_time = #{record.partyTime,jdbcType=TIMESTAMP},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      dun_status = #{record.dunStatus,jdbcType=INTEGER},
+      effective_count = #{record.effectiveCount,jdbcType=INTEGER},
+      start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      status = #{record.status,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PaymentNode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    update payment_node
+    <set>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="cid != null">
+        cid = #{cid,jdbcType=INTEGER},
+      </if>
+      <if test="companyName != null">
+        company_name = #{companyName,jdbcType=VARCHAR},
+      </if>
+      <if test="projectType != null">
+        project_type = #{projectType,jdbcType=INTEGER},
+      </if>
+      <if test="dunType != null">
+        dun_type = #{dunType,jdbcType=INTEGER},
+      </if>
+      <if test="unitPrice != null">
+        unit_price = #{unitPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="quantity != null">
+        quantity = #{quantity,jdbcType=INTEGER},
+      </if>
+      <if test="totalAmount != null">
+        total_amount = #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyAmount != null">
+        party_amount = #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyTime != null">
+        party_time = #{partyTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="dunStatus != null">
+        dun_status = #{dunStatus,jdbcType=INTEGER},
+      </if>
+      <if test="effectiveCount != null">
+        effective_count = #{effectiveCount,jdbcType=INTEGER},
+      </if>
+      <if test="startTime != null">
+        start_time = #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PaymentNode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jul 07 13:58:53 CST 2020.
+    -->
+    update payment_node
+    set tid = #{tid,jdbcType=INTEGER},
+      cid = #{cid,jdbcType=INTEGER},
+      company_name = #{companyName,jdbcType=VARCHAR},
+      project_type = #{projectType,jdbcType=INTEGER},
+      dun_type = #{dunType,jdbcType=INTEGER},
+      unit_price = #{unitPrice,jdbcType=DECIMAL},
+      quantity = #{quantity,jdbcType=INTEGER},
+      total_amount = #{totalAmount,jdbcType=DECIMAL},
+      party_amount = #{partyAmount,jdbcType=DECIMAL},
+      party_time = #{partyTime,jdbcType=TIMESTAMP},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      dun_status = #{dunStatus,jdbcType=INTEGER},
+      effective_count = #{effectiveCount,jdbcType=INTEGER},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      status = #{status,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="selectByTid" resultType="com.goafanti.organization.bo.OutPaymentNode">
+  select id,tid,cid,company_name companyName,unit_price unitPrice,quantity,total_amount totalAmount,create_time createTime,
+   party_amount partyAmount, date_format(party_time,'%Y-%m-%d')partyTimes,project_type projectType,dun_type dunType
+   from payment_node where tid= #{tid}
+   <if test="status !=null">
+   and dun_status = #{status}
+   </if>
+  </select>
+  <select id="selectByStatus" resultType="com.goafanti.organization.bo.OutPaymentNode">
+  select id,tid,cid,company_name companyName,unit_price unitPrice,quantity,total_amount totalAmount,
+   party_amount partyAmount, date_format(party_time,'%Y-%m-%d')partyTimes,project_type projectType,dun_type dunType
+   from payment_node where dun_status = #{status}
+  </select>
+  
+  <select id="selectBytidGetEmail" resultType="com.goafanti.common.bo.paymentNodeEmailBo">
+  select a.tid,b.order_no orderNo,c.salesman_id salesmanId,c.salesman_name salesmanName,c.buyer_name userName,d.email from payment_node a 
+left join t_order_task b on a.tid=b.id
+left join t_order_mid c on b.order_no=c.order_no left join admin d on  c.salesman_id=d.id
+where a.tid= #{tid}
+  </select>
+  
+   <select id="selectByTidAndCid" resultType="com.goafanti.organization.bo.OutPaymentNode">
+    select id,tid,cid,company_name companyName,unit_price unitPrice,quantity,total_amount totalAmount,create_time createTime,
+   party_amount partyAmount, date_format(party_time,'%Y-%m-%d')partyTimes,project_type projectType,dun_type dunType
+   from payment_node where tid= #{tid}
+   <if test="cid !=null">
+   and cid = #{cid}
+   </if>
+  </select> 
 </mapper>

+ 40 - 25
src/main/java/com/goafanti/common/mapper/ThirdPartyCompanyMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
@@ -22,12 +22,13 @@
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="cid" jdbcType="INTEGER" property="cid" />
     <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
+    <result column="type" jdbcType="INTEGER" property="type" />
   </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 Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -61,7 +62,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -95,16 +96,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     id, tid, company_name, unit_price, quantity, total_amount, material, urgent, audit, 
-    assets, income, remarks, create_time, cid, party_amount
+    assets, income, remarks, create_time, cid, party_amount, type
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.ThirdPartyCompanyExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     select
     <if test="distinct">
@@ -123,7 +124,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -134,7 +135,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     delete from third_party_company
     where id = #{id,jdbcType=INTEGER}
@@ -143,7 +144,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     delete from third_party_company
     <if test="_parameter != null">
@@ -154,26 +155,26 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     insert into third_party_company (id, tid, company_name, 
       unit_price, quantity, total_amount, 
       material, urgent, audit, 
       assets, income, remarks, 
-      create_time, cid, party_amount
-      )
+      create_time, cid, party_amount, 
+      type)
     values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, 
       #{unitPrice,jdbcType=DECIMAL}, #{quantity,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL}, 
       #{material,jdbcType=INTEGER}, #{urgent,jdbcType=INTEGER}, #{audit,jdbcType=INTEGER}, 
       #{assets,jdbcType=VARCHAR}, #{income,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{cid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL}
-      )
+      #{createTime,jdbcType=TIMESTAMP}, #{cid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL}, 
+      #{type,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.ThirdPartyCompany">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     insert into third_party_company
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -222,6 +223,9 @@
       <if test="partyAmount != null">
         party_amount,
       </if>
+      <if test="type != null">
+        type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -269,13 +273,16 @@
       <if test="partyAmount != null">
         #{partyAmount,jdbcType=DECIMAL},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.ThirdPartyCompanyExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     select count(*) from third_party_company
     <if test="_parameter != null">
@@ -286,7 +293,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     update third_party_company
     <set>
@@ -335,6 +342,9 @@
       <if test="record.partyAmount != null">
         party_amount = #{record.partyAmount,jdbcType=DECIMAL},
       </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -344,7 +354,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     update third_party_company
     set id = #{record.id,jdbcType=INTEGER},
@@ -361,7 +371,8 @@
       remarks = #{record.remarks,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       cid = #{record.cid,jdbcType=INTEGER},
-      party_amount = #{record.partyAmount,jdbcType=DECIMAL}
+      party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      type = #{record.type,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -370,7 +381,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     update third_party_company
     <set>
@@ -416,6 +427,9 @@
       <if test="partyAmount != null">
         party_amount = #{partyAmount,jdbcType=DECIMAL},
       </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -423,7 +437,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Sep 03 17:15:07 CST 2020.
+      This element was generated on Tue Sep 08 14:36:38 CST 2020.
     -->
     update third_party_company
     set tid = #{tid,jdbcType=INTEGER},
@@ -439,13 +453,14 @@
       remarks = #{remarks,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       cid = #{cid,jdbcType=INTEGER},
-      party_amount = #{partyAmount,jdbcType=DECIMAL}
+      party_amount = #{partyAmount,jdbcType=DECIMAL},
+      type = #{type,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByTid" resultType="com.goafanti.organization.bo.OutThirdPartyCompany">
-   select id,tid,company_name companyName,unit_price unitPrice,quantity,total_amount totalAmount,material,urgent,audit,assets,
-   income,remarks,cid
-   from third_party_company where tid= #{tid}
+   select a.id,a.tid,a.company_name companyName,a.unit_price unitPrice,a.quantity,a.total_amount totalAmount,a.material,a.urgent,
+    a.audit,a.assets,a.income,a.remarks,a.cid,b.cost_reduction costReduction,b.official_cost officialCost,a.type,a.party_amount partyAmount
+   from third_party_company a left join t_order_task b on a.tid=b.id  where tid= #{tid}
   </select>
    <select id="selectPaymentList" resultType="com.goafanti.organization.bo.outPaymentList">
 		select c.contract_no contractNo,b.order_no orderNo,d.buyer_name userName, d.dep_name depName,f.cost_amount costAmount,

+ 68 - 45
src/main/java/com/goafanti/common/model/ThirdPartyCompany.java

@@ -15,88 +15,93 @@ public class ThirdPartyCompany {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.id
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.tid
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer tid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.company_name
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private String companyName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.unit_price
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	@DecimalMax(value = "999999", message = "{" + ErrorConstants.DECIMAL_PARAM_MAX_ERROR + "}")
 	@DecimalMin(value = "0", message = "{" + ErrorConstants.DECIMAL_PARAM_MIN_ERROR + "}")
 	private BigDecimal unitPrice;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.quantity
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer quantity;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.total_amount
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	@DecimalMax(value = "999999", message = "{" + ErrorConstants.DECIMAL_PARAM_MAX_ERROR + "}")
 	@DecimalMin(value = "0", message = "{" + ErrorConstants.DECIMAL_PARAM_MIN_ERROR + "}")
 	private BigDecimal totalAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.material
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer material;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.urgent
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer urgent;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.audit
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer audit;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.assets
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private String assets;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.income
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private String income;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.remarks
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private String remarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.create_time
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.cid
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private Integer cid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.party_amount
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	private BigDecimal partyAmount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column third_party_company.type
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
+	 */
+	private Integer type;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.id
 	 * @return  the value of third_party_company.id
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getId() {
 		return id;
@@ -105,7 +110,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.id
 	 * @param id  the value for third_party_company.id
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -114,7 +119,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.tid
 	 * @return  the value of third_party_company.tid
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getTid() {
 		return tid;
@@ -123,7 +128,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.tid
 	 * @param tid  the value for third_party_company.tid
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
@@ -132,7 +137,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.company_name
 	 * @return  the value of third_party_company.company_name
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public String getCompanyName() {
 		return companyName;
@@ -141,7 +146,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.company_name
 	 * @param companyName  the value for third_party_company.company_name
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setCompanyName(String companyName) {
 		this.companyName = companyName;
@@ -150,7 +155,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.unit_price
 	 * @return  the value of third_party_company.unit_price
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public BigDecimal getUnitPrice() {
 		return unitPrice;
@@ -159,7 +164,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.unit_price
 	 * @param unitPrice  the value for third_party_company.unit_price
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setUnitPrice(BigDecimal unitPrice) {
 		this.unitPrice = unitPrice;
@@ -168,7 +173,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.quantity
 	 * @return  the value of third_party_company.quantity
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getQuantity() {
 		return quantity;
@@ -177,7 +182,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.quantity
 	 * @param quantity  the value for third_party_company.quantity
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setQuantity(Integer quantity) {
 		this.quantity = quantity;
@@ -186,7 +191,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.total_amount
 	 * @return  the value of third_party_company.total_amount
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public BigDecimal getTotalAmount() {
 		return totalAmount;
@@ -195,7 +200,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.total_amount
 	 * @param totalAmount  the value for third_party_company.total_amount
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setTotalAmount(BigDecimal totalAmount) {
 		this.totalAmount = totalAmount;
@@ -204,7 +209,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.material
 	 * @return  the value of third_party_company.material
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getMaterial() {
 		return material;
@@ -213,7 +218,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.material
 	 * @param material  the value for third_party_company.material
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setMaterial(Integer material) {
 		this.material = material;
@@ -222,7 +227,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.urgent
 	 * @return  the value of third_party_company.urgent
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getUrgent() {
 		return urgent;
@@ -231,7 +236,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.urgent
 	 * @param urgent  the value for third_party_company.urgent
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setUrgent(Integer urgent) {
 		this.urgent = urgent;
@@ -240,7 +245,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.audit
 	 * @return  the value of third_party_company.audit
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getAudit() {
 		return audit;
@@ -249,7 +254,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.audit
 	 * @param audit  the value for third_party_company.audit
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setAudit(Integer audit) {
 		this.audit = audit;
@@ -258,7 +263,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.assets
 	 * @return  the value of third_party_company.assets
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public String getAssets() {
 		return assets;
@@ -267,7 +272,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.assets
 	 * @param assets  the value for third_party_company.assets
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setAssets(String assets) {
 		this.assets = assets;
@@ -276,7 +281,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.income
 	 * @return  the value of third_party_company.income
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public String getIncome() {
 		return income;
@@ -285,7 +290,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.income
 	 * @param income  the value for third_party_company.income
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setIncome(String income) {
 		this.income = income;
@@ -294,7 +299,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.remarks
 	 * @return  the value of third_party_company.remarks
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -303,7 +308,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.remarks
 	 * @param remarks  the value for third_party_company.remarks
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks;
@@ -312,7 +317,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.create_time
 	 * @return  the value of third_party_company.create_time
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -321,7 +326,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.create_time
 	 * @param createTime  the value for third_party_company.create_time
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -330,7 +335,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.cid
 	 * @return  the value of third_party_company.cid
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Integer getCid() {
 		return cid;
@@ -339,7 +344,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.cid
 	 * @param cid  the value for third_party_company.cid
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setCid(Integer cid) {
 		this.cid = cid;
@@ -348,7 +353,7 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column third_party_company.party_amount
 	 * @return  the value of third_party_company.party_amount
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public BigDecimal getPartyAmount() {
 		return partyAmount;
@@ -357,9 +362,27 @@ public class ThirdPartyCompany {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.party_amount
 	 * @param partyAmount  the value for third_party_company.party_amount
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 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 third_party_company.type
+	 * @return  the value of third_party_company.type
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column third_party_company.type
+	 * @param type  the value for third_party_company.type
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
 }

+ 76 - 16
src/main/java/com/goafanti/common/model/ThirdPartyCompanyExample.java

@@ -8,23 +8,23 @@ import java.util.List;
 public class ThirdPartyCompanyExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public ThirdPartyCompanyExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class ThirdPartyCompanyExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1103,11 +1103,71 @@ public class ThirdPartyCompanyExample {
 			addCriterion("party_amount not between", value1, value2, "partyAmount");
 			return (Criteria) this;
 		}
+
+		public Criteria andTypeIsNull() {
+			addCriterion("type is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeIsNotNull() {
+			addCriterion("type is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeEqualTo(Integer value) {
+			addCriterion("type =", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeNotEqualTo(Integer value) {
+			addCriterion("type <>", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeGreaterThan(Integer value) {
+			addCriterion("type >", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("type >=", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeLessThan(Integer value) {
+			addCriterion("type <", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeLessThanOrEqualTo(Integer value) {
+			addCriterion("type <=", value, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeIn(List<Integer> values) {
+			addCriterion("type in", values, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeNotIn(List<Integer> values) {
+			addCriterion("type not in", values, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeBetween(Integer value1, Integer value2) {
+			addCriterion("type between", value1, value2, "type");
+			return (Criteria) this;
+		}
+
+		public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+			addCriterion("type not between", value1, value2, "type");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table third_party_company
-	 * @mbg.generated  Thu Sep 03 17:15:07 CST 2020
+	 * @mbg.generated  Tue Sep 08 14:36:38 CST 2020
 	 */
 	public static class Criterion {
 		private String condition;

+ 25 - 7
src/main/java/com/goafanti/organization/bo/OutThirdPartyCompany.java

@@ -1,7 +1,25 @@
-package com.goafanti.organization.bo;
-
-import com.goafanti.common.model.ThirdPartyCompany;
-
-public class OutThirdPartyCompany  extends ThirdPartyCompany{
-
-}
+package com.goafanti.organization.bo;
+
+import com.goafanti.common.model.ThirdPartyCompany;
+
+public class OutThirdPartyCompany  extends ThirdPartyCompany{
+	
+	private Integer costReduction;
+	
+	private Integer officialCost;
+	
+	public Integer getCostReduction() {
+		return costReduction;
+	}
+	public void setCostReduction(Integer costReduction) {
+		this.costReduction = costReduction;
+	}
+	public Integer getOfficialCost() {
+		return officialCost;
+	}
+	public void setOfficialCost(Integer officialCost) {
+		this.officialCost = officialCost;
+	}
+	
+
+}

+ 10 - 2
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -94,7 +94,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/deleteCompany" , method = RequestMethod.POST)
-	public Result deleteCompany(Integer id) {
+	public Result deleteCompany(String id) {
 		Result res =new Result();
 		if (null==id) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
@@ -153,6 +153,10 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"项目编号","项目编号"));
 			return res;
 		}
+		if (thirdPartyCompanyService.addNodeCheck(p)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"数量或者金额","数量或者金额"));
+			return res;
+		}
 		if (!res.getError().isEmpty()) {
             return res;
         }
@@ -166,7 +170,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/deletePaymentNode" , method = RequestMethod.POST)
-	public Result deletePaymentNode(Integer id) {
+	public Result deletePaymentNode(String id) {
 		Result res =new Result();
 		if (null==id) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
@@ -198,6 +202,10 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"项目编号","项目编号"));
 			return res;
 		}
+		if (thirdPartyCompanyService.addNodeCheck(p)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"数量或者金额","数量或者金额"));
+			return res;
+		}
 		if (!res.getError().isEmpty()) {
             return res;
         }

+ 4 - 2
src/main/java/com/goafanti/organization/service/ThirdPartyCompanyService.java

@@ -39,9 +39,9 @@ public interface ThirdPartyCompanyService {
 
 	List<OutPaymentNode> selectPaymentNode(Integer tid);
 
-	int deleteCompany(Integer id);
+	int deleteCompany(String id);
 
-	int deletePaymentNode(Integer id);
+	int deletePaymentNode(String id);
 
 	int addOrderPayment(TOrderPayment p);
 
@@ -89,5 +89,7 @@ public interface ThirdPartyCompanyService {
 
 	int deleteFinancialPayment(Integer id);
 
+	boolean addNodeCheck(InputPaymentNode p);
+
 
 }

+ 39 - 6
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -152,6 +152,22 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		return paymentNodeMapper.insertSelective(p);
 	}
 
+	@Override
+	public boolean addNodeCheck(InputPaymentNode p) {
+		ThirdPartyCompany t=thirdPartyCompanyMapper.selectByPrimaryKey(p.getCid());
+		if (p.getTotalAmount().compareTo(t.getTotalAmount())>0) {
+			return true;
+		}
+		List<OutPaymentNode> list=paymentNodeMapper.selectByTidAndCid(p.getTid(),p.getCid());
+		BigDecimal sum=p.getTotalAmount();
+		for (OutPaymentNode pn : list) {
+			if (pn.getId().equals(p.getId())) sum=sum.add(pn.getTotalAmount());
+		}
+		if (sum.compareTo(t.getTotalAmount())>0) {
+			return true;
+		}
+		return false;
+	}
 
 	@Override
 	public int updatePaymentNode(InputPaymentNode p) {
@@ -179,14 +195,26 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 
 	@Override
-	public int deleteCompany(Integer id) {
-		return thirdPartyCompanyMapper.deleteByPrimaryKey(id);
+	public int deleteCompany(String id) {
+		if (id.contains(",")) {
+			String []ids =id.split(",");
+			for (String s : ids) {
+				thirdPartyCompanyMapper.deleteByPrimaryKey(Integer.valueOf(s));
+			}
+		}else thirdPartyCompanyMapper.deleteByPrimaryKey(Integer.valueOf(id));
+		return 1;
 	}
 
 
 	@Override
-	public int deletePaymentNode(Integer id) {
-		return paymentNodeMapper.deleteByPrimaryKey(id);
+	public int deletePaymentNode(String id) {
+		if (id.contains(",")) {
+			String []ids =id.split(",");
+			for (String s : ids) {
+				paymentNodeMapper.deleteByPrimaryKey(Integer.valueOf(s));
+			}
+		}else paymentNodeMapper.deleteByPrimaryKey(Integer.valueOf(id));
+		return 1;
 	}
 
 
@@ -219,6 +247,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		tp.setStatus(p.getStatus());
 		Integer type=NoticeStatus.PAYMENT_NODE.getCode();
 		String auditStr="重新发起付款:";
+		//状态 0审核 1待支付 2驳回 3已支付 4取消
 		if (p.getStatus()==0) {
 			tp.setApplicationAmount(p.getApplicationAmount());
 			tp.setChooseType(p.getChooseType());
@@ -264,9 +293,9 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			int flag=0;
 			TOrderPayment tp=tOrderPaymentMapper.selectByPrimaryKey(p.getId());
 			ThirdPartyCompany tpc=new ThirdPartyCompany();
-			
+			System.out.println(p);
 			thirdPartyCompanyMapper.selectByPrimaryKey(tp.getTpcId());
-			if (p.getPaymentAmount()==null) {
+			if (p.getPaymentAmount()==null||p.getPaymentAmount().compareTo(new BigDecimal(0))==0) {
 				p.setPaymentAmount(tp.getApplicationAmount());
 			}
 			if (tp.getChooseType()==1) {
@@ -282,6 +311,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 					flag=1;
 				}
 				pn.setStatus(flag);
+				pn.setPartyAmount(p.getPaymentAmount());
 				paymentNodeMapper.updateByPrimaryKeySelective(pn);
 				tpc=thirdPartyCompanyMapper.selectByPrimaryKey(pn.getCid());
 			}else {
@@ -619,4 +649,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 
 	
+
+
+	
 }