Commit 291282f2 by liyanlin

fix

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