Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -3,6 +3,7 @@ package com.zt.plat.module.qms.resource.device.controller.admin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zt.plat.module.qms.common.service.BusinessFileService;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.*;
|
||||
import com.zt.plat.module.qms.resource.device.service.DeviceCalibrationPlanService;
|
||||
@@ -59,6 +60,7 @@ public class DeviceCalibrationController extends AbstractFileUploadController im
|
||||
|
||||
@Resource private DeviceCalibrationService deviceCalibrationService;
|
||||
@Resource private DeviceProductService deviceProductService;
|
||||
@Resource private BusinessFileService businessFileService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备-检定校准")
|
||||
@@ -102,7 +104,9 @@ public class DeviceCalibrationController extends AbstractFileUploadController im
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DeviceCalibrationRespVO> getDeviceCalibration(@RequestParam("id") Long id) {
|
||||
DeviceCalibrationDO deviceCalibration = deviceCalibrationService.getDeviceCalibration(id);
|
||||
return success(BeanUtils.toBean(deviceCalibration, DeviceCalibrationRespVO.class));
|
||||
DeviceCalibrationRespVO vo = BeanUtils.toBean(deviceCalibration, DeviceCalibrationRespVO.class);
|
||||
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@GetMapping("/getVO")
|
||||
@@ -110,6 +114,7 @@ public class DeviceCalibrationController extends AbstractFileUploadController im
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DeviceCalibrationVO> getVO(@RequestParam("id") Long id) {
|
||||
DeviceCalibrationVO vo = deviceCalibrationService.getDeviceCalibrationVO(id);
|
||||
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.qms.common.service.BusinessFileService;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationRespVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationSaveReqVO;
|
||||
@@ -56,7 +57,7 @@ public class DeviceInfomationController extends AbstractFileUploadController imp
|
||||
|
||||
@Resource private DeviceInfomationService deviceInfomationService;
|
||||
@Resource private DeviceProductService deviceProductService;
|
||||
|
||||
@Resource private BusinessFileService businessFileService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -96,9 +97,9 @@ public class DeviceInfomationController extends AbstractFileUploadController imp
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新设备-设备信息")
|
||||
@PreAuthorize("@ss.hasPermission('resource:device-infomation:update')")
|
||||
public CommonResult<Boolean> updateDeviceInfomation(@Valid @RequestBody DeviceInfomationSaveReqVO updateReqVO) {
|
||||
deviceInfomationService.updateDeviceInfomation(updateReqVO);
|
||||
return success(true);
|
||||
public CommonResult<DeviceInfomationRespVO> updateDeviceInfomation(@Valid @RequestBody DeviceInfomationSaveReqVO updateReqVO) {
|
||||
DeviceInfomationDO entity = deviceInfomationService.updateDeviceInfomation(updateReqVO);
|
||||
return success(BeanUtils.toBean(entity, DeviceInfomationRespVO.class));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@@ -123,16 +124,17 @@ public class DeviceInfomationController extends AbstractFileUploadController imp
|
||||
@Operation(summary = "获得设备-设备信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DeviceInfomationWithProductVO> getDeviceInfomation(@RequestParam("id") Long id) {
|
||||
DeviceInfomationWithProductVO deviceInfomation = deviceInfomationService.getDeviceWithProduct(id);
|
||||
String customConfig = deviceInfomation.getCustomConfig();
|
||||
DeviceInfomationWithProductVO vo = deviceInfomationService.getDeviceWithProduct(id);
|
||||
String customConfig = vo.getCustomConfig();
|
||||
if(!ObjectUtils.isEmpty(customConfig)){
|
||||
try{
|
||||
deviceInfomation.setCustomConfigJson(JSON.parseObject(customConfig));
|
||||
vo.setCustomConfigJson(JSON.parseObject(customConfig));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return success(deviceInfomation);
|
||||
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.qms.resource.device.controller.admin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zt.plat.module.qms.common.service.BusinessFileService;
|
||||
import com.zt.plat.module.qms.enums.QmsCommonConstant;
|
||||
import com.zt.plat.module.qms.resource.device.common.DeviceConstant;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.*;
|
||||
@@ -61,6 +62,7 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
@Resource private DevicePeriodCheckService devicePeriodCheckService;
|
||||
@Resource private DeviceProductService deviceProductService;
|
||||
@Resource private MaterialProductService materialProductService;
|
||||
@Resource private BusinessFileService businessFileService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备-期间核查")
|
||||
@@ -109,8 +111,10 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
@Operation(summary = "获得设备-期间核查")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DevicePeriodCheckRespVO> getDevicePeriodCheck(@RequestParam("id") Long id) {
|
||||
DevicePeriodCheckDO devicePeriodCheck = devicePeriodCheckService.getDevicePeriodCheck(id);
|
||||
return success(BeanUtils.toBean(devicePeriodCheck, DevicePeriodCheckRespVO.class));
|
||||
DevicePeriodCheckDO entity = devicePeriodCheckService.getDevicePeriodCheck(id);
|
||||
DevicePeriodCheckRespVO vo = BeanUtils.toBean(entity, DevicePeriodCheckRespVO.class);
|
||||
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@GetMapping("/getVoDevice")
|
||||
@@ -118,6 +122,7 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DevicePeriodCheckVO> getVoDevice(@RequestParam("id") Long id) {
|
||||
DevicePeriodCheckVO vo = devicePeriodCheckService.getVoDevice(id);
|
||||
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@@ -126,6 +131,7 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DevicePeriodCheckVO> getVoMaterial(@RequestParam("id") Long id) {
|
||||
DevicePeriodCheckVO vo = devicePeriodCheckService.getVoMaterial(id);
|
||||
vo.setBusinessFileRet(businessFileService.getBusinessFileList(id));
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.zt.plat.module.qms.resource.device.controller.vo;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
@@ -109,4 +112,8 @@ public class DeviceCalibrationRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
//============扩展字段============
|
||||
|
||||
@Schema(description = "附件对象")
|
||||
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
|
||||
}
|
||||
@@ -80,4 +80,8 @@ public class DeviceCalibrationSaveReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//=================扩展字段==================>
|
||||
@Schema(description = "删除的文件id")
|
||||
private List<Long> deleteFileIdList;
|
||||
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.zt.plat.module.qms.resource.device.controller.vo;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* 检定校准响应对象
|
||||
@@ -55,4 +58,7 @@ public class DeviceCalibrationVO extends DeviceCalibrationRespVO{
|
||||
|
||||
//============其他字段============
|
||||
private JSONObject signatureData;
|
||||
|
||||
@Schema(description = "附件对象")
|
||||
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,14 @@ package com.zt.plat.module.qms.resource.device.controller.vo;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 设备-设备信息 Response VO")
|
||||
@Data
|
||||
@@ -145,4 +148,8 @@ public class DeviceInfomationRespVO {
|
||||
@Schema(description = "数据采集设备类型")
|
||||
@ExcelProperty("数据采集设备类型")
|
||||
private String collectDeviceType;
|
||||
|
||||
// ===================扩展字段=========================
|
||||
@Schema(description = "附件对象")
|
||||
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 设备-设备信息新增/修改 Request VO")
|
||||
@Data
|
||||
@@ -110,4 +111,8 @@ public class DeviceInfomationSaveReqVO {
|
||||
@Schema(description = "数据采集设备类型")
|
||||
private String collectDeviceType;
|
||||
|
||||
//=================扩展字段==================>
|
||||
@Schema(description = "删除的文件id")
|
||||
private List<Long> deleteFileIdList;
|
||||
|
||||
}
|
||||
@@ -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.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
@@ -118,4 +120,9 @@ public class DevicePeriodCheckRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
//============扩展字段============
|
||||
|
||||
@Schema(description = "附件对象")
|
||||
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
|
||||
|
||||
}
|
||||
@@ -86,4 +86,8 @@ public class DevicePeriodCheckSaveReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
//=================扩展字段==================>
|
||||
@Schema(description = "删除的文件id")
|
||||
private List<Long> deleteFileIdList;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user