Commit 2005018a authored by zp's avatar zp

导入ç¦净值

parent 935354ca
...@@ -170,7 +170,7 @@ public interface ProductApi { ...@@ -170,7 +170,7 @@ public interface ProductApi {
@ApiOperation("理财师净值导入") @ApiOperation("理财师净值导入")
@GetMapping("/ifa/net/import") @GetMapping("/ifa/net/import")
CommonResp<List<FundNavMessage>> importNetInfo(@RequestParam("file") MultipartFile file, CommonResp<List<FundNavMessage>> importNetInfo(@RequestParam("file") MultipartFile file,
@RequestParam("fundId") @Valid @NotEmpty(message = "请先确定需要导入的基金") String fundId); @RequestParam(value = "fundId", required = false) String fundId);
@ApiOperation("理财师净值导入") @ApiOperation("理财师净值导入")
@PostMapping("/ifa/net/import/check/save") @PostMapping("/ifa/net/import/check/save")
......
...@@ -1676,7 +1676,13 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1676,7 +1676,13 @@ public class ProductServiceImpl implements ProductService, Constant {
@Override @Override
public CommonResp<List<FundNavMessage>> importNetCheckSave(IfaNetImportReq req) { public CommonResp<List<FundNavMessage>> importNetCheckSave(IfaNetImportReq req) {
Map<Long, IfaImportedFundNav> ifaNavMap = getIfaNavMap(req.getFundId()); Map<Long, IfaImportedFundNav> ifaNavMap;
if (StringUtils.isEmpty(req.getFundId())) {
ifaNavMap = new HashMap<>(0);
} else {
ifaNavMap = getIfaNavMap(req.getFundId());
}
List<FundNavMessage> resultMessage = new ArrayList<>(req.getFundNavMessages().size() * 2); List<FundNavMessage> resultMessage = new ArrayList<>(req.getFundNavMessages().size() * 2);
AtomicBoolean errorStatus = new AtomicBoolean(false); AtomicBoolean errorStatus = new AtomicBoolean(false);
...@@ -1938,7 +1944,12 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1938,7 +1944,12 @@ public class ProductServiceImpl implements ProductService, Constant {
return CommonResp.error("获取不到基金信息"); return CommonResp.error("获取不到基金信息");
} }
Map<Long, IfaImportedFundNav> ifaNavMap = getIfaNavMap(fundId); Map<Long, IfaImportedFundNav> ifaNavMap;
if (StringUtils.isEmpty(fundId)) {
ifaNavMap = new HashMap<>(0);
} else {
ifaNavMap = getIfaNavMap(fundId);
}
try (InputStream inputStream = file.getInputStream()) { try (InputStream inputStream = file.getInputStream()) {
ExcelReader reader = ExcelUtil.getReader(inputStream); ExcelReader reader = ExcelUtil.getReader(inputStream);
......
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