feat(delivery): 添加发货管理的数据权限控制功能
- 在发货清单查询中集成数据权限注解支持 - 为发货服务类添加 DataScope 注解配置 - 更新 MyBatis 映射文件以支持数据权限 SQL 注入 - 添加用户职责关联查询以支持权限判断 - 修改前端组件移除不必要的自动加载逻辑 - 在用户控制器中增加角色授权接口实现dev_1.0.0
parent
330f2f7d54
commit
6bed84cf3e
|
|
@ -186,7 +186,7 @@
|
||||||
<!-- 发货清单对话框 -->
|
<!-- 发货清单对话框 -->
|
||||||
<delivery-items ref="items"></delivery-items>
|
<delivery-items ref="items"></delivery-items>
|
||||||
<!-- 合同详情抽屉 -->
|
<!-- 合同详情抽屉 -->
|
||||||
<order-detail ref="orderDetail"></order-detail>
|
<!-- <order-detail ref="orderDetail"></order-detail>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
// created() {
|
||||||
this.getList();
|
// this.getList();
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询进货商列表 */
|
/** 查询进货商列表 */
|
||||||
getList() {
|
getList() {
|
||||||
|
|
|
||||||
|
|
@ -465,6 +465,20 @@ public class SysUserController extends BaseController
|
||||||
}
|
}
|
||||||
return toAjax(userService.deleteUserByIds(ids));
|
return toAjax(userService.deleteUserByIds(ids));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 用户授权角色
|
||||||
|
*/
|
||||||
|
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||||
|
@PutMapping("/authRole")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult authRole(Long userId, Long[] roleIds)
|
||||||
|
{
|
||||||
|
userService.checkUserDataScope(userId);
|
||||||
|
roleService.checkRoleDataScope(roleIds);
|
||||||
|
userService.insertUserAuth(userId, roleIds);
|
||||||
|
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||||
|
return success();
|
||||||
|
}
|
||||||
// ----------------------新增的个人信息 业务处理---------------------------
|
// ----------------------新增的个人信息 业务处理---------------------------
|
||||||
// /**
|
// /**
|
||||||
// * 个人信息
|
// * 个人信息
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.ShiroUtils;
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
|
|
@ -84,6 +85,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
* @return 产品库存
|
* @return 产品库存
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@DataScope(deptAlias = "t8", userAlias = "t8")
|
||||||
public List<InventoryDelivery> selectInventoryDeliveryList(InventoryDelivery inventoryDelivery) {
|
public List<InventoryDelivery> selectInventoryDeliveryList(InventoryDelivery inventoryDelivery) {
|
||||||
return inventoryDeliveryMapper.selectInventoryDeliveryList(inventoryDelivery);
|
return inventoryDeliveryMapper.selectInventoryDeliveryList(inventoryDelivery);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join project_info t5 on t4.project_id=t5.id
|
left join project_info t5 on t4.project_id=t5.id
|
||||||
left join sys_user t6 on t1.create_by = t6.user_id
|
left join sys_user t6 on t1.create_by = t6.user_id
|
||||||
left join product_info t7 on t3.product_code = t7.product_code
|
left join product_info t7 on t3.product_code = t7.product_code
|
||||||
|
left join sys_user t8 on t4.duty = t8.user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectInventoryDeliveryList" parameterType="InventoryDelivery" resultMap="InventoryDeliveryResult">
|
<select id="selectInventoryDeliveryList" parameterType="InventoryDelivery" resultMap="InventoryDeliveryResult">
|
||||||
|
|
@ -62,7 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectName != null and projectName != ''">and t5.project_name like
|
<if test="projectName != null and projectName != ''">and t5.project_name like
|
||||||
concat('%',#{projectName},'%')
|
concat('%',#{projectName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
${params.authSql}
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectInventoryDeliveryById" parameterType="Long" resultMap="InventoryDeliveryResult">
|
<select id="selectInventoryDeliveryById" parameterType="Long" resultMap="InventoryDeliveryResult">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue