fix:文件打标签重构
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.sdm.project.controller;
|
||||
|
||||
import com.sdm.common.annotation.AutoFillDictTags;
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.req.data.CreateDirReq;
|
||||
import com.sdm.common.entity.req.data.QueryDirReq;
|
||||
@@ -130,12 +131,14 @@ public class SimulationRunController implements ISimulationRunFeignClient {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoFillDictTags
|
||||
@SysLog("任务执行后 算例录入关键结果")
|
||||
@PostMapping(value = "/addSimulationKeyResult", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public SdmResponse addSimulationKeyResult(KeyResultReq req) {
|
||||
return runService.addSimulationKeyResult(req);
|
||||
}
|
||||
|
||||
@AutoFillDictTags
|
||||
@SysLog("编辑算例关键结果属性")
|
||||
@PostMapping(value = "/editSimulationKeyResult", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public SdmResponse editSimulationKeyResult(KeyResultReq req) {
|
||||
@@ -147,6 +150,7 @@ public class SimulationRunController implements ISimulationRunFeignClient {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoFillDictTags
|
||||
@SysLog("上传交付物-文件信息和关键结果信息批量入库")
|
||||
@PostMapping(value = "/batchAddSimulationKeyResult")
|
||||
public SdmResponse<List<BatchAddFileInfoResp>> batchAddSimulationKeyResult(@RequestBody KeyResultReq req) {
|
||||
@@ -180,6 +184,7 @@ public class SimulationRunController implements ISimulationRunFeignClient {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoFillDictTags
|
||||
@SysLog("算例关键结果查询")
|
||||
@PostMapping(value = "/listSimulationKeyResult")
|
||||
public SdmResponse<PageDataResp<List<SimulationRunKeyResult>>> listSimulationKeyResult(@RequestBody KeyResultReq req) {
|
||||
@@ -196,6 +201,7 @@ public class SimulationRunController implements ISimulationRunFeignClient {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoFillDictTags
|
||||
@PostMapping(value = "/queryKeyResultAndTaskInfo")
|
||||
public SdmResponse<PageDataResp<List<KeyResultAndTaskInfoResp>>> queryKeyResultAndTaskInfo(@RequestBody KeyResultReq req) {
|
||||
return runService.queryKeyResultAndTaskInfo(req);
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.sdm.common.entity.enums.NodeTypeEnum;
|
||||
import com.sdm.common.entity.req.data.GetSimulationTaskFileReq;
|
||||
import com.sdm.common.entity.req.data.UploadFilesReq;
|
||||
|
||||
import com.sdm.common.entity.req.system.DictTagReq;
|
||||
import com.sdm.common.entity.req.system.UserQueryReq;
|
||||
import com.sdm.common.entity.resp.PageDataResp;
|
||||
import com.sdm.common.entity.resp.data.FileMetadataInfoResp;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.sdm.project.model.req;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.sdm.common.entity.BaseReq;
|
||||
import com.sdm.common.entity.enums.FileBizTypeEnum;
|
||||
import com.sdm.common.entity.req.system.DictTagReq;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class KeyResultReq extends BaseReq {
|
||||
@@ -69,6 +72,36 @@ public class KeyResultReq extends BaseReq {
|
||||
@Schema(description = "文件类型",implementation = FileBizTypeEnum.class)
|
||||
private Integer fileType;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// 很重要,用于设置标签,通过autoFillDictTags切面 ,设置dictTagIdsCache
|
||||
/**
|
||||
* 字典标签查询结果缓存
|
||||
* key: dictClass(字典类)
|
||||
* value: Map<dictValue, dictId>(字典值 -> 字典ID)
|
||||
* 此字段由服务层填充,前端不需传入
|
||||
*/
|
||||
@Schema(description = "字典标签查询结果缓存", hidden = true)
|
||||
@JSONField(serialize = false)
|
||||
private Map<String, Map<String, Integer>> dictTagIdsCache;
|
||||
|
||||
@Schema(description = "字典标签查询列表,格式:['fileTypeDictClass','fileTypeDictValue','disciplineTypeDictClass','disciplineDictValue']")
|
||||
private List<String> dictTags;
|
||||
|
||||
@Schema(description = "文件类型字典类")
|
||||
private String fileTypeDictClass;
|
||||
@Schema(description = "文件类型字典值")
|
||||
private String fileTypeDictValue;
|
||||
|
||||
@Schema(description = "学科类型字典类")
|
||||
private String disciplineTypeDictClass;
|
||||
|
||||
@Schema(description = "学科类型字典值")
|
||||
private String disciplineDictValue;
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
|
||||
@Schema(description = "文件")
|
||||
private MultipartFile file;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user