anderx hace 4 años
padre
commit
a32660df7b

+ 1 - 1
GeneratorConfig.xml

@@ -45,7 +45,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="t_order_payment"
+    <table schema="aft" tableName="t_order_outsource"
 	enableCountByExample="false" enableUpdateByExample="false"
 	enableDeleteByExample="false" enableSelectByExample="false"
 	selectByExampleQueryId="false" enableSelectByPrimaryKey="true"

+ 1 - 1
src/main/java/com/goafanti/common/dao/OfficialFeePriceMapper.java

@@ -51,7 +51,7 @@ public interface OfficialFeePriceMapper {
 	List<OfficialFeePrice> selectListByname(@Param("name")String name);
 
 
-	OfficialFeePrice selectBytype(Integer type);
+	OfficialFeePrice selectBytype(@Param("type")Integer type,@Param("patentType")Integer patentType);
 
 
 	OfficialFeePrice countOfficialFeePrice(OfficialFeePrice o);

+ 9 - 34
src/main/java/com/goafanti/common/dao/TOrderOutsourceMapper.java

@@ -12,68 +12,43 @@ import org.apache.ibatis.annotations.Param;
 public interface TOrderOutsourceMapper {
     /**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
-	 */
-	long countByExample(TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
-	 */
-	int deleteByExample(TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
 	int insert(TOrderOutsource record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
 	int insertSelective(TOrderOutsource record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
-	 */
-	List<TOrderOutsource> selectByExample(TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
 	TOrderOutsource selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
-	int updateByExampleSelective(@Param("record") TOrderOutsource record,
-			@Param("example") TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
-	 */
-	int updateByExample(@Param("record") TOrderOutsource record, @Param("example") TOrderOutsourceExample example);
+	int updateByPrimaryKeySelective(TOrderOutsource record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
-	int updateByPrimaryKeySelective(TOrderOutsource record);
+	int updateByPrimaryKeyWithBLOBs(TOrderOutsource record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Fri Jun 12 13:38:21 CST 2020
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
 	 */
 	int updateByPrimaryKey(TOrderOutsource record);
 

+ 2 - 1
src/main/java/com/goafanti/common/mapper/OfficialFeePriceMapper.xml

@@ -161,7 +161,8 @@
     select 
     <include refid="Base_Column_List" />
     from official_fee_price
-    where type = #{cid,jdbcType=INTEGER}
+    where type = #{type,jdbcType=INTEGER}
+    and patent_type= #{patentType,jdbcType=INTEGER}
   </select>
   <select id="countOfficialFeePrice" resultMap="BaseResultMap">
   	select 

+ 86 - 249
src/main/java/com/goafanti/common/mapper/TOrderOutsourceMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
@@ -13,7 +13,6 @@
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
     <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
-    <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
     <result column="amount" jdbcType="DECIMAL" property="amount" />
     <result column="company_name" jdbcType="VARCHAR" property="companyName" />
     <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
@@ -23,115 +22,47 @@
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="start_type" jdbcType="INTEGER" property="startType" />
+    <result column="patent_type" jdbcType="INTEGER" property="patentType" />
     <result column="patent_name_type" jdbcType="INTEGER" property="patentNameType" />
     <result column="patent_name" jdbcType="VARCHAR" property="patentName" />
-    <result column="patent_type" jdbcType="INTEGER" property="patentType" />
+    <result column="actual_official" jdbcType="INTEGER" property="actualOfficial" />
   </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 Fri Jun 12 13:38:21 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">
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderOutsource">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
-    <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>
+    <result column="picture_url" jdbcType="LONGVARCHAR" property="pictureUrl" />
+  </resultMap>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
-    id, order_no, refund_status, create_time, remarks, attachment_url, picture_url, amount, 
-    company_name, audit_time, unit_price, unit_number, outsource_remarks, type, tid, 
-    start_type, patent_name_type, patent_name, patent_type
+    id, order_no, refund_status, create_time, remarks, attachment_url, amount, company_name, 
+    audit_time, unit_price, unit_number, outsource_remarks, `type`, tid, start_type, 
+    patent_type, patent_name_type, patent_name, actual_official
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample" resultMap="BaseResultMap">
+  <sql id="Blob_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from t_order_outsource
-    <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">
+    picture_url
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
     from t_order_outsource
     where id = #{id,jdbcType=INTEGER}
   </select>
@@ -139,48 +70,37 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     delete from t_order_outsource
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
-    -->
-    delete from t_order_outsource
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TOrderOutsource">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     insert into t_order_outsource (id, order_no, refund_status, 
       create_time, remarks, attachment_url, 
-      picture_url, amount, company_name, 
-      audit_time, unit_price, unit_number, 
-      outsource_remarks, type, tid, 
-      start_type, patent_name_type, patent_name, 
-      patent_type)
+      amount, company_name, audit_time, 
+      unit_price, unit_number, outsource_remarks, 
+      `type`, tid, start_type, 
+      patent_type, patent_name_type, patent_name, 
+      actual_official, picture_url)
     values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER}, 
       #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=VARCHAR}, 
-      #{pictureUrl,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{companyName,jdbcType=VARCHAR}, 
-      #{auditTime,jdbcType=TIMESTAMP}, #{unitPrice,jdbcType=DECIMAL}, #{unitNumber,jdbcType=INTEGER}, 
-      #{outsourceRemarks,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, 
-      #{startType,jdbcType=INTEGER}, #{patentNameType,jdbcType=INTEGER}, #{patentName,jdbcType=VARCHAR}, 
-      #{patentType,jdbcType=INTEGER})
+      #{amount,jdbcType=DECIMAL}, #{companyName,jdbcType=VARCHAR}, #{auditTime,jdbcType=TIMESTAMP}, 
+      #{unitPrice,jdbcType=DECIMAL}, #{unitNumber,jdbcType=INTEGER}, #{outsourceRemarks,jdbcType=VARCHAR}, 
+      #{type,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{startType,jdbcType=INTEGER}, 
+      #{patentType,jdbcType=INTEGER}, #{patentNameType,jdbcType=INTEGER}, #{patentName,jdbcType=VARCHAR}, 
+      #{actualOfficial,jdbcType=INTEGER}, #{pictureUrl,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderOutsource">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     insert into t_order_outsource
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -202,9 +122,6 @@
       <if test="attachmentUrl != null">
         attachment_url,
       </if>
-      <if test="pictureUrl != null">
-        picture_url,
-      </if>
       <if test="amount != null">
         amount,
       </if>
@@ -224,7 +141,7 @@
         outsource_remarks,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="tid != null">
         tid,
@@ -232,18 +149,21 @@
       <if test="startType != null">
         start_type,
       </if>
+      <if test="patentType != null">
+        patent_type,
+      </if>
       <if test="patentNameType != null">
         patent_name_type,
       </if>
       <if test="patentName != null">
         patent_name,
       </if>
-      <if test="patentType != null">
-        patent_type,
-      </if>
       <if test="actualOfficial != null">
         actual_official,
       </if>
+      <if test="pictureUrl != null">
+        picture_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -264,9 +184,6 @@
       <if test="attachmentUrl != null">
         #{attachmentUrl,jdbcType=VARCHAR},
       </if>
-      <if test="pictureUrl != null">
-        #{pictureUrl,jdbcType=VARCHAR},
-      </if>
       <if test="amount != null">
         #{amount,jdbcType=DECIMAL},
       </if>
@@ -294,136 +211,28 @@
       <if test="startType != null">
         #{startType,jdbcType=INTEGER},
       </if>
+      <if test="patentType != null">
+        #{patentType,jdbcType=INTEGER},
+      </if>
       <if test="patentNameType != null">
         #{patentNameType,jdbcType=INTEGER},
       </if>
       <if test="patentName != null">
         #{patentName,jdbcType=VARCHAR},
       </if>
-      <if test="patentType != null">
-        #{patentType,jdbcType=INTEGER},
-      </if>
       <if test="actualOfficial != null">
         #{actualOfficial,jdbcType=INTEGER},
       </if>
+      <if test="pictureUrl != null">
+        #{pictureUrl,jdbcType=LONGVARCHAR},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderOutsourceExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
-    -->
-    select count(*) from t_order_outsource
-    <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 Fri Jun 12 13:38:21 CST 2020.
-    -->
-    update t_order_outsource
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.orderNo != null">
-        order_no = #{record.orderNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.refundStatus != null">
-        refund_status = #{record.refundStatus,jdbcType=INTEGER},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.remarks != null">
-        remarks = #{record.remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.attachmentUrl != null">
-        attachment_url = #{record.attachmentUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pictureUrl != null">
-        picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.amount != null">
-        amount = #{record.amount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.companyName != null">
-        company_name = #{record.companyName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.auditTime != null">
-        audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.unitPrice != null">
-        unit_price = #{record.unitPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.unitNumber != null">
-        unit_number = #{record.unitNumber,jdbcType=INTEGER},
-      </if>
-      <if test="record.outsourceRemarks != null">
-        outsource_remarks = #{record.outsourceRemarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.type != null">
-        type = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.tid != null">
-        tid = #{record.tid,jdbcType=INTEGER},
-      </if>
-      <if test="record.startType != null">
-        start_type = #{record.startType,jdbcType=INTEGER},
-      </if>
-      <if test="record.patentNameType != null">
-        patent_name_type = #{record.patentNameType,jdbcType=INTEGER},
-      </if>
-      <if test="record.patentName != null">
-        patent_name = #{record.patentName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.patentType != null">
-        patent_type = #{record.patentType,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 Fri Jun 12 13:38:21 CST 2020.
-    -->
-    update t_order_outsource
-    set id = #{record.id,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=VARCHAR},
-      refund_status = #{record.refundStatus,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      remarks = #{record.remarks,jdbcType=VARCHAR},
-      attachment_url = #{record.attachmentUrl,jdbcType=VARCHAR},
-      picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
-      amount = #{record.amount,jdbcType=DECIMAL},
-      company_name = #{record.companyName,jdbcType=VARCHAR},
-      audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
-      unit_price = #{record.unitPrice,jdbcType=DECIMAL},
-      unit_number = #{record.unitNumber,jdbcType=INTEGER},
-      outsource_remarks = #{record.outsourceRemarks,jdbcType=VARCHAR},
-      type = #{record.type,jdbcType=INTEGER},
-      tid = #{record.tid,jdbcType=INTEGER},
-      start_type = #{record.startType,jdbcType=INTEGER},
-      patent_name_type = #{record.patentNameType,jdbcType=INTEGER},
-      patent_name = #{record.patentName,jdbcType=VARCHAR},
-      patent_type = #{record.patentType,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderOutsource">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     update t_order_outsource
     <set>
@@ -442,9 +251,6 @@
       <if test="attachmentUrl != null">
         attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
       </if>
-      <if test="pictureUrl != null">
-        picture_url = #{pictureUrl,jdbcType=VARCHAR},
-      </if>
       <if test="amount != null">
         amount = #{amount,jdbcType=DECIMAL},
       </if>
@@ -464,7 +270,7 @@
         outsource_remarks = #{outsourceRemarks,jdbcType=VARCHAR},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="tid != null">
         tid = #{tid,jdbcType=INTEGER},
@@ -472,26 +278,57 @@
       <if test="startType != null">
         start_type = #{startType,jdbcType=INTEGER},
       </if>
+      <if test="patentType != null">
+        patent_type = #{patentType,jdbcType=INTEGER},
+      </if>
       <if test="patentNameType != null">
         patent_name_type = #{patentNameType,jdbcType=INTEGER},
       </if>
       <if test="patentName != null">
         patent_name = #{patentName,jdbcType=VARCHAR},
       </if>
-      <if test="patentType != null">
-        patent_type = #{patentType,jdbcType=INTEGER},
-      </if>
       <if test="actualOfficial != null">
         actual_official = #{actualOfficial,jdbcType=INTEGER},
       </if>
+      <if test="pictureUrl != null">
+        picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.TOrderOutsource">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
+    -->
+    update t_order_outsource
+    set order_no = #{orderNo,jdbcType=VARCHAR},
+      refund_status = #{refundStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
+      amount = #{amount,jdbcType=DECIMAL},
+      company_name = #{companyName,jdbcType=VARCHAR},
+      audit_time = #{auditTime,jdbcType=TIMESTAMP},
+      unit_price = #{unitPrice,jdbcType=DECIMAL},
+      unit_number = #{unitNumber,jdbcType=INTEGER},
+      outsource_remarks = #{outsourceRemarks,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      tid = #{tid,jdbcType=INTEGER},
+      start_type = #{startType,jdbcType=INTEGER},
+      patent_type = #{patentType,jdbcType=INTEGER},
+      patent_name_type = #{patentNameType,jdbcType=INTEGER},
+      patent_name = #{patentName,jdbcType=VARCHAR},
+      actual_official = #{actualOfficial,jdbcType=INTEGER},
+      picture_url = #{pictureUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderOutsource">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Jun 12 13:38:21 CST 2020.
+      This element was generated on Fri Jul 23 15:28:48 CST 2021.
     -->
     update t_order_outsource
     set order_no = #{orderNo,jdbcType=VARCHAR},
@@ -499,19 +336,19 @@
       create_time = #{createTime,jdbcType=TIMESTAMP},
       remarks = #{remarks,jdbcType=VARCHAR},
       attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
-      picture_url = #{pictureUrl,jdbcType=VARCHAR},
       amount = #{amount,jdbcType=DECIMAL},
       company_name = #{companyName,jdbcType=VARCHAR},
       audit_time = #{auditTime,jdbcType=TIMESTAMP},
       unit_price = #{unitPrice,jdbcType=DECIMAL},
       unit_number = #{unitNumber,jdbcType=INTEGER},
       outsource_remarks = #{outsourceRemarks,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
       tid = #{tid,jdbcType=INTEGER},
       start_type = #{startType,jdbcType=INTEGER},
+      patent_type = #{patentType,jdbcType=INTEGER},
       patent_name_type = #{patentNameType,jdbcType=INTEGER},
       patent_name = #{patentName,jdbcType=VARCHAR},
-      patent_type = #{patentType,jdbcType=INTEGER}
+      actual_official = #{actualOfficial,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByOrderNo" resultType="com.goafanti.order.bo.OrderOutsourceDtails">
@@ -644,7 +481,7 @@
 	and b.create_time between #{starTime} and  #{endTime}
 	</if>
   </select>
-  <select id="selectByTid"  parameterType="java.lang.Integer" resultType="com.goafanti.organization.bo.outProjectBo">
+  <select id="selectByTid" parameterType="java.lang.Integer" resultType="com.goafanti.organization.bo.outProjectBo">
      select a.id,a.start_type startType,a.patent_type patentType,c.`type` projectType
     from  t_order_task b left join  t_order_outsource a on a.tid=b.id
     left join business_project c on b.commodity_id=c.id

+ 25 - 19
src/main/java/com/goafanti/common/mapper/TOrderPaymentMapper.xml

@@ -286,6 +286,9 @@
       <if test="nodeId != null">
         node_id,
       </if>
+      <if test="chooseType != null">
+        choose_type,
+      </if>
       <if test="paymentType != null">
         payment_type,
       </if>
@@ -299,7 +302,10 @@
         payment_status,
       </if>
       <if test="status != null">
-        status,
+        `status`,
+      </if>
+      <if test="applicationAmount != null">
+        application_amount,
       </if>
       <if test="paymentAmount != null">
         payment_amount,
@@ -310,21 +316,18 @@
       <if test="createTime != null">
         create_time,
       </if>
-      <if test="tpcId != null">
-        tpc_id,
-      </if>
-      <if test="applicationAmount != null">
-        application_amount,
-      </if>
-      <if test="chooseType != null">
-        choose_type,
-      </if>
       <if test="aid != null">
         aid,
       </if>
       <if test="aname != null">
         aname,
       </if>
+      <if test="tpcId != null">
+        tpc_id,
+      </if>
+      <if test="processStatus != null">
+        process_status,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -336,6 +339,9 @@
       <if test="nodeId != null">
         #{nodeId,jdbcType=INTEGER},
       </if>
+      <if test="chooseType != null">
+        #{chooseType,jdbcType=INTEGER},
+      </if>
       <if test="paymentType != null">
         #{paymentType,jdbcType=INTEGER},
       </if>
@@ -351,6 +357,9 @@
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
+      <if test="applicationAmount != null">
+        #{applicationAmount,jdbcType=DECIMAL},
+      </if>
       <if test="paymentAmount != null">
         #{paymentAmount,jdbcType=DECIMAL},
       </if>
@@ -360,21 +369,18 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="tpcId != null">
-        #{tpcId,jdbcType=INTEGER},
-      </if>
-      <if test="applicationAmount != null">
-        #{applicationAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="chooseType != null">
-        #{chooseType,jdbcType=INTEGER},
-      </if>
       <if test="aid != null">
         #{aid,jdbcType=VARCHAR},
       </if>
       <if test="aname != null">
         #{aname,jdbcType=VARCHAR},
       </if>
+      <if test="tpcId != null">
+        #{tpcId,jdbcType=INTEGER},
+      </if>
+      <if test="processStatus != null">
+        #{processStatus,jdbcType=INTEGER},
+      </if>
     </trim>
      <selectKey keyProperty="id" order="AFTER" resultType="int">
         SELECT LAST_INSERT_ID()

+ 330 - 70
src/main/java/com/goafanti/common/model/TOrderOutsource.java

@@ -2,249 +2,509 @@ package com.goafanti.common.model;
 
 import java.math.BigDecimal;
 import java.util.Date;
-import javax.annotation.Generated;
+import java.io.Serializable;
 
-public class TOrderOutsource {
+public class TOrderOutsource implements Serializable {
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.id")
+	/**
+	 * Database Column Remarks: id This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.id
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer id;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.order_no")
+	/**
+	 * Database Column Remarks: 订单编号 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.order_no
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String orderNo;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.refund_status")
+	/**
+	 * Database Column Remarks: 状态 0-待审核 ,1-审核通过,2-审核拒绝 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.refund_status
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer refundStatus;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.create_time")
+	/**
+	 * Database Column Remarks: 创建时间 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.create_time
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Date createTime;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.remarks")
+	/**
+	 * Database Column Remarks: 审核备注 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.remarks
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String remarks;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.attachment_url")
+	/**
+	 * Database Column Remarks: 附件地址 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.attachment_url
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String attachmentUrl;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.amount")
+	/**
+	 * Database Column Remarks: 总金额 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.amount
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private BigDecimal amount;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.company_name")
+	/**
+	 * Database Column Remarks: 公司名称 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.company_name
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String companyName;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.audit_time")
+	/**
+	 * Database Column Remarks: 审核时间 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.audit_time
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Date auditTime;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.unit_price")
+	/**
+	 * Database Column Remarks: 单价 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.unit_price
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private BigDecimal unitPrice;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.unit_number")
+	/**
+	 * Database Column Remarks: 数量 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.unit_number
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer unitNumber;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.outsource_remarks")
+	/**
+	 * Database Column Remarks: 外包备注 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.outsource_remarks
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String outsourceRemarks;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.type")
+	/**
+	 * Database Column Remarks: 分类 0订单 1项目 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer type;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.tid")
+	/**
+	 * Database Column Remarks: 任务编号 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.tid
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer tid;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.start_type")
+	/**
+	 * Database Column Remarks: 0外包 1供应商 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.start_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer startType;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_type")
+	/**
+	 * Database Column Remarks: 专利类型 0申请/变更/转让 1买卖 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.patent_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer patentType;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_name_type")
+	/**
+	 * Database Column Remarks: 专利名称 0实用新型 1发明专利 2外观专利 3 其他 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.patent_name_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer patentNameType;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_name")
+	/**
+	 * Database Column Remarks: 专利名称 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.patent_name
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String patentName;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.628+08:00", comments = "Source field: t_order_outsource.actual_official")
+	/**
+	 * Database Column Remarks: 签单标记 0实际已缴 1实际未已缴 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.actual_official
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private Integer actualOfficial;
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.628+08:00", comments = "Source field: t_order_outsource.picture_url")
+	/**
+	 * Database Column Remarks: 图片地址 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.picture_url
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	private String pictureUrl;
-
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.id")
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_outsource
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.id
+	 * @return  the value of t_order_outsource.id
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getId() {
 		return id;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.id")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.id
+	 * @param id  the value for t_order_outsource.id
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setId(Integer id) {
 		this.id = id;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.order_no")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.order_no
+	 * @return  the value of t_order_outsource.order_no
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getOrderNo() {
 		return orderNo;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.order_no")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.order_no
+	 * @param orderNo  the value for t_order_outsource.order_no
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
+		this.orderNo = orderNo == null ? null : orderNo.trim();
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.refund_status")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.refund_status
+	 * @return  the value of t_order_outsource.refund_status
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getRefundStatus() {
 		return refundStatus;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.refund_status")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.refund_status
+	 * @param refundStatus  the value for t_order_outsource.refund_status
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setRefundStatus(Integer refundStatus) {
 		this.refundStatus = refundStatus;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.create_time")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.create_time
+	 * @return  the value of t_order_outsource.create_time
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Date getCreateTime() {
 		return createTime;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.create_time")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.create_time
+	 * @param createTime  the value for t_order_outsource.create_time
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.remarks")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.remarks
+	 * @return  the value of t_order_outsource.remarks
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getRemarks() {
 		return remarks;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.remarks")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.remarks
+	 * @param remarks  the value for t_order_outsource.remarks
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setRemarks(String remarks) {
-		this.remarks = remarks;
+		this.remarks = remarks == null ? null : remarks.trim();
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.attachment_url")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.attachment_url
+	 * @return  the value of t_order_outsource.attachment_url
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getAttachmentUrl() {
 		return attachmentUrl;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.attachment_url")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.attachment_url
+	 * @param attachmentUrl  the value for t_order_outsource.attachment_url
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setAttachmentUrl(String attachmentUrl) {
-		this.attachmentUrl = attachmentUrl;
+		this.attachmentUrl = attachmentUrl == null ? null : attachmentUrl.trim();
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.amount")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.amount
+	 * @return  the value of t_order_outsource.amount
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public BigDecimal getAmount() {
 		return amount;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.amount")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.amount
+	 * @param amount  the value for t_order_outsource.amount
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setAmount(BigDecimal amount) {
 		this.amount = amount;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.company_name")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.company_name
+	 * @return  the value of t_order_outsource.company_name
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getCompanyName() {
 		return companyName;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.company_name")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.company_name
+	 * @param companyName  the value for t_order_outsource.company_name
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setCompanyName(String companyName) {
-		this.companyName = companyName;
+		this.companyName = companyName == null ? null : companyName.trim();
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.audit_time")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.audit_time
+	 * @return  the value of t_order_outsource.audit_time
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Date getAuditTime() {
 		return auditTime;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.audit_time")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.audit_time
+	 * @param auditTime  the value for t_order_outsource.audit_time
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setAuditTime(Date auditTime) {
 		this.auditTime = auditTime;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.unit_price")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.unit_price
+	 * @return  the value of t_order_outsource.unit_price
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public BigDecimal getUnitPrice() {
 		return unitPrice;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.unit_price")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.unit_price
+	 * @param unitPrice  the value for t_order_outsource.unit_price
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setUnitPrice(BigDecimal unitPrice) {
 		this.unitPrice = unitPrice;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.unit_number")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.unit_number
+	 * @return  the value of t_order_outsource.unit_number
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getUnitNumber() {
 		return unitNumber;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.unit_number")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.unit_number
+	 * @param unitNumber  the value for t_order_outsource.unit_number
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setUnitNumber(Integer unitNumber) {
 		this.unitNumber = unitNumber;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.outsource_remarks")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.outsource_remarks
+	 * @return  the value of t_order_outsource.outsource_remarks
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getOutsourceRemarks() {
 		return outsourceRemarks;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.outsource_remarks")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.outsource_remarks
+	 * @param outsourceRemarks  the value for t_order_outsource.outsource_remarks
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setOutsourceRemarks(String outsourceRemarks) {
-		this.outsourceRemarks = outsourceRemarks;
+		this.outsourceRemarks = outsourceRemarks == null ? null : outsourceRemarks.trim();
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.type")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.type
+	 * @return  the value of t_order_outsource.type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getType() {
 		return type;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.type")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.type
+	 * @param type  the value for t_order_outsource.type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setType(Integer type) {
 		this.type = type;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.tid")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.tid
+	 * @return  the value of t_order_outsource.tid
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getTid() {
 		return tid;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.tid")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.tid
+	 * @param tid  the value for t_order_outsource.tid
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.start_type")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.start_type
+	 * @return  the value of t_order_outsource.start_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getStartType() {
 		return startType;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.start_type")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.start_type
+	 * @param startType  the value for t_order_outsource.start_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setStartType(Integer startType) {
 		this.startType = startType;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_type")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.patent_type
+	 * @return  the value of t_order_outsource.patent_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getPatentType() {
 		return patentType;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_type")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.patent_type
+	 * @param patentType  the value for t_order_outsource.patent_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setPatentType(Integer patentType) {
 		this.patentType = patentType;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_name_type")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.patent_name_type
+	 * @return  the value of t_order_outsource.patent_name_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getPatentNameType() {
 		return patentNameType;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_name_type")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.patent_name_type
+	 * @param patentNameType  the value for t_order_outsource.patent_name_type
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setPatentNameType(Integer patentNameType) {
 		this.patentNameType = patentNameType;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_name")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.patent_name
+	 * @return  the value of t_order_outsource.patent_name
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getPatentName() {
 		return patentName;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.627+08:00", comments = "Source field: t_order_outsource.patent_name")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.patent_name
+	 * @param patentName  the value for t_order_outsource.patent_name
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setPatentName(String patentName) {
-		this.patentName = patentName;
+		this.patentName = patentName == null ? null : patentName.trim();
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.628+08:00", comments = "Source field: t_order_outsource.actual_official")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.actual_official
+	 * @return  the value of t_order_outsource.actual_official
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public Integer getActualOfficial() {
 		return actualOfficial;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.628+08:00", comments = "Source field: t_order_outsource.actual_official")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.actual_official
+	 * @param actualOfficial  the value for t_order_outsource.actual_official
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setActualOfficial(Integer actualOfficial) {
 		this.actualOfficial = actualOfficial;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.628+08:00", comments = "Source field: t_order_outsource.picture_url")
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.picture_url
+	 * @return  the value of t_order_outsource.picture_url
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public String getPictureUrl() {
 		return pictureUrl;
 	}
 
-	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-11-25T17:04:15.628+08:00", comments = "Source field: t_order_outsource.picture_url")
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.picture_url
+	 * @param pictureUrl  the value for t_order_outsource.picture_url
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
 	public void setPictureUrl(String pictureUrl) {
-		this.pictureUrl = pictureUrl;
+		this.pictureUrl = pictureUrl == null ? null : pictureUrl.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Fri Jul 23 15:28:48 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", orderNo=").append(orderNo);
+		sb.append(", refundStatus=").append(refundStatus);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", remarks=").append(remarks);
+		sb.append(", attachmentUrl=").append(attachmentUrl);
+		sb.append(", amount=").append(amount);
+		sb.append(", companyName=").append(companyName);
+		sb.append(", auditTime=").append(auditTime);
+		sb.append(", unitPrice=").append(unitPrice);
+		sb.append(", unitNumber=").append(unitNumber);
+		sb.append(", outsourceRemarks=").append(outsourceRemarks);
+		sb.append(", type=").append(type);
+		sb.append(", tid=").append(tid);
+		sb.append(", startType=").append(startType);
+		sb.append(", patentType=").append(patentType);
+		sb.append(", patentNameType=").append(patentNameType);
+		sb.append(", patentName=").append(patentName);
+		sb.append(", actualOfficial=").append(actualOfficial);
+		sb.append(", pictureUrl=").append(pictureUrl);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
 	}
 
 	private String reason;

+ 4 - 0
src/main/java/com/goafanti/order/controller/OutsourceOrgApiController.java

@@ -136,6 +136,10 @@ public class OutsourceOrgApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目外包信息","项目外包信息"));
 			return res;
 		}
+		if(orderNewService.checkOfficialType(o)){
+			res.getError().add(buildError(ErrorConstants.DATA_EMPTY_ERROR, "官费分类","官费分类"));
+			return res;
+		}
 		return res.data(orderNewService.pushOutsourceProjectAudit(o));
 	}
 	/**

+ 1 - 0
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -203,5 +203,6 @@ public interface OrderNewService {
 	 * 	非特批触发订单催款
 	 */
 	void pushOrderDun(String orderNo);
+	boolean checkOfficialType(TOrderOutsource o);
 	
 }

+ 28 - 13
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -40,6 +40,7 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.IdleContractNoMapper;
 import com.goafanti.common.dao.NewOrderDunMapper;
+import com.goafanti.common.dao.OfficialFeePriceMapper;
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.OrganizationManagementMapper;
 import com.goafanti.common.dao.OutsourceLogMapper;
@@ -69,6 +70,7 @@ import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.IdleContractNo;
 import com.goafanti.common.model.NewOrderDun;
 import com.goafanti.common.model.Notice;
+import com.goafanti.common.model.OfficialFeePrice;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationManagement;
 import com.goafanti.common.model.OutsourceLog;
@@ -182,6 +184,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Autowired
 	private ProjcetCheckLogMapper	projcetCheckLogMapper;
 	@Autowired
+	private OfficialFeePriceMapper	officialFeePriceMapper;
+	@Autowired
 	private AsyncUtils	asyncUtils;
 	
 	@Value(value = "${mobileRemindCodeTemplate}")
@@ -274,8 +278,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			log.setTid(t.getId());
 			log.setAid(TokenManager.getAdminId());
 			StringBuffer str=new StringBuffer();
-			if (t.getOfficialCost()==null&&t.getCostReduction()==null&&t.getPatentType()==null) {
-				str.append("未做修改");
+			if ((t.getOfficialCost()==null&&t.getCostReduction()==null&&t.getPatentType()==null)||
+					(t.getOfficialCost()==use.getOfficialCost()&&t.getPatentType()==use.getPatentType()&&t.getCostReduction()==use.getCostReduction())) {
+				str.append("未做任何修改。");
 			}else {
 				str.append("修改了:");
 				if (t.getPatentType()!=null&&use.getPatentType()!=t.getPatentType()) {
@@ -1312,7 +1317,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			//旧项目变更,如果驳回修改成新的项目变更
 			if(o.getUnitNumber()!=null)tOrderOutsourceMapper.updateByidNull(o.getId());
 		}
-		updateOrderCostAmount(o.getTid(),o.getStartType(),o.getActualOfficial());
+		updateOrderCostAmount(o);
 		return 1;
 	}
 
@@ -1320,32 +1325,30 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 * 发起外包时,通过计算获取项目的成本,订单的成本
 	 * @param tid
 	 */
-	private void updateOrderCostAmount(Integer tid,Integer startType,Integer actualOfficial) {
+	private void updateOrderCostAmount(TOrderOutsource o) {
 		//计算项目成本
-		List<OutThirdPartyCompany>list=thirdPartyCompanyMapper.selectByTid(tid);
+		List<OutThirdPartyCompany>list=thirdPartyCompanyMapper.selectByTid(o.getTid());
 		BigDecimal tCount=new BigDecimal(0);
 		for (OutThirdPartyCompany op : list) {
 			tCount=tCount.add(new BigDecimal(op.getTotalAmount()));
 		}
-		tTaskMidMapper.updateCostAmount(tid,tCount);
+		tTaskMidMapper.updateCostAmount(o.getTid(),tCount);
 		//计算订单成本
 		BigDecimal oCount=new BigDecimal(0);
-		List <TTaskMid> tlist=tTaskMidMapper.selectListByTid(tid);
+		List <TTaskMid> tlist=tTaskMidMapper.selectListByTid(o.getTid());
 		for (TTaskMid tm : tlist) {
 			if (tm!=null&&tm.getCostAmount()!=null)oCount=oCount.add(tm.getCostAmount()==null?new BigDecimal(0):tm.getCostAmount());
 		}
 		//订单成本计算
-		ProjectTypePuls op= thirdPartyCompanyMapper.selectByTidGetDtails( tid);
+		ProjectTypePuls op= thirdPartyCompanyMapper.selectByTidGetDtails( o.getTid());
 		if (op.getOfficialCost()==1) {
-			BigDecimal mCount=new BigDecimal(0);
-			if (op.getCostReduction()==0) {
-				mCount=op.getOfficialAmount().multiply(new BigDecimal(op.getQuantity()));
-			}else {
+			BigDecimal mCount=op.getOfficialAmount().multiply(new BigDecimal(op.getQuantity()));
+			if (op.getCostReduction()==1) {
 				mCount=op.getProportion85().multiply(new BigDecimal(op.getQuantity()));
 			}
 			oCount=oCount.add(mCount);
 		}
-		tOrderMidMapper.updateCostAmount(tid,oCount);
+		tOrderMidMapper.updateCostAmount(o.getTid(),oCount);
 	}
 
 	@SuppressWarnings("unchecked")
@@ -1383,6 +1386,18 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 
 
+	@Override
+	public boolean checkOfficialType(TOrderOutsource o) {
+		TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(o.getTid());
+		OfficialFeePrice of=officialFeePriceMapper.selectBytype(o.getPatentNameType(), t.getPatentType());
+		if (of==null) {
+			return true;
+		}
+		return false;
+	}
+
+
+
 
 
 

+ 14 - 0
src/main/java/com/goafanti/organization/bo/outOrderPayment.java

@@ -87,6 +87,12 @@ public class outOrderPayment {
 	 * @mbg.generated  Tue Jul 07 11:46:04 CST 2020
 	 */
 	private String aname;
+	
+	/**
+	 * Database Column Remarks: 流程状态 0发起 1咨询师管理员 2财务 This field was generated by MyBatis Generator. This field corresponds to the database column t_order_payment.process_status
+	 * @mbg.generated  Tue Jul 20 09:16:18 CST 2021
+	 */
+	private Integer processStatus;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_payment.id
@@ -459,6 +465,14 @@ public class outOrderPayment {
 	public void setTpcName(String tpcName) {
 		this.tpcName = tpcName;
 	}
+
+	public Integer getProcessStatus() {
+		return processStatus;
+	}
+
+	public void setProcessStatus(Integer processStatus) {
+		this.processStatus = processStatus;
+	}
 	
 	
 	/*public String getAuditInformation() {

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

@@ -271,7 +271,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	@Override
 	public int addOrderPayment(TOrderPayment p) {
 		p.setStatus(0);
-		p.setProcessStatus(0);
+		p.setProcessStatus(1);
 		AdminListBo a =adminMapper.getDeptNameByAid(TokenManager.getAdminId());
 		p.setAid(a.getId());
 		p.setAname(a.getName());
@@ -499,32 +499,30 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			if (x>tot.getCommodityQuantity()) {
 				return -2;
 			}
-		}
-		
-		BigDecimal total=new BigDecimal(0);
-		BigDecimal a=p.getApplicationAmount()==null?new BigDecimal(0):p.getApplicationAmount();
-		List<outOrderPayment> list=new ArrayList<>();
-		//支付种类 0第三方 1催款2官费
-		if (p.getChooseType()==0) {
-			//首先不能大于第三方
-			list=tOrderPaymentMapper.selectList(p.getTpcId(),null,p.getChooseType());
-		}else if (p.getChooseType()==1) {
-			list=tOrderPaymentMapper.selectList(null,p.getNodeId(),p.getChooseType());
-		}else if (p.getChooseType()==2) {
-			list=tOrderPaymentMapper.selectList(p.getTpcId(),null,p.getChooseType());
-		}
-		for (outOrderPayment o : list) {
-				a=a.add(new BigDecimal(o.getApplicationAmount()));	
-		}
-		if (p.getChooseType()==0) {
-			ThirdPartyCompany t=thirdPartyCompanyMapper.selectByPrimaryKey(p.getTpcId());
-			total=t.getTotalAmount();
-		}else if (p.getChooseType()==1) {
-			PaymentNode n=paymentNodeMapper.selectByPrimaryKey(p.getNodeId());
-			total=n.getTotalAmount();
-		} 
-		if (a.compareTo(total) == 1) {
-			return -1;
+		}else {
+			BigDecimal total=new BigDecimal(0);
+			BigDecimal a=p.getApplicationAmount()==null?new BigDecimal(0):p.getApplicationAmount();
+			List<outOrderPayment> list=new ArrayList<>();
+			//支付种类 0第三方 1催款2官费
+			if (p.getChooseType()==0) {
+				//首先不能大于第三方
+				list=tOrderPaymentMapper.selectList(p.getTpcId(),null,p.getChooseType());
+			}else if (p.getChooseType()==1) {
+				list=tOrderPaymentMapper.selectList(null,p.getNodeId(),p.getChooseType());
+			}
+			for (outOrderPayment o : list) {
+					a=a.add(new BigDecimal(o.getApplicationAmount()));	
+			}
+			if (p.getChooseType()==0) {
+				ThirdPartyCompany t=thirdPartyCompanyMapper.selectByPrimaryKey(p.getTpcId());
+				total=t.getTotalAmount();
+			}else if (p.getChooseType()==1) {
+				PaymentNode n=paymentNodeMapper.selectByPrimaryKey(p.getNodeId());
+				total=n.getTotalAmount();
+			} 
+			if (a.compareTo(total) == 1) {
+				return -1;
+			}
 		}
 		return 0;
 	}
@@ -972,9 +970,9 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		Admin a=adminMapper.selectAllByid(TokenManager.getAdminId());
 		int processStatus=0;
 		if (in.getStatus()==1) {
-			processStatus=1;
-		}else {
 			processStatus=2;
+		}else {
+			processStatus=0;
 		}
 		if (in.getPid()!=null) {
 			in.setAid(a.getId());