소스 검색

新增财务批量确认

Signed-off-by: anderx <312518615@qq.com>
anderx 5 년 전
부모
커밋
8bdd62d6fb

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

+ 67 - 89
src/main/java/com/goafanti/common/dao/CompanyLibraryMapper.java

@@ -7,95 +7,73 @@ import org.apache.ibatis.annotations.Param;
 
 public interface CompanyLibraryMapper {
     /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    long countByExample(CompanyLibraryExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int deleteByExample(CompanyLibraryExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int deleteByPrimaryKey(Integer id);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int insert(CompanyLibrary record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int insertSelective(CompanyLibrary record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    List<CompanyLibrary> selectByExample(CompanyLibraryExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    CompanyLibrary selectByPrimaryKey(Integer id);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int updateByExampleSelective(@Param("record") CompanyLibrary record, @Param("example") CompanyLibraryExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int updateByExample(@Param("record") CompanyLibrary record, @Param("example") CompanyLibraryExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int updateByPrimaryKeySelective(CompanyLibrary record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table company_library
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    int updateByPrimaryKey(CompanyLibrary record);
-
-
-	List<CompanyLibrary> selectVague(String name);
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	long countByExample(CompanyLibraryExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int deleteByExample(CompanyLibraryExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int insert(CompanyLibrary record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int insertSelective(CompanyLibrary record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	List<CompanyLibrary> selectByExample(CompanyLibraryExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	CompanyLibrary selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") CompanyLibrary record,
+			@Param("example") CompanyLibraryExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int updateByExample(@Param("record") CompanyLibrary record, @Param("example") CompanyLibraryExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int updateByPrimaryKeySelective(CompanyLibrary record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table company_library
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	int updateByPrimaryKey(CompanyLibrary record);
+
+	List<CompanyLibrary> selectVague(@Param("name")String name, @Param("type")Integer type);
 
 	int insertSelectiveGetId(CompanyLibrary c);
 

+ 86 - 84
src/main/java/com/goafanti/common/dao/TOrderPaymentMapper.java

@@ -1,85 +1,87 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.TOrderPayment;
-import com.goafanti.common.model.TOrderPaymentExample;
-import com.goafanti.organization.bo.outOrderPayment;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface TOrderPaymentMapper {
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	long countByExample(TOrderPaymentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int deleteByExample(TOrderPaymentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int insert(TOrderPayment record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int insertSelective(TOrderPayment record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	List<TOrderPayment> selectByExample(TOrderPaymentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	TOrderPayment selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") TOrderPayment record, @Param("example") TOrderPaymentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int updateByExample(@Param("record") TOrderPayment record, @Param("example") TOrderPaymentExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int updateByPrimaryKeySelective(TOrderPayment record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
-	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
-	 */
-	int updateByPrimaryKey(TOrderPayment record);
-
-	outOrderPayment selectByidGetDetails(Integer id);
-
-	int insertSelectiveGetId(TOrderPayment p);
-
-	List<outOrderPayment> selectByTid(Integer id);
-
-	List<outOrderPayment> selectList(@Param("tpcId")Integer tpcId, @Param("nodeId")Integer nodeId);
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderPayment;
+import com.goafanti.common.model.TOrderPaymentExample;
+import com.goafanti.organization.bo.outOrderPayment;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderPaymentMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	long countByExample(TOrderPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int deleteByExample(TOrderPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int insert(TOrderPayment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int insertSelective(TOrderPayment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	List<TOrderPayment> selectByExample(TOrderPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	TOrderPayment selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") TOrderPayment record, @Param("example") TOrderPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int updateByExample(@Param("record") TOrderPayment record, @Param("example") TOrderPaymentExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int updateByPrimaryKeySelective(TOrderPayment record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_payment
+	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
+	 */
+	int updateByPrimaryKey(TOrderPayment record);
+
+	outOrderPayment selectByidGetDetails(@Param("id")Integer id, @Param("type")int type);
+
+	int insertSelectiveGetId(TOrderPayment p);
+
+	List<outOrderPayment> selectByTid(Integer id);
+
+	List<outOrderPayment> selectList(@Param("tpcId")Integer tpcId, @Param("nodeId")Integer nodeId);
+
+	void updateByids(List<Integer> list);
 }

+ 63 - 35
src/main/java/com/goafanti/common/mapper/CompanyLibraryMapper.xml

@@ -5,18 +5,19 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="company_name" jdbcType="VARCHAR" property="companyName" />
-    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="type" jdbcType="INTEGER" property="type" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -50,7 +51,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -84,15 +85,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
-    id, company_name, aid, create_time
+    id, company_name, type, create_time, aid
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.CompanyLibraryExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     select
     <if test="distinct">
@@ -111,7 +112,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -122,7 +123,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     delete from company_library
     where id = #{id,jdbcType=INTEGER}
@@ -131,7 +132,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     delete from company_library
     <if test="_parameter != null">
@@ -142,18 +143,18 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
-    insert into company_library (id, company_name, aid, 
-      create_time)
-    values (#{id,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP})
+    insert into company_library (id, company_name, type, 
+      create_time, aid)
+    values (#{id,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.CompanyLibrary">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     insert into company_library
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -163,12 +164,15 @@
       <if test="companyName != null">
         company_name,
       </if>
-      <if test="aid != null">
-        aid,
+      <if test="type != null">
+        type,
       </if>
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="aid != null">
+        aid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -177,19 +181,22 @@
       <if test="companyName != null">
         #{companyName,jdbcType=VARCHAR},
       </if>
-      <if test="aid != null">
-        #{aid,jdbcType=VARCHAR},
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.CompanyLibraryExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     select count(*) from company_library
     <if test="_parameter != null">
@@ -200,7 +207,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     update company_library
     <set>
@@ -210,12 +217,15 @@
       <if test="record.companyName != null">
         company_name = #{record.companyName,jdbcType=VARCHAR},
       </if>
-      <if test="record.aid != null">
-        aid = #{record.aid,jdbcType=VARCHAR},
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
       </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="record.aid != null">
+        aid = #{record.aid,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -225,13 +235,14 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     update company_library
     set id = #{record.id,jdbcType=INTEGER},
       company_name = #{record.companyName,jdbcType=VARCHAR},
-      aid = #{record.aid,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+      type = #{record.type,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      aid = #{record.aid,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -240,19 +251,22 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     update company_library
     <set>
       <if test="companyName != null">
         company_name = #{companyName,jdbcType=VARCHAR},
       </if>
-      <if test="aid != null">
-        aid = #{aid,jdbcType=VARCHAR},
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -260,17 +274,18 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Jun 11 15:36:42 CST 2020.
+      This element was generated on Thu Sep 03 09:21:51 CST 2020.
     -->
     update company_library
     set company_name = #{companyName,jdbcType=VARCHAR},
-      aid = #{aid,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      type = #{type,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      aid = #{aid,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   
   <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.CompanyLibrary" useGeneratedKeys="true">
-    insert into company_library
+     insert into company_library
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
@@ -278,9 +293,15 @@
       <if test="companyName != null">
         company_name,
       </if>
+      <if test="type != null">
+        type,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="aid != null">
+        aid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -289,9 +310,15 @@
       <if test="companyName != null">
         #{companyName,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
     </trim>
     <selectKey keyProperty="id" order="AFTER" resultType="int">
         SELECT LAST_INSERT_ID()
@@ -305,6 +332,7 @@
   
   <select id="selectVague" resultType="com.goafanti.common.model.CompanyLibrary">
   select id,company_name companyName from  company_library
-    where  company_name like concat('%',#{companyName,jdbcType=VARCHAR},'%')
+    where  company_name like concat('%',#{name,jdbcType=VARCHAR},'%')
+    and type= #{type}
   </select>
 </mapper>

+ 20 - 4
src/main/java/com/goafanti/common/mapper/TOrderPaymentMapper.xml

@@ -566,11 +566,19 @@
     </selectKey>
   </insert>
   <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,
-	  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
+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,
+	d.finance_name financeName ,c.order_no orderNo,a.application_amount applicationAmount,
+	  b.party_amount nodePartyAmount,b.total_amount nodeTotalAmount,b.unit_price nodeUnitPrice
+	 from t_order_payment a
+	 <if test="type==0">
+	 left join third_party_company b on a.tpc_id=b.id
+	 </if>
+	<if test="type==1">  
+	 left join payment_node b on a.node_id=b.id
+	 </if>
 	 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">
@@ -596,4 +604,12 @@
 	 </if>
   </select>
   
+  <update id="updateByids">
+  	 update t_order_payment set status=3
+	 where id in 
+  <foreach item="item" collection="list" separator="," open="(" close=")" index="">
+       #{item}
+     </foreach>
+  </update>
+  
 </mapper>

+ 121 - 136
src/main/java/com/goafanti/common/model/CompanyLibrary.java

@@ -1,137 +1,122 @@
-package com.goafanti.common.model;
-
-import java.util.Date;
-
-public class CompanyLibrary {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column company_library.id
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    private Integer id;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column company_library.company_name
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    private String companyName;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column company_library.aid
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    private String aid;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column company_library.create_time
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    private Date createTime;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column company_library.id
-     *
-     * @return the value of company_library.id
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public Integer getId() {
-        return id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column company_library.id
-     *
-     * @param id the value for company_library.id
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 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 company_library.company_name
-     *
-     * @return the value of company_library.company_name
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public String getCompanyName() {
-        return companyName;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column company_library.company_name
-     *
-     * @param companyName the value for company_library.company_name
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public void setCompanyName(String companyName) {
-        this.companyName = companyName;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column company_library.aid
-     *
-     * @return the value of company_library.aid
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public String getAid() {
-        return aid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column company_library.aid
-     *
-     * @param aid the value for company_library.aid
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public void setAid(String aid) {
-        this.aid = aid;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column company_library.create_time
-     *
-     * @return the value of company_library.create_time
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column company_library.create_time
-     *
-     * @param createTime the value for company_library.create_time
-     *
-     * @mbg.generated Thu Jun 11 15:36:42 CST 2020
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class CompanyLibrary {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column company_library.id
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column company_library.company_name
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	private String companyName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column company_library.type
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column company_library.create_time
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column company_library.aid
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	private String aid;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column company_library.id
+	 * @return  the value of company_library.id
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column company_library.id
+	 * @param id  the value for company_library.id
+	 * @mbg.generated  Thu Sep 03 09:21:51 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 company_library.company_name
+	 * @return  the value of company_library.company_name
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public String getCompanyName() {
+		return companyName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column company_library.company_name
+	 * @param companyName  the value for company_library.company_name
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public void setCompanyName(String companyName) {
+		this.companyName = companyName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column company_library.type
+	 * @return  the value of company_library.type
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column company_library.type
+	 * @param type  the value for company_library.type
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column company_library.create_time
+	 * @return  the value of company_library.create_time
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column company_library.create_time
+	 * @param createTime  the value for company_library.create_time
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column company_library.aid
+	 * @return  the value of company_library.aid
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public String getAid() {
+		return aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column company_library.aid
+	 * @param aid  the value for company_library.aid
+	 * @mbg.generated  Thu Sep 03 09:21:51 CST 2020
+	 */
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 581 - 562
src/main/java/com/goafanti/common/model/CompanyLibraryExample.java


+ 27 - 19
src/main/java/com/goafanti/organization/bo/outOrderPayment.java

@@ -5,41 +5,49 @@ import java.math.BigDecimal;
 import com.goafanti.common.model.TOrderPayment;
 
 public class outOrderPayment extends TOrderPayment{
-	 private Integer NodeQuantity;
-	 private BigDecimal NodePartyAmount;
-	 private BigDecimal NodeTotalAmount;
+	 private Integer nodeQuantity;
+	 private BigDecimal nodePartyAmount;
+	 private BigDecimal nodeTotalAmount;
+	 private BigDecimal nodeUnitPrice;
 	 private String createTimes;
 	 
 	 private String financeName;
+	
+	public String getFinanceName() {
+		return financeName;
+	}
+	public void setFinanceName(String financeName) {
+		this.financeName = financeName;
+	}
+	public String getCreateTimes() {
+		return createTimes;
+	}
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
 	public Integer getNodeQuantity() {
-		return NodeQuantity;
+		return nodeQuantity;
 	}
 	public void setNodeQuantity(Integer nodeQuantity) {
-		NodeQuantity = nodeQuantity;
+		this.nodeQuantity = nodeQuantity;
 	}
 	public BigDecimal getNodePartyAmount() {
-		return NodePartyAmount;
+		return nodePartyAmount;
 	}
 	public void setNodePartyAmount(BigDecimal nodePartyAmount) {
-		NodePartyAmount = nodePartyAmount;
+		this.nodePartyAmount = nodePartyAmount;
 	}
 	public BigDecimal getNodeTotalAmount() {
-		return NodeTotalAmount;
+		return nodeTotalAmount;
 	}
 	public void setNodeTotalAmount(BigDecimal nodeTotalAmount) {
-		NodeTotalAmount = nodeTotalAmount;
-	}
-	public String getFinanceName() {
-		return financeName;
+		this.nodeTotalAmount = nodeTotalAmount;
 	}
-	public void setFinanceName(String financeName) {
-		this.financeName = financeName;
+	public BigDecimal getNodeUnitPrice() {
+		return nodeUnitPrice;
 	}
-	public String getCreateTimes() {
-		return createTimes;
-	}
-	public void setCreateTimes(String createTimes) {
-		this.createTimes = createTimes;
+	public void setNodeUnitPrice(BigDecimal nodeUnitPrice) {
+		this.nodeUnitPrice = nodeUnitPrice;
 	}
 	
 	/*public String getAuditInformation() {

+ 21 - 4
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -29,6 +29,7 @@ import com.goafanti.organization.service.ThirdPartyCompanyService;
 @RestController
 @RequestMapping("/api/admin/company")
 public class ThirdPartyCompanyApiController extends BaseApiController{
+	
 	@Resource
 	private ThirdPartyCompanyService thirdPartyCompanyService;
 	
@@ -38,7 +39,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/addCompany" , method = RequestMethod.POST)
-	public Result addCompany(@Valid ThirdPartyCompany t,BindingResult bindingResult) {
+	public Result addCompany(@Valid ThirdPartyCompany t,BindingResult bindingResult,Integer calculation) {
 		Result res =new Result();
 		if (bindingResult.hasErrors()) {
             res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -52,7 +53,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		if (!res.getError().isEmpty()) {
             return res;
         }
-		res.data(thirdPartyCompanyService.addCompany(t));
+		res.data(thirdPartyCompanyService.addCompany(t,calculation));
 		return res;
 	}
 	
@@ -124,13 +125,13 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/selectVague" , method = RequestMethod.GET)
-	public Result selectVague(String  name) {
+	public Result selectVague(String  name,Integer type) {
 		Result res =new Result();
 		if (StringUtils.isBlank(name)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
 			return res;
 		}
-		res.data(thirdPartyCompanyService.selectVague(name));
+		res.data(thirdPartyCompanyService.selectVague(name,type));
 		return res;
 	}
 	
@@ -465,4 +466,20 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		return res;
 	}
 	
+	/**
+	 *  删除软著价格表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/groupPayment" , method = RequestMethod.POST)
+	public Result groupPayment(String ids) {
+		Result res =new Result();
+		if (StringUtils.isBlank(ids)) {
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+				return res;
+		}
+		res.data(thirdPartyCompanyService.updateGroupPayment(ids));
+		return res;
+	}
+	
 }

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

@@ -1,6 +1,7 @@
 package com.goafanti.organization.service;
 
 import java.util.List;
+import java.util.Map;
 
 import com.goafanti.common.model.CompanyLibrary;
 import com.goafanti.common.model.PaymentNode;
@@ -23,9 +24,9 @@ import com.goafanti.organization.bo.outOrderPayment;
 
 public interface ThirdPartyCompanyService {
 
-	int addCompany(ThirdPartyCompany t);
+	int addCompany(ThirdPartyCompany t, Integer calculation);
 
-	List<CompanyLibrary> selectVague(String name);
+	List<CompanyLibrary> selectVague(String name, Integer type);
 
 	int updateCompany(ThirdPartyCompany t);
 
@@ -75,5 +76,7 @@ public interface ThirdPartyCompanyService {
 
 	boolean checkSoftWritingPrice(SoftWritingPrice s);
 
+	Map<String ,Object> updateGroupPayment(String ids);
+
 
 }

+ 51 - 11
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -85,14 +85,30 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 
 	@Override
-	public int addCompany(ThirdPartyCompany t) {
-		SoftWritingPrice s=new SoftWritingPrice();
-		s.setCid(t.getCid());
-		s.setMaterial(t.getMaterial());
-		s.setUrgent(t.getUrgent());
-		List<SoftWritingPrice> list=softWritingPriceMapper.checkSoftWritingPrice(s);
-		for (SoftWritingPrice sw : list) {
-			t.setUnitPrice(sw.getUnitPrice().multiply(new BigDecimal(t.getQuantity())));
+	public int addCompany(ThirdPartyCompany t,Integer calculation) {
+		if(calculation==null)calculation=0;
+		if (calculation==0) {//0其他 1计算
+			CompanyLibrary c=new CompanyLibrary();
+			List<Integer> list=companyLibraryMapper.selectName(t.getCompanyName());
+			if (list.size()<1) {
+				c.setCompanyName(t.getCompanyName());
+				c.setAid(TokenManager.getAdminId());
+				c.setType(1);//0系统 1录入
+				companyLibraryMapper.insertSelectiveGetId(c);
+				t.setCid(c.getId());
+			}else {
+				t.setCid(list.get(0));
+			}
+			t.setTotalAmount(t.getUnitPrice().multiply(new BigDecimal(t.getQuantity())));
+		}else if (calculation==1) {
+			SoftWritingPrice s=new SoftWritingPrice();
+			s.setCid(t.getCid());
+			s.setMaterial(t.getMaterial());
+			s.setUrgent(t.getUrgent());
+			List<SoftWritingPrice> list=softWritingPriceMapper.checkSoftWritingPrice(s);
+			for (SoftWritingPrice sw : list) {
+				t.setUnitPrice(sw.getUnitPrice().multiply(new BigDecimal(t.getQuantity())));
+			}
 		}
 		return thirdPartyCompanyMapper.insertSelective(t);
 	}
@@ -113,8 +129,9 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 
 	@Override
-	public List<CompanyLibrary> selectVague(String name) {
-		return companyLibraryMapper.selectVague(name);
+	public List<CompanyLibrary> selectVague(String name,Integer type) {
+		if(type==null)type=1;
+		return companyLibraryMapper.selectVague(name,type);
 	}
 
 
@@ -180,7 +197,9 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	@Override
 	public outOrderPayment OrderPaymentDetails(Integer id) {
-		return tOrderPaymentMapper.selectByidGetDetails(id);
+		TOrderPayment tt=tOrderPaymentMapper.selectByPrimaryKey(id);
+		int type=tt.getChooseType();
+		return tOrderPaymentMapper.selectByidGetDetails(id,type);
 	}
 
 
@@ -486,6 +505,27 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	}
 
 
+	@Override
+	public Map<String ,Object> updateGroupPayment(String ids) {
+		String [] idss=ids.split(",");
+		List<Integer>elist=new ArrayList<>();
+		List<Integer> list=new ArrayList<>();
+		for (String s : idss) {
+			TOrderPayment top=tOrderPaymentMapper.selectByPrimaryKey(Integer.valueOf(s));
+			if (top!=null&&top.getStatus()==1) {
+				list.add(top.getId());
+			}else {
+				elist.add(Integer.valueOf(s));
+			}
+		}
+		if(!list.isEmpty())tOrderPaymentMapper.updateByids(list);
+		Map<String ,Object> map=new HashMap<>();
+		map.put("OK", list);
+		map.put("fail", elist);
+		return map;
+	}
+
+