Bläddra i källkod

Merge branch 'master' of http://47.108.172.52:3000/dayou/item-management-1phase

GouGengquan 10 månader sedan
förälder
incheckning
f2faa19a66

BIN
biz-base/src/main/resources/docs/personal/house_statement.docx


BIN
biz-base/src/main/resources/docs/personal/immovable_statement.docx


BIN
biz-base/src/main/resources/docs/personal/land_statement.docx


+ 59 - 2
dao/src/main/resources/mapper/MajorProductionMapper.xml

@@ -265,11 +265,55 @@
         order by temp.repertory_in_time desc
     </select>
 
+    <resultMap id="myOrderMap" type="com.dayou.vo.MajorOrderVO">
+        <result column="id" property="id" />
+        <result column="businessId" property="businessId" />
+        <result column="order_id" property="orderId" />
+        <result column="orderName" property="orderName" />
+        <result column="productionNo" property="productionNo" />
+        <result column="if_save_file" property="ifSaveFile" />
+        <result column="principal" property="principal" />
+        <result column="clientManager" property="clientManager" />
+        <result column="clienteleName" property="clienteleName" />
+        <result column="clienteleSubName" property="clienteleSubName" />
+        <result column="bailor" property="bailor" />
+        <result column="clienteleContactName" property="clienteleContactName" />
+        <result column="owner" property="owner" />
+        <result column="orderFundId" property="orderFundId" />
+        <result column="should_amount" property="shouldAmount" />
+        <result column="real_amount" property="realAmount" />
+        <result column="created" property="created" />
+        <result column="remark" property="remark" />
+        <result column="mDeclareResult" property="mDeclareResult" />
+        <result column="eDeclareResult" property="eDeclareResult" />
+        <association property="currentNodeName" javaType="java.lang.String"
+                     select="queryCurrentNodeName" column="{businessId=businessId,productionNo=productionNo}"/>
+    </resultMap>
+
+    <select id="queryCurrentNodeName" resultType="java.lang.String">
+        select name from work_node where id = (
+        select node_id from work_flow_node_instance where
+        business_type='MAJOR_BUSINESS'
+        and state= 'PENDING'
+        AND deleted = 0
+        and business_id = #{businessId}
+            <if test="productionNo!=null and productionNo!=''">
+              and (business_min_id = #{productionNo} or business_sub_id = #{productionNo}) order by id desc limit 1
+            </if>
+            <if test="productionNo==null">
+                and business_sub_id is null and business_min_id is null
+            </if>
+        )
+    </select>
+
     <sql id="myMajorOrder">
         SELECT
-            m.id,
+            mp.id AS id,
+            m.id as businessId,
             m.order_id,
             m.name as orderName,
+            mp.report_no as productionNo,
+            mp.if_save_file,
             u.name as principal,
             u1.name as clientManager,
             cc.name as clienteleName,
@@ -286,6 +330,7 @@
             ( SELECT declare_result FROM commission_declare WHERE business_id = m.id AND production_id IS NULL AND business_type = 'COMMISSION_DECLARE_MAJOR_EVALUATE' AND deleted = 0 ) as eDeclareResult
         FROM
             major m
+                left join major_production mp on mp.major_id = m.id
                 left join user u on u.id = m.principal_id
                 left join user u1 on u1.id = m.client_manager_id
                 left join customer_company cc on cc.id = m.clientele_id
@@ -294,7 +339,7 @@
                 left join (select * from order_fund where business_type ='MAJOR_BUSINESS' and deleted = 0) orf on orf.business_id = m.id
 </sql>
 
-    <select id="myOrder" parameterType="com.dayou.vo.MajorOrderVO" resultType="com.dayou.vo.MajorOrderVO">
+    <select id="myOrder" parameterType="com.dayou.vo.MajorOrderVO" resultMap="myOrderMap">
         <include refid="myMajorOrder" />
         where m.deleted = 0
         and m.client_manager_id = #{vo.clientManagerId}
@@ -317,6 +362,18 @@
         <if test="vo!=null and vo.principalId!=null and vo.principalId!=''">
             AND m.principal_id like concat('%',#{vo.principalId},'%')
         </if>
+        <if test="vo!=null and vo.orderId!=null and vo.orderId!=''">
+            AND m.order_id like concat('%',#{vo.orderId},'%')
+        </if>
+        <if test="vo!=null and vo.productionNo!=null and vo.productionNo!=''">
+            AND mp.report_no like concat('%',#{vo.productionNo},'%')
+        </if>
+        <if test="vo!=null and vo.clienteleName!=null and vo.clienteleName!=''">
+            AND cc.name like concat('%',#{vo.clienteleName},'%')
+        </if>
+        <if test="vo!=null and vo.clienteleSubName!=null and vo.clienteleSubName!=''">
+            AND cc1.name like concat('%',#{vo.clienteleSubName},'%')
+        </if>
         <if test="vo!=null and vo.startDate!=null and vo.startDate!=''">
             and m.created &gt;= #{vo.startDate}
         </if>

+ 13 - 1
domain/src/main/java/com/dayou/vo/MajorOrderVO.java

@@ -16,10 +16,16 @@ import java.util.Date;
 public class MajorOrderVO {
 
     /**
-     * 订单id
+     * id
      */
     private Long id;
 
+    /**
+     * 订单id
+     */
+
+    private Long businessId;
+
 
     /**
      * 产品收款id
@@ -115,4 +121,10 @@ public class MajorOrderVO {
      */
     private Long principalId;
 
+    private String productionNo;
+
+    private String currentNodeName;
+
+    private Boolean ifSaveFile;
+
 }