|
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.museums.controller.admin.specimeninfo;
|
|
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
|
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
|
import cn.iocoder.yudao.module.museums.enums.common.*;
|
|
import cn.iocoder.yudao.module.museums.enums.common.*;
|
|
import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO;
|
|
import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogPageReqVO;
|
|
|
|
+import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogReqVO;
|
|
import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO;
|
|
import cn.iocoder.yudao.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO;
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO;
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.logger.OperateLogDO;
|
|
import cn.iocoder.yudao.module.system.service.logger.OperateLogService;
|
|
import cn.iocoder.yudao.module.system.service.logger.OperateLogService;
|
|
@@ -175,6 +176,12 @@ public class SpecimenInfoController {
|
|
@RequestParam(value = "imageFile", required = false) MultipartFile imageFile,
|
|
@RequestParam(value = "imageFile", required = false) MultipartFile imageFile,
|
|
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
|
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
|
|
|
|
|
|
|
+ // 验证输入条件
|
|
|
|
+ //必须同时上传Excel文件和压缩包文件,或者只上传Excel文件。
|
|
|
|
+ if (imageFile != null && !imageFile.isEmpty() && (file == null || file.isEmpty())) {
|
|
|
|
+ throw exception(MUST_UPLOADED_EXCEL_AND_IMAGE);
|
|
|
|
+ }
|
|
|
|
+
|
|
SpecimenImportRespVO importResult = null;
|
|
SpecimenImportRespVO importResult = null;
|
|
|
|
|
|
// 处理 Excel 文件中的标本数据(如果存在)
|
|
// 处理 Excel 文件中的标本数据(如果存在)
|
|
@@ -190,10 +197,12 @@ public class SpecimenInfoController {
|
|
throw exception(INVALID_IMAGE_FORMAT);
|
|
throw exception(INVALID_IMAGE_FORMAT);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
System.gc();
|
|
System.gc();
|
|
return success(importResult);
|
|
return success(importResult);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
//工作台
|
|
//工作台
|
|
@GetMapping("/statistics/entry/{year}")
|
|
@GetMapping("/statistics/entry/{year}")
|
|
@Operation(summary = "统计本年标本每月入库数量")
|
|
@Operation(summary = "统计本年标本每月入库数量")
|
|
@@ -232,6 +241,20 @@ public class SpecimenInfoController {
|
|
return CommonResult.success(yearlySourceStatistics);
|
|
return CommonResult.success(yearlySourceStatistics);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// @GetMapping("/logs")
|
|
|
|
+// @Operation(summary = "获得标本相关的系统日志")
|
|
|
|
+// @Parameter(name = "specimenId", description = "标本编号", required = true, example = "1024")
|
|
|
|
+// @Parameter(name = "moduleType", description = "操作模块类型", required = true, example = "MUSEUMS 标本")
|
|
|
|
+// public CommonResult<List<OperateLogRespVO>> getSpecimenLogs(
|
|
|
|
+// @RequestParam("specimenId") List<String> extra,
|
|
|
|
+// @RequestParam("moduleType") String type) {
|
|
|
|
+// OperateLogPageReqVO pageReqDTO=new OperateLogPageReqVO();
|
|
|
|
+// pageReqDTO.setType(type);
|
|
|
|
+// pageReqDTO.setExtra(extra);
|
|
|
|
+// List<OperateLogDO> logs = operateLogService.getLogsBySpecimenIdAndType(pageReqDTO);
|
|
|
|
+// return success(BeanUtils.toBean(logs, OperateLogRespVO.class));
|
|
|
|
+// }
|
|
|
|
+
|
|
@GetMapping("/logs")
|
|
@GetMapping("/logs")
|
|
@Operation(summary = "获得标本相关的系统日志")
|
|
@Operation(summary = "获得标本相关的系统日志")
|
|
@Parameter(name = "specimenId", description = "标本编号", required = true, example = "1024")
|
|
@Parameter(name = "specimenId", description = "标本编号", required = true, example = "1024")
|
|
@@ -239,10 +262,11 @@ public class SpecimenInfoController {
|
|
public CommonResult<List<OperateLogRespVO>> getSpecimenLogs(
|
|
public CommonResult<List<OperateLogRespVO>> getSpecimenLogs(
|
|
@RequestParam("specimenId") List<String> extra,
|
|
@RequestParam("specimenId") List<String> extra,
|
|
@RequestParam("moduleType") String type) {
|
|
@RequestParam("moduleType") String type) {
|
|
- OperateLogPageReqVO pageReqDTO=new OperateLogPageReqVO();
|
|
|
|
- pageReqDTO.setType(type);
|
|
|
|
- pageReqDTO.setExtra(extra);
|
|
|
|
- List<OperateLogDO> logs = operateLogService.getLogsBySpecimenIdAndType(pageReqDTO);
|
|
|
|
|
|
+ OperateLogReqVO reqVO = new OperateLogReqVO();
|
|
|
|
+ reqVO.setType(type);
|
|
|
|
+ reqVO.setExtra(extra);
|
|
|
|
+ List<OperateLogDO> logs = operateLogService.getLogsBySpecimenIdAndType(reqVO);
|
|
|
|
+ // 返回结果
|
|
return success(BeanUtils.toBean(logs, OperateLogRespVO.class));
|
|
return success(BeanUtils.toBean(logs, OperateLogRespVO.class));
|
|
}
|
|
}
|
|
}
|
|
}
|