Browse Source

调账流水记录部门权限

zxf 5 days ago
parent
commit
ef28326f29

+ 7 - 4
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/domain/BizFinancialAdjustmentRecord.java

@@ -17,6 +17,8 @@ public class BizFinancialAdjustmentRecord extends BaseEntity
 {
 {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
+    @Excel(name = "供应商")
+    private String deptName;
     /** 调账流水id */
     /** 调账流水id */
     private Long financialAdjustId;
     private Long financialAdjustId;
 
 
@@ -49,15 +51,16 @@ public class BizFinancialAdjustmentRecord extends BaseEntity
     private String adjustmentReason;
     private String adjustmentReason;
 
 
     /** 部门ID */
     /** 部门ID */
-    @Excel(name = "部门ID")
+
     private Long deptId;
     private Long deptId;
 
 
     /** 用户ID */
     /** 用户ID */
-    @Excel(name = "用户ID")
-    private Long userId;
 
 
+    private Long userId;
+    @Excel(name = "操作人")
     private String userName;
     private String userName;
-    private String deptName;
+
+
 
 
     public void setUserName(String userName) {
     public void setUserName(String userName) {
         this.userName = userName;
         this.userName = userName;

+ 2 - 0
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/BizFinancialAdjustmentRecordServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.logistics.service.impl;
 
 
 import java.util.List;
 import java.util.List;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.datascope.annotation.DataScope;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import com.ruoyi.logistics.mapper.BizFinancialAdjustmentRecordMapper;
 import com.ruoyi.logistics.mapper.BizFinancialAdjustmentRecordMapper;
@@ -39,6 +40,7 @@ public class BizFinancialAdjustmentRecordServiceImpl implements IBizFinancialAdj
      * @return 调账流水记录
      * @return 调账流水记录
      */
      */
     @Override
     @Override
+    @DataScope(deptAlias = "d")
     public List<BizFinancialAdjustmentRecord> selectBizFinancialAdjustmentRecordList(BizFinancialAdjustmentRecord bizFinancialAdjustmentRecord)
     public List<BizFinancialAdjustmentRecord> selectBizFinancialAdjustmentRecordList(BizFinancialAdjustmentRecord bizFinancialAdjustmentRecord)
     {
     {
         return bizFinancialAdjustmentRecordMapper.selectBizFinancialAdjustmentRecordList(bizFinancialAdjustmentRecord);
         return bizFinancialAdjustmentRecordMapper.selectBizFinancialAdjustmentRecordList(bizFinancialAdjustmentRecord);

+ 5 - 0
jd-logistics-modules/jd-logistics-system/src/main/resources/mapper/logistics/BizFinancialAdjustmentRecordMapper.xml

@@ -45,7 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="adjustmentReason != null  and adjustmentReason != ''"> and adjustment_reason = #{adjustmentReason}</if>
             <if test="adjustmentReason != null  and adjustmentReason != ''"> and adjustment_reason = #{adjustmentReason}</if>
             <if test="deptId != null "> and a.dept_id = #{deptId}</if>
             <if test="deptId != null "> and a.dept_id = #{deptId}</if>
             <if test="userId != null "> and a.user_id = #{userId}</if>
             <if test="userId != null "> and a.user_id = #{userId}</if>
+
+            <!-- 数据范围过滤 -->
+            ${params.dataScope}
         </where>
         </where>
+
+
     </select>
     </select>
     
     
     <select id="selectBizFinancialAdjustmentRecordByFinancialAdjustId" parameterType="Long" resultMap="BizFinancialAdjustmentRecordResult">
     <select id="selectBizFinancialAdjustmentRecordByFinancialAdjustId" parameterType="Long" resultMap="BizFinancialAdjustmentRecordResult">