Browse Source

修改导出报告word并下载 接口

tags/v1.1.0
wanghaoran 2 years ago
parent
commit
45f324c87f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java

+ 3
- 2
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java View File

@@ -44,6 +44,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
@@ -280,8 +281,8 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp
} else {
if(StringUtils.isNotEmpty(reportInfoVO.getMission().getMileage())){
try{
int temp = Integer.parseInt(reportInfoVO.getMission().getMileage()) / 1000;
str = temp+"公里";
BigDecimal mileageBd = new BigDecimal(reportInfoVO.getMission().getMileage()).divide(new BigDecimal(1000));
str = mileageBd + "公里";
}catch (Exception e){
log.info("转换里程出错:{}",e.getMessage());
str="";

Loading…
Cancel
Save