Browse Source

订单中间表修改,法务完成表修改

anderx 4 years ago
parent
commit
e5725d8c43

+ 4 - 5
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml

@@ -413,20 +413,18 @@
       ,b.operation_time operationTime,date_format(b.operation_time,'%Y-%m-%d')operationDate,b.legal_affairs_type `type`
     </if>
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
-    <if test="type==3">
-      left join t_order_legal_affairs d on a.order_no=d.order_no
-    </if>
     <if test="shiro == 2">
       left join admin c on a.salesman_id =c.id
     </if>
     <if test="type==1 or type==2 or type==3">
       where b.legal_affairs =1
+      and b.legal_affairs_type = (#{type}-1)
     </if>
     <if test="type==0">
       where b.order_receivables >0
     </if>
     <if test="status != null">
-      and d.status = #{status}
+      and b.legal_affairs_status = #{status}
     </if>
     <if test="shiro==1">
       and a.order_type in
@@ -478,12 +476,13 @@
     </if>
     <if test="type==1 or type==2 or type==3">
       where b.legal_affairs =1
+      and b.legal_affairs_type = (#{type}-1)
     </if>
     <if test="type==0">
       where b.order_receivables >0
     </if>
     <if test="status != null">
-      and d.status = #{status}
+      and b.legal_affairs_status = #{status}
     </if>
     <if test="shiro==1">
       and a.order_type in

+ 2 - 0
src/main/java/com/goafanti/order/service/impl/LegalAffairsServiceImpl.java

@@ -46,6 +46,7 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
         tm.setOrderNo(orderNo);
         tm.setLegalAffairs(1);
         tm.setLegalAffairsType(0);
+        tm.setLegalAffairsStatus(0);
         return tOrderMidMapper.updateByOrderNo(tm);
     }
 
@@ -164,6 +165,7 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
         tm.setOrderNo(in.getOrderNo());
         tm.setLegalAffairsType(in.getType());
         tm.setOperationTime(la.getOperationTime());
+        tm.setLegalAffairsStatus(in.getStatus());
         tOrderMidMapper.updateByOrderNo(tm);
         return tOrderLegalAffairsMapper.insertSelective(la);
     }