| | |
| | | @GetMapping("/feedbackList") |
| | | public Result<?> feedbackList(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | String userId = user.getId(); |
| | | String key = ""; |
| | | if (StringUtils.isNotBlank(productionCode)) { |
| | |
| | | MdcProduction mdcProduction = mdcProductionService.getOne(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getProductionCode, productionCode).eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0.toString())); |
| | | key = mdcProduction.getId(); |
| | | } else { |
| | | //工段 查询用户拥有的工段权限 |
| | | key = mdcProductionService.findThreeProductionId(userId); |
| | | //判断是公司级还是厂区 |
| | | MdcProduction mdcProduction = mdcProductionService.getOne(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getParentId, "")); |
| | | if (userType.equals(MdcConstant.USER_TYPE_4)) { |
| | | //公司 |
| | | key = mdcProduction.getId(); |
| | | } else if (userType.equals(MdcConstant.USER_TYPE_3)) { |
| | | //厂区 |
| | | key = mdcProductionService.findFirstProduction(userId, mdcProduction.getId()); |
| | | } |
| | | } |
| | | List<MdcFeedback> result = mdcHomeService.getFeedbackList(key); |
| | | return Result.OK(result); |