Bläddra i källkod

Merge branch 'test' of jishutao/kede-server into prod

anderx 4 år sedan
förälder
incheckning
56300b3ba4
30 ändrade filer med 1374 tillägg och 1376 borttagningar
  1. 0 1
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  2. 28 83
      src/main/java/com/goafanti/common/dao/NewOrderChangeMapper.java
  3. 2 2
      src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java
  4. 22 0
      src/main/java/com/goafanti/common/dao/TOrderAssistMapper.java
  5. 2 0
      src/main/java/com/goafanti/common/dao/TOrderNewMapper.java
  6. 22 0
      src/main/java/com/goafanti/common/dao/TOrderServiceMapper.java
  7. 85 371
      src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml
  8. 44 165
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  9. 85 0
      src/main/java/com/goafanti/common/mapper/TOrderAssistMapper.xml
  10. 4 0
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  11. 107 0
      src/main/java/com/goafanti/common/mapper/TOrderServiceMapper.xml
  12. 423 715
      src/main/java/com/goafanti/common/model/NewOrderChange.java
  13. 26 0
      src/main/java/com/goafanti/common/model/PublicRelease.java
  14. 64 0
      src/main/java/com/goafanti/common/model/TOrderAssist.java
  15. 90 0
      src/main/java/com/goafanti/common/model/TOrderService.java
  16. 15 0
      src/main/java/com/goafanti/order/bo/TOrderServiceBo.java
  17. 24 0
      src/main/java/com/goafanti/order/bo/assistListBo.java
  18. 107 3
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  19. 28 2
      src/main/java/com/goafanti/order/controller/OrderChangeApiController.java
  20. 24 0
      src/main/java/com/goafanti/order/service/OrderAssistService.java
  21. 1 0
      src/main/java/com/goafanti/order/service/OrderChangeService.java
  22. 69 0
      src/main/java/com/goafanti/order/service/impl/OrderAssistServiceImpl.java
  23. 13 10
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  24. 2 0
      src/main/java/com/goafanti/weChat/bo/InputPublicRelease.java
  25. 22 0
      src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java
  26. 28 1
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java
  27. 4 0
      src/main/java/com/goafanti/weChat/service/PublicReleaseService.java
  28. 30 20
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java
  29. 2 2
      src/main/resources/props/config_local.properties
  30. 1 1
      src/main/resources/props/config_test.properties

+ 0 - 1
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -229,7 +229,6 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 
 	@Override
 	public List<Admin> listAdminByName(String name) {
-		
 		return adminMapper.listAdminByName(name);
 	}
 

+ 28 - 83
src/main/java/com/goafanti/common/dao/NewOrderChangeMapper.java

@@ -11,88 +11,33 @@ import java.util.Map;
 import org.apache.ibatis.annotations.Param;
 
 public interface NewOrderChangeMapper {
+    int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	long countByExample(NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int deleteByExample(NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int insert(NewOrderChange record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int insertSelective(NewOrderChange record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	List<NewOrderChange> selectByExample(NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	NewOrderChange selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") NewOrderChange record,
-			@Param("example") NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByExample(@Param("record") NewOrderChange record, @Param("example") NewOrderChangeExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByPrimaryKeySelective(NewOrderChange record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Apr 01 08:39:10 CST 2020
-	 */
-	int updateByPrimaryKey(NewOrderChange record);
-
-	List<NewOrderChangeBo> selectByorderNo(String orderNo);
-
-	int checkOderNo(String orderNo);
-
-	NewOrderChangeBo selectById(Integer id);
-
-	void addRefundInvoice(@Param("orderNo")String orderNo, @Param("amount")BigDecimal amount);
-
-	void subtractRefundInvoice(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount);
-
-
-	List<Map<String, String>> getOrderChange(String orderNo);
-
-	NewOrderChangeBo selectByChangeId(String changeId);
-
-	NewOrderChangeBo selectByorderNoAndStatus(String orderNo);
+    int insert(NewOrderChange record);
+
+    int insertSelective(NewOrderChange record);
+
+    NewOrderChange selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(NewOrderChange record);
+
+    int updateByPrimaryKey(NewOrderChange record);
+
+
+    List<NewOrderChangeBo> selectByorderNo(String orderNo);
+
+    int checkOderNo(String orderNo);
+
+    NewOrderChangeBo selectById(Integer id);
+
+    void addRefundInvoice(@Param("orderNo")String orderNo, @Param("amount")BigDecimal amount);
+
+    void subtractRefundInvoice(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount);
+
+
+    List<Map<String, String>> getOrderChange(String orderNo);
+
+    NewOrderChangeBo selectByChangeId(String changeId);
+
+    NewOrderChangeBo selectByorderNoAndStatus(String orderNo);
 }

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

@@ -23,8 +23,6 @@ public interface PublicReleaseMapper {
     int updateByPrimaryKey(PublicRelease record);
 
 
-    void insertSelectiveGetId(PublicRelease in);
-
     OutPublicRelease selectDtails(@Param("id") Integer id, @Param("ufid")String ufid);
 
     int checkTime(@Param("aid")String aid, @Param("start") Date start, @Param("end")Date end);
@@ -32,4 +30,6 @@ public interface PublicReleaseMapper {
     void updateSignByAidAndUid(@Param("uid") String buyerId, @Param("aid") String salesmanId);
 
     List<OutPublicReleaseCount > getTimeUserFollow(@Param("date")Date date, @Param("now")Date now);
+
+    List<OutPublicRelease> publicByOrder(String orderNo);
 }

+ 22 - 0
src/main/java/com/goafanti/common/dao/TOrderAssistMapper.java

@@ -0,0 +1,22 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderAssist;
+import com.goafanti.order.bo.assistListBo;
+
+import java.util.List;
+
+public interface TOrderAssistMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(TOrderAssist record);
+
+    int insertSelective(TOrderAssist record);
+
+    TOrderAssist selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TOrderAssist record);
+
+    int updateByPrimaryKey(TOrderAssist record);
+
+    List<assistListBo> assistList(String orderNo);
+}

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

@@ -44,4 +44,6 @@ public interface TOrderNewMapper {
     List<outStatisticsList> statisticsList(InputStatistics in);
 
     List<outProvinceStatisticsList> provinceStatisticsList(InputStatistics in);
+
+    List<Map<String, Object>> selectOrderByuid(String uid);
 }

+ 22 - 0
src/main/java/com/goafanti/common/dao/TOrderServiceMapper.java

@@ -0,0 +1,22 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderService;
+import com.goafanti.order.bo.TOrderServiceBo;
+
+import java.util.List;
+
+public interface TOrderServiceMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(TOrderService record);
+
+    int insertSelective(TOrderService record);
+
+    TOrderService selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TOrderService record);
+
+    int updateByPrimaryKey(TOrderService record);
+
+    List<TOrderServiceBo> orderServiceList(String orderNo);
+}

+ 85 - 371
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.NewOrderChangeMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
     <result column="process_state" jdbcType="INTEGER" property="processState" />
@@ -38,177 +33,52 @@
     <result column="refund_status" jdbcType="INTEGER" property="refundStatus" />
     <result column="refund_url" jdbcType="VARCHAR" property="refundUrl" />
     <result column="back_status" jdbcType="INTEGER" property="backStatus" />
+    <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
   </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 Wed Apr 01 08:39:10 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    id, order_no, process_state, status, type, create_time, remarks, voucher_url, total_amount, 
-    settlement_amount, change_amount, applicant, dep_name, project_state, zxs_cost, zxs_remarks, 
-    payment_time, payment_amount, invoice_time, invoice_amount, invoice_type, cw_cost, 
-    refundable_amount, cw_remarks, estimate_cost, estimate_refundable, refund_Invoice, 
-    used_order, refund_status, refund_url, back_status
+    id, order_no, process_state, `status`, `type`, create_time, remarks, voucher_url, 
+    total_amount, settlement_amount, change_amount, applicant, dep_name, project_state, 
+    zxs_cost, zxs_remarks, payment_time, payment_amount, invoice_time, invoice_amount, 
+    invoice_type, cw_cost, refundable_amount, cw_remarks, estimate_cost, estimate_refundable, 
+    refund_Invoice, used_order, refund_status, refund_url, back_status, attachment_url
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from new_order_change
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     select 
     <include refid="Base_Column_List" />
     from new_order_change
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     delete from new_order_change
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    delete from new_order_change
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    insert into new_order_change (id, order_no, process_state, 
-      status, type, create_time, 
-      remarks, voucher_url, total_amount, 
-      settlement_amount, change_amount, applicant, 
-      dep_name, project_state, zxs_cost, 
-      zxs_remarks, payment_time, payment_amount, 
-      invoice_time, invoice_amount, invoice_type, 
-      cw_cost, refundable_amount, cw_remarks, 
-      estimate_cost, estimate_refundable, refund_Invoice, 
-      used_order, refund_status, refund_url, 
-      back_status)
-    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, 
-      #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{remarks,jdbcType=VARCHAR}, #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, 
-      #{settlementAmount,jdbcType=DECIMAL}, #{changeAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, 
-      #{depName,jdbcType=VARCHAR}, #{projectState,jdbcType=VARCHAR}, #{zxsCost,jdbcType=DECIMAL}, 
-      #{zxsRemarks,jdbcType=VARCHAR}, #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, 
-      #{invoiceTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, 
-      #{cwCost,jdbcType=DECIMAL}, #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, 
-      #{estimateCost,jdbcType=DECIMAL}, #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, 
-      #{usedOrder,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, 
-      #{backStatus,jdbcType=INTEGER})
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
+    insert into new_order_change (order_no, process_state, `status`, 
+      `type`, create_time, remarks, 
+      voucher_url, total_amount, settlement_amount, 
+      change_amount, applicant, dep_name, 
+      project_state, zxs_cost, zxs_remarks, 
+      payment_time, payment_amount, invoice_time, 
+      invoice_amount, invoice_type, cw_cost, 
+      refundable_amount, cw_remarks, estimate_cost, 
+      estimate_refundable, refund_Invoice, used_order, 
+      refund_status, refund_url, back_status, 
+      attachment_url)
+    values (#{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
+      #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, 
+      #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, 
+      #{changeAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, #{depName,jdbcType=VARCHAR}, 
+      #{projectState,jdbcType=VARCHAR}, #{zxsCost,jdbcType=DECIMAL}, #{zxsRemarks,jdbcType=VARCHAR}, 
+      #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, #{invoiceTime,jdbcType=TIMESTAMP}, 
+      #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, #{cwCost,jdbcType=DECIMAL}, 
+      #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, #{estimateCost,jdbcType=DECIMAL}, 
+      #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, #{usedOrder,jdbcType=VARCHAR}, 
+      #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, 
+      #{attachmentUrl,jdbcType=VARCHAR})
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
     insert into new_order_change
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="orderNo != null">
         order_no,
       </if>
@@ -216,10 +86,10 @@
         process_state,
       </if>
       <if test="status != null">
-        status,
+        `status`,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="createTime != null">
         create_time,
@@ -299,11 +169,11 @@
       <if test="backStatus != null">
         back_status,
       </if>
+      <if test="attachmentUrl != null">
+        attachment_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="orderNo != null">
         #{orderNo,jdbcType=VARCHAR},
       </if>
@@ -394,173 +264,12 @@
       <if test="backStatus != null">
         #{backStatus,jdbcType=INTEGER},
       </if>
+      <if test="attachmentUrl != null">
+        #{attachmentUrl,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
-    select count(*) from new_order_change
-    <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 Wed Apr 01 08:39:10 CST 2020.
-    -->
-    update new_order_change
-    <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.processState != null">
-        process_state = #{record.processState,jdbcType=INTEGER},
-      </if>
-      <if test="record.status != null">
-        status = #{record.status,jdbcType=INTEGER},
-      </if>
-      <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.remarks != null">
-        remarks = #{record.remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.voucherUrl != null">
-        voucher_url = #{record.voucherUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.totalAmount != null">
-        total_amount = #{record.totalAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.settlementAmount != null">
-        settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.changeAmount != null">
-        change_amount = #{record.changeAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.applicant != null">
-        applicant = #{record.applicant,jdbcType=VARCHAR},
-      </if>
-      <if test="record.depName != null">
-        dep_name = #{record.depName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.projectState != null">
-        project_state = #{record.projectState,jdbcType=VARCHAR},
-      </if>
-      <if test="record.zxsCost != null">
-        zxs_cost = #{record.zxsCost,jdbcType=DECIMAL},
-      </if>
-      <if test="record.zxsRemarks != null">
-        zxs_remarks = #{record.zxsRemarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.paymentTime != null">
-        payment_time = #{record.paymentTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.paymentAmount != null">
-        payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.invoiceTime != null">
-        invoice_time = #{record.invoiceTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.invoiceAmount != null">
-        invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.invoiceType != null">
-        invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
-      </if>
-      <if test="record.cwCost != null">
-        cw_cost = #{record.cwCost,jdbcType=DECIMAL},
-      </if>
-      <if test="record.refundableAmount != null">
-        refundable_amount = #{record.refundableAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.cwRemarks != null">
-        cw_remarks = #{record.cwRemarks,jdbcType=VARCHAR},
-      </if>
-      <if test="record.estimateCost != null">
-        estimate_cost = #{record.estimateCost,jdbcType=DECIMAL},
-      </if>
-      <if test="record.estimateRefundable != null">
-        estimate_refundable = #{record.estimateRefundable,jdbcType=DECIMAL},
-      </if>
-      <if test="record.refundInvoice != null">
-        refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.usedOrder != null">
-        used_order = #{record.usedOrder,jdbcType=VARCHAR},
-      </if>
-      <if test="record.refundStatus != null">
-        refund_status = #{record.refundStatus,jdbcType=INTEGER},
-      </if>
-      <if test="record.refundUrl != null">
-        refund_url = #{record.refundUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.backStatus != null">
-        back_status = #{record.backStatus,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 Wed Apr 01 08:39:10 CST 2020.
-    -->
-    update new_order_change
-    set id = #{record.id,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=VARCHAR},
-      process_state = #{record.processState,jdbcType=INTEGER},
-      status = #{record.status,jdbcType=INTEGER},
-      type = #{record.type,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      remarks = #{record.remarks,jdbcType=VARCHAR},
-      voucher_url = #{record.voucherUrl,jdbcType=VARCHAR},
-      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
-      settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
-      change_amount = #{record.changeAmount,jdbcType=DECIMAL},
-      applicant = #{record.applicant,jdbcType=VARCHAR},
-      dep_name = #{record.depName,jdbcType=VARCHAR},
-      project_state = #{record.projectState,jdbcType=VARCHAR},
-      zxs_cost = #{record.zxsCost,jdbcType=DECIMAL},
-      zxs_remarks = #{record.zxsRemarks,jdbcType=VARCHAR},
-      payment_time = #{record.paymentTime,jdbcType=TIMESTAMP},
-      payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
-      invoice_time = #{record.invoiceTime,jdbcType=TIMESTAMP},
-      invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
-      invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
-      cw_cost = #{record.cwCost,jdbcType=DECIMAL},
-      refundable_amount = #{record.refundableAmount,jdbcType=DECIMAL},
-      cw_remarks = #{record.cwRemarks,jdbcType=VARCHAR},
-      estimate_cost = #{record.estimateCost,jdbcType=DECIMAL},
-      estimate_refundable = #{record.estimateRefundable,jdbcType=DECIMAL},
-      refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL},
-      used_order = #{record.usedOrder,jdbcType=VARCHAR},
-      refund_status = #{record.refundStatus,jdbcType=INTEGER},
-      refund_url = #{record.refundUrl,jdbcType=VARCHAR},
-      back_status = #{record.backStatus,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     update new_order_change
     <set>
       <if test="orderNo != null">
@@ -570,10 +279,10 @@
         process_state = #{processState,jdbcType=INTEGER},
       </if>
       <if test="status != null">
-        status = #{status,jdbcType=INTEGER},
+        `status` = #{status,jdbcType=INTEGER},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -653,20 +362,18 @@
       <if test="backStatus != null">
         back_status = #{backStatus,jdbcType=INTEGER},
       </if>
+      <if test="attachmentUrl != null">
+        attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.NewOrderChange">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Apr 01 08:39:10 CST 2020.
-    -->
     update new_order_change
     set order_no = #{orderNo,jdbcType=VARCHAR},
       process_state = #{processState,jdbcType=INTEGER},
-      status = #{status,jdbcType=INTEGER},
-      type = #{type,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       remarks = #{remarks,jdbcType=VARCHAR},
       voucher_url = #{voucherUrl,jdbcType=VARCHAR},
@@ -692,7 +399,8 @@
       used_order = #{usedOrder,jdbcType=VARCHAR},
       refund_status = #{refundStatus,jdbcType=INTEGER},
       refund_url = #{refundUrl,jdbcType=VARCHAR},
-      back_status = #{backStatus,jdbcType=INTEGER}
+      back_status = #{backStatus,jdbcType=INTEGER},
+      attachment_url = #{attachmentUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByorderNo" resultType="com.goafanti.order.bo.NewOrderChangeBo">
@@ -703,7 +411,7 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks from new_order_change a where 1 = 1 
+	a.cw_remarks cwRemarks from new_order_change a where 1 = 1
 	and a.order_no= #{orderNo}
 	order by a.create_time desc limit 1
   </select>
@@ -716,10 +424,10 @@ select
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
 	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status!=4
-	and a.id= #{ChangeId} 
+	and a.id= #{ChangeId}
 	order by a.create_time desc
   </select>
-  
+
   <select id="selectByorderNoAndStatus" resultType="com.goafanti.order.bo.NewOrderChangeBo">
 select
 	a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,
@@ -729,15 +437,15 @@ select
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
 	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status in (0,1,2,3)
-	and a.order_no= #{orderNo} 
+	and a.order_no= #{orderNo}
 	order by a.create_time desc
   </select>
-  
+
   <select id="selectById" resultType="com.goafanti.order.bo.NewOrderChangeBo">
   select
 	a.id, a.order_no orderNo, a.process_state processState, a.status, a.`type`,a.refundable_amount refundableAmount,a.refund_url refundUrl,
 	date_format(a.create_time, '%Y-%m-%d %H:%i:%S')createTimes, a.remarks, a.voucher_url voucherUrl,a.cw_cost cwCost,a.refund_status refundStatus,
-	a.total_amount totalAmount, a.settlement_amount settlementAmount, (a.total_amount-a.settlement_amount) arrears,
+	a.total_amount totalAmount, a.settlement_amount settlementAmount, (a.total_amount-a.settlement_amount) arrears,a.attachment_url attachmentUrl,
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
@@ -749,21 +457,21 @@ select
 	where status in (0,1,2,3) and order_no= #{orderNo}
   </select>
   <select id="selectOrderChangeList" resultType="com.goafanti.order.bo.NewOderCahngeListBo">
-	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType, 
+	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType,
   date_format(b.create_time,'%Y-%m-%d %H:%i:%S')establishTimes, b.order_status orderStatus,b.total_amount totalAmount,a.status ,
   b.settlement_amount settlementAmount,(b.total_amount-b.settlement_amount) arrears,d.name salesmanName,e.name depName,a.`type`,
   a.process_state processState,a.back_status backStatus from new_order_change  noc left join  new_order_change a on noc.id=a.id
-  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join admin d on b.salesman_id=d.id 
-  left join department e on b.order_dep=e.id 
- 	<if test="processState==2"> 
+  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join admin d on b.salesman_id=d.id
+  left join department e on b.order_dep=e.id
+ 	<if test="processState==2">
  	left join (select order_no, aid from order_examine where`type`=0 group by order_no,aid)x on a.order_no = x.order_no
 	</if>
-	<if test="processState==3"> 
+	<if test="processState==3">
 	left join (select order_no, aid from order_examine where`type`=1 group by order_no,aid)x on a.order_no = x.order_no
-	</if> 
+	</if>
 	where 1=1
 	<if test="processState==0">
-	and b.salesman_id= #{aid} 
+	and b.salesman_id= #{aid}
 	</if>
 	<if test="processState==1">
 	and b.order_dep in
@@ -787,7 +495,7 @@ select
 	and e.finance_id =#{aid}
 	</if>
 	<if test="processState==5 and aids !=null">
-	and e.finance_id in 
+	and e.finance_id in
 		<foreach close=")" collection="aids" item="id" open="(" separator=",">
 		#{id}
 		</foreach>
@@ -817,28 +525,28 @@ select
 	and d.name like concat('%',#{salesmanName},'%')
 	</if>
 	<if test="complete ==0 and processState != 8">
-	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}) 
+	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState})
 	</if>
 	<if test="complete ==0 and processState == 8">
 	 and (a.process_state &gt;= #{processState} and  a.process_state &lt; 9)or a.back_status &gt;= #{processState}
 	</if>
 	<if test="complete ==1 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state = #{processState}  
+	 and a.process_state = #{processState}
 	</if>
 	<if test="complete ==1 and processState == 5">
 	 and (a.process_state in(5,9)  and a.status !=4)
 	</if>
 	<if test="complete ==1 and processState == 7">
-	 and (a.process_state = 7  and  a.status != 4 and a.status !=2) 
+	 and (a.process_state = 7  and  a.status != 4 and a.status !=2)
 	</if>
 	<if test="complete ==1 and processState == 8">
 	 and a.process_state = #{processState}  and a.status != 4 and a.status !=2
 	</if>
 	<if test="complete ==2 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state &gt; #{processState}  
+	 and a.process_state &gt; #{processState}
 	</if>
 	<if test="complete ==2 and processState == 5">
-	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4) 
+	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4)
 	</if>
 	<if test="complete ==2 and processState == 7">
 	 and ((a.process_state = 7  and  (a.status = 4 or a.status = 2))or a.process_state &gt; 7)
@@ -852,28 +560,31 @@ select
 	<if test="complete ==4">
 	 and   a.status = 4
 	</if>
-	<if test="complete ==5 and processState != 2 and processState != 3">
+    <if test="complete ==5 and processState != 2 and processState != 3">
 	 and a.back_status &gt;= #{processState}
 	</if>
+    <if test="complete ==6">
+      and   a.status = 6
+    </if>
 	order by a.status,a.create_time desc
 	<if test="page_sql != null">
 			${page_sql}
 	</if>
   </select>
-  
+
   <select id="selectOrderChangeCount" resultType="java.lang.Integer">
   select count(*) from new_order_change noc left join  new_order_change a on noc.id=a.id
-  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id 
+  left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id
   left join admin d on b.salesman_id=d.id left join department e on b.order_dep=e.id
-		<if test="processState==2"> 
+		<if test="processState==2">
  	left join (select order_no, aid from order_examine where`type`=0 group by order_no,aid)x on a.order_no = x.order_no
 	</if>
-	<if test="processState==3"> 
+	<if test="processState==3">
 	left join (select order_no, aid from order_examine where`type`=1 group by order_no,aid)x on a.order_no = x.order_no
-	</if> 
+	</if>
 	where 1=1
 	<if test="processState==0">
-	and b.salesman_id= #{aid} 
+	and b.salesman_id= #{aid}
 	</if>
 	<if test="processState==1">
 	and b.order_dep in
@@ -897,7 +608,7 @@ select
 	and e.finance_id =#{aid}
 	</if>
 	<if test="processState==5 and aids !=null">
-	and e.finance_id in 
+	and e.finance_id in
 		<foreach close=")" collection="aids" item="id" open="(" separator=",">
 		#{id}
 		</foreach>
@@ -927,28 +638,28 @@ select
 	and d.name like concat('%',#{salesmanName},'%')
 	</if>
 	<if test="complete ==0 and processState != 8">
-	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState}) 
+	 and (a.process_state &gt;= #{processState} or a.back_status &gt;= #{processState})
 	</if>
 	<if test="complete ==0 and processState == 8">
 	 and (a.process_state &gt;= #{processState} and  a.process_state &lt; 9)or a.back_status &gt;= #{processState}
 	</if>
 	<if test="complete ==1 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state = #{processState} 
+	 and a.process_state = #{processState}
 	</if>
 	<if test="complete ==1 and processState == 5">
 	 and (a.process_state in(5,9)  and a.status !=4)
 	</if>
 	<if test="complete ==1 and processState == 7">
-	 and (a.process_state = 7  and  a.status != 4 and a.status !=2) 
+	 and (a.process_state = 7  and  a.status != 4 and a.status !=2)
 	</if>
 	<if test="complete ==1 and processState == 8">
 	 and a.process_state = #{processState}  and a.status != 4 and a.status !=2
 	</if>
 	<if test="complete ==2 and processState != 5 and processState != 7 and processState != 8">
-	 and a.process_state &gt; #{processState}  
+	 and a.process_state &gt; #{processState}
 	</if>
 	<if test="complete ==2 and processState == 5">
-	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4) 
+	 and (a.process_state &gt; 5 and a.process_state &lt; 9) or (a.process_state =9 and a.status=4)
 	</if>
 	<if test="complete ==2 and processState == 7">
 	 and ((a.process_state = 7  and  (a.status = 4 or a.status = 2))or a.process_state &gt; 7)
@@ -965,6 +676,9 @@ select
 	<if test="complete ==5 and processState != 2 and processState != 3">
 	 and a.back_status &gt;= #{processState}
 	</if>
+    <if test="complete ==6">
+      and   a.status = 6
+    </if>
 	</select>
 	<update id="addRefundInvoice">
 	update  new_order_change

+ 44 - 165
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -30,12 +30,14 @@
     <result column="plan" jdbcType="VARCHAR" property="plan" />
     <result column="expected_effect" jdbcType="VARCHAR" property="expectedEffect" />
     <result column="next_plan" jdbcType="VARCHAR" property="nextPlan" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
   </resultMap>
   <sql id="Base_Column_List">
     id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude, 
     latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname, 
     ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info, 
-    `plan`, expected_effect, next_plan
+    `plan`, expected_effect, next_plan, `type`, order_no
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
@@ -56,8 +58,8 @@
       pname, ufid, duration, 
       valid_date, new_user, sign_sum, 
       main_status, supplement, audit_info, 
-      `plan`, expected_effect, next_plan
-      )
+      `plan`, expected_effect, next_plan, 
+      `type`, order_no)
     values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, 
       #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR}, 
       #{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, 
@@ -66,8 +68,8 @@
       #{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE}, 
       #{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER}, 
       #{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR}, 
-      #{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR}
-      )
+      #{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR}, 
+      #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
     insert into public_release
@@ -153,6 +155,12 @@
       <if test="nextPlan != null">
         next_plan,
       </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="uid != null">
@@ -236,6 +244,12 @@
       <if test="nextPlan != null">
         #{nextPlan,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
@@ -322,6 +336,12 @@
       <if test="nextPlan != null">
         next_plan = #{nextPlan,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -353,7 +373,9 @@
       audit_info = #{auditInfo,jdbcType=VARCHAR},
       `plan` = #{plan,jdbcType=VARCHAR},
       expected_effect = #{expectedEffect,jdbcType=VARCHAR},
-      next_plan = #{nextPlan,jdbcType=VARCHAR}
+      next_plan = #{nextPlan,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      order_no = #{orderNo,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -363,160 +385,6 @@
     set a.sign_sum =a.sign_sum +1
     where a.aid =#{aid} and a.uid =#{uid} and a.main_status =1 and a.create_time =b.create_time
   </update>
-  <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
-     insert into public_release
-     <trim prefix="(" suffix=")" suffixOverrides=",">
-       <if test="uid != null">
-         `uid`,
-       </if>
-       <if test="aid != null">
-         aid,
-       </if>
-       <if test="releaseStart != null">
-         release_start,
-       </if>
-       <if test="releaseEnd != null">
-         release_end,
-       </if>
-       <if test="remarks != null">
-         remarks,
-       </if>
-       <if test="annexUrl != null">
-         annex_url,
-       </if>
-       <if test="userName != null">
-         user_name,
-       </if>
-       <if test="longitude != null">
-         longitude,
-       </if>
-       <if test="latitude != null">
-         latitude,
-       </if>
-       <if test="status != null">
-         `status`,
-       </if>
-       <if test="createTime != null">
-         create_time,
-       </if>
-       <if test="clockIn != null">
-         clock_in,
-       </if>
-       <if test="clockInTime != null">
-         clock_in_time,
-       </if>
-       <if test="photoUrl != null">
-         photo_url,
-       </if>
-       <if test="pid != null">
-         pid,
-       </if>
-       <if test="pname != null">
-         pname,
-       </if>
-       <if test="ufid != null">
-         ufid,
-       </if>
-       <if test="duration != null">
-         duration,
-       </if>
-       <if test="validDate != null">
-         valid_date,
-       </if>
-       <if test="newUser != null">
-         new_user,
-       </if>
-       <if test="signSum != null">
-         sign_sum,
-       </if>
-       <if test="mainStatus != null">
-         main_status,
-       </if>
-       <if test="supplement != null">
-         supplement,
-       </if>
-       <if test="auditInfo != null">
-         audit_info,
-       </if>
-     </trim>
-     <trim prefix="values (" suffix=")" suffixOverrides=",">
-       <if test="uid != null">
-         #{uid,jdbcType=VARCHAR},
-       </if>
-       <if test="aid != null">
-         #{aid,jdbcType=VARCHAR},
-       </if>
-       <if test="releaseStart != null">
-         #{releaseStart,jdbcType=TIMESTAMP},
-       </if>
-       <if test="releaseEnd != null">
-         #{releaseEnd,jdbcType=TIMESTAMP},
-       </if>
-       <if test="remarks != null">
-         #{remarks,jdbcType=VARCHAR},
-       </if>
-       <if test="annexUrl != null">
-         #{annexUrl,jdbcType=VARCHAR},
-       </if>
-       <if test="userName != null">
-         #{userName,jdbcType=VARCHAR},
-       </if>
-       <if test="longitude != null">
-         #{longitude,jdbcType=VARCHAR},
-       </if>
-       <if test="latitude != null">
-         #{latitude,jdbcType=VARCHAR},
-       </if>
-       <if test="status != null">
-         #{status,jdbcType=INTEGER},
-       </if>
-       <if test="createTime != null">
-         #{createTime,jdbcType=TIMESTAMP},
-       </if>
-       <if test="clockIn != null">
-         #{clockIn,jdbcType=INTEGER},
-       </if>
-       <if test="clockInTime != null">
-         #{clockInTime,jdbcType=TIMESTAMP},
-       </if>
-       <if test="photoUrl != null">
-         #{photoUrl,jdbcType=VARCHAR},
-       </if>
-       <if test="pid != null">
-         #{pid,jdbcType=VARCHAR},
-       </if>
-       <if test="pname != null">
-         #{pname,jdbcType=VARCHAR},
-       </if>
-       <if test="ufid != null">
-         #{ufid,jdbcType=VARCHAR},
-       </if>
-       <if test="duration != null">
-         #{duration,jdbcType=DOUBLE},
-       </if>
-       <if test="validDate != null">
-         #{validDate,jdbcType=VARCHAR},
-       </if>
-       <if test="newUser != null">
-         #{newUser,jdbcType=INTEGER},
-       </if>
-       <if test="signSum != null">
-         #{signSum,jdbcType=INTEGER},
-       </if>
-       <if test="mainStatus != null">
-         #{mainStatus,jdbcType=INTEGER},
-       </if>
-       <if test="supplement != null">
-         #{supplement,jdbcType=VARCHAR},
-       </if>
-       <if test="auditInfo != null">
-         #{auditInfo,jdbcType=VARCHAR},
-       </if>
-     </trim>
-    <selectKey keyProperty="id" order="AFTER" resultType="int">
-        SELECT LAST_INSERT_ID()
-    </selectKey>
-  </insert>
 
   <select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
   select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
@@ -593,9 +461,10 @@
     select  a.id,b.nickname ,c.name  aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
     date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
     a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,a.longitude ,a.aid ,c.superior_id suprId,a.uid,
-    a.clock_in clockIn ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer
-  	from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
-	where 1=1
+    a.clock_in clockIn ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo
+    from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
+    left join t_order_new d on a.order_no=d.order_no
+    where 1=1
 	<if test="id !=null">
 	and a.id= #{id}
 	</if>
@@ -609,7 +478,7 @@
   	select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration
 	from (select if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,if(a.clock_in=1,1,0) dk,a.aid
   	,if(a.status=2,a.duration,0)duration    from  public_release a  left join admin b on a.aid=b.id
-	where 1=1
+	where a.type=0
 	<if test="aid != null">
 	and a.aid= #{aid}
 	</if>
@@ -631,7 +500,7 @@
 
   <select id="countPublicStatistics" resultType="java.lang.Integer">
   	select count(*) from (select aid from public_release a  left join admin b on a.aid=b.id
-	where 1=1
+	where a.type=0
 	<if test="aid != null">
 	and a.aid= #{aid}
 	</if>
@@ -734,4 +603,14 @@
      group by aid,uid,new_user)a left join admin c on a.aid=c.id
     left join department d on c.department_id =d.id left join district_glossory e on d.province =e.id
   </select>
+  <select id="publicByOrder" resultType="com.goafanti.weChat.bo.OutPublicRelease">
+    select a.id,a.uid,a.aid,b.nickname ,c.name aname,a.duration ,a.user_name userName,
+           date_format(a.release_start,'%Y-%m-%d %H:%i:%S')releaseStarts,
+           date_format(a.release_end ,'%Y-%m-%d %H:%i:%S')releaseEnds,
+           date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S')clockInTimes,
+           a.remarks
+    from public_release a left join user b on a.uid=b.id
+                          left join admin c on a.aid =c.id
+    where a.order_no = #{orderNo}
+    </select>
 </mapper>

+ 85 - 0
src/main/java/com/goafanti/common/mapper/TOrderAssistMapper.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.TOrderAssistMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderAssist">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, order_no, aid, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from t_order_assist
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from t_order_assist
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderAssist" useGeneratedKeys="true">
+    insert into t_order_assist (order_no, aid, create_time
+      )
+    values (#{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderAssist" useGeneratedKeys="true">
+    insert into t_order_assist
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderAssist">
+    update t_order_assist
+    <set>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderAssist">
+    update t_order_assist
+    set order_no = #{orderNo,jdbcType=VARCHAR},
+      aid = #{aid,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="assistList" resultType="com.goafanti.order.bo.assistListBo">
+    select a.id,a.order_no orderNo,a.aid,a.create_time createTime,b.name,
+           date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes
+    from t_order_assist a left join admin b on a.aid=b.id
+    where order_no = #{orderNo}
+    order by a.id
+  </select>
+</mapper>

+ 4 - 0
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1536,4 +1536,8 @@ select a.id, b.contract_no contractNo,a.order_no as orderNo,c.nickname as userNa
     </if>
      desc
   </select>
+    <select id="selectOrderByuid" resultType="java.util.Map">
+      select order_no orderNo,contract_no contractNo
+      from t_order_new  where delete_sign in (0,2) and  buyer_id = #{uid}
+    </select>
 </mapper>

+ 107 - 0
src/main/java/com/goafanti/common/mapper/TOrderServiceMapper.xml

@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.TOrderServiceMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderService">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="service_time" jdbcType="DATE" property="serviceTime" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, order_no, service_time, content, remarks, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from t_order_service
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from t_order_service
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderService" useGeneratedKeys="true">
+    insert into t_order_service (order_no, service_time, content, 
+      remarks, create_time)
+    values (#{orderNo,jdbcType=VARCHAR}, #{serviceTime,jdbcType=DATE}, #{content,jdbcType=VARCHAR}, 
+      #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderService" useGeneratedKeys="true">
+    insert into t_order_service
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="serviceTime != null">
+        service_time,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="serviceTime != null">
+        #{serviceTime,jdbcType=DATE},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderService">
+    update t_order_service
+    <set>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="serviceTime != null">
+        service_time = #{serviceTime,jdbcType=DATE},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderService">
+    update t_order_service
+    set order_no = #{orderNo,jdbcType=VARCHAR},
+      service_time = #{serviceTime,jdbcType=DATE},
+      content = #{content,jdbcType=VARCHAR},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="orderServiceList" resultType="com.goafanti.order.bo.TOrderServiceBo">
+    select id,order_no orderNo,date_format(service_time,'%Y-%m-%d')serviceTimes,
+           content ,remarks
+    from t_order_service
+    where order_no = #{orderNo}
+    order by id
+  </select>
+</mapper>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 423 - 715
src/main/java/com/goafanti/common/model/NewOrderChange.java


+ 26 - 0
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -145,6 +145,16 @@ public class PublicRelease implements Serializable {
      */
     private String nextPlan;
 
+    /**
+     * 分类 0业务/行政 1技术
+     */
+    private Integer type;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -370,4 +380,20 @@ public class PublicRelease implements Serializable {
     public void setNextPlan(String nextPlan) {
         this.nextPlan = nextPlan;
     }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
 }

+ 64 - 0
src/main/java/com/goafanti/common/model/TOrderAssist.java

@@ -0,0 +1,64 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * t_order_assist
+ * @author 
+ */
+public class TOrderAssist implements Serializable {
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+    /**
+     * 协单人编号
+     */
+    private String aid;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 90 - 0
src/main/java/com/goafanti/common/model/TOrderService.java

@@ -0,0 +1,90 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * t_order_service
+ * @author 
+ */
+public class TOrderService implements Serializable {
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+    /**
+     * 服务时间
+     */
+    private Date serviceTime;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public Date getServiceTime() {
+        return serviceTime;
+    }
+
+    public void setServiceTime(Date serviceTime) {
+        this.serviceTime = serviceTime;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 15 - 0
src/main/java/com/goafanti/order/bo/TOrderServiceBo.java

@@ -0,0 +1,15 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TOrderService;
+
+public class TOrderServiceBo extends TOrderService {
+    private String serviceTimes;
+
+    public String getServiceTimes() {
+        return serviceTimes;
+    }
+
+    public void setServiceTimes(String serviceTimes) {
+        this.serviceTimes = serviceTimes;
+    }
+}

+ 24 - 0
src/main/java/com/goafanti/order/bo/assistListBo.java

@@ -0,0 +1,24 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TOrderAssist;
+
+public class assistListBo extends TOrderAssist {
+    private String name;
+    private String createTimes;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCreateTimes() {
+        return createTimes;
+    }
+
+    public void setCreateTimes(String createTimes) {
+        this.createTimes = createTimes;
+    }
+}

+ 107 - 3
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -11,9 +11,12 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.model.*;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.service.OrderAssistService;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.formula.constant.ErrorConstant;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -23,9 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.model.TOrderNewWithBLOBs;
-import com.goafanti.common.model.TOrderRefundWithBLOBs;
-import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.order.enums.ApprovalNewState;
 import com.goafanti.order.enums.OrderNewState;
@@ -37,6 +37,8 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	
 	@Autowired
 	private OrderNewService orderNewService;
+	@Autowired
+	private OrderAssistService orderAssistService;
 	@Value(value = "${upload.path}")
 	private String	uploadPath			= null;
 	/**
@@ -618,4 +620,106 @@ public class AdminNewOrderApiController extends CertifyApiController {
 		return excelUtil.exportExcel(list,"签单省份统计表",uploadPath,sb.substring(0,sb.toString().length()-1));
 	}
 
+
+	/**
+	 * 新增协单人员
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/addAssist",method = RequestMethod.POST)
+	public Result addAssist(TOrderAssist in){
+		Result res = new Result();
+		if (in.getAid()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"协单人"));
+			return res;
+		}
+		if (in.getOrderNo()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+			return res;
+		}
+		int i=orderAssistService.addAssistCheck(in);
+		if (i==-1){
+			res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR,ErrorConstants.PARAM_BEING_ERROR,"协单人员"));
+			return res;
+		}
+		return res.data(orderAssistService.addAssist(in));
+	}
+	/**
+	 * 删除订单协单人员
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteAssist",method = RequestMethod.POST)
+	public Result deleteAssist(Integer id){
+		Result res = new Result();
+		if (id==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"协单人"));
+			return res;
+		}
+		return res.data(orderAssistService.deleteAssist(id));
+	}
+
+	/**
+	 * 协单人员列表
+	 * @return
+	 */
+	@RequestMapping(value = "/assistList",method = RequestMethod.GET)
+	public Result assistList(String orderNo){
+		Result res = new Result();
+		if (orderNo==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+			return res;
+		}
+		return res.data(orderAssistService.assistList(orderNo));
+	}
+
+
+	/**
+	 * 新增订单上门服务
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/addOrderService",method = RequestMethod.POST)
+	public Result addOrderService(TOrderServiceBo in){
+		Result res = new Result();
+		if (in.getServiceTimes()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"服务时间"));
+			return res;
+		}
+		if (in.getOrderNo()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+			return res;
+		}
+		return res.data(orderAssistService.addOrderService(in));
+	}
+
+	/**
+	 * 删除订单上门服务
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteOrderService",method = RequestMethod.POST)
+	public Result deleteOrderService(Integer id){
+		Result res = new Result();
+		if (id==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"服务编号"));
+			return res;
+		}
+
+		return res.data(orderAssistService.deleteOrderService(id));
+	}
+
+	/**
+	 * 订单上门服务列表
+	 * @return
+	 */
+	@RequestMapping(value = "/orderServiceList",method = RequestMethod.GET)
+	public Result orderServiceList(String orderNo){
+		Result res = new Result();
+		if (orderNo==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+			return res;
+		}
+		return res.data(orderAssistService.orderServiceList(orderNo));
+	}
+
 }

+ 28 - 2
src/main/java/com/goafanti/order/controller/OrderChangeApiController.java

@@ -78,7 +78,6 @@ public class OrderChangeApiController extends CertifyApiController {
 	
 	/**
 	 *  变更项目列表
-	 * @param t
 	 * @return
 	 */
 	@RequestMapping(value = "/selectChangeTask", method = RequestMethod.GET)
@@ -93,7 +92,6 @@ public class OrderChangeApiController extends CertifyApiController {
 	}
 	/**
 	 *  变更催款列表
-	 * @param t
 	 * @return
 	 */
 	@RequestMapping(value = "/selectChangeDun", method = RequestMethod.GET)
@@ -283,6 +281,11 @@ public class OrderChangeApiController extends CertifyApiController {
 	}
 	/**
 	 *  变更列表
+	 *  超级无语接口,变更太乱了
+	 *  首先是草稿然后发起变成审核中,再在流程中走一遍当金额小于2000总裁通过标记为通过,大于2000总裁通过不改变状态,流转到董事长,董事长审核改变
+	 *  状态为通过,通过状态下为财务退票,退票完成后改状态为上传附件,实际为营销员上传附件,营销员上传完后触发完成变更,状态才变成完成
+	 *  流程状态 0营销员 1营销管理员 2技术员 3技术经理 4技术总监 5财务专员(退单) 6财务总监 7总裁 8董事长
+	 *  状态 0草稿 1审核中 2通过 3驳回 4完成 5撤销 6上传附件
 	 */
 	@RequestMapping(value ="/orderChangeList",method = RequestMethod.GET)
 	public Result orderChangeList(String userName,Integer  processState,Integer timeType,String startTime,String endTime,
@@ -373,6 +376,19 @@ public class OrderChangeApiController extends CertifyApiController {
 		return res;
 	}
 	/**
+	 * 完成变更退票
+	 */
+	@RequestMapping(value ="/completeRefund",method = RequestMethod.GET)
+	public Result completeRefund(NewOrderChangeBo nb) {
+		Result res =new Result();
+		if (nb.getId()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"变更编号"));
+			return res;
+		}
+		res.data(orderChangeService.pushCompleteRefund(nb));
+		return res;
+	}
+	/**
 	 * 取消变更
 	 */
 	@RequestMapping(value ="/cancelOrderChange",method = RequestMethod.POST)
@@ -424,6 +440,16 @@ public class OrderChangeApiController extends CertifyApiController {
 		res.setData(handleFile(res, "/order_refund/", false, req, sign));
 		return res;
 	}
+
+	/**
+	 *	  变更附件文件上传
+	 */
+	@RequestMapping(value = "/uploadChangeAttachment", method = RequestMethod.POST)
+	public Result uploadChangeAttachment(HttpServletRequest req,String sign){
+		Result res = new Result();
+		res.setData(handleFile(res, "/order_change_attachment/", false, req, sign));
+		return res;
+	}
 	
 	/**
 	 *	  新增退款信息 

+ 24 - 0
src/main/java/com/goafanti/order/service/OrderAssistService.java

@@ -0,0 +1,24 @@
+package com.goafanti.order.service;
+
+import com.goafanti.common.model.TOrderAssist;
+import com.goafanti.order.bo.TOrderServiceBo;
+import com.goafanti.order.bo.assistListBo;
+
+import java.util.List;
+
+public interface OrderAssistService {
+    int addAssist(TOrderAssist in);
+
+    List<assistListBo> assistList(String orderNo);
+
+    int addAssistCheck(TOrderAssist in);
+
+    int deleteAssist(Integer id);
+
+    int addOrderService(TOrderServiceBo in);
+
+    int deleteOrderService(Integer id);
+
+
+    List<TOrderServiceBo> orderServiceList(String orderNo);
+}

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

@@ -88,4 +88,5 @@ public interface OrderChangeService {
 	int updateCancelOrderChange(NewOrderChangeBo nb);
 
 
+	int pushCompleteRefund(NewOrderChangeBo nb);
 }

+ 69 - 0
src/main/java/com/goafanti/order/service/impl/OrderAssistServiceImpl.java

@@ -0,0 +1,69 @@
+package com.goafanti.order.service.impl;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.TOrderAssistMapper;
+import com.goafanti.common.dao.TOrderNewMapper;
+import com.goafanti.common.dao.TOrderServiceMapper;
+import com.goafanti.common.model.TOrderAssist;
+import com.goafanti.common.model.TOrderNew;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.order.bo.TOrderServiceBo;
+import com.goafanti.order.bo.assistListBo;
+import com.goafanti.order.service.OrderAssistService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class OrderAssistServiceImpl extends BaseMybatisDao<TOrderAssistMapper> implements OrderAssistService {
+    @Autowired
+    private TOrderAssistMapper tOrderAssistMapper;
+    @Autowired
+    private TOrderServiceMapper tOrderServiceMapper;
+    @Override
+    public int addAssist(TOrderAssist in) {
+        return tOrderAssistMapper.insertSelective(in);
+    }
+
+    @Override
+    public List<assistListBo> assistList(String orderNo) {
+        return tOrderAssistMapper.assistList(orderNo);
+    }
+
+    @Override
+    public int addAssistCheck(TOrderAssist in) {
+        List<assistListBo> list = assistList(in.getOrderNo());
+        for (assistListBo bo : list) {
+            if (bo.getAid().equals(in.getAid())){
+                return -1;
+            }
+        }
+
+        return 0;
+    }
+
+
+
+    @Override
+    public int deleteAssist(Integer id) {
+        return tOrderAssistMapper.deleteByPrimaryKey(id);
+    }
+
+    @Override
+    public int addOrderService(TOrderServiceBo in) {
+        if (in.getServiceTimes()!=null)in.setServiceTime(DateUtils.StringToDate(in.getServiceTimes(), AFTConstants.YYYYMMDD));
+        return tOrderServiceMapper.insertSelective(in);
+    }
+
+    @Override
+    public int deleteOrderService(Integer id) {
+        return tOrderServiceMapper.deleteByPrimaryKey(id);
+    }
+
+    @Override
+    public List<TOrderServiceBo> orderServiceList(String orderNo) {
+        return tOrderServiceMapper.orderServiceList(orderNo);
+    }
+}

+ 13 - 10
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -329,14 +329,6 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 					}
 				
 			}
-			/*else {
-				if(nb.getProcessState()==9) {
-					//changgeAdopt(nb); 取消订单变更完成
-					}
-				//流程状态 0营销员 1营销管理员 2技术员 3技术经理 4技术总监 5财务专员(退单) 6财务总监 7总裁 8董事长 9 财务专员(非退单)
-				if (nb.getProcessState()==1) nb.setProcessState(7);
-				else if (nb.getProcessState()==7)nb.setProcessState(9);
-			}*/ //去掉第二条线
 			if(nb.getStatus()==3) {
 				nb.setStatus(1);//如果驳回数据则改为正常数据
 			}
@@ -641,13 +633,22 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		//变更完成
 		changeAdopt(nb);
 		TOrderNew o=pushChange(nb);
+		newOrderChangeMapper.updateByPrimaryKeySelective(nb);
+		return 1;
+	}
+
+
+	@Override
+	public int pushCompleteRefund(NewOrderChangeBo nb) {
+		nb.setStatus(6);
+		NewOrderChangeBo nob=newOrderChangeMapper.selectById(nb.getId());
+		TOrderNew o=tOrderNewMapper.selectByPrimaryKey(nob.getOrderNo());
 		List<String> alist = new ArrayList<>();
 		alist.add(o.getSalesmanId());
 		newOrderChangeMapper.updateByPrimaryKeySelective(nb);
-		orderNewService.pushGeneralSendNoticeAndEmail(alist,NoticeStatus.ORDER_CHANGE_END.getCode(), o.getOrderNo(), TokenManager.getAdminId(),0);
+		orderNewService.pushGeneralSendNoticeAndEmail(alist,NoticeStatus.ORDER_CHANGE_YES.getCode(), o.getOrderNo(), TokenManager.getAdminId(),0);
 		return 1;
 	}
-	
 
 	/**
 	 * 修改订单数据
@@ -1081,4 +1082,6 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				tOrderNewMapper.updateByPrimaryKeySelective(t);
 				return 1;
 			}
+
+
 }

+ 2 - 0
src/main/java/com/goafanti/weChat/bo/InputPublicRelease.java

@@ -17,6 +17,8 @@ public class InputPublicRelease extends PublicRelease {
 	
 	private String reason;
 
+
+
 	public String getReleaseStarts() {
 		return releaseStarts;
 	}

+ 22 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java

@@ -2,6 +2,8 @@ package com.goafanti.weChat.bo;
 
 import com.goafanti.common.model.PublicRelease;
 
+import java.util.Date;
+
 public class OutPublicRelease extends PublicRelease {
 	/**
 	 * 
@@ -20,6 +22,26 @@ public class OutPublicRelease extends PublicRelease {
 
 	private String reviewer;
 
+	private String clockInTimes;
+
+	private  String contractNo;
+
+	public String getContractNo() {
+		return contractNo;
+	}
+
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+
+	public String getClockInTimes() {
+		return clockInTimes;
+	}
+
+	public void setClockInTimes(String clockInTimes) {
+		this.clockInTimes = clockInTimes;
+	}
+
 	public String getReviewer() {
 		return reviewer;
 	}

+ 28 - 1
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -231,7 +231,34 @@ public class AdminReleaseApiController extends CertifyApiController{
 		res.setData(publicReleaseService.addSupplement( id ,supplement,nextPlan));
 		return res;
 	}
-	
+
+	/**
+	 * 根据客户返回订单
+	 */
+	@RequestMapping(value = "/selectOrderByUid",method =RequestMethod.GET)
+	public Result selectOrderByUid(String uid){
+		Result res = new Result();
+		if (uid==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"客户编号"));
+			return res;
+		}
+		res.data(publicReleaseService.selectOrderByUid(uid));
+		return res;
+	}
+
+	/**
+	 * 查看上门记录
+	 */
+	@RequestMapping(value = "/publicByOrder",method =RequestMethod.GET)
+	public Result publicByOrder(String orderNo){
+		Result res = new Result();
+		if (orderNo==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+			return res;
+		}
+		res.data(publicReleaseService.publicByOrder(orderNo));
+		return res;
+	}
 	
 	
 }

+ 4 - 0
src/main/java/com/goafanti/weChat/service/PublicReleaseService.java

@@ -43,4 +43,8 @@ public interface PublicReleaseService {
 	List<OutPublicDtails> publicReleaseListDtailsList(InputPublicDtails in);
 
     int addSupplement(Integer id, String supplement, String nextPlan);
+
+    List<Map<String,Object>> selectOrderByUid(String uid);
+
+	List<OutPublicRelease> publicByOrder(String orderNo);
 }

+ 30 - 20
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -8,6 +8,7 @@ import java.util.Map;
 import java.util.UUID;
 
 
+import com.goafanti.common.dao.*;
 import com.goafanti.order.service.OrderService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -16,11 +17,6 @@ import org.springframework.web.socket.TextMessage;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.OrganizationContactBookMapper;
-import com.goafanti.common.dao.PublicReleaseLogMapper;
-import com.goafanti.common.dao.PublicReleaseMapper;
-import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Admin;
@@ -74,6 +70,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	private OrganizationContactBookMapper	organizationContactBookMapper;
 	@Autowired
 	private SystemWebSocketHandler	systemWebSocketHandler;
+	@Autowired
+	private TOrderNewMapper tOrderNewMapper;
 	
 	@Override
 	public Map<String, Object> addPublicRelease(InputPublicRelease in) {
@@ -152,6 +150,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			e.printStackTrace();
 			throw new BusinessException("转换异常");
 		}
+		User u=userMapper.selectByPrimaryKey(in.getUid());
+		if (u!=null&&u.getShareType()==2){
+			in.setNewUser(1);
+		}
+		if (u!=null&&u.getAid().equals(TokenManager.getAdminId())){
+			in.setMainStatus(1);
+		}
 		if(in.getStatus()==null||in.getStatus()!=3) {
 			in.setStatus(1);
 		}else {
@@ -278,14 +283,17 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					!TokenManager.getAdminId().equals(ab.getDepManager())){
 				flag=true;
 			}
-			if(flag)out=null;
-		}
-		if(TokenManager.getAdminId().equals(out.getAid())) {
-			out.setPermission(0);
-		}else {
-			out.setPermission(1);
+			if(flag){
+				out=null;
+			}else {
+				if(TokenManager.getAdminId().equals(out.getAid())) {
+					out.setPermission(0);
+				}else {
+					out.setPermission(1);
+				}
+			}
 		}
-		return out;	 
+		return out;
 	}
 	
 	@Override
@@ -374,6 +382,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	}
 
 
+
+
 	@Override
 	public boolean checkTime(InputPublicRelease in) {
 		try {
@@ -391,15 +401,15 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	}
 
 
+	@Override
+	public List<Map<String, Object>> selectOrderByUid(String uid) {
+		return tOrderNewMapper.selectOrderByuid(uid);
+	}
 
-
-
-
-
-
-	
-
-	
+	@Override
+	public List<OutPublicRelease> publicByOrder(String orderNo) {
+		return publicReleaseMapper.publicByOrder(orderNo);
+	}
 
 
 }

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -46,11 +46,11 @@ user_channel_days=90
 
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
-#static.host=//172.16.0.253/1.1.98
+#static.host=//172.16.0.53/1.2.02
 #avatar.host=//172.16.0.253
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.99
+static.host=//static.jishutao.com/1.2.02
 
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -43,7 +43,7 @@ user_remind_days=15
 #提前提醒天数
 user_channel_days=90
 
-static.host=//static.jishutao.com/1.1.99
+static.host=//static.jishutao.com/1.2.02
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload