Răsfoiți Sursa

物流对账 导出接口数据权限

xucaiqin 2 ani în urmă
părinte
comite
93722d33e5

+ 1 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpLedgerLogisticsMapper.java

@@ -141,5 +141,5 @@ public interface KwpLedgerLogisticsMapper extends BaseMapper<KwpLedgerLogistics>
      * @param idList
      * @return
      */
-    List<LedgerLogisticsDto> exportList(@Param("logisticsReq") LogisticsReq logisticsReq, @Param("idList") List<Long> idList);
+    List<LedgerLogisticsDto> exportList(@Param("logisticsReq") LogisticsReq logisticsReq, @Param("idList") List<Long> idList, @Param("authList") List<Long> authList);
 }

+ 1 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerLogisticsService.java

@@ -814,7 +814,7 @@ public class KwpLedgerLogisticsService extends AbsLedger {
 
     public List<LedgerLogisticsDto> exportList(LogisticsReq logisticsReq, List<Long> idList) {
         fillPara(logisticsReq);
-        List<LedgerLogisticsDto> ledgerLogisticsDtos = logisticsMapper.exportList(logisticsReq, idList);
+        List<LedgerLogisticsDto> ledgerLogisticsDtos = logisticsMapper.exportList(logisticsReq, idList, LoginUserHolder.getAuthUserIdList());
         changeDict(ledgerLogisticsDtos);
         return ledgerLogisticsDtos;
     }

+ 49 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/KwpLedgerLogisticsMapper.xml

@@ -727,6 +727,55 @@
                                 or kllu.contacts like concat('%', #{logisticsReq.keywords,jdbcType=VARCHAR}, '%')
                             )
                     </if>
+                    <if test="logisticsReq.unitType == 1">
+                        and (
+                        case when kll.status in (1, 6)
+                            then
+                            kll.create_by in
+                        <foreach collection="authList" item="item" open="(" close=")" separator=",">
+                            #{item,jdbcType=BIGINT}
+                        </foreach>
+                        when kll.status in (2, 3, 4, 5) then
+                        (
+                            kll.create_by in
+                        <foreach collection="authList" item="item" open="(" close=")" separator=",">
+                            #{item,jdbcType=BIGINT}
+                        </foreach>
+                        or kllu2.contacts_id in
+                        <foreach collection="authList" item="item" open="(" close=")" separator=",">
+                            #{item,jdbcType=BIGINT}
+                        </foreach>
+                        )
+                            end
+                            )
+                    </if>
+                    <if test="logisticsReq.unitType == 2">
+                        and (
+                        case
+                            when kll.status = 2 then
+                                true
+                        when kll.status in (3, 4, 5) then
+                        (
+                        (
+                            kllu2.contacts_id in
+                        <foreach collection="authList" item="item" open="(" close=")" separator=",">
+                            #{item,jdbcType=BIGINT}
+                        </foreach>)
+                        or
+                    (
+                    select kllt.id
+                    from kwp_ledger_logistics_track kllt where kllt.del_flag = 0
+                                                           and kllt.l_ledger_id = kll.id
+                                                           and kllt.status in (3, 5)
+                                                           and kllt.create_by in
+                        <foreach collection="authList" item="item" open="(" close=")" separator=",">
+                            #{item,jdbcType=BIGINT}
+                        </foreach>
+                        )
+                            )
+                            end
+                            )
+                    </if>
                 </otherwise>
             </choose>
         </where>