Bläddra i källkod

订单列表修改

anderx 1 år sedan
förälder
incheckning
e1943fb2c5

+ 13 - 7
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -718,8 +718,8 @@
             <foreach collection="type" item="item" separator="," open="(" close=")">
                 #{item}
             </foreach>
-        </if>
         group by order_no) toa on o.order_no=toa.order_no
+        </if>
         where delete_sign in(0,2) and o.approval in(0,1,2,4,5,7,8) and outsource=  #{o.outsource,jdbcType=INTEGER}
         <if test="o.processStatus == 3">
             and o.process_status = #{o.processStatus,jdbcType=INTEGER}
@@ -844,7 +844,13 @@
         <if test="specially == 10">
             left join admin mg on a.salesman_id=mg.id
         </if>
-        inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
+        <if test="type !=null">
+            inner join
+        </if>
+        <if test="type ==null">
+            left join
+        </if>
+        (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
         from t_order_approval
         <if test="type !=null">
             where `type` in
@@ -853,7 +859,6 @@
             </foreach>
         </if>
         group by order_no) toa on a.order_no=toa.order_no
-        where a.delete_sign in(0,2)
         <include refid="selectOrderNewSql"/>
         order by
         <if test="specially == 3">
@@ -1042,15 +1047,16 @@
         <if test="specially == 10">
             left join admin mg on a.salesman_id=mg.id
         </if>
-        inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
-        from t_order_approval
         <if test="type !=null">
+            inner join
+            (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
+            from t_order_approval
             where `type` in
             <foreach collection="type" item="item" separator="," open="(" close=")">
                 #{item}
             </foreach>
-        </if>
         group by order_no) toa on a.order_no=toa.order_no
+        </if>
         where a.delete_sign in(0,2)
         <include refid="selectOrderNewSql"/>
 
@@ -1323,8 +1329,8 @@
             <foreach collection="type" item="item" separator="," open="(" close=")">
                 #{item}
             </foreach>
-        </if>
         group by order_no) toa on o.order_no=toa.order_no
+        </if>
         where o.delete_sign in(0,2,3)  and o.approval in(0,1,2,4,5,7,8) and outsource=  #{o.outsource,jdbcType=INTEGER}
         <if test="o.processStatus == 3">
             and o.process_status = #{o.processStatus,jdbcType=INTEGER}

+ 11 - 4
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -2112,7 +2112,13 @@
     <if test="shiroType ==2 or  shiroType ==3">
       left join department d on b.order_dep =d.id
     </if>
-    inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
+    <if test="type !=null">
+      inner join
+    </if>
+    <if test="type ==null">
+      left join
+    </if>
+    (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
     from t_order_approval
     <if test="type !=null">
       where `type` in
@@ -2194,15 +2200,16 @@
     <if test="shiroType ==2 or shiroType ==3">
       left join department d on b.order_dep =d.id
     </if>
-    inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
-    from t_order_approval
     <if test="type !=null">
+      inner join
+      (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
+      from t_order_approval
       where `type` in
       <foreach collection="type" item="item" separator="," open="(" close=")">
         #{item}
       </foreach>
+      group by order_no) toa on o.order_no=toa.order_no
     </if>
-    group by order_no) toa on b.order_no=toa.order_no
     where  b.delete_sign in (0,2)
     and a.process_status in (1,2,3,4)
     <if test="shiroType ==1">