Commit 1faf8aea authored by neo's avatar neo

[bugfix] set requre to false for some para in importFinancedata

parent 05e48990
......@@ -116,9 +116,9 @@ public class FinanceDataImportController {
@RequestMapping(value = "importData/importFinancedata", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity FinanceImportData(@RequestParam String importMethod, @RequestParam String fileName,
@RequestParam String importType, @RequestParam String fileGuid,
@RequestParam Integer period, @RequestParam String fileExtension,
@RequestParam String projectYear, MultipartHttpServletRequest request) {
@RequestParam String importType, @RequestParam(required = false) String fileGuid,
@RequestParam Integer period, @RequestParam(required = false) String fileExtension,
@RequestParam(required = false) String projectYear, MultipartHttpServletRequest request) {
String userId = identityService.getIdentityUser().getID();
if (StringUtils.isEmpty(importMethod)) {
return ResponseEntity.ok(new OperationResultDto(false, "importMethod is empty"));
......
......@@ -220,8 +220,8 @@ public class FinanceDataImportServiceImpl {
}
private String imageToBase64ByImagePath(String imagPath, String format) {
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
logger.debug("read image path is {}",imagPath);
BufferedImage bufferedImage = ImageIO.read(new File(imagPath));
ImageIO.write(bufferedImage, format, outputStream);
BASE64Encoder encoder = new BASE64Encoder();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment