| | |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.mdc.service.IMdcHomeService; |
| | | import org.jeecg.modules.mdc.vo.MdcCommonVo; |
| | | import org.jeecg.modules.mdc.vo.MdcHomeEfficiencyVo; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | List<MdcCommonVo> resultMap = mdcHomeService.getEquipmentStatusStatistics(userId, key); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", resultMap); |
| | | map.put("producitonId", key); |
| | | map.put("productionId", key); |
| | | return Result.OK(map); |
| | | } |
| | | |
| | |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | @ApiOperation(value = "MDC首页接口-工段级设备效率统计", notes = "MDC首页接口-工段级设备效率统计") |
| | | @GetMapping("/equipmentEfficiencyStatistics") |
| | | public Result<?> equipmentEfficiencyStatistics(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | 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); |
| | | } |
| | | MdcHomeEfficiencyVo result = mdcHomeService.getEquipmentEfficiencyStatistics(userId, key); |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | |
| | | } |