Procházet zdrojové kódy

用户加入是否绑定供应商

wangliang před 1 rokem
rodič
revize
14f12b8195

+ 26 - 4
sop-api/install/mysql/init/init.sql

@@ -780,7 +780,7 @@ CREATE TABLE `t_b_device_in_out` (
                                      `user_id` bigint(20) NOT NULL COMMENT '登记人id',
                                      `custom_name` varchar(100) DEFAULT NULL COMMENT '客户名称',
                                      `type` varchar(20) DEFAULT NULL COMMENT '类型,IN:入库,OUT:出库',
-                                     `device_no` varchar(50) DEFAULT NULL COMMENT '设备编号',
+                                     `device_serial_no` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '设备序列号',
                                      `supplier_name` varchar(100) DEFAULT NULL COMMENT '供应商名称',
                                      `location` varchar(100) DEFAULT NULL COMMENT '当前所在地',
                                      `address` varchar(100) DEFAULT NULL COMMENT '发往地',
@@ -1621,7 +1621,7 @@ INSERT INTO `sys_privilege` VALUES (13, '组织架构管理', 'org', 'MENU', 12,
 INSERT INTO `sys_privilege` VALUES (14, '用户权限管理', 'userPrivilegeManage', 'MENU', 11, 2, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (15, '用户管理', 'user', 'MENU', 14, 1, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (16, '角色管理', 'role', 'MENU', 14, 2, NULL, NULL, 1, 0, 1);
-INSERT INTO `sys_privilege` VALUES (17, '初始化密码', 'InitPwd', 'LINK', 15, 3, NULL, '18', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (17, '初始化密码', 'InitPwd', 'LINK', 15, 3, 'AUTH', '18', 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (18, '用户初始化密码', '/api/admin/user/init_password', 'URL', 15, 4, 'AUTH', NULL, 1, 1, 0);
 INSERT INTO `sys_privilege` VALUES (19, '项目质量管理', 'projectQualityManage', 'MENU', NULL, 6, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (20, '项目质量管理', 'projectChildQualityManage', 'MENU', 19, 1, NULL, NULL, 1, 0, 1);
@@ -1640,8 +1640,8 @@ INSERT INTO `sys_privilege` VALUES (33, '人员档案管理', 'userArchives', 'M
 INSERT INTO `sys_privilege` VALUES (34, '人员调配', 'userAllocate', 'MENU', 32, 2, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (35, '人资监控', 'userArchivesControl', 'MENU', 32, 3, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (36, '设备保障', 'deviceManage', 'MENU', 31, 2, NULL, NULL, 1, 0, 1);
-INSERT INTO `sys_privilege` VALUES (37, '出入库登记查询', 'deviceInOut', 'MENU', 36, 1, NULL, NULL, 1, 0, 1);
-INSERT INTO `sys_privilege` VALUES (38, '设备资源监控', 'deviceControl', 'MENU', 36, 2, NULL, NULL, 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (37, '出入库登记查询', 'deviceInOut', 'MENU', 36, 2, NULL, NULL, 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (38, '设备资源监控', 'deviceControl', 'MENU', 36, 3, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (39, 'SOP管理', 'sopManage', 'MENU', NULL, 3, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (40, 'SOP管理', 'sopChildManage', 'MENU', 39, 1, NULL, NULL, 1, 0, 1);
 INSERT INTO `sys_privilege` VALUES (41, '教务处SOP管理', 'office', 'MENU', 40, 1, NULL, '3034,3035', 1, 0, 1);
@@ -2099,6 +2099,28 @@ INSERT INTO `sys_privilege` VALUES (3049, '审核', 'Approve', 'LINK', 21, 1, 'A
 INSERT INTO `sys_privilege` VALUES (3050, '获取所有用户(动态表单用)接口', '/api/admin/common/get_user_list/form_widget', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
 INSERT INTO `sys_privilege` VALUES (3051, '小程序签名预览', '/api/admin/common/file/preview/app', 'URL', 64, 6, 'SYS', NULL, 1, 1, 0);
 INSERT INTO `sys_privilege` VALUES (3052, '考勤异常详情接口', '/api/admin/ding/exception/apply/view', 'URL', 27, 6, 'SYS', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3053, '设备发货管理', 'deviceDelivery', 'MENU', 36, 1, NULL, NULL, 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3054, '列表', 'List', 'LIST', 3053, 1, 'AUTH', '3067', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3055, '查询条件', 'Condition', 'CONDITION', 3053, 1, 'AUTH', '3067', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3056, '批量导入', 'BatchImport', 'BUTTON', 3053, 1, 'AUTH', '3069', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3057, '批量导出', 'BatchExport', 'BUTTON', 3053, 2, 'AUTH', '3070', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3058, '批量发货', 'BatchDeliver', 'BUTTON', 3053, 3, 'AUTH', '3066', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3059, '批量签收', 'BatchReceive', 'BUTTON', 3053, 4, 'AUTH', '3066', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3060, '批量作废', 'BatchCancel', 'BUTTON', 3053, 5, 'AUTH', '3066', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3061, '修改', 'Update', 'LINK', 3053, 1, 'AUTH', '3065,3068', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3062, '作废', 'Cancel', 'LINK', 3053, 2, 'AUTH', '3066', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3063, '发货', 'Deliver', 'LINK', 3053, 3, 'AUTH', '3066', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3064, '签收', 'Receive', 'LINK', 3053, 4, 'AUTH', '3066', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3065, '设备发货保存接口', '/api/admin/device/delivery/save', 'URL', 3053, 1, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3066, '设备发货状态修改接口', '/api/admin/device/delivery/status/update', 'URL', 3053, 2, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3067, '设备发货列表分页查询', '/api/admin/device/delivery/page', 'URL', 3053, 3, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3068, '设备发货查询单个记录接口', '/api/admin/device/delivery/find/by/id', 'URL', 3053, 4, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3069, '设备发货导入', '/api/admin/device/delivery/import', 'URL', 3053, 5, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3070, '设备发货导出', '/api/admin/device/delivery/export', 'URL', 3053, 6, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3072, '绑定供应商', 'bandSupplier', 'LINK', 15, 4, 'AUTH', '3074,3075', 1, 0, 1);
+INSERT INTO `sys_privilege` VALUES (3073, '根据用户角色查询供应商信息接口', '/api/sys/supplier/list/by/user_role', 'URL', 4, 7, 'SYS', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3074, '查询绑定供应商', '/api/admin/user/query/supplier', 'URL', 15, 5, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO `sys_privilege` VALUES (3075, '绑定供应商', '/api/admin/user/band/supplier', 'URL', 15, 6, 'AUTH', NULL, 1, 1, 0);
 
 INSERT INTO `sys_role` VALUES (1, NULL, '系统管理员', 1, 'ADMIN', NULL, NULL, NULL, NULL, 1, '系统角色');
 INSERT INTO `sys_role` VALUES (2, NULL, '总负责人', 1, 'PMO', NULL, NULL, 443437441441857536, 1697425600601, 1, '系统角色');

+ 14 - 18
sop-api/src/main/java/com/qmth/sop/server/api/SysSupplierController.java

@@ -10,6 +10,7 @@ import com.qmth.sop.common.annotation.OperationLog;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.LogTypeEnum;
 import com.qmth.sop.common.enums.SupplierTypeEnum;
+import com.qmth.sop.common.enums.UserRoleEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
@@ -24,7 +25,7 @@ import java.util.Objects;
 
 /**
  * 供应商表 控制器.
- * 
+ *
  * @author: shudonghui
  * @date: 2023-08-02 14:18:39
  * @version: 1.0
@@ -33,10 +34,9 @@ import java.util.Objects;
  */
 @Api(tags = "供应商表 Controller")
 @RestController
-@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX+ SystemConstant.PREFIX_URL_SUPPLIER)
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_SUPPLIER)
 public class SysSupplierController {
 
-
     @Resource
     SysSupplierService sysSupplierService;
 
@@ -50,6 +50,7 @@ public class SysSupplierController {
 
         return ResultUtil.ok(resultIPage);
     }
+
     @ApiOperation(value = "新增供应商表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "新增供应商表信息", response = Object.class)})
@@ -74,7 +75,7 @@ public class SysSupplierController {
         return ResultUtil.ok();
     }
 
-//    @ApiOperation(value = "删除供应商表接口")
+    //    @ApiOperation(value = "删除供应商表接口")
 //    @RequestMapping(value = "/delete", method = RequestMethod.POST)
 //    @ApiResponses({@ApiResponse(code = 200, message = "删除供应商表信息", response = EditResult.class)})
 //    public Result delete(@ApiParam(value = "供应商表信息", required = true) @RequestParam(required = true) SysSupplier sysSupplier) {
@@ -82,8 +83,8 @@ public class SysSupplierController {
 //        return ResultUtil.ok(new EditResult(sysSupplier.getId()));
 //    }
     /*
-    *启用禁用
-    */
+     *启用禁用
+     */
     @ApiOperation(value = "启用禁用供应商表接口")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "启用禁用供应商表信息", response = Object.class)})
@@ -93,23 +94,14 @@ public class SysSupplierController {
         return ResultUtil.ok();
     }
 
-    /*
-    * 查询供应商表信息
-    */
     @ApiOperation(value = "查询供应商表信息接口")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "供应商表信息", response = SysSupplier.class)})
     public Result list(@ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Boolean enable,
                        @ApiParam(value = "类型", required = false) @RequestParam(required = false) SupplierTypeEnum type) {
-        return ResultUtil.ok(sysSupplierService.list(new QueryWrapper<SysSupplier>().lambda().eq(Objects.nonNull(enable),SysSupplier::getEnable, enable).eq(Objects.nonNull(type),SysSupplier::getType, type)));
+        return ResultUtil.ok(sysSupplierService.list(new QueryWrapper<SysSupplier>().lambda().eq(Objects.nonNull(enable), SysSupplier::getEnable, enable).eq(Objects.nonNull(type), SysSupplier::getType, type)));
     }
 
-    /**
-     * 获取单个
-     * @param id
-     * @return
-     */
-
     @ApiOperation(value = "获取单个供应商表信息接口")
     @RequestMapping(value = "/get", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "供应商表信息", response = SysSupplier.class)})
@@ -117,6 +109,10 @@ public class SysSupplierController {
         return ResultUtil.ok(sysSupplierService.getById(id));
     }
 
-
-
+    @ApiOperation(value = "根据用户角色查询供应商信息接口")
+    @RequestMapping(value = "/list/by/user_role", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "供应商表信息", response = SysSupplier.class)})
+    public Result listByUserRole(@ApiParam(value = "用户角色", required = true) @RequestParam UserRoleEnum userRoleEnum) {
+        return ResultUtil.ok(sysSupplierService.findByUserRoleEnum(userRoleEnum));
+    }
 }

+ 33 - 0
sop-api/src/main/java/com/qmth/sop/server/api/SysUserController.java

@@ -3,13 +3,17 @@ package com.qmth.sop.server.api;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.sop.business.bean.dto.UserDto;
+import com.qmth.sop.business.entity.SysSupplier;
 import com.qmth.sop.business.entity.SysUser;
+import com.qmth.sop.business.service.SysSupplierService;
 import com.qmth.sop.business.service.SysUserService;
 import com.qmth.sop.common.annotation.OperationLog;
 import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.ExceptionResultEnum;
 import com.qmth.sop.common.enums.LogTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
+import com.qmth.sop.common.util.ServletUtil;
 import io.swagger.annotations.*;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;
@@ -19,6 +23,8 @@ import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import java.security.NoSuchAlgorithmException;
+import java.util.Objects;
+import java.util.Optional;
 
 /**
  * <p>
@@ -36,6 +42,9 @@ public class SysUserController {
     @Resource
     SysUserService sysUserService;
 
+    @Resource
+    SysSupplierService supplierService;
+
     @ApiOperation(value = "查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = UserDto.class)})
@@ -74,4 +83,28 @@ public class SysUserController {
     public Result initPassword(@RequestBody SysUser sysUser) throws NoSuchAlgorithmException {
         return ResultUtil.ok(sysUserService.initPassword(sysUser));
     }
+
+    @ApiOperation(value = "查询绑定供应商")
+    @RequestMapping(value = "/query/supplier", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = SysSupplier.class)})
+    public Result querySupplier(@ApiParam(value = "用户id", required = true) @RequestParam Long id) {
+        SysUser sysUser = sysUserService.getById(id);
+        Optional.ofNullable(sysUser).orElseThrow(() -> ExceptionResultEnum.USER_NO_EXISTS.exception());
+        SysSupplier sysSupplier = Objects.nonNull(sysUser.getSupplierId()) ? supplierService.getById(sysUser.getSupplierId()) : null;
+        return ResultUtil.ok(sysSupplier);
+    }
+
+    @ApiOperation(value = "绑定供应商")
+    @RequestMapping(value = "/band/supplier", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
+    @OperationLog(logType = LogTypeEnum.EDIT)
+    public Result bandSupplier(@ApiParam(value = "用户id", required = true) @RequestParam Long id,
+                               @ApiParam(value = "供应商id", required = true) @RequestParam Long supplierId) {
+        SysUser sysUser = sysUserService.getById(id);
+        Optional.ofNullable(sysUser).orElseThrow(() -> ExceptionResultEnum.USER_NO_EXISTS.exception());
+        SysUser requestSysUser = (SysUser) ServletUtil.getRequestUser();
+        sysUser.setSupplierId(supplierId);
+        sysUser.updateInfo(requestSysUser.getId());
+        return ResultUtil.ok(sysUserService.updateById(sysUser));
+    }
 }

+ 11 - 8
sop-business/src/main/java/com/qmth/sop/business/bean/dto/UserDto.java

@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.sop.common.enums.GenderEnum;
 import com.qmth.sop.common.enums.RoleTypeEnum;
 import com.qmth.sop.common.enums.UserRoleEnum;
+import io.swagger.annotations.ApiModelProperty;
 import org.springframework.util.CollectionUtils;
 
 import java.io.Serializable;
@@ -36,31 +37,33 @@ public class UserDto implements Serializable {
     private String genderStr;
     private List<RoleDto> roles;
 
+    @ApiModelProperty("是否绑定供应商")
     Boolean bandSupplier = false;
 
-    UserRoleEnum roleEnum;
+    @ApiModelProperty("用户角色(设备发货员、乙方总负责人用)")
+    UserRoleEnum userRoleEnum;
 
     public Boolean getBandSupplier() {
         if (!CollectionUtils.isEmpty(roles)) {
             int count = (int) roles.stream().filter(s -> {
                 if (s.getType() == RoleTypeEnum.DEVICE_DELIVERY) {
-                    this.roleEnum = Objects.nonNull(roleEnum) ? UserRoleEnum.THIRD_PMO_AND_DEVICE_DELIVERY : UserRoleEnum.DEVICE_DELIVERY;
+                    this.userRoleEnum = Objects.nonNull(userRoleEnum) ? UserRoleEnum.THIRD_PMO_AND_DEVICE_DELIVERY : UserRoleEnum.DEVICE_DELIVERY;
                 } else if (s.getType() == RoleTypeEnum.THIRD_PMO) {
-                    this.roleEnum = Objects.nonNull(roleEnum) ? UserRoleEnum.THIRD_PMO_AND_DEVICE_DELIVERY : UserRoleEnum.THIRD_PMO;
+                    this.userRoleEnum = Objects.nonNull(userRoleEnum) ? UserRoleEnum.THIRD_PMO_AND_DEVICE_DELIVERY : UserRoleEnum.THIRD_PMO;
                 }
-                return Objects.nonNull(this.roleEnum) ? true : false;
+                return Objects.nonNull(this.userRoleEnum) ? true : false;
             }).count();
             return count > 0 ? true : false;
         }
         return bandSupplier;
     }
 
-    public UserRoleEnum getRoleEnum() {
-        return roleEnum;
+    public UserRoleEnum getUserRoleEnum() {
+        return userRoleEnum;
     }
 
-    public void setRoleEnum(UserRoleEnum roleEnum) {
-        this.roleEnum = roleEnum;
+    public void setUserRoleEnum(UserRoleEnum userRoleEnum) {
+        this.userRoleEnum = userRoleEnum;
     }
 
     public void setBandSupplier(Boolean bandSupplier) {

+ 29 - 18
sop-business/src/main/java/com/qmth/sop/business/service/SysSupplierService.java

@@ -3,6 +3,9 @@ package com.qmth.sop.business.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.sop.business.entity.SysSupplier;
+import com.qmth.sop.common.enums.UserRoleEnum;
+
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -14,37 +17,45 @@ import java.util.Map;
  * @email: shudonghui@qmth.com.cn
  * @Company: www.qmth.com.cn
  */
-public interface SysSupplierService extends IService<SysSupplier>{
+public interface SysSupplierService extends IService<SysSupplier> {
 
     /**
-    * 查询列表
-    *
-    * @param iPage
-    * @return
-    */
+     * 查询列表
+     *
+     * @param iPage
+     * @return
+     */
     IPage<SysSupplier> query(IPage<Map> iPage);
 
     /**
-    * 新增供应商表
-    *
-    * @param sysSupplier
-    */
+     * 新增供应商表
+     *
+     * @param sysSupplier
+     */
     void add(SysSupplier sysSupplier);
 
     /**
-    * 修改供应商表
-    *
-    * @param sysSupplier
-    */
+     * 修改供应商表
+     *
+     * @param sysSupplier
+     */
     void update(SysSupplier sysSupplier);
 
     /**
-    * 删除供应商表
-    *
-    * @param id
-    */
+     * 删除供应商表
+     *
+     * @param id
+     */
     void delete(Long id);
 
 
     void enable(long id);
+
+    /**
+     * 根据userRole查找供应商
+     *
+     * @param userRoleEnum
+     * @return
+     */
+    List<SysSupplier> findByUserRoleEnum(UserRoleEnum userRoleEnum);
 }

+ 26 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysSupplierServiceImpl.java

@@ -1,15 +1,19 @@
 package com.qmth.sop.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.sop.business.entity.SysSupplier;
 import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.mapper.SysSupplierMapper;
 import com.qmth.sop.business.service.SysSupplierService;
+import com.qmth.sop.common.enums.SupplierTypeEnum;
+import com.qmth.sop.common.enums.UserRoleEnum;
 import com.qmth.sop.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -78,9 +82,30 @@ public class SysSupplierServiceImpl extends ServiceImpl<SysSupplierMapper, SysSu
     @Override
     @Transactional
     public void enable(long id) {
-        SysSupplier sysSupplier= this.getById(id);
+        SysSupplier sysSupplier = this.getById(id);
         sysSupplier.setEnable(!sysSupplier.getEnable());
         this.update(sysSupplier);
     }
 
+    /**
+     * 根据userRole查找供应商
+     *
+     * @param userRoleEnum
+     * @return
+     */
+    @Override
+    public List<SysSupplier> findByUserRoleEnum(UserRoleEnum userRoleEnum) {
+        QueryWrapper<SysSupplier> sysSupplierQueryWrapper = new QueryWrapper<>();
+        switch (userRoleEnum) {
+            case THIRD_PMO:
+                sysSupplierQueryWrapper.lambda().eq(SysSupplier::getType, SupplierTypeEnum.HUMAN);
+                break;
+            case DEVICE_DELIVERY:
+                sysSupplierQueryWrapper.lambda().eq(SysSupplier::getType, SupplierTypeEnum.DEVICE);
+                break;
+            default:
+                break;
+        }
+        return this.list(sysSupplierQueryWrapper);
+    }
 }

+ 15 - 1
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -2395,4 +2395,18 @@ WHERE id=17;
 
 INSERT INTO sys_privilege
 (id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
-VALUES(3068, '绑定供应商', 'bandSupplier', 'LINK', 15, 4, 'AUTH', NULL, 1, 0, 1);
+VALUES(3068, '绑定供应商', 'bandSupplier', 'LINK', 15, 4, 'AUTH', NULL, 1, 0, 1);
+
+--2023.12.03update
+UPDATE sys_privilege
+SET name='绑定供应商', url='bandSupplier', `type`='LINK', parent_id=15, `sequence`=4, property='AUTH', related='3074,3075', enable=1, default_auth=0, front_display=1
+WHERE id=3072;
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(3073, '根据用户角色查询供应商信息接口', '/api/sys/supplier/list/by/user_role', 'URL', 4, 7, 'SYS', NULL, 1, 1, 0);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(3074, '查询绑定供应商', '/api/admin/user/query/supplier', 'URL', 15, 5, 'AUTH', NULL, 1, 1, 0);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(3075, '绑定供应商', '/api/admin/user/band/supplier', 'URL', 15, 6, 'AUTH', NULL, 1, 1, 0);