1.技术监督附件上传调整
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user