| | |
| | | private ProcessPermissionsService processPermissionsService; |
| | | |
| | | String PZH=" ————————————————— "; |
| | | Integer PBN = 6; |
| | | |
| | | |
| | | @GetMapping(value = "/plan/{id}/auth") |
| | |
| | | InputStream inputStream = file.getInputStream(); |
| | | // 获取文件的内容类型 |
| | | String contentType = file.getContentType(); |
| | | String suffix = getFileSuffix(file.getOriginalFilename()); |
| | | String url = ossService.upload(inputStream, suffix,contentType); |
| | | String url = ossService.upload(inputStream, file.getOriginalFilename(), contentType); |
| | | // String url = "http://tjdt.oss-cn-hangzhou.aliyuncs.com/"+file.getOriginalFilename(); |
| | | String[] names = url.split("com/"); |
| | | String name= names[1]; |
| | |
| | | wrapper.like("name", condition); |
| | | wrapper.eq("status",1); |
| | | |
| | | |
| | | ProcessPermissions processPermissions1 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5).eq("process", "1-1"));//2:核价流程 |
| | | User manager1 = userService.selectById(processPermissions1.getUserId()); // 获取核价流程节点1确认人 |
| | | |
| | | ProcessPermissions processPermissions2 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5).eq("process", "1-2"));//2:核价流程 |
| | | User manager2 = userService.selectById(processPermissions2.getUserId()); // 获取核价流程节点1确认人 |
| | | |
| | | ProcessPermissions processPermissions3= processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5).eq("process", "1-3"));//2:核价流程 |
| | | User manager3 = userService.selectById(processPermissions3.getUserId()); // 获取核价流程节点1确认人 |
| | | |
| | | List<ProcessPermissions> processPermissionsList = processPermissionsService.selectList(new EntityWrapper<ProcessPermissions>().eq("process_memo", 4).or().eq("process_memo", 5));//2:核价流程 |
| | | int type =0; |
| | | if (getUserId().equals(manager1.getId())){ |
| | | type=1;//(货架) |
| | | }else if (getUserId().equals(manager2.getId()) || getUserId().equals(manager3.getId())){ |
| | | type = 2;//(集成) |
| | | }else { |
| | | for (ProcessPermissions processPermissions:processPermissionsList){ |
| | | if (getUserId().equals(processPermissions.getUserId())){ |
| | | type=PBN-processPermissions.getProcessMemo(); |
| | | break; |
| | | } |
| | | } |
| | | if (type==0){ |
| | | return R.error("你不是核价员,无权接任务"); |
| | | } |
| | | |
| | | List<Long> typeList = new ArrayList<>(); |
| | | List<PlanType> planTypes = planTypeService.selectList(new EntityWrapper<PlanType>().eq("type", type)); |
| | | if (type==1){ |
| | | planTypes = planTypeService.selectList(new EntityWrapper<PlanType>()); |
| | | } |
| | | if (Cools.isEmpty(planTypes) || planTypes.size()==0){ |
| | | return R.ok(); |
| | | } |