| | |
| | | import org.jeecg.modules.base.service.IFactoryModelService; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.model.DepartVo; |
| | | import org.jeecg.modules.eam.model.MaintenanceCycleVo; |
| | | import org.jeecg.modules.eam.service.*; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | |
| | | @Autowired |
| | | private IAreaService areaService; |
| | | |
| | | @Autowired |
| | | private IDailyInspectionStandardService dailyInspectionStandardService; |
| | | |
| | | @Autowired |
| | | private IMaintenanceStandardService maintenanceStandardService; |
| | | |
| | | |
| | | |
| | |
| | | return Result.OK("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | *设备台站-保养标准 |
| | | */ |
| | | @GetMapping("getEquipmentListAllStandard") |
| | | public Result<?> getEquipmentListAllStandard(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam Map<String, Object> params) { |
| | | IPage<Map<String, Object>> equipmentListAllStandards = equipmentService.getEquipmentListAllStandard(pageNo, pageSize, params); |
| | | List<Map<String, Object>> records = equipmentListAllStandards.getRecords(); |
| | | for (Map<String, Object> record : records) { |
| | | String id = (String) record.get("id"); |
| | | String precisionParameters = (String)record.get("precisionParameters"); |
| | | if("1".equals(precisionParameters)){ |
| | | record.put("yseNoPrecisionParameters","0"); |
| | | }else{ |
| | | record.put("yseNoPrecisionParameters","1"); |
| | | } |
| | | List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery() |
| | | .eq(DailyInspectionStandard::getEquipmentId, id) |
| | | .eq(DailyInspectionStandard::getVersionStatus, "2") |
| | | .list(); |
| | | if(dailyInspectionStandards.size()>0){ |
| | | record.put("yseNoInspectionStandard","0"); |
| | | }else{ |
| | | record.put("yseNoInspectionStandard","1"); |
| | | } |
| | | List<MaintenanceStandard> maintenance2Standards = maintenanceStandardService.lambdaQuery() |
| | | .eq(MaintenanceStandard::getEquipmentId, id) |
| | | .eq(MaintenanceStandard::getMaintenanceType, "2") |
| | | .eq(MaintenanceStandard::getVersionStatus, "2").list(); |
| | | if(maintenance2Standards.size()>0){ |
| | | record.put("yseNoMaintenance2Standard","0"); |
| | | }else{ |
| | | record.put("yseNoMaintenance2Standard","1"); |
| | | } |
| | | |
| | | List<MaintenanceStandard> maintenance3Standards = maintenanceStandardService.lambdaQuery() |
| | | .eq(MaintenanceStandard::getEquipmentId, id) |
| | | .eq(MaintenanceStandard::getMaintenanceType, "3") |
| | | .eq(MaintenanceStandard::getVersionStatus, "2").list(); |
| | | if(maintenance3Standards.size()>0){ |
| | | record.put("yseNoMaintenance3Standard","0"); |
| | | }else{ |
| | | record.put("yseNoMaintenance3Standard","1"); |
| | | } |
| | | |
| | | } |
| | | return Result.ok(equipmentListAllStandards); |
| | | } |
| | | |
| | | } |