这种情况下要怎么将数据返回给askbillBodyDataTable
protected void assembleDatatable() {
askbillHeadDataTable.set(askbillhead1);
askbillHeadDataTable.setSelect(new Integer[]{0});
askbillBodyDataTable.set(askbillbodys1);
askbillBodyDataTable.setTotalPages(1);//songpeng 增加物料规格和型号(根据物料id--product_id查询);产品描述(product_desc)、表体备注(bmemo);
askbillBodyDataTable.setPageIndex(0);
askbillBodyDataTable.setPageSize(1);
priceDataTable.set(compareInfos1);//承兑价,现金价,报价说明,交货期
priceDataTable.setTotalPages(1);
priceDataTable.setPageIndex(0);
priceDataTable.setPageSize(1);
if (talksDataTable != null && quotationOffers1 != null) {
talksDataTable.set(quotationOffers1.toArray(new QuotationOffer[0]));
talksDataTable.setSelect(new Integer[]{0});
}
//上期成交价(含税)
//askbillBodyDataTable-rows-data-extFields-historySupplyPrice- LASTPRICE
Row[] rows = askbillBodyDataTable.getRows();
for (Row str : rows) {
Map < String, Field > data = str.getFields();
Field extFields = data.get("extFields");
HashMap value = (HashMap) extFields.getValue();
HashMap historySupplyPrice = (HashMap) value.get("historySupplyPrice");
Double lastprice1 = (java.lang.Double) historySupplyPrice.get("LASTPRICE");
double d = lastprice1;
int d2 = (int) d;
String s1 = String.valueOf(d);
if (s1.contains(".") && d2 != d) {
int i = s1.indexOf(".");
for (int j = i; j < s1.length() - 1; j++) {
int lastIndex = s1.charAt(s1.length() - 1);
int io = s1.lastIndexOf("0");
if (lastIndex == io) {
s1 = s1.substring(0, s1.length() - 1);
}
}
} else {
s1 += "0";
}
logger.info("s1:" + s1);
}