fix:期间核查、检定校准接口调整
This commit is contained in:
@@ -13,4 +13,9 @@ public class DeviceConstant {
|
||||
public static final String FREQUENCY_TYPE_MONTH = "month";
|
||||
public static final String FREQUENCY_TYPE_DAY = "day";
|
||||
|
||||
|
||||
//期间核查目标类型
|
||||
public static final String PERIOD_CHECK_TAGET_DEVICE = "device";
|
||||
public static final String PERIOD_CHECK_TAGET_MATERIAL = "material";
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ public class DeviceCalibrationController extends AbstractFileUploadController im
|
||||
}
|
||||
|
||||
@Resource private DeviceCalibrationService deviceCalibrationService;
|
||||
@Resource private DeviceCalibrationPlanService deviceCalibrationPlanService;
|
||||
@Resource private DeviceProductService deviceProductService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@@ -65,6 +64,12 @@ public class DeviceCalibrationController extends AbstractFileUploadController im
|
||||
return success(deviceCalibrationService.createDeviceCalibration(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/createByDeviceId")
|
||||
@Operation(summary = "创建设备-检定校准")
|
||||
public CommonResult<DeviceCalibrationRespVO> createByDeviceId(@RequestBody DeviceCalibrationSaveReqVO createReqVO) {
|
||||
return success(deviceCalibrationService.createByDeviceId(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新设备-检定校准")
|
||||
public CommonResult<DeviceCalibrationRespVO> updateDeviceCalibration(@Valid @RequestBody DeviceCalibrationSaveReqVO updateReqVO) {
|
||||
|
||||
@@ -2,8 +2,10 @@ package com.zt.plat.module.qms.resource.device.controller.admin;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zt.plat.module.qms.resource.device.common.DeviceConstant;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.*;
|
||||
import com.zt.plat.module.qms.resource.device.service.DeviceProductService;
|
||||
import com.zt.plat.module.qms.resource.material.service.MaterialProductService;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -56,6 +58,7 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
|
||||
@Resource private DevicePeriodCheckService devicePeriodCheckService;
|
||||
@Resource private DeviceProductService deviceProductService;
|
||||
@Resource private MaterialProductService materialProductService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备-期间核查")
|
||||
@@ -96,11 +99,19 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
return success(BeanUtils.toBean(devicePeriodCheck, DevicePeriodCheckRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/getVO")
|
||||
@GetMapping("/getVoDevice")
|
||||
@Operation(summary = "获得设备-检定校准")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DevicePeriodCheckVO> getVO(@RequestParam("id") Long id) {
|
||||
DevicePeriodCheckVO vo = devicePeriodCheckService.getDevicePeriodCheckVO(id);
|
||||
public CommonResult<DevicePeriodCheckVO> getVoDevice(@RequestParam("id") Long id) {
|
||||
DevicePeriodCheckVO vo = devicePeriodCheckService.getVoDevice(id);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@GetMapping("/getVoMaterial")
|
||||
@Operation(summary = "获得设备-检定校准")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<DevicePeriodCheckVO> getVoMaterial(@RequestParam("id") Long id) {
|
||||
DevicePeriodCheckVO vo = devicePeriodCheckService.getVoMaterial(id);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@@ -110,9 +121,9 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
return devicePeriodCheckService.submitApply(param);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@GetMapping("/pageDevice")
|
||||
@Operation(summary = "获得设备-期间核查分页")
|
||||
public CommonResult<PageResult<DevicePeriodCheckVO>> getDevicePeriodCheckPage(@Valid DevicePeriodCheckPageReqVO param) {
|
||||
public CommonResult<PageResult<DevicePeriodCheckVO>> pageDevice(@Valid DevicePeriodCheckPageReqVO param) {
|
||||
Page<DevicePeriodCheckPageReqVO> page = new Page<>(param.getPageNo(), param.getPageSize());
|
||||
Long productId = param.getProductId();
|
||||
if(!ObjectUtils.isEmpty(productId)){
|
||||
@@ -125,7 +136,29 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
|
||||
param.setFlowStatusList(Arrays.asList(flowStatus.split(",")));
|
||||
param.setFlowStatus("");
|
||||
}
|
||||
IPage<DevicePeriodCheckVO> pageList = devicePeriodCheckService.queryPageList(page, param);
|
||||
param.setCheckTarget(DeviceConstant.PERIOD_CHECK_TAGET_DEVICE);
|
||||
IPage<DevicePeriodCheckVO> pageList = devicePeriodCheckService.queryPageListDevice(page, param);
|
||||
PageResult<DevicePeriodCheckVO> pageResult = new PageResult<>(pageList.getRecords(), pageList.getTotal());
|
||||
return CommonResult.success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/pageMaterial")
|
||||
@Operation(summary = "获得设备-期间核查分页")
|
||||
public CommonResult<PageResult<DevicePeriodCheckVO>> pageMaterial(@Valid DevicePeriodCheckPageReqVO param) {
|
||||
Page<DevicePeriodCheckPageReqVO> page = new Page<>(param.getPageNo(), param.getPageSize());
|
||||
Long productId = param.getProductId();
|
||||
if(!ObjectUtils.isEmpty(productId)){
|
||||
List<Long> productIdList = deviceProductService.getIdListByIdPath(productId);
|
||||
param.setProductIdList(productIdList);
|
||||
param.setProductId(null);
|
||||
}
|
||||
String flowStatus = param.getFlowStatus();
|
||||
if (!ObjectUtils.isEmpty(flowStatus)) {
|
||||
param.setFlowStatusList(Arrays.asList(flowStatus.split(",")));
|
||||
param.setFlowStatus("");
|
||||
}
|
||||
param.setCheckTarget(DeviceConstant.PERIOD_CHECK_TAGET_MATERIAL);
|
||||
IPage<DevicePeriodCheckVO> pageList = devicePeriodCheckService.queryPageListMaterial(page, param);
|
||||
PageResult<DevicePeriodCheckVO> pageResult = new PageResult<>(pageList.getRecords(), pageList.getTotal());
|
||||
return CommonResult.success(pageResult);
|
||||
}
|
||||
|
||||
@@ -55,11 +55,18 @@ public class DevicePeriodCheckPlanController extends AbstractFileUploadControlle
|
||||
@Resource
|
||||
private DevicePeriodCheckPlanService devicePeriodCheckPlanService;
|
||||
|
||||
@PostMapping("/createPlan")
|
||||
@PostMapping("/createPlanDevice")
|
||||
@Operation(summary = "创建设备-期间核查计划")
|
||||
public CommonResult<DevicePeriodCheckPlanRespVO> createDevicePeriodCheckPlan(@RequestBody JSONObject param) {
|
||||
public CommonResult<DevicePeriodCheckPlanRespVO> createPlanDevice(@RequestBody JSONObject param) {
|
||||
String checkYear = param.getString("checkYear");
|
||||
return success(devicePeriodCheckPlanService.createPlan(checkYear));
|
||||
return success(devicePeriodCheckPlanService.createPlanDevice(checkYear));
|
||||
}
|
||||
|
||||
@PostMapping("/createPlanMaterial")
|
||||
@Operation(summary = "创建设备-期间核查计划")
|
||||
public CommonResult<DevicePeriodCheckPlanRespVO> createPlanMaterial(@RequestBody JSONObject param) {
|
||||
String checkYear = param.getString("checkYear");
|
||||
return success(devicePeriodCheckPlanService.createPlanMaterial(checkYear));
|
||||
}
|
||||
|
||||
@RequestMapping("/savePlan")
|
||||
|
||||
@@ -59,6 +59,9 @@ public class DevicePeriodCheckPageReqVO extends PageParam {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] checkDate;
|
||||
|
||||
@Schema(description = "核查对象类型")
|
||||
private String checkTarget;
|
||||
|
||||
@Schema(description = "上次检查日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] lastCheckDate;
|
||||
@@ -92,7 +95,7 @@ public class DevicePeriodCheckPageReqVO extends PageParam {
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
|
||||
//======================设备大类字段==============================
|
||||
//======================设备大类字段==========================
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ public class DevicePeriodCheckPlanPageReqVO extends PageParam {
|
||||
@Schema(description = "数据类型,班组/汇总", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "核查对象类型")
|
||||
private String checkTarget;
|
||||
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
private String cancelFlag;
|
||||
|
||||
|
||||
@@ -54,6 +54,10 @@ public class DevicePeriodCheckPlanRespVO {
|
||||
@ExcelProperty("数据类型,班组/汇总")
|
||||
private String dataType;
|
||||
|
||||
@ExcelProperty("核查对象类型")
|
||||
@Schema(description = "核查对象类型")
|
||||
private String checkTarget;
|
||||
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
@ExcelProperty("作废标识:0-有效;1-作废")
|
||||
private String cancelFlag;
|
||||
|
||||
@@ -41,6 +41,9 @@ public class DevicePeriodCheckPlanSaveReqVO {
|
||||
@Schema(description = "数据类型,班组/汇总", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "核查对象类型")
|
||||
private String checkTarget;
|
||||
|
||||
@Schema(description = "作废标识:0-有效;1-作废")
|
||||
private String cancelFlag;
|
||||
|
||||
|
||||
@@ -73,6 +73,10 @@ public class DevicePeriodCheckRespVO {
|
||||
@ExcelProperty("实际检查日期")
|
||||
private LocalDateTime checkDate;
|
||||
|
||||
@ExcelProperty("核查对象类型")
|
||||
@Schema(description = "核查对象类型")
|
||||
private String checkTarget;
|
||||
|
||||
@Schema(description = "上次检查日期")
|
||||
@ExcelProperty("上次检查日期")
|
||||
private LocalDateTime lastCheckDate;
|
||||
|
||||
@@ -56,6 +56,9 @@ public class DevicePeriodCheckSaveReqVO {
|
||||
@Schema(description = "实际检查日期")
|
||||
private LocalDateTime checkDate;
|
||||
|
||||
@Schema(description = "核查对象类型")
|
||||
private String checkTarget;
|
||||
|
||||
@Schema(description = "上次检查日期")
|
||||
private LocalDateTime lastCheckDate;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user