feat:设备流程接口
This commit is contained in:
@@ -52,15 +52,18 @@ public class DeviceApplyController extends AbstractFileUploadController implemen
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private DeviceApplyService deviceApplyService;
|
||||
@Resource private DeviceApplyService deviceApplyService;
|
||||
|
||||
//todo 通过设备通用流程配置创建
|
||||
@PostMapping("/createTempData")
|
||||
@Operation(summary = "创建创建临时数据")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply:create')")
|
||||
public CommonResult<DeviceApplyRespVO> createTempData(@Valid @RequestBody DeviceApplySaveReqVO createReqVO) {
|
||||
return success(deviceApplyService.createTempData(createReqVO));
|
||||
@RequestMapping("/createTempData")
|
||||
@Operation(summary = "创建临时数据")
|
||||
public CommonResult<DeviceApplyRespVO> createTempData(@RequestBody DeviceApplySaveReqVO createReqVO) {
|
||||
return deviceApplyService.createTempData(createReqVO);
|
||||
}
|
||||
|
||||
@RequestMapping("/saveDeviceApply")
|
||||
@Operation(summary = "保存申请数据")
|
||||
public CommonResult<Boolean> saveDeviceApply(@Valid @RequestBody DeviceApplySaveReqVO createReqVO) {
|
||||
return deviceApplyService.saveDeviceApply(createReqVO);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.qms.resource.device.controller.vo;
|
||||
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@@ -49,6 +50,7 @@ public class DeviceApplyRespVO {
|
||||
|
||||
@Schema(description = "业务状态", example = "1")
|
||||
@ExcelProperty("业务状态")
|
||||
@Dict(dicCode = "flow_status")
|
||||
private String businessStatus;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
|
||||
@@ -45,7 +45,7 @@ public class DeviceApplyDO extends BusinessBaseDO {
|
||||
* 申请部门ID
|
||||
*/
|
||||
@TableField("APL_DEPT")
|
||||
private String applyDepartment;
|
||||
private Long applyDepartment;
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class DeviceApplyDO extends BusinessBaseDO {
|
||||
* 申请人ID
|
||||
*/
|
||||
@TableField("APL_USER")
|
||||
private String applyUser;
|
||||
private Long applyUser;
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ public class DeviceApplyDO extends BusinessBaseDO {
|
||||
* 表单模板ID
|
||||
*/
|
||||
@TableField("TMPL_ID")
|
||||
private String templateId;
|
||||
private Long templateId;
|
||||
/**
|
||||
* 表单组件
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.qms.resource.device.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyRespVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplySaveReqVO;
|
||||
@@ -25,7 +26,9 @@ public interface DeviceApplyService {
|
||||
DeviceApplyRespVO createDeviceApply(@Valid DeviceApplySaveReqVO createReqVO);
|
||||
|
||||
//创建临时数据
|
||||
DeviceApplyRespVO createTempData(@Valid DeviceApplySaveReqVO createReqVO);
|
||||
CommonResult<DeviceApplyRespVO> createTempData(@Valid DeviceApplySaveReqVO createReqVO);
|
||||
|
||||
CommonResult<Boolean> saveDeviceApply(@Valid DeviceApplySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 更新设备通用流程,验收、降级、停用、报废、还原、启用
|
||||
@@ -34,6 +37,7 @@ public interface DeviceApplyService {
|
||||
*/
|
||||
void updateDeviceApply(@Valid DeviceApplySaveReqVO updateReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 删除设备通用流程,验收、降级、停用、报废、还原、启用
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,8 @@ public interface DeviceConfigFlowService {
|
||||
|
||||
List<DeviceConfigFlowDO> getEnableList(DeviceConfigFlowPageReqVO pageReqVO);
|
||||
|
||||
DeviceConfigFlowDO getByBusinessType(String code);
|
||||
|
||||
/**
|
||||
* 创建设备通用流程配置
|
||||
*
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.qms.resource.device.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowRespVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigFlowSaveReqVO;
|
||||
@@ -37,6 +38,15 @@ public class DeviceConfigFlowServiceImpl implements DeviceConfigFlowService {
|
||||
return deviceConfigFlowMapper.selectList(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceConfigFlowDO getByBusinessType(String code) {
|
||||
LambdaQueryWrapper<DeviceConfigFlowDO> query = new LambdaQueryWrapper<>();
|
||||
query.eq(DeviceConfigFlowDO::getBusinessType, code);
|
||||
query.orderByDesc(DeviceConfigFlowDO::getUpdateTime);
|
||||
query.last("limit 1");
|
||||
return deviceConfigFlowMapper.selectOne(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceConfigFlowRespVO createDeviceConfigFlow(DeviceConfigFlowSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
|
||||
Reference in New Issue
Block a user