Commit 71347dea authored by TIANZHI.HU's avatar TIANZHI.HU

对账单打印更新 add by 39135 HuTianzhi

parent fafc3ad0
......@@ -14,8 +14,10 @@ import java.io.*;
import java.math.BigDecimal;
import java.net.URL;
import java.net.URLEncoder;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import javax.imageio.ImageIO;
......@@ -332,10 +334,15 @@ public class ConExportServiceImpl implements ConExportService {
if(x.compareTo((BigDecimal) map1.get("CF_ITEM")) ==0){
cell.setCellValue("");
}else {
DataFormat df = wb.createDataFormat(); // 此处设置数据格式
contentTable.setDataFormat(df.getFormat("#,##0.00"));//保留两位小数点
cell.setCellStyle(contentTable);
cell.setCellValue(new DecimalFormat().parse(map1.get("UNRECEIVED_AMOUNT").toString()).doubleValue());// 未收金额
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
Date dueDate = dft.parse((String) map1.get("DUE_DATE"));
Date now = new Date();
if(now.after(dueDate)){
DataFormat df = wb.createDataFormat(); // 此处设置数据格式
contentTable.setDataFormat(df.getFormat("#,##0.00"));//保留两位小数点
cell.setCellStyle(contentTable);
cell.setCellValue(new DecimalFormat().parse(map1.get("UNRECEIVED_AMOUNT").toString()).doubleValue());// 未收金额
}
}
} else {
cell.setCellValue(""); // 未收金额
......
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