Commit c10054005f21ac922165af5b6e109d684b477bb3

Authored by chenhang4442024
1 parent b498609e

feat:生产科角色对于订单的可见范围

src/main/java/com/order/erp/controller/ReceiveEmailMappingController.java
1 1 package com.order.erp.controller;
2 2  
  3 +import com.order.erp.common.annotation.AnonymousAccess;
3 4 import com.order.erp.common.constant.ServerResult;
4 5 import com.order.erp.domain.dto.order.ReceiveEmailMappingDO;
5 6 import com.order.erp.domain.vo.order.ReceiveEmailMappingQueryVO;
... ... @@ -34,6 +35,7 @@ public class ReceiveEmailMappingController {
34 35 * @return 查询结果
35 36 */
36 37 @PostMapping("/list")
  38 + @AnonymousAccess
37 39 public ServerResult list() {
38 40 return receiveEmailMappingService.listGetAll();
39 41 }
... ... @@ -46,6 +48,7 @@ public class ReceiveEmailMappingController {
46 48 * @return 新增结果
47 49 */
48 50 @PostMapping("/add")
  51 + @AnonymousAccess
49 52 public ServerResult add(@RequestBody ReceiveEmailMappingVO receiveEmailMappingVO) {
50 53 return receiveEmailMappingService.add(receiveEmailMappingVO);
51 54 }
... ... @@ -57,6 +60,7 @@ public class ReceiveEmailMappingController {
57 60 * @return 编辑结果
58 61 */
59 62 @PostMapping("/edit")
  63 + @AnonymousAccess
60 64 public ServerResult edit(@RequestBody ReceiveEmailMappingVO receiveEmailMappingVO) {
61 65 return receiveEmailMappingService.edit(receiveEmailMappingVO);
62 66 }
... ... @@ -68,6 +72,7 @@ public class ReceiveEmailMappingController {
68 72 * @return 删除是否成功
69 73 */
70 74 @PostMapping("/delete_by_id")
  75 + @AnonymousAccess
71 76 public ServerResult deleteById(@RequestBody ReceiveEmailMappingVO receiveEmailMappingVO) {
72 77 return receiveEmailMappingService.deleteById(receiveEmailMappingVO);
73 78 }
... ... @@ -78,6 +83,7 @@ public class ReceiveEmailMappingController {
78 83 * @return 实例对象
79 84 */
80 85 @PostMapping("/query_by_id")
  86 + @AnonymousAccess
81 87 public ServerResult queryById(@RequestBody ReceiveEmailMappingQueryVO receiveEmailMappingQueryVO) {
82 88 return receiveEmailMappingService.queryById(receiveEmailMappingQueryVO);
83 89 }
... ... @@ -89,6 +95,7 @@ public class ReceiveEmailMappingController {
89 95 * @return 操作结果
90 96 */
91 97 @PostMapping("/opt")
  98 + @AnonymousAccess
92 99 public ServerResult opt(@RequestBody ReceiveEmailMappingDO receiveEmailMappingDo) {
93 100 return receiveEmailMappingService.opt(receiveEmailMappingDo);
94 101 }
... ...
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
... ... @@ -1282,6 +1282,10 @@ public class OrderBaseInfoServiceImpl extends ServiceImpl<OrderBaseInfoMapper, O
1282 1282 if (Objects.nonNull(roleEnum) && roleEnum.getId().equals(RoleEnum.BUSINESS_USER.getId())) {
1283 1283 queryVO.setBusinessPerson(Arrays.asList(dataScope.getUser().getNickName()));
1284 1284 }
  1285 + // 生产科
  1286 + if(Objects.nonNull(roleEnum) && roleEnum.getId().equals(RoleEnum.PRODUCE_USER.getId())){
  1287 + queryVO.setProductionDepartment(Arrays.asList(dataScope.getUser().getNickName()));
  1288 + }
1285 1289 if (StringUtils.isNotBlank(queryVO.getCommitUserPhone())) {
1286 1290 AdminUserDO userDO = userService.getOne(new LambdaQueryWrapper<AdminUserDO>()
1287 1291 .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN)
... ...