Jelajahi Sumber

Merge remote-tracking branch 'origin/test' into test

Qchen 2 tahun lalu
induk
melakukan
9fa169cfa5

+ 1 - 1
src/main/resources/mapper/modules/admin/SysUserMapper.xml

@@ -573,7 +573,7 @@
                 and t1.mobile = #{user.mobile}
                 and t1.mobile = #{user.mobile}
             </if>
             </if>
             <if test='user.deptId !=null and user.deptId!=""  '>
             <if test='user.deptId !=null and user.deptId!=""  '>
-                and t2.id = #{user.deptId}
+                and t2.id like CONCAT('', #{user.deptId}, '%')
             </if>
             </if>
         </if>
         </if>
         order by flag
         order by flag

+ 7 - 11
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -781,7 +781,7 @@
         select
         select
         io.orderno as orderno,
         io.orderno as orderno,
         io.quoteno as  quoteno,
         io.quoteno as  quoteno,
-        io.orderstatus as orderstatus,
+        iac.orderstatus as orderstatus,
         io.carinfo as  carinfo,
         io.carinfo as  carinfo,
         io.userid as userid,
         io.userid as userid,
         io.username as username,
         io.username as username,
@@ -818,7 +818,7 @@
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' )
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} )
                 <if test="deptIds != null and deptIds.size>0" >
                 <if test="deptIds != null and deptIds.size>0" >
                     AND (
                     AND (
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
@@ -827,7 +827,6 @@
                     )
                     )
                 </if>
                 </if>
                 )
                 )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
                 <if test="flag" >
                 <if test="flag" >
                     OR iac.operator_id = #{orderQueryVo.userId}
                     OR iac.operator_id = #{orderQueryVo.userId}
                 </if>
                 </if>
@@ -839,8 +838,7 @@
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} ) )
                 <if test="flag" >
                 <if test="flag" >
                     OR iac.operator_id = #{orderQueryVo.userId}
                     OR iac.operator_id = #{orderQueryVo.userId}
                 </if>
                 </if>
@@ -853,7 +851,7 @@
                 and io.deptid like "${orderQueryVo.deptId}%"
                 and io.deptid like "${orderQueryVo.deptId}%"
             </if>
             </if>
             <if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
             <if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
-                and io.orderstatus = #{orderQueryVo.orderStatus}
+                and iac.orderstatus = #{orderQueryVo.orderStatus}
             </if>
             </if>
             <if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
             <if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
                 and io.frameno = #{orderQueryVo.frameNo}
                 and io.frameno = #{orderQueryVo.frameNo}
@@ -897,7 +895,7 @@
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' )
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} )
                 <if test="deptIds != null and deptIds.size>0" >
                 <if test="deptIds != null and deptIds.size>0" >
                     AND (
                     AND (
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
@@ -906,7 +904,6 @@
                     )
                     )
                 </if>
                 </if>
                 )
                 )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
               <if test="flag" >
               <if test="flag" >
                 OR iac.operator_id = #{orderQueryVo.userId}
                 OR iac.operator_id = #{orderQueryVo.userId}
               </if>
               </if>
@@ -918,8 +915,7 @@
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} ) )
                 <if test="flag" >
                 <if test="flag" >
                     OR iac.operator_id = #{orderQueryVo.userId}
                     OR iac.operator_id = #{orderQueryVo.userId}
                 </if>
                 </if>
@@ -932,7 +928,7 @@
                 and io.deptid like "${orderQueryVo.deptId}%"
                 and io.deptid like "${orderQueryVo.deptId}%"
             </if>
             </if>
             <if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
             <if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
-                and io.orderstatus = #{orderQueryVo.orderStatus}
+                and iac.orderstatus= #{orderQueryVo.orderStatus}
             </if>
             </if>
             <if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
             <if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
                 and io.frameno = #{orderQueryVo.frameNo}
                 and io.frameno = #{orderQueryVo.frameNo}