1.技术监督附件上传调整

This commit is contained in:
wr
2023-09-15 15:00:44 +08:00
parent 4e76669d4e
commit a169e7db19
8 changed files with 74 additions and 27 deletions

View File

@@ -1,11 +1,13 @@
package com.njcn.process.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.process.pojo.param.SupvAlarmParam;
@@ -18,6 +20,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.njcn.web.controller.BaseController;
@@ -49,11 +52,16 @@ public class SupvFileController extends BaseController {
public HttpResult<Object> planUpload(@ApiParam(value = "文件", required = true) @RequestPart("files") MultipartFile file,
@RequestParam("planId") String planId,
@RequestParam("type") Integer type,
@RequestParam("uploaderId") String uploaderId,
@RequestParam("uploaderName") String uploaderName,
@RequestParam("attachmentType")String attachmentType,
@RequestParam("uploadTime")String uploadTime
){
String methodDescribe = getMethodDescribe("planUpload");
iSupvFileService.planUpload(file,planId,type,attachmentType,uploadTime);
if(!StrUtil.isAllNotBlank(planId,uploaderId,uploaderName,attachmentType,uploadTime)||type==null){
throw new BusinessException("必填字段不能为空");
}
iSupvFileService.planUpload(file,planId,type,uploaderId,uploaderName,attachmentType,uploadTime);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}