Redeem 2 年 前
コミット
b0ce73f457

+ 35 - 3
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -138,16 +138,48 @@
             <if test="businessCompanyId!=null and businessCompanyId!=''">
                 AND RC.COMPANY_ID = #{businessCompanyId}
             </if>
+            <if test="supplierCompanyId!=null and supplierCompanyId!=''">
+                AND RC.COMPANY_ID = #{supplierCompanyId}
+            </if>
+            <if test="receiveCompanyId!=null and receiveCompanyId!=''">
+                AND RC.COMPANY_ID = #{receiveCompanyId}
+            </if>
             <if test="carrierId!=null and carrierId!=''">
                 AND RC.COMPANY_ID = #{carrierId}
             </if>
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE(RC.COMPANY_NAME, #{index})
             </if>
-            <if test="!roleCodes.contains('admin') and dilCompanyList != null and dilCompanyList.size > 0">
-                AND RC.COMPANY_ID in
+            <if test="roleCodes.contains('shippingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '发货单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('recevingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '收货单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('carrierCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '承运单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('businessCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
                 <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
-                    #{item.companyId}
+                    <if test="companyType == '业务单位'">
+                        #{item.companyId}
+                    </if>
                 </foreach>
             </if>
         </where>