xie.kaifeng 8 ماه پیش
والد
کامیت
b82cd31ff7
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      mtp3-century/src/main/resources/mapper/TradeOrderdetailMapper.xml

+ 6 - 4
mtp3-century/src/main/resources/mapper/TradeOrderdetailMapper.xml

@@ -1108,8 +1108,9 @@
                 </foreach>
             </if>
             <if test="vo.userid != null and vo.userid != ''">
-                and pua.userid in
-                (select uo.userid from useraccount uo where uo.usertype in (2,3) start with uo.userid = #{vo.userid} connect by prior uo.userid = uo.parentuserid)
+                and (pua.userid in
+                (select uo.userid from useraccount uo where uo.usertype in (1,2,3) start with uo.userid = #{vo.userid} connect by prior uo.userid = uo.parentuserid)
+                or ua.userid = #{vo.userid})
             </if>
         </where>
         group by t.accountid, ua.userid, ua.accountname, t.goodsid, g.goodscode, g.goodsname,
@@ -1169,8 +1170,9 @@
                 </foreach>
             </if>
             <if test="vo.userid != null and vo.userid != ''">
-                and pua.userid in
-                (select uo.userid from useraccount uo where uo.usertype in (2,3) start with uo.userid = #{vo.userid} connect by prior uo.userid = uo.parentuserid)
+                and (pua.userid in
+                (select uo.userid from useraccount uo where uo.usertype in (1,2,3) start with uo.userid = #{vo.userid} connect by prior uo.userid = uo.parentuserid)
+                or ua.userid = #{vo.userid})
             </if>
         </where>
         group by t.reckondate, t.accountid, ua.userid, ua.accountname, t.goodsid, g.goodscode, g.goodsname,