|
|
@@ -7,19 +7,16 @@ import com.ydtech.modules.esm.service.InsTaskImageService;
|
|
|
import com.ydtech.modules.ins.service.impl.YongAnServiceImpl;
|
|
|
import com.ydtech.modules.order.convert.InsTaskImageConvert;
|
|
|
import com.ydtech.modules.order.entity.vo.InsTaskImageVo;
|
|
|
+import com.ydtech.modules.order.service.OrderTaskImageService;
|
|
|
import com.ydtech.utils.ImageCompressionUtils;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import com.ydtech.utils.idgen.IdGenerate;
|
|
|
+import com.ydtech.validation.annotation.CheckObjectNotNull;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import org.springframework.util.ObjectUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import javax.imageio.ImageIO;
|
|
|
-import javax.validation.constraints.NotEmpty;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
-import java.awt.image.BufferedImage;
|
|
|
import java.io.IOException;
|
|
|
import java.util.Base64;
|
|
|
import java.util.Date;
|
|
|
@@ -30,6 +27,9 @@ import java.util.List;
|
|
|
@RestController
|
|
|
public class OrderTaskImageController {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private OrderTaskImageService orderTaskImageService;
|
|
|
+
|
|
|
private final InsTaskImageService insTaskImageService;
|
|
|
|
|
|
public OrderTaskImageController(InsTaskImageService insTaskImageService) {
|
|
|
@@ -97,5 +97,11 @@ public class OrderTaskImageController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/uploadFile")
|
|
|
+ @ApiOperation(value = "文件上传")
|
|
|
+ public HttpResult uploadFile(@CheckObjectNotNull(message = "上传文件不能为空") MultipartFile file, String type) throws IOException {
|
|
|
+ return orderTaskImageService.uploadFile(file, type);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|