Compare commits
4 Commits
85c50c1c69
...
85b91fb624
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85b91fb624 | ||
|
|
985c3df8a6 | ||
|
|
0fe155e89b | ||
|
|
195703718d |
@@ -131,6 +131,12 @@ public class QMSMultiDataPermissionHandler implements MultiDataPermissionHandler
|
||||
if (!DeptContextHolder.shouldIgnore() && ctxDeptId != null && ctxDeptId > 0L) {
|
||||
effectiveDeptIds = CollUtil.newHashSet(ctxDeptId);
|
||||
}
|
||||
|
||||
//如果可以查看所有数据,直接跳过
|
||||
if (qmsDataPermission.getAll()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 情况一:仅当不存在上下文部门时,且 ALL 可查看全部,才无需拼接条件;若存在上下文部门则仍需基于该部门过滤
|
||||
if (ctxDeptId == null && qmsDataPermission.getAll()) {
|
||||
return null;
|
||||
|
||||
@@ -73,6 +73,11 @@ public class DeviceApplyController extends AbstractFileUploadController implemen
|
||||
return deviceApplyService.addDetail(param);
|
||||
}
|
||||
|
||||
@RequestMapping("/submitDeviceApply")
|
||||
@Operation(summary = "提交申请")
|
||||
public CommonResult<DeviceApplyRespVO> submitDeviceApply(@RequestBody DeviceApplySaveReqVO param) {
|
||||
return deviceApplyService.submitDeviceApply(param);
|
||||
}
|
||||
|
||||
@RequestMapping("/removeDetail")
|
||||
@Operation(summary = "删除明细")
|
||||
@@ -100,7 +105,7 @@ public class DeviceApplyController extends AbstractFileUploadController implemen
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除设备通用流程,验收、降级、停用、报废、还原、启用")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply:delete')")
|
||||
public CommonResult<Boolean> deleteDeviceApplyList(@RequestBody BatchDeleteReqVO req) {
|
||||
deviceApplyService.deleteDeviceApplyListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -109,7 +114,7 @@ public class DeviceApplyController extends AbstractFileUploadController implemen
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得设备通用流程,验收、降级、停用、报废、还原、启用")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply:query')")
|
||||
public CommonResult<DeviceApplyRespVO> getDeviceApply(@RequestParam("id") Long id) {
|
||||
DeviceApplyDO deviceApply = deviceApplyService.getDeviceApply(id);
|
||||
return success(BeanUtils.toBean(deviceApply, DeviceApplyRespVO.class));
|
||||
|
||||
@@ -57,20 +57,20 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得设备通用流程分页")
|
||||
public CommonResult<List<DeviceApplyDetailRespVO>> list(DeviceApplyDetailPageReqVO reqVO) {
|
||||
List<DeviceApplyDetailDO> list = deviceApplyDetailService.selectList(reqVO);
|
||||
return success(BeanUtils.toBean(list, DeviceApplyDetailRespVO.class));
|
||||
List<DeviceApplyDetailRespVO> list = deviceApplyDetailService.selectListWithDeviceInfo(reqVO);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备通用流程明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply-detail:create')")
|
||||
public CommonResult<DeviceApplyDetailRespVO> createDeviceApplyDetail(@Valid @RequestBody DeviceApplyDetailSaveReqVO createReqVO) {
|
||||
return success(deviceApplyDetailService.createDeviceApplyDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新设备通用流程明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply-detail:update')")
|
||||
public CommonResult<Boolean> updateDeviceApplyDetail(@Valid @RequestBody DeviceApplyDetailSaveReqVO updateReqVO) {
|
||||
deviceApplyDetailService.updateDeviceApplyDetail(updateReqVO);
|
||||
return success(true);
|
||||
@@ -79,7 +79,7 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除设备通用流程明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:delete')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply-detail:delete')")
|
||||
public CommonResult<Boolean> deleteDeviceApplyDetail(@RequestParam("id") Long id) {
|
||||
deviceApplyDetailService.deleteDeviceApplyDetail(id);
|
||||
return success(true);
|
||||
@@ -88,7 +88,7 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除设备通用流程明细")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:delete')")
|
||||
public CommonResult<Boolean> deleteDeviceApplyDetailList(@RequestBody BatchDeleteReqVO req) {
|
||||
deviceApplyDetailService.deleteDeviceApplyDetailListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -97,7 +97,7 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得设备通用流程明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply-detail:query')")
|
||||
public CommonResult<DeviceApplyDetailRespVO> getDeviceApplyDetail(@RequestParam("id") Long id) {
|
||||
DeviceApplyDetailDO deviceApplyDetail = deviceApplyDetailService.getDeviceApplyDetail(id);
|
||||
return success(BeanUtils.toBean(deviceApplyDetail, DeviceApplyDetailRespVO.class));
|
||||
@@ -105,9 +105,9 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得设备通用流程明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-apply-detail:query')")
|
||||
public CommonResult<PageResult<DeviceApplyDetailRespVO>> getDeviceApplyDetailPage(@Valid DeviceApplyDetailPageReqVO pageReqVO) {
|
||||
PageResult<DeviceApplyDetailDO> pageResult = deviceApplyDetailService.getDeviceApplyDetailPage(pageReqVO);
|
||||
PageResult<DeviceApplyDetailRespVO> pageResult = deviceApplyDetailService.getDeviceApplyDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DeviceApplyDetailRespVO.class));
|
||||
}
|
||||
|
||||
@@ -115,13 +115,11 @@ public class DeviceApplyDetailController extends AbstractFileUploadController im
|
||||
@Operation(summary = "导出设备通用流程明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-apply-detail:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDeviceApplyDetailExcel(@Valid DeviceApplyDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
public void exportDeviceApplyDetailExcel(@Valid DeviceApplyDetailPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DeviceApplyDetailDO> list = deviceApplyDetailService.getDeviceApplyDetailPage(pageReqVO).getList();
|
||||
List<DeviceApplyDetailRespVO> list = deviceApplyDetailService.getDeviceApplyDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "设备通用流程明细.xls", "数据", DeviceApplyDetailRespVO.class,
|
||||
BeanUtils.toBean(list, DeviceApplyDetailRespVO.class));
|
||||
ExcelUtils.write(response, "设备通用流程明细.xls", "数据", DeviceApplyDetailRespVO.class,list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -105,14 +105,14 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建设备-点检、保养记录")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-maintain:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-maintain:create')")
|
||||
public CommonResult<DeviceMaintainRespVO> createDeviceMaintain(@Valid @RequestBody DeviceMaintainSaveReqVO createReqVO) {
|
||||
return success(deviceMaintainService.createDeviceMaintain(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新设备-点检、保养记录")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-maintain:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-maintain:update')")
|
||||
public CommonResult<Boolean> updateDeviceMaintain(@Valid @RequestBody DeviceMaintainSaveReqVO updateReqVO) {
|
||||
deviceMaintainService.updateDeviceMaintain(updateReqVO);
|
||||
return success(true);
|
||||
@@ -121,7 +121,7 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除设备-点检、保养记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-maintain:delete')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-maintain:delete')")
|
||||
public CommonResult<Boolean> deleteDeviceMaintain(@RequestParam("id") Long id) {
|
||||
deviceMaintainService.deleteDeviceMaintain(id);
|
||||
return success(true);
|
||||
@@ -130,7 +130,7 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除设备-点检、保养记录")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-maintain:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-maintain:delete')")
|
||||
public CommonResult<Boolean> deleteDeviceMaintainList(@RequestBody BatchDeleteReqVO req) {
|
||||
deviceMaintainService.deleteDeviceMaintainListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -146,7 +146,7 @@ public class DeviceMaintainController extends AbstractFileUploadController imple
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得设备-点检、保养记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('qms:device-maintain:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:device-maintain:query')")
|
||||
public CommonResult<PageResult<DeviceMaintainRespVO>> getDeviceMaintainPage(@Valid DeviceMaintainPageReqVO pageReqVO) {
|
||||
PageResult<DeviceMaintainDO> pageResult = deviceMaintainService.getDeviceMaintainPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DeviceMaintainRespVO.class));
|
||||
|
||||
@@ -44,4 +44,42 @@ public class DeviceApplyDetailRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
//============设备大类属性====================
|
||||
@Schema(description = "大类名称", example = "王五")
|
||||
@ExcelProperty("大类名称")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "型号")
|
||||
@ExcelProperty("型号")
|
||||
private String modelNo;
|
||||
|
||||
@Schema(description = "技术指标")
|
||||
@ExcelProperty("技术指标")
|
||||
private String parameter;
|
||||
|
||||
@Schema(description = "制造商")
|
||||
@ExcelProperty("制造商")
|
||||
private String manufacturer;
|
||||
|
||||
|
||||
//============设备实例属性====================
|
||||
@Schema(description = "设备名称", example = "张三")
|
||||
@ExcelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@Schema(description = "别名")
|
||||
@ExcelProperty("别名")
|
||||
private String alias;
|
||||
|
||||
@Schema(description = "管理编号")
|
||||
@ExcelProperty("管理编号")
|
||||
private String deviceCode;
|
||||
|
||||
@Schema(description = "出厂编号")
|
||||
@ExcelProperty("出厂编号")
|
||||
private String factoryCode;
|
||||
|
||||
@Schema(description = "存放位置")
|
||||
@ExcelProperty("存放位置")
|
||||
private String position;
|
||||
}
|
||||
@@ -101,8 +101,8 @@ public class DeviceInfomationSaveReqVO {
|
||||
@Schema(description = "自定义表单数据")
|
||||
private String customFormData;
|
||||
|
||||
@Schema(description = "设备图片")
|
||||
private String photo;
|
||||
// @Schema(description = "设备图片")
|
||||
// private String photo;
|
||||
|
||||
@Schema(description = "技术指标")
|
||||
private String deviceParameter;
|
||||
|
||||
@@ -3,8 +3,12 @@ package com.zt.plat.module.qms.resource.device.dal.mapper;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailRespVO;
|
||||
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceApplyDetailDO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfomationDO;
|
||||
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceProductDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,16 +21,42 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface DeviceApplyDetailMapper extends BaseMapperX<DeviceApplyDetailDO> {
|
||||
|
||||
default PageResult<DeviceApplyDetailDO> selectPage(DeviceApplyDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DeviceApplyDetailDO>()
|
||||
// default PageResult<DeviceApplyDetailDO> selectPage(DeviceApplyDetailPageReqVO reqVO) {
|
||||
// return selectPage(reqVO, new LambdaQueryWrapperX<DeviceApplyDetailDO>()
|
||||
// .eqIfPresent(DeviceApplyDetailDO::getApplyId, reqVO.getApplyId())
|
||||
// .eqIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfomationId())
|
||||
// .eqIfPresent(DeviceApplyDetailDO::getDeviceBorrowDetailId, reqVO.getDeviceBorrowDetailId())
|
||||
// .eqIfPresent(DeviceApplyDetailDO::getFormData, reqVO.getFormData())
|
||||
// .eqIfPresent(DeviceApplyDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
// .eqIfPresent(DeviceApplyDetailDO::getRemark, reqVO.getRemark())
|
||||
// .betweenIfPresent(DeviceApplyDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
// .orderByDesc(DeviceApplyDetailDO::getId));
|
||||
// }
|
||||
|
||||
default PageResult<DeviceApplyDetailRespVO> selectPage(DeviceApplyDetailPageReqVO reqVO) {
|
||||
return selectJoinPage(reqVO, DeviceApplyDetailRespVO.class, new MPJLambdaWrapperX<DeviceApplyDetailDO>()
|
||||
.leftJoin(DeviceInfomationDO.class, DeviceInfomationDO::getId, DeviceApplyDetailDO::getDeviceInfomationId)
|
||||
.leftJoin(DeviceProductDO.class, DeviceProductDO::getId, DeviceInfomationDO::getProductId)
|
||||
.selectAll(DeviceApplyDetailDO.class)
|
||||
.selectAs(DeviceProductDO::getName, DeviceApplyDetailRespVO::getProductName)
|
||||
.selectAs(DeviceProductDO::getModelNo, DeviceApplyDetailRespVO::getModelNo)
|
||||
.selectAs(DeviceProductDO::getParameter, DeviceApplyDetailRespVO::getParameter)
|
||||
.selectAs(DeviceProductDO::getManufacturer, DeviceApplyDetailRespVO::getManufacturer)
|
||||
.selectAs(DeviceInfomationDO::getDeviceName, DeviceApplyDetailRespVO::getDeviceName)
|
||||
.selectAs(DeviceInfomationDO::getAlias, DeviceApplyDetailRespVO::getAlias)
|
||||
.selectAs(DeviceInfomationDO::getDeviceCode, DeviceApplyDetailRespVO::getDeviceCode)
|
||||
.selectAs(DeviceInfomationDO::getFactoryCode, DeviceApplyDetailRespVO::getFactoryCode)
|
||||
.selectAs(DeviceInfomationDO::getPosition, DeviceApplyDetailRespVO::getPosition)
|
||||
.eqIfPresent(DeviceApplyDetailDO::getApplyId, reqVO.getApplyId())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfomationId())
|
||||
.inIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfoIdList())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getDeviceBorrowDetailId, reqVO.getDeviceBorrowDetailId())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getFormData, reqVO.getFormData())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(DeviceApplyDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(DeviceApplyDetailDO::getId));
|
||||
.orderByDesc(DeviceApplyDetailDO::getId)
|
||||
);
|
||||
}
|
||||
|
||||
default List<DeviceApplyDetailDO> selectList(DeviceApplyDetailPageReqVO reqVO) {
|
||||
@@ -42,5 +72,31 @@ public interface DeviceApplyDetailMapper extends BaseMapperX<DeviceApplyDetailDO
|
||||
.orderByDesc(DeviceApplyDetailDO::getId));
|
||||
}
|
||||
|
||||
default List<DeviceApplyDetailRespVO> selectListWithDeviceInfo(DeviceApplyDetailPageReqVO reqVO) {
|
||||
return selectJoinList(DeviceApplyDetailRespVO.class, new MPJLambdaWrapperX<DeviceApplyDetailDO>()
|
||||
.leftJoin(DeviceInfomationDO.class, DeviceInfomationDO::getId, DeviceApplyDetailDO::getDeviceInfomationId)
|
||||
.leftJoin(DeviceProductDO.class, DeviceProductDO::getId, DeviceInfomationDO::getProductId)
|
||||
.selectAll(DeviceApplyDetailDO.class)
|
||||
.selectAs(DeviceProductDO::getName, DeviceApplyDetailRespVO::getProductName)
|
||||
.selectAs(DeviceProductDO::getModelNo, DeviceApplyDetailRespVO::getModelNo)
|
||||
.selectAs(DeviceProductDO::getParameter, DeviceApplyDetailRespVO::getParameter)
|
||||
.selectAs(DeviceProductDO::getManufacturer, DeviceApplyDetailRespVO::getManufacturer)
|
||||
.selectAs(DeviceInfomationDO::getDeviceName, DeviceApplyDetailRespVO::getDeviceName)
|
||||
.selectAs(DeviceInfomationDO::getAlias, DeviceApplyDetailRespVO::getAlias)
|
||||
.selectAs(DeviceInfomationDO::getDeviceCode, DeviceApplyDetailRespVO::getDeviceCode)
|
||||
.selectAs(DeviceInfomationDO::getFactoryCode, DeviceApplyDetailRespVO::getFactoryCode)
|
||||
.selectAs(DeviceInfomationDO::getPosition, DeviceApplyDetailRespVO::getPosition)
|
||||
.eqIfPresent(DeviceApplyDetailDO::getApplyId, reqVO.getApplyId())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfomationId())
|
||||
.inIfPresent(DeviceApplyDetailDO::getDeviceInfomationId, reqVO.getDeviceInfoIdList())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getDeviceBorrowDetailId, reqVO.getDeviceBorrowDetailId())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getFormData, reqVO.getFormData())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(DeviceApplyDetailDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(DeviceApplyDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(DeviceApplyDetailDO::getId)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zt.plat.module.qms.resource.device.enums;
|
||||
|
||||
public enum DeviceBizEnum {
|
||||
|
||||
accept("Accept", "验收"),
|
||||
repair("Repair", "维修"),
|
||||
demote("Demote", "降级"),
|
||||
scrap("Scrap", "报废"),
|
||||
disable("Disable", "停用"),
|
||||
enable("Enable", "启用"),
|
||||
lend("Lend", "外借"),
|
||||
giveback("Giveback", "归还");
|
||||
|
||||
|
||||
private String code;
|
||||
private String describe;
|
||||
|
||||
|
||||
DeviceBizEnum(String code, String describe){
|
||||
this.code = code;
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
public static DeviceBizEnum getByCode(String code) {
|
||||
for (DeviceBizEnum c : DeviceBizEnum.values()) {
|
||||
if (c.getCode().equals(code)) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescribe(String code) {
|
||||
for (DeviceBizEnum c : DeviceBizEnum.values()) {
|
||||
if (c.getCode().equals(code)) {
|
||||
return c.describe;
|
||||
}
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
public static String getCode(String describe) {
|
||||
for (DeviceBizEnum c : DeviceBizEnum.values()) {
|
||||
if (c.getDescribe().equals(describe)) {
|
||||
return c.code;
|
||||
}
|
||||
}
|
||||
return describe;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDescribe() {
|
||||
return describe;
|
||||
}
|
||||
|
||||
public void setDescribe(String describe) {
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,8 +16,12 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
||||
*/
|
||||
public interface DeviceApplyDetailService {
|
||||
|
||||
List<DeviceApplyDetailRespVO> selectListWithDeviceInfo(DeviceApplyDetailPageReqVO reqVO);
|
||||
|
||||
List<DeviceApplyDetailDO> selectList(DeviceApplyDetailPageReqVO reqVO);
|
||||
|
||||
List<DeviceApplyDetailDO> selectListByApplyId(Long applyId);
|
||||
|
||||
void insertBatch(List<DeviceApplyDetailDO> list);
|
||||
|
||||
/**
|
||||
@@ -63,6 +67,6 @@ public interface DeviceApplyDetailService {
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 设备通用流程明细分页
|
||||
*/
|
||||
PageResult<DeviceApplyDetailDO> getDeviceApplyDetailPage(DeviceApplyDetailPageReqVO pageReqVO);
|
||||
PageResult<DeviceApplyDetailRespVO> getDeviceApplyDetailPage(DeviceApplyDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -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.DeviceApplyDetailPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailRespVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceApplyDetailSaveReqVO;
|
||||
@@ -38,6 +39,18 @@ public class DeviceApplyDetailServiceImpl implements DeviceApplyDetailService {
|
||||
return deviceApplyDetailMapper.selectList(reqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceApplyDetailRespVO> selectListWithDeviceInfo(DeviceApplyDetailPageReqVO reqVO) {
|
||||
return deviceApplyDetailMapper.selectListWithDeviceInfo(reqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceApplyDetailDO> selectListByApplyId(Long applyId) {
|
||||
LambdaQueryWrapper<DeviceApplyDetailDO> query = new LambdaQueryWrapper<>();
|
||||
query.eq(DeviceApplyDetailDO::getApplyId, applyId);
|
||||
return deviceApplyDetailMapper.selectList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertBatch(List<DeviceApplyDetailDO> list) {
|
||||
@@ -71,12 +84,12 @@ public class DeviceApplyDetailServiceImpl implements DeviceApplyDetailService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDeviceApplyDetailListByIds(List<Long> ids) {
|
||||
public void deleteDeviceApplyDetailListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateDeviceApplyDetailExists(ids);
|
||||
// 删除
|
||||
deviceApplyDetailMapper.deleteByIds(ids);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateDeviceApplyDetailExists(List<Long> ids) {
|
||||
List<DeviceApplyDetailDO> list = deviceApplyDetailMapper.selectByIds(ids);
|
||||
@@ -97,7 +110,7 @@ public class DeviceApplyDetailServiceImpl implements DeviceApplyDetailService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<DeviceApplyDetailDO> getDeviceApplyDetailPage(DeviceApplyDetailPageReqVO pageReqVO) {
|
||||
public PageResult<DeviceApplyDetailRespVO> getDeviceApplyDetailPage(DeviceApplyDetailPageReqVO pageReqVO) {
|
||||
return deviceApplyDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user