新增对应的数据结构

This commit is contained in:
chenze 2024-08-07 17:39:31 +08:00
parent 78859b4fad
commit 8884bce693
2 changed files with 15 additions and 6 deletions

View File

@ -64,18 +64,28 @@ public class RepairController extends BaseController {
repairVO.setStatusName(repair.getStatus().getName());
//设备类型
RepairType repairType = repairTypeService.selectRepairTypeById(Long.valueOf(repair.getTypeId()));
repairVO.setTypeName(repairType.getName());
if (null != repairType){
repairVO.setTypeName(repairType.getName());
}
//设备名称
RepairDevice repairDevice = deviceService.selectRepairDeviceById(Long.valueOf(repair.getRepairDevice()));
repairVO.setRepairDeviceName(repairDevice.getName());
if (repairDevice != null) {
repairVO.setRepairDeviceName(repairDevice.getName());
}
//故障
RepairFailureType repairFailureType = repairFailureTypeService.selectRepairFailureTypeById(repair.getFailureTypeId());
repairVO.setFailureTypeName(repairFailureType.getName());
if (repairFailureType != null) {
repairVO.setFailureTypeName(repairFailureType.getName());
}
IcsCustomerStaff staff = customerStaffService.selectIcsCustomerStaffById(Long.valueOf(repair.getUserId()));
repairVO.setUserName(staff.getUsername());
if (null != staff){
repairVO.setUserName(staff.getUsername());
}
IcsCustomerStaff worker = customerStaffService.selectIcsCustomerStaffById(repair.getWorkerId());
repairVO.setWorkerName(worker.getUsername());
if (null != worker){
repairVO.setWorkerName(worker.getUsername());
}
RepairRecord repairRecord = repairRecordService.selectByRepairId(id);
if (null != repairRecord){

View File

@ -79,7 +79,6 @@ public class RepairTypeController extends BaseController {
type.setWorkerNames(customerStaffs.get(0).getUsername()+""+customerStaffs.size()+"");
type.setWorkerList(customerStaffs);
}
}
return result(repairTypes);
}