| | |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<CalibrationOrder> queryWrapper = QueryGenerator.initQueryWrapper(calibrationOrder, req.getParameterMap()); |
| | | //状态筛选 |
| | | List<String> statusEnumList = null; |
| | | if(StringUtils.isNotBlank(calibrationOrder.getStatusEnums())) { |
| | | String[] statusEnums = calibrationOrder.getStatusEnums().split(","); |
| | | statusEnumList = Arrays.asList(statusEnums); |
| | | queryWrapper.notIn("status", statusEnumList); |
| | | } |
| | | Page<CalibrationOrder> page = new Page<CalibrationOrder>(pageNo, pageSize); |
| | | IPage<CalibrationOrder> pageList = calibrationOrderService.page(page, queryWrapper); |
| | | for (CalibrationOrder record : pageList.getRecords()) { |
| | |
| | | public Result<?> getAreaEquipmentList(String equipmentNum) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(!USER_TYPE_1.equals(userType)){ |
| | | list = calibrationOrderService.getAreaEquipmentList(equipmentNum,"",null); |
| | | List<Map<String, Object>> list = calibrationOrderService.getAreaEquipmentList(equipmentNum,"",null); |
| | | for (Map<String, Object> map : list) { |
| | | String equipmentId = (String)map.get("id"); |
| | | List<Map<String, Object>> counts = calibrationOrderService.getEquipmentReportRepairCount(equipmentId); |
| | | if(counts.size()>0){ |
| | | map.put("repairCount",counts.get(0).get("repairCount")); |
| | | }else{ |
| | | map.put("repairCount","0"); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getAreaEquipmentList("",area.getId(),null); |
| | | for (Map<String, Object> map : list) { |
| | | String equipmentId = (String)map.get("id"); |
| | | List<Map<String, Object>> counts = calibrationOrderService.getEquipmentReportRepairCount(equipmentId); |
| | | if(counts.size()>0){ |
| | | map.put("repairCount",counts.get(0).get("repairCount")); |
| | | }else{ |
| | | map.put("repairCount","0"); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | List<Map<String, Object>> operationCertificatelist = calibrationOrderService.getOperationCertificate(user.getUsername()); |
| | |
| | | String equipmentIds = (String)operationCertificatelist.get(0).get("equipmentIds"); |
| | | List<String> strings = Arrays.asList(equipmentIds.split(",")); |
| | | list = calibrationOrderService.getAreaEquipmentList("","",strings); |
| | | for (Map<String, Object> map : list) { |
| | | String equipmentId = (String)map.get("id"); |
| | | List<Map<String, Object>> counts = calibrationOrderService.getEquipmentReportRepairCount(equipmentId); |
| | | if(counts.size()>0){ |
| | | map.put("repairCount",counts.get(0).get("repairCount")); |
| | | }else{ |
| | | map.put("repairCount","0"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *首页 技术状态点击弹出对应明细 |
| | | * qsw 2024-5-23 |
| | | */ |
| | | @GetMapping("showEquipmentByTechnologyStatus") |
| | | public Result<?> getEquipmentByTechnologyStatus(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode,String technologyStatus) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | equipments = calibrationOrderService.getEquipmentByTechnologyStatus(pageNo, pageSize, "", "", technologyStatus); |
| | | }else{ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_2.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.getEquipmentByTechnologyStatus(pageNo, pageSize, area.getId(), "", technologyStatus); |
| | | } |
| | | }else 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){ |
| | | equipments = calibrationOrderService.getEquipmentByTechnologyStatus(pageNo, pageSize, "", area.getId(), technologyStatus); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | String code = calibrationOrderService.findProductionCode(user.getId()); |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, code).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.getEquipmentByTechnologyStatus(pageNo, pageSize, area.getId(), "", technologyStatus); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.getEquipmentByTechnologyStatus(pageNo, pageSize, "", area.getId(), technologyStatus); |
| | | } |
| | | } |
| | | }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){ |
| | | equipments = calibrationOrderService.getEquipmentByTechnologyStatus(pageNo, pageSize, "", area.getId(), technologyStatus); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *首页 设备报修情况统计明细展示 |
| | | * qsw 2024-5-25 |
| | | */ |
| | | @GetMapping("showEquipmentByReportRepair") |
| | | public Result<?> getEquipmentByReportRepair(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode,String isStop) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | equipments = calibrationOrderService.getEquipmentByReportRepair(pageNo, pageSize, "", "", isStop); |
| | | }else{ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_2.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.getEquipmentByReportRepair(pageNo, pageSize, area.getId(), "", isStop); |
| | | } |
| | | }else 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){ |
| | | equipments = calibrationOrderService.getEquipmentByReportRepair(pageNo, pageSize, "", area.getId(), isStop); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | String code = calibrationOrderService.findProductionCode(user.getId()); |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, code).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.getEquipmentByReportRepair(pageNo, pageSize, area.getId(), "", isStop); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.getEquipmentByReportRepair(pageNo, pageSize, "", area.getId(), isStop); |
| | | } |
| | | } |
| | | }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){ |
| | | equipments = calibrationOrderService.getEquipmentByReportRepair(pageNo, pageSize, "", area.getId(), isStop); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | /** |
| | | *首页本月三保计划明细 |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @GetMapping("showThisMonthMaintenanceList") |
| | | public Result<?> showThisMonthMaintenanceList(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceList(pageNo, pageSize, "", ""); |
| | | }else{ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_2.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else 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){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | String code = calibrationOrderService.findProductionCode(user.getId()); |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, code).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceList(pageNo, pageSize, "", 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){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | |
| | | /** |
| | | *首页下月三保计划明细展示 |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @GetMapping("showNextMonthMaintenanceList") |
| | | public Result<?> showNextMonthMaintenanceList(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | equipments = calibrationOrderService.showNextMonthMaintenanceList(pageNo, pageSize, "", ""); |
| | | }else{ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_2.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showNextMonthMaintenanceList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else 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){ |
| | | equipments = calibrationOrderService.showNextMonthMaintenanceList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | String code = calibrationOrderService.findProductionCode(user.getId()); |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, code).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showNextMonthMaintenanceList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showNextMonthMaintenanceList(pageNo, pageSize, "", 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){ |
| | | equipments = calibrationOrderService.showNextMonthMaintenanceList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | /** |
| | | *首页(二级页面)下下月三保计划明细 |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @GetMapping("showNextNextMonthMaintenanceList") |
| | | public Result<?> showNextNextMonthMaintenanceList(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | // List<Map<String, Object>> list = null; |
| | | IPage<Map<String, Object>> equipments = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | equipments = calibrationOrderService.showNextNextMonthMaintenanceList(pageNo, pageSize, "", ""); |
| | | }else{ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_2.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showNextNextMonthMaintenanceList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else 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){ |
| | | equipments = calibrationOrderService.showNextNextMonthMaintenanceList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | String code = calibrationOrderService.findProductionCode(user.getId()); |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, code).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showNextNextMonthMaintenanceList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showNextNextMonthMaintenanceList(pageNo, pageSize, "", 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){ |
| | | equipments = calibrationOrderService.showNextNextMonthMaintenanceList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | /** |
| | | *首页(二级页面)本月三保完成设备明细 |
| | | * qsw 2024-3-14 |
| | | */ |
| | | @GetMapping("showThisMonthMaintenanceFinishList") |
| | | public Result<?> showThisMonthMaintenanceFinishList(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceFinishList(pageNo, pageSize, "", ""); |
| | | }else{ |
| | | String orgType = calibrationOrderService.findOrgType(productionCode); |
| | | if(ORG_TYPE_2.equals(orgType)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceFinishList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else 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){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceFinishList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | } |
| | | }else if(USER_TYPE_3.equals(userType)){ |
| | | String code = calibrationOrderService.findProductionCode(user.getId()); |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, code).eq(Area::getType, "1").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceFinishList(pageNo, pageSize, area.getId(), ""); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | if(area != null){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceFinishList(pageNo, pageSize, "", 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){ |
| | | equipments = calibrationOrderService.showThisMonthMaintenanceFinishList(pageNo, pageSize, "", area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保延期数量明细 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @GetMapping("show3MaintenancePostponeList") |
| | | public Result<?> show3MaintenancePostponeList(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = 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){ |
| | | equipments = calibrationOrderService.show3MaintenancePostponeCount(pageNo, pageSize,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){ |
| | | equipments = calibrationOrderService.show3MaintenancePostponeCount(pageNo, pageSize,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){ |
| | | equipments = calibrationOrderService.show3MaintenancePostponeCount(pageNo, pageSize,area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保超期数量明细 |
| | | * qsw 2024-3-20 |
| | | */ |
| | | @GetMapping("show3MaintenanceOverdueList") |
| | | public Result<?> show3MaintenanceOverdueList(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize,String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | IPage<Map<String, Object>> equipments = 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){ |
| | | equipments = calibrationOrderService.show3MaintenanceOverdueCount(pageNo, pageSize, 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){ |
| | | equipments = calibrationOrderService.show3MaintenanceOverdueCount(pageNo, pageSize, 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){ |
| | | equipments = calibrationOrderService.show3MaintenanceOverdueCount(pageNo, pageSize, area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(equipments); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |