| | |
| | | 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)); |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList(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)); |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList("",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)); |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList(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){ |
| | | list = calibrationOrderService.getEquipmentTechnologyStatusList("",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.getEquipmentTechnologyStatusList("",area.getId()); |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | list = calibrationOrderService.getReportRepairEquipmentList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getReportRepairEquipmentList(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)); |
| | | list = calibrationOrderService.getReportRepairEquipmentList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getReportRepairEquipmentList("",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)); |
| | | list = calibrationOrderService.getReportRepairEquipmentList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getReportRepairEquipmentList(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){ |
| | | list = calibrationOrderService.getReportRepairEquipmentList("",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.getReportRepairEquipmentList("",area.getId()); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @GetMapping("getThisMonthMaintenanceList") |
| | | public Result<?> getThisMonthMaintenanceList(String productionCode) { |
| | | // List<Area> areaList = areaService.lambdaQuery().eq(Area::getNum, factoryNum).eq(Area::getDelFlag, 0).list(); |
| | | // List<Map<String, Object>> list; |
| | | // if(areaList.size()>0){ |
| | | // list = calibrationOrderService.getThisMonthMaintenanceList(areaList.get(0).getId()); |
| | | // }else{ |
| | | // list = null; |
| | | // } |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | |
| | | 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)); |
| | | list = calibrationOrderService.getThisMonthMaintenanceList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceList(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)); |
| | | list = calibrationOrderService.getThisMonthMaintenanceList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceList("",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)); |
| | | list = calibrationOrderService.getThisMonthMaintenanceList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceList(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){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceList("",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.getThisMonthMaintenanceList("",area.getId()); |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextMonthMaintenanceList(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)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextMonthMaintenanceList("",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)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextMonthMaintenanceList(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){ |
| | | list = calibrationOrderService.getNextMonthMaintenanceList("",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.getNextMonthMaintenanceList("",area.getId()); |
| | | } |
| | | } |
| | |
| | | List<Map<String, Object>> list = null; |
| | | if(USER_TYPE_4.equals(userType)){ |
| | | if(StringUtils.isBlank(productionCode)){ |
| | | list = calibrationOrderService.getFactoryNextMonthMaintenanceList(); |
| | | list = calibrationOrderService.getFactoryNextNextMonthMaintenanceList(); |
| | | }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)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextNextMonthMaintenanceList(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)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextNextMonthMaintenanceList("",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)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextNextMonthMaintenanceList(area.getId(),""); |
| | | } |
| | | }else{ |
| | | Area area = areaService.getOne(new LambdaQueryWrapper<Area>().eq(Area::getNum, productionCode).eq(Area::getType, "3").eq(Area::getDelFlag, 0)); |
| | | list = calibrationOrderService.getNextMonthMaintenanceList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getNextNextMonthMaintenanceList("",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.getNextNextMonthMaintenanceList("",area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | |
| | | 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)); |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList(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)); |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList("",area.getId()); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList("",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)); |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList(area.getId(),""); |
| | | if(area != null){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList(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){ |
| | | list = calibrationOrderService.getThisMonthMaintenanceFinishList("",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.getThisMonthMaintenanceFinishList("",area.getId()); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 工段级 三保延期数量 |
| | | * 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 |
| | | */ |
| | | @GetMapping("getTwoMaintenancePlanList") |
| | | public Result<?> getTwoMaintenancePlanList() { |
| | | List<Map<String, Object>> twoMaintenancePlanList = calibrationOrderService.getTwoMaintenancePlanList(); |
| | | return Result.ok(); |
| | | public Result<?> getTwoMaintenancePlanList(String productionCode) { |
| | | List<Map<String, Object>> twoMaintenancePlanList = calibrationOrderService.getTwoMaintenancePlanList(productionCode); |
| | | return Result.ok(twoMaintenancePlanList); |
| | | } |
| | | |
| | | /** |
| | | *首页 第四级 对应工区下,设备台账信息展示; |
| | | * qsw 2024-4-22 |
| | | */ |
| | | @GetMapping("getAreaEquipmentList") |
| | | 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); |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | *首页 第四级 对应工区下,所有设备台账信息展示; |
| | | * qsw 2024-4-22 |
| | | */ |
| | | @GetMapping("getAllAreaEquipmentList") |
| | | public Result<?> getAllAreaEquipmentList(String productionCode) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Integer userType = user.getUserType(); |
| | | List<Map<String, Object>> list = null; |
| | | if(!USER_TYPE_1.equals(userType)){ |
| | | 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); |
| | | } |
| | | }else{ |
| | | List<Map<String, Object>> operationCertificatelist = calibrationOrderService.getOperationCertificate(user.getUsername()); |
| | | if(operationCertificatelist.size()>0){ |
| | | String equipmentIds = (String)operationCertificatelist.get(0).get("equipmentIds"); |
| | | List<String> strings = Arrays.asList(equipmentIds.split(",")); |
| | | list = calibrationOrderService.getAreaEquipmentList("","",strings); |
| | | } |
| | | } |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | /** |
| | | *首页 第四级 对应工区下,所有设备台账信息展示; |
| | | * qsw 2024-4-22 |
| | | */ |
| | | @GetMapping("getOperationCertificate") |
| | | public Result<?> getOperationCertificate() { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | List<Map<String, Object>> list = calibrationOrderService.getOperationCertificate(user.getUsername()); |
| | | return Result.ok(list); |
| | | } |
| | | |
| | | } |