Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test

This commit is contained in:
2026-03-13 15:52:21 +08:00
3 changed files with 17 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.qms.resource.device.controller.admin;
import com.alibaba.fastjson.JSONObject;
import com.zt.plat.module.qms.common.service.BusinessFileService;
import com.zt.plat.module.qms.resource.device.controller.vo.*;
import com.zt.plat.module.qms.resource.device.service.DeviceInfomationService;
import org.springframework.util.ObjectUtils;
@@ -59,6 +60,7 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
@Resource private DeviceMaintainService deviceMaintainService;
@Resource private DeviceInfomationService deviceInfomationService;
@Resource private BusinessFileService businessFileService;
@PostMapping("/saveMaintainVo")
@Operation(summary = "创建或获取维护数据")
@@ -95,7 +97,10 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
@Operation(summary = "查询维护记录详情")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<DeviceMaintainVO> getMaintainDetail(@RequestParam("id") Long id) {
return deviceMaintainService.getMaintainDetail(id);
CommonResult<DeviceMaintainVO> ret = deviceMaintainService.getMaintainDetail(id);
DeviceMaintainVO vo = ret.getData();
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
return CommonResult.success(vo);
}
@GetMapping("/queryPageListWithCount")
@@ -158,7 +163,9 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<DeviceMaintainRespVO> getDeviceMaintain(@RequestParam("id") Long id) {
DeviceMaintainDO deviceMaintain = deviceMaintainService.getDeviceMaintain(id);
return success(BeanUtils.toBean(deviceMaintain, DeviceMaintainRespVO.class));
DeviceMaintainRespVO vo = BeanUtils.toBean(deviceMaintain, DeviceMaintainRespVO.class);
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
return success(vo);
}
@GetMapping("/page")

View File

@@ -1,5 +1,7 @@
package com.zt.plat.module.qms.resource.device.controller.vo;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
@@ -82,7 +84,8 @@ public class DeviceMaintainRespVO {
//=====================================扩展字段===============================================
@Schema(description = "附件对象")
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
}

View File

@@ -1,5 +1,7 @@
package com.zt.plat.module.qms.resource.device.controller.vo;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceMaintainDO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceMaintainItemDO;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -64,5 +66,6 @@ public class DeviceMaintainVO extends DeviceMaintainRespVO {
private String maintainContent;
//============其他字段============
@Schema(description = "附件对象")
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
}