| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo; |
| | | import com.panzhihua.common.model.vos.west.SystemUserVo; |
| | | import com.panzhihua.common.service.auth.TokenService; |
| | | import com.panzhihua.westcommittee.annotation.SysLog; |
| | | import com.panzhihua.westcommittee.model.entity.*; |
| | |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | |
| | | Set<String> collect1 = new HashSet<>(); |
| | | if(collect.size() > 0){ |
| | | LambdaQueryWrapper<SystemMenu> queryWrapper = new LambdaQueryWrapper<SystemMenu>().in(SystemMenu::getId, collect); |
| | | switch (systemUser.getAccountLevel()){ |
| | | case 3: |
| | | queryWrapper.notIn(SystemMenu::getUrl, Arrays.asList("/system_setting/position_management", "/system_setting/position_management/add", "/system_setting/position_management/del", |
| | | "/system_setting/role_management", "/system_setting/role_management/add", "/system_setting/role_management/edit", "/system_setting/role_management/del", |
| | | "/work_order_transaction_management/work_order_item_configuration", "/work_order_transaction_management/work_order_item_configuration/save", |
| | | "/work_order_transaction_management/problem_type_management", "/work_order_transaction_management/problem_type_management/add", |
| | | "/work_order_transaction_management/problem_type_management/edit", "/work_order_transaction_management/problem_type_management/del", "/work_order_transaction_management/banner_management", |
| | | "/work_order_transaction_management/banner_management/add", "/work_order_transaction_management/banner_management/edit", "/work_order_transaction_management/banner_management/del")); |
| | | break; |
| | | case 4: |
| | | queryWrapper.notIn(SystemMenu::getUrl, Arrays.asList("/system_setting/position_management", "/system_setting/position_management/add", "/system_setting/position_management/del", |
| | | "/system_setting/role_management", "/system_setting/role_management/add", "/system_setting/role_management/edit", "/system_setting/role_management/del", |
| | | "/work_order_transaction_management/work_order_item_configuration", "/work_order_transaction_management/work_order_item_configuration/save", |
| | | "/work_order_transaction_management/problem_type_management", "/work_order_transaction_management/problem_type_management/add", |
| | | "/work_order_transaction_management/problem_type_management/edit", "/work_order_transaction_management/problem_type_management/del", "/work_order_transaction_management/banner_management", |
| | | "/work_order_transaction_management/banner_management/add", "/work_order_transaction_management/banner_management/edit", "/work_order_transaction_management/banner_management/del")); |
| | | break; |
| | | case 5: |
| | | queryWrapper.notIn(SystemMenu::getUrl, Arrays.asList("/system_setting/position_management", "/system_setting/position_management/add", "/system_setting/position_management/del", |
| | | "/system_setting/role_management", "/system_setting/role_management/add", "/system_setting/role_management/edit", "/system_setting/role_management/del", |
| | | "/system_setting/people_management", "/system_setting/people_management/add", "/system_setting/people_management/edit", "/system_setting/people_management/del", |
| | | "/system_setting/people_management/freeze", "/system_setting/unit_management", "/system_setting/people_management/detail", "/system_setting/unit_management/add", |
| | | "/system_setting/unit_management/edit", "/system_setting/unit_management/del", "/work_order_transaction_management/work_order_item_configuration", |
| | | "/work_order_transaction_management/work_order_item_configuration/save", "/work_order_transaction_management/problem_type_management", |
| | | "/work_order_transaction_management/problem_type_management/add", "/work_order_transaction_management/problem_type_management/edit", |
| | | "/work_order_transaction_management/problem_type_management/del", "/work_order_transaction_management/banner_management", |
| | | "/work_order_transaction_management/banner_management/add", "/work_order_transaction_management/banner_management/edit", "/work_order_transaction_management/banner_management/del")); |
| | | break; |
| | | if(systemUser.getSystemRoleId()!=1 || systemUser.getAccountLevel()!=2){ |
| | | queryWrapper.notIn(SystemMenu::getUrl, Arrays.asList("/system_setting/position_management", "/system_setting/position_management/add", "/system_setting/position_management/del", |
| | | "/system_setting/role_management", "/system_setting/role_management/add", "/system_setting/role_management/edit", "/system_setting/role_management/del", |
| | | "/work_order_transaction_management/work_order_item_configuration", "/work_order_transaction_management/work_order_item_configuration/save", |
| | | "/work_order_transaction_management/problem_type_management", "/work_order_transaction_management/problem_type_management/add", |
| | | "/work_order_transaction_management/problem_type_management/edit", "/work_order_transaction_management/problem_type_management/del", "/work_order_transaction_management/banner_management", |
| | | "/work_order_transaction_management/banner_management/add", "/work_order_transaction_management/banner_management/edit", "/work_order_transaction_management/banner_management/del","/complaint/assign","/complaint/assign/list","/complaint/assign/assign","/complaint/assign/export")); |
| | | } |
| | | List<SystemMenu> systemMenus = systemMenuService.list(queryWrapper); |
| | | collect1 = systemMenus.stream().map(SystemMenu::getUrl).collect(Collectors.toSet()); |
| | |
| | | public R<IPage<SystemUserListVo>> list(SystemUserList query){ |
| | | Integer id = this.getLoginUserInfoWest().getId(); |
| | | SystemUser user = systemUserService.getById(id); |
| | | if(user.getSystemRoleId()!=1){ |
| | | return R.ok(new Page<>()); |
| | | } |
| | | IPage<SystemUserListVo> list = systemUserService.list(user, query); |
| | | return R.ok(list); |
| | | } |
| | |
| | | String jsapiTicket = SignatureUtil.getJsApiTicket(accessToken); |
| | | String nonceStr = UUID.randomUUID().toString().replace("-", ""); |
| | | String timestamp = String.valueOf(System.currentTimeMillis() / 1000); |
| | | // String url = "https://huacheng.psciio.com/web/sangeshenbian/"; // 当前页面的URL,不包含#及其后面部分 |
| | | // String url = "https://huacheng.psciio.com/web/west/"; // 当前页面的URL,不包含#及其后面部分 |
| | | String url = "http://192.168.110.91:8080/#/pages/Appeal/Appeal/"; // 当前页面的URL,不包含#及其后面部分 |
| | | |
| | | String signature = SignatureUtil.getSignature(jsapiTicket, nonceStr, timestamp, url); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/importUser") |
| | | @ApiOperation(value = "用户导入", tags = {"西区纪委后台-人员管理"}) |
| | | public R<?> importUser(MultipartFile file) { |
| | | String s = file.getOriginalFilename(); |
| | | if (s == null || !("xls".equals(s.substring(s.lastIndexOf(".") + 1)) || "xlsx".equals(s.substring(s.lastIndexOf(".") + 1)))) { |
| | | return R.fail("只能上传.xls或.xlsx格式的文件"); |
| | | } |
| | | try { |
| | | return systemUserService.importUser(s, file); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |