| | |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保延期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @GetMapping("get3MaintenancePostponeCount") |
| | | public Result<?> get3MaintenancePostponeCount(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_3.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenancePostponeCount(area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenancePostponeCount(area.getId()); |
| | | } |
| | | } |
| | | }else if(USER_TYPE_2.equals(userType)){ |
| | | String areaProductionCode = calibrationOrderService.findAreaProductionCode(user.getId()); |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, areaProductionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenancePostponeCount(area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保超期数量 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @GetMapping("get3MaintenanceOverdueCount") |
| | | public Result<?> get3MaintenanceOverdueCount(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_3.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenanceOverdueCount(area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | if(StringUtils.isNotBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenanceOverdueCount(area.getId()); |
| | | } |
| | | } |
| | | }else if(USER_TYPE_2.equals(userType)){ |
| | | String areaProductionCode = calibrationOrderService.findAreaProductionCode(user.getId()); |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, areaProductionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.get3MaintenanceOverdueCount(area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | *首页二保计划展示 |
| | | * qsw 2024-3-15 |
| | | */ |