Commit 291282f2 by liyanlin

fix

parent 8e6df1b0
...@@ -76,17 +76,19 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail ...@@ -76,17 +76,19 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
} }
BeanUtils.copyProperties(req, costDetailDomain); BeanUtils.copyProperties(req, costDetailDomain);
if (req.getFileSelect2() != null) { if(req.getFilePath() == null || req.getFilePath().isEmpty()) {
// 文件上传的路径 if (req.getFileSelect2() != null) {
//String filePath = PathUtil.getBasePath() + PathUtil.getPath("cost/" + costDetailDomain.getDetailNo() + "/"); // 文件上传的路径
// 调用工具类执行保存,并返回 path //String filePath = PathUtil.getBasePath() + PathUtil.getPath("cost/" + costDetailDomain.getDetailNo() + "/");
String path = null; // 调用工具类执行保存,并返回 path
try { String path = null;
path = CostFileUtil.qiniuUpload(req.getFileSelect2()); try {
} catch (IOException e) { path = CostFileUtil.qiniuUpload(req.getFileSelect2());
throw new BizException("上传文件失败"); } catch (IOException e) {
throw new BizException("上传文件失败");
}
costDetailDomain.setFilePath(path);
} }
costDetailDomain.setFilePath(path);
} }
if (StringUtils.isNotEmpty(req.getTypeNo())) { if (StringUtils.isNotEmpty(req.getTypeNo())) {
......
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