Browse Source

节点财务付款开发

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

+ 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="payment_log"/>
+    <table schema="aft" tableName="financial_payment"/>
   </context>
 </generatorConfiguration>

+ 80 - 0
src/main/java/com/goafanti/common/dao/FinancialPaymentMapper.java

@@ -0,0 +1,80 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.FinancialPayment;
+import com.goafanti.common.model.FinancialPaymentExample;
+import com.goafanti.organization.bo.outFinancialPayment;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface FinancialPaymentMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	long countByExample(FinancialPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int deleteByExample(FinancialPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int insert(FinancialPayment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int insertSelective(FinancialPayment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	List<FinancialPayment> selectByExample(FinancialPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	FinancialPayment selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") FinancialPayment record,
+			@Param("example") FinancialPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int updateByExample(@Param("record") FinancialPayment record, @Param("example") FinancialPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int updateByPrimaryKeySelective(FinancialPayment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	int updateByPrimaryKey(FinancialPayment record);
+
+	List<outFinancialPayment> selectByPid(Integer id);
+}

+ 2 - 0
src/main/java/com/goafanti/common/dao/TOrderPaymentMapper.java

@@ -78,4 +78,6 @@ public interface TOrderPaymentMapper {
 	outOrderPayment selectByidGetDetails(Integer id);
 
 	int insertSelectiveGetId(TOrderPayment p);
+
+	List<outOrderPayment> selectByTid(Integer id);
 }

+ 290 - 0
src/main/java/com/goafanti/common/mapper/FinancialPaymentMapper.xml

@@ -0,0 +1,290 @@
+<?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.FinancialPaymentMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.FinancialPayment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="pid" jdbcType="INTEGER" property="pid" />
+    <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
+    <result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime" />
+    <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 Tue Jun 16 16:45:09 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 Jun 16 16:45:09 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 Jun 16 16:45:09 CST 2020.
+    -->
+    id, pid, party_amount, payment_time, create_time
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.FinancialPaymentExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from financial_payment
+    <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 Jun 16 16:45:09 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from financial_payment
+    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 Jun 16 16:45:09 CST 2020.
+    -->
+    delete from financial_payment
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.FinancialPaymentExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    delete from financial_payment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.FinancialPayment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    insert into financial_payment (id, pid, party_amount, 
+      payment_time, create_time)
+    values (#{id,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL}, 
+      #{paymentTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.FinancialPayment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    insert into financial_payment
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="partyAmount != null">
+        party_amount,
+      </if>
+      <if test="paymentTime != null">
+        payment_time,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=INTEGER},
+      </if>
+      <if test="partyAmount != null">
+        #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="paymentTime != null">
+        #{paymentTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.FinancialPaymentExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    select count(*) from financial_payment
+    <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 Jun 16 16:45:09 CST 2020.
+    -->
+    update financial_payment
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.pid != null">
+        pid = #{record.pid,jdbcType=INTEGER},
+      </if>
+      <if test="record.partyAmount != null">
+        party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.paymentTime != null">
+        payment_time = #{record.paymentTime,jdbcType=TIMESTAMP},
+      </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 Tue Jun 16 16:45:09 CST 2020.
+    -->
+    update financial_payment
+    set id = #{record.id,jdbcType=INTEGER},
+      pid = #{record.pid,jdbcType=INTEGER},
+      party_amount = #{record.partyAmount,jdbcType=DECIMAL},
+      payment_time = #{record.paymentTime,jdbcType=TIMESTAMP},
+      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.FinancialPayment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    update financial_payment
+    <set>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=INTEGER},
+      </if>
+      <if test="partyAmount != null">
+        party_amount = #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="paymentTime != null">
+        payment_time = #{paymentTime,jdbcType=TIMESTAMP},
+      </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.FinancialPayment">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Jun 16 16:45:09 CST 2020.
+    -->
+    update financial_payment
+    set pid = #{pid,jdbcType=INTEGER},
+      party_amount = #{partyAmount,jdbcType=DECIMAL},
+      payment_time = #{paymentTime,jdbcType=TIMESTAMP},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectByPid" resultType="com.goafanti.organization.bo.outFinancialPayment">
+  select id,pid,party_amount partyAmount,date_format(payment_time,'%Y-%m-%d') paymentTimes 
+  from financial_payment where pid= #{id}
+  </select>
+</mapper>

+ 10 - 2
src/main/java/com/goafanti/common/mapper/TOrderPaymentMapper.xml

@@ -458,10 +458,18 @@
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByidGetDetails" resultType="com.goafanti.organization.bo.outOrderPayment">
-select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
+	select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
 	  a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks , b.quantity NodeQuantity,
-	  b.party_amount NodePartyAmount,b.total_amount NodeTotalAmount,d.finance_name financeName 
+	  b.party_amount NodePartyAmount,b.total_amount NodeTotalAmount,d.finance_name financeName ,c.order_no orderNo
 	 from t_order_payment a left join payment_node b on a.node_id=b.id
 	 left join t_order_task c on b.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.id= #{id}
   </select>
+  
+  <select id="selectByTid" resultType="com.goafanti.organization.bo.outOrderPayment">
+  select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
+	  a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks , b.quantity NodeQuantity,
+	  b.party_amount NodePartyAmount,b.total_amount NodeTotalAmount,d.finance_name financeName ,c.order_no orderNo
+	 from t_order_payment a left join payment_node b on a.node_id=b.id
+	 left join t_order_task c on b.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.tid= #{id}
+  </select>
 </mapper>

+ 123 - 0
src/main/java/com/goafanti/common/model/FinancialPayment.java

@@ -0,0 +1,123 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class FinancialPayment {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column financial_payment.id
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column financial_payment.pid
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	private Integer pid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column financial_payment.party_amount
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	private BigDecimal partyAmount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column financial_payment.payment_time
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	private Date paymentTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column financial_payment.create_time
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	private Date createTime;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column financial_payment.id
+	 * @return  the value of financial_payment.id
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column financial_payment.id
+	 * @param id  the value for financial_payment.id
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 financial_payment.pid
+	 * @return  the value of financial_payment.pid
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public Integer getPid() {
+		return pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column financial_payment.pid
+	 * @param pid  the value for financial_payment.pid
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public void setPid(Integer pid) {
+		this.pid = pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column financial_payment.party_amount
+	 * @return  the value of financial_payment.party_amount
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public BigDecimal getPartyAmount() {
+		return partyAmount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column financial_payment.party_amount
+	 * @param partyAmount  the value for financial_payment.party_amount
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 financial_payment.payment_time
+	 * @return  the value of financial_payment.payment_time
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public Date getPaymentTime() {
+		return paymentTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column financial_payment.payment_time
+	 * @param paymentTime  the value for financial_payment.payment_time
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public void setPaymentTime(Date paymentTime) {
+		this.paymentTime = paymentTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column financial_payment.create_time
+	 * @return  the value of financial_payment.create_time
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column financial_payment.create_time
+	 * @param createTime  the value for financial_payment.create_time
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+}

+ 563 - 0
src/main/java/com/goafanti/common/model/FinancialPaymentExample.java

@@ -0,0 +1,563 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class FinancialPaymentExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public FinancialPaymentExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 CST 2020
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 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 andPidIsNull() {
+			addCriterion("pid is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidIsNotNull() {
+			addCriterion("pid is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidEqualTo(Integer value) {
+			addCriterion("pid =", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidNotEqualTo(Integer value) {
+			addCriterion("pid <>", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidGreaterThan(Integer value) {
+			addCriterion("pid >", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidGreaterThanOrEqualTo(Integer value) {
+			addCriterion("pid >=", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidLessThan(Integer value) {
+			addCriterion("pid <", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidLessThanOrEqualTo(Integer value) {
+			addCriterion("pid <=", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidIn(List<Integer> values) {
+			addCriterion("pid in", values, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidNotIn(List<Integer> values) {
+			addCriterion("pid not in", values, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidBetween(Integer value1, Integer value2) {
+			addCriterion("pid between", value1, value2, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidNotBetween(Integer value1, Integer value2) {
+			addCriterion("pid not between", value1, value2, "pid");
+			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 andPaymentTimeIsNull() {
+			addCriterion("payment_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeIsNotNull() {
+			addCriterion("payment_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeEqualTo(Date value) {
+			addCriterion("payment_time =", value, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeNotEqualTo(Date value) {
+			addCriterion("payment_time <>", value, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeGreaterThan(Date value) {
+			addCriterion("payment_time >", value, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("payment_time >=", value, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeLessThan(Date value) {
+			addCriterion("payment_time <", value, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeLessThanOrEqualTo(Date value) {
+			addCriterion("payment_time <=", value, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeIn(List<Date> values) {
+			addCriterion("payment_time in", values, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeNotIn(List<Date> values) {
+			addCriterion("payment_time not in", values, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeBetween(Date value1, Date value2) {
+			addCriterion("payment_time between", value1, value2, "paymentTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPaymentTimeNotBetween(Date value1, Date value2) {
+			addCriterion("payment_time not between", value1, value2, "paymentTime");
+			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 financial_payment
+	 * @mbg.generated  Tue Jun 16 16:45:09 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);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table financial_payment
+     *
+     * @mbg.generated do_not_delete_during_merge Tue Jun 16 16:43:32 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 18 - 0
src/main/java/com/goafanti/organization/bo/InuptFinancialPayment.java

@@ -0,0 +1,18 @@
+package com.goafanti.organization.bo;
+
+
+import com.goafanti.common.model.FinancialPayment;
+
+public class InuptFinancialPayment extends FinancialPayment{
+	
+	private String paymentTimes;
+
+	public String getPaymentTimes() {
+		return paymentTimes;
+	}
+
+	public void setPaymentTimes(String paymentTimes) {
+		this.paymentTimes = paymentTimes;
+	}
+
+}

+ 15 - 0
src/main/java/com/goafanti/organization/bo/outFinancialPayment.java

@@ -0,0 +1,15 @@
+package com.goafanti.organization.bo;
+
+import com.goafanti.common.model.FinancialPayment;
+
+public class outFinancialPayment extends FinancialPayment{
+	private String paymentTimes;
+
+	public String getPaymentTimes() {
+		return paymentTimes;
+	}
+
+	public void setPaymentTimes(String paymentTimes) {
+		this.paymentTimes = paymentTimes;
+	}
+}

+ 40 - 0
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -10,10 +10,12 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.model.FinancialPayment;
 import com.goafanti.common.model.TOrderPayment;
 import com.goafanti.common.model.ThirdPartyCompany;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.organization.bo.InputPaymentNode;
+import com.goafanti.organization.bo.InuptFinancialPayment;
 import com.goafanti.organization.service.ThirdPartyCompanyService;
 
 
@@ -177,4 +179,42 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectOrderPayment(id));
 		return res;
 	}
+	
+	@RequestMapping(value = "/selectPaymentLog" , method = RequestMethod.GET)
+	public Result selectPaymentLog(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectPaymentLog(id));
+		return res;
+	}
+	
+	@RequestMapping(value = "/addfinancialPayment" , method = RequestMethod.POST)
+	public Result addfinancialPayment(InuptFinancialPayment f) {
+		Result res =new Result();
+		if (null==f.getPartyAmount()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"金额","金额"));
+			return res;
+		}
+		if (null==f.getPaymentTimes()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"付款时间","付款时间"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.addfinancialPayment(f));
+		return res;
+	}
+	
+	@RequestMapping(value = "/selectfinancialPayment" , method = RequestMethod.GET)
+	public Result selectfinancialPayment(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectfinancialPayment(id));
+		return res;
+	}
+	
 }

+ 9 - 1
src/main/java/com/goafanti/organization/service/ThirdPartyCompanyService.java

@@ -7,9 +7,11 @@ import com.goafanti.common.model.PaymentNode;
 import com.goafanti.common.model.TOrderPayment;
 import com.goafanti.common.model.ThirdPartyCompany;
 import com.goafanti.organization.bo.InputPaymentNode;
+import com.goafanti.organization.bo.InuptFinancialPayment;
 import com.goafanti.organization.bo.OutPaymentLog;
 import com.goafanti.organization.bo.OutPaymentNode;
 import com.goafanti.organization.bo.OutThirdPartyCompany;
+import com.goafanti.organization.bo.outFinancialPayment;
 import com.goafanti.organization.bo.outOrderPayment;
 
 public interface ThirdPartyCompanyService {
@@ -38,6 +40,12 @@ public interface ThirdPartyCompanyService {
 
 	int updateOrderPayment(TOrderPayment p);
 
-	List<OutPaymentLog> selectOrderPayment(Integer id);
+	List<outOrderPayment> selectOrderPayment(Integer id);
+
+	List<OutPaymentLog> selectPaymentLog(Integer id);
+
+	int addfinancialPayment(InuptFinancialPayment f);
+
+	List<outFinancialPayment> selectfinancialPayment(Integer id);
 
 }

+ 27 - 1
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.CompanyLibraryMapper;
+import com.goafanti.common.dao.FinancialPaymentMapper;
 import com.goafanti.common.dao.PaymentLogMapper;
 import com.goafanti.common.dao.PaymentNodeMapper;
 import com.goafanti.common.dao.TOrderPaymentMapper;
@@ -21,9 +22,11 @@ import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.organization.bo.InputPaymentNode;
+import com.goafanti.organization.bo.InuptFinancialPayment;
 import com.goafanti.organization.bo.OutPaymentLog;
 import com.goafanti.organization.bo.OutPaymentNode;
 import com.goafanti.organization.bo.OutThirdPartyCompany;
+import com.goafanti.organization.bo.outFinancialPayment;
 import com.goafanti.organization.bo.outOrderPayment;
 import com.goafanti.organization.service.ThirdPartyCompanyService;
 
@@ -42,6 +45,8 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	private PaymentLogMapper	paymentLogMapper;
 	@Autowired
 	private AdminMapper	adminMapper;
+	@Autowired
+	private FinancialPaymentMapper	financialPaymentMapper;
 	
 
 
@@ -126,6 +131,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	@Override
 	public int addOrderPayment(TOrderPayment p) {
+		p.setStatus(0);
 		tOrderPaymentMapper.insertSelectiveGetId(p);
 		Admin a=adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
 		PaymentLog pl=new PaymentLog(p.getId(),0,"发起付款",a.getId(),a.getName());
@@ -147,10 +153,30 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 
 	@Override
-	public List<OutPaymentLog> selectOrderPayment(Integer id) {
+	public List<OutPaymentLog> selectPaymentLog(Integer id) {
 		return paymentLogMapper.selectByPid(id);
 	}
 
 
+	@Override
+	public List<outOrderPayment> selectOrderPayment(Integer id) {
+		
+		return tOrderPaymentMapper.selectByTid(id);
+	}
+
+
+	@Override
+	public int addfinancialPayment(InuptFinancialPayment f) {
+		f.setPaymentTime(DateUtils.StringToDate(f.getPaymentTimes(), AFTConstants.YYYYMMDD));
+		return financialPaymentMapper.insertSelective(f);
+	}
+
+
+	@Override
+	public List<outFinancialPayment> selectfinancialPayment(Integer id) {
+		return financialPaymentMapper.selectByPid(id);
+	}
+
+
 
 }