|
@ -15,6 +15,7 @@ import com.yihu.jw.entity.hospital.DmHospitalDO;
|
|
import com.yihu.jw.hospital.HospitalDao;
|
|
import com.yihu.jw.hospital.HospitalDao;
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
|
import com.yihu.jw.restmodel.web.PageEnvelop;
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
@ -31,6 +32,7 @@ import java.awt.print.Pageable;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.io.OutputStream;
|
|
import java.io.OutputStream;
|
|
import java.lang.Boolean;
|
|
import java.lang.Boolean;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.logging.Logger;
|
|
import java.util.logging.Logger;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@ -1502,107 +1504,145 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
public MixEnvelop getSumAmountExcel(String belongCommunity, String equNum, String startTime, String endTime,int page,int size) {
|
|
|
|
|
|
// public MixEnvelop getSumAmountExcel(String belongCommunity, String equNum, String startTime, String endTime,int page,int size) {
|
|
|
|
// List<Map<String,Object>> mapList=new ArrayList<>();
|
|
|
|
// Map<String,Object> countMap = new HashMap<>();
|
|
|
|
// //第几页
|
|
|
|
// countMap.put("page",page);
|
|
|
|
// //多少条
|
|
|
|
// countMap.put("size",size);
|
|
|
|
// page = (page - 1) * size;
|
|
|
|
// //查询出所有的设备
|
|
|
|
// Iterable <Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page,size);
|
|
|
|
// List<Mediicinedevice> mediicinedeviceList= IterableUtils.toList(mediicinedevices);
|
|
|
|
// String countSql = " select " +
|
|
|
|
// " COUNT(DISTINCT (t.id)) as count " +
|
|
|
|
// " from " +
|
|
|
|
// " t_mediicine_device as t " +
|
|
|
|
// " where " +
|
|
|
|
// " 1=1 " ;
|
|
|
|
// Logger.getAnonymousLogger().info("finalCountSql="+countSql);
|
|
|
|
// int decCount = jdbcTemplate.queryForObject(countSql,Integer.class);
|
|
|
|
// //总页数
|
|
|
|
// int total=decCount/size+(decCount%size>0?1:0);
|
|
|
|
// countMap.put("total",total);
|
|
|
|
// //总条数
|
|
|
|
// countMap.put("count",decCount);
|
|
|
|
// mapList.add(countMap);
|
|
|
|
//
|
|
|
|
// //将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回
|
|
|
|
// for (Mediicinedevice mediicinedevice:mediicinedeviceList){
|
|
|
|
// Map<String,Object> map=new HashMap<>();
|
|
|
|
// map.put("community",mediicinedevice.getCommunity());
|
|
|
|
// map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName()));
|
|
|
|
// String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" +
|
|
|
|
// " COUNT(*) AS count,\n" +
|
|
|
|
// " t.shipping_equ AS equNum\n" +
|
|
|
|
// " FROM t_mediicine_order t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum()+"'";
|
|
|
|
// String conditionSql="";
|
|
|
|
// if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){
|
|
|
|
// conditionSql += "AND t.belong_community ='"+belongCommunity+"'";
|
|
|
|
// }
|
|
|
|
// if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){
|
|
|
|
// conditionSql += "AND t.shipping_equ = '" + equNum + "'";
|
|
|
|
// }
|
|
|
|
// if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
|
|
// conditionSql += "AND t.shipping_time >= "+ startTime ;
|
|
|
|
// }
|
|
|
|
// if (org.apache.commons.lang3.StringUtils.isNoneBlank(endTime)){
|
|
|
|
// conditionSql += "AND t.shipping_time <= "+ endTime ;
|
|
|
|
// }
|
|
|
|
// oneSql=oneSql+conditionSql;
|
|
|
|
// List<Map<String,Object>> list = hibenateUtils.createSQLQuery(oneSql);
|
|
|
|
// for (Map<String,Object> oneMap:list){
|
|
|
|
// String count = oneMap.get("count")==null?"0":oneMap.get("count").toString();
|
|
|
|
// String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString();
|
|
|
|
// map.put("ordercount",count);
|
|
|
|
// map.put("sumAmount",sumAmount);
|
|
|
|
// }
|
|
|
|
// mapList.add(map);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList);
|
|
|
|
// }
|
|
|
|
|
|
|
|
public MixEnvelop getSumAmount(String belongCommunity, String equNum, String startTime, String endTime, int page, int size) {
|
|
List<Map<String,Object>> mapList=new ArrayList<>();
|
|
List<Map<String,Object>> mapList=new ArrayList<>();
|
|
Map<String,Object> countMap = new HashMap<>();
|
|
|
|
//第几页
|
|
|
|
countMap.put("page",page);
|
|
|
|
//多少条
|
|
|
|
countMap.put("size",size);
|
|
|
|
page = (page - 1) * size;
|
|
|
|
//查询出所有的设备
|
|
//查询出所有的设备
|
|
Iterable <Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page,size);
|
|
|
|
List<Mediicinedevice> mediicinedeviceList= IterableUtils.toList(mediicinedevices);
|
|
|
|
String countSql = " select " +
|
|
|
|
" COUNT(DISTINCT (t.id)) as count " +
|
|
|
|
" from " +
|
|
|
|
" t_mediicine_device as t " +
|
|
|
|
" where " +
|
|
|
|
" 1=1 " ;
|
|
|
|
Logger.getAnonymousLogger().info("finalCountSql="+countSql);
|
|
|
|
int decCount = jdbcTemplate.queryForObject(countSql,Integer.class);
|
|
|
|
//总页数
|
|
|
|
int total=decCount/size+(decCount%size>0?1:0);
|
|
|
|
countMap.put("total",total);
|
|
|
|
//总条数
|
|
|
|
countMap.put("count",decCount);
|
|
|
|
mapList.add(countMap);
|
|
|
|
|
|
|
|
//将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回
|
|
|
|
for (Mediicinedevice mediicinedevice:mediicinedeviceList){
|
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
|
map.put("community",mediicinedevice.getCommunity());
|
|
|
|
map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName()));
|
|
|
|
String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" +
|
|
|
|
" COUNT(*) AS count,\n" +
|
|
|
|
" t.shipping_equ AS equNum\n" +
|
|
|
|
" FROM t_mediicine_order t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum()+"'";
|
|
|
|
String conditionSql="";
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){
|
|
|
|
conditionSql += "AND t.belong_community ='"+belongCommunity+"'";
|
|
|
|
}
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){
|
|
|
|
conditionSql += "AND t.shipping_equ = '" + equNum + "'";
|
|
|
|
}
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
|
|
conditionSql += "AND t.shipping_time >= "+ startTime ;
|
|
|
|
}
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(endTime)){
|
|
|
|
conditionSql += "AND t.shipping_time <= "+ endTime ;
|
|
|
|
}
|
|
|
|
oneSql=oneSql+conditionSql;
|
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(oneSql);
|
|
|
|
for (Map<String,Object> oneMap:list){
|
|
|
|
String count = oneMap.get("count")==null?"0":oneMap.get("count").toString();
|
|
|
|
String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString();
|
|
|
|
map.put("ordercount",count);
|
|
|
|
map.put("sumAmount",sumAmount);
|
|
|
|
|
|
if (!org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)&&!org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)
|
|
|
|
&&!org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)&&!org.apache.commons.lang3.StringUtils.isNoneBlank(endTime)) {
|
|
|
|
page=(page-1)*size;
|
|
|
|
Iterable<Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page, size);
|
|
|
|
for (Mediicinedevice mediicinedevice : mediicinedevices) {
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
map.put("community", mediicinedevice.getCommunity());
|
|
|
|
map.put("equName", mediicinedevice.getEquNum() + (mediicinedevice.getEquName() == null ? "" : "/" + mediicinedevice.getEquName()));
|
|
|
|
String oneSql = "SELECT SUM(t.amount) AS sumAmount,\n" +
|
|
|
|
" COUNT(*) AS count,\n" +
|
|
|
|
" t.shipping_equ AS equNum\n" +
|
|
|
|
" FROM t_mediicine_order t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum() + "'";
|
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(oneSql);
|
|
|
|
for (Map<String,Object> oneMap:list){
|
|
|
|
String count = oneMap.get("count")==null?"0":oneMap.get("count").toString();
|
|
|
|
String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString();
|
|
|
|
float price = Float.parseFloat(sumAmount);
|
|
|
|
BigDecimal b = new BigDecimal(price);
|
|
|
|
float m_price = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
|
|
|
|
map.put("ordercount",count);
|
|
|
|
map.put("sumAmount",m_price);
|
|
|
|
}
|
|
|
|
mapList.add(map);
|
|
}
|
|
}
|
|
mapList.add(map);
|
|
|
|
|
|
String countSql = " select " +
|
|
|
|
" COUNT(DISTINCT (t.id)) as count " +
|
|
|
|
" from " +
|
|
|
|
" t_mediicine_device as t " +
|
|
|
|
" where " +
|
|
|
|
" 1=1 " ;
|
|
|
|
Logger.getAnonymousLogger().info("finalCountSql="+countSql);
|
|
|
|
int decCount = jdbcTemplate.queryForObject(countSql,Integer.class);
|
|
|
|
//总页数
|
|
|
|
int total=decCount/size+(decCount%size>0?1:0);
|
|
|
|
MixEnvelop mixEnvelop = MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList);
|
|
|
|
mixEnvelop.setTotalCount(decCount);
|
|
|
|
mixEnvelop.setTotalPage(total);
|
|
|
|
return mixEnvelop;
|
|
}
|
|
}
|
|
return MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList);
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Map<String,Object>> getSumAmount(String belongCommunity, String equNum, String startTime, String endTime,int page,int size) {
|
|
|
|
List<Map<String,Object>> mapList=new ArrayList<>();
|
|
|
|
Map<String,Object> countMap = new HashMap<>();
|
|
|
|
//第几页
|
|
|
|
countMap.put("page",page);
|
|
|
|
//多少条
|
|
|
|
countMap.put("size",size);
|
|
|
|
page = (page - 1) * size;
|
|
|
|
//查询出所有的设备
|
|
|
|
Iterable <Mediicinedevice> mediicinedevices = deviceDao.findDeviceAll(page,size);
|
|
|
|
List<Mediicinedevice> mediicinedeviceList= IterableUtils.toList(mediicinedevices);
|
|
|
|
String countSql = " select " +
|
|
|
|
" COUNT(DISTINCT (t.id)) as count " +
|
|
|
|
" from " +
|
|
|
|
" t_mediicine_device as t " +
|
|
|
|
" where " +
|
|
|
|
" 1=1 " ;
|
|
|
|
Logger.getAnonymousLogger().info("finalCountSql="+countSql);
|
|
|
|
int decCount = jdbcTemplate.queryForObject(countSql,Integer.class);
|
|
|
|
//总页数
|
|
|
|
int total=decCount/size+(decCount%size>0?1:0);
|
|
|
|
countMap.put("total",total);
|
|
|
|
countMap.put("count",decCount);
|
|
|
|
mapList.add(countMap);
|
|
|
|
|
|
|
|
//将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回
|
|
//将同一个设备的社区/名称/设备编码/历史记录/总金额放到一个Map中,并将这些Map放到同一个list中返回
|
|
for (Mediicinedevice mediicinedevice:mediicinedeviceList){
|
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
Map<String,Object> map=new HashMap<>();
|
|
map.put("community",mediicinedevice.getCommunity());
|
|
|
|
map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName()));
|
|
|
|
String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" +
|
|
String oneSql="SELECT SUM(t.amount) AS sumAmount,\n" +
|
|
" COUNT(*) AS count,\n" +
|
|
" COUNT(*) AS count,\n" +
|
|
" t.shipping_equ AS equNum\n" +
|
|
" t.shipping_equ AS equNum\n" +
|
|
" FROM t_mediicine_order t WHERE t.sell_state = 1 AND t.shipping_equ = '" + mediicinedevice.getEquNum()+"'";
|
|
|
|
|
|
" FROM t_mediicine_order t WHERE t.sell_state = 1 ";
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(belongCommunity)){
|
|
oneSql += "AND t.belong_community ='"+belongCommunity+"'";
|
|
|
|
}
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){
|
|
|
|
oneSql += "AND t.shipping_equ = '" + equNum + "'";
|
|
|
|
|
|
oneSql += "AND t.belong_community = '"+belongCommunity+"' ";
|
|
|
|
if (!org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){
|
|
|
|
Mediicinedevice device=deviceDao.findByBelongCommunity(belongCommunity);
|
|
|
|
map.put("community",device.getCommunity());
|
|
|
|
}else {
|
|
|
|
oneSql += "AND t.shipping_equ = '" + equNum + "'";
|
|
|
|
Mediicinedevice device=deviceDao.findByBelongCommunityAndEquNum(belongCommunity,equNum);
|
|
|
|
map.put("community",device.getCommunity());
|
|
|
|
map.put("equName",device.getEquNum()+(device.getEquName()==null?"":"/"+device.getEquName()));
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
if (!org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){
|
|
|
|
// Mediicinedevice device=deviceDao.findByBelongCommunity(belongCommunity);
|
|
|
|
// map.put("community",device.getCommunity());
|
|
|
|
}else {
|
|
|
|
oneSql += "AND t.shipping_equ = '" + equNum + "'";
|
|
|
|
Mediicinedevice device=deviceDao.findMediicinedeviceByEquNum(equNum);
|
|
|
|
map.put("community",device.getCommunity());
|
|
|
|
map.put("equName",device.getEquNum()+(device.getEquName()==null?"":"/"+device.getEquName()));
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
// if (org.apache.commons.lang3.StringUtils.isNoneBlank(equNum)){
|
|
|
|
// oneSql += "AND t.shipping_equ = '" + equNum + "'";
|
|
|
|
// Mediicinedevice daoByEquNum=deviceDao.findMediicinedeviceByEquNum(equNum);
|
|
|
|
// map.put("equName",daoByEquNum.getEquNum()+(daoByEquNum.getEquName()==null?"":"/"+daoByEquNum.getEquName()));
|
|
|
|
// }else {
|
|
|
|
// map.put("equName",mediicinedevice.getEquNum()+(mediicinedevice.getEquName()==null?"":"/"+mediicinedevice.getEquName()));
|
|
|
|
// }
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
oneSql += "AND t.shipping_time >= "+ startTime ;
|
|
oneSql += "AND t.shipping_time >= "+ startTime ;
|
|
}
|
|
}
|
|
@ -1613,12 +1653,17 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
for (Map<String,Object> oneMap:list){
|
|
for (Map<String,Object> oneMap:list){
|
|
String count = oneMap.get("count")==null?"0":oneMap.get("count").toString();
|
|
String count = oneMap.get("count")==null?"0":oneMap.get("count").toString();
|
|
String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString();
|
|
String sumAmount=oneMap.get("sumAmount")==null?"0":oneMap.get("sumAmount").toString();
|
|
|
|
float price = Float.parseFloat(sumAmount);
|
|
|
|
BigDecimal b = new BigDecimal(price);
|
|
|
|
float m_price = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
|
|
map.put("ordercount",count);
|
|
map.put("ordercount",count);
|
|
map.put("sumAmount",sumAmount);
|
|
|
|
|
|
map.put("sumAmount",m_price);
|
|
}
|
|
}
|
|
mapList.add(map);
|
|
mapList.add(map);
|
|
}
|
|
|
|
return mapList;
|
|
|
|
|
|
MixEnvelop mixEnvelop = MixEnvelop.getSuccessListWithPage2(BaseHospitalRequestMapping.Prescription.api_success,mapList);
|
|
|
|
mixEnvelop.setTotalPage(mapList.size()/size+(mapList.size()%size==0?0:1));
|
|
|
|
mixEnvelop.setTotalCount(mapList.size());
|
|
|
|
return mixEnvelop;
|
|
}
|
|
}
|
|
|
|
|
|
public void pushListWrite(OutputStream os, List<Map<String, Object>> list)throws Exception {
|
|
public void pushListWrite(OutputStream os, List<Map<String, Object>> list)throws Exception {
|
|
@ -1669,10 +1714,10 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
"WHERE " +
|
|
"WHERE " +
|
|
"t.shipping_equ='"+deviceId+"'";
|
|
"t.shipping_equ='"+deviceId+"'";
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(prescribeNum)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(prescribeNum)){
|
|
sql += " AND t.prescribe_num='"+prescribeNum+"'";
|
|
|
|
|
|
sql += " AND t.prescribe_num like '%"+prescribeNum+"%'";
|
|
}
|
|
}
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(amount)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(amount)){
|
|
sql += " AND t.amount='"+amount+"'";
|
|
|
|
|
|
sql += " AND t.amount like '%"+amount+"%'";
|
|
}
|
|
}
|
|
if(org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
if(org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
sql += " AND t.prescribe_time>='"+startTime+"'";
|
|
sql += " AND t.prescribe_time>='"+startTime+"'";
|
|
@ -1695,10 +1740,10 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
"WHERE " +
|
|
"WHERE " +
|
|
"t.shipping_equ='"+deviceId+"'";
|
|
"t.shipping_equ='"+deviceId+"'";
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(prescribeNum)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(prescribeNum)){
|
|
sql += " AND t.prescribe_num='"+prescribeNum+"'";
|
|
|
|
|
|
sql += " AND t.prescribe_num like '%"+prescribeNum+"%'";
|
|
}
|
|
}
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(amount)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(amount)){
|
|
sql += " AND t.amount='"+amount+"'";
|
|
|
|
|
|
sql += " AND t.amount like '%"+amount+"%'";
|
|
}
|
|
}
|
|
if(org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
if(org.apache.commons.lang3.StringUtils.isNoneBlank(startTime)){
|
|
sql += " AND t.prescribe_time>='"+startTime+"'";
|
|
sql += " AND t.prescribe_time>='"+startTime+"'";
|
|
@ -1748,6 +1793,13 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
"a.equ_num=t.shipping_equ " +
|
|
"a.equ_num=t.shipping_equ " +
|
|
"and t.sell_state='1' ";
|
|
"and t.sell_state='1' ";
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
|
|
|
|
for (Map<String,Object> map:list){
|
|
|
|
String sumAmount=map.get("sumAmount")==null?"0":map.get("sumAmount").toString();
|
|
|
|
float price = Float.parseFloat(sumAmount);
|
|
|
|
BigDecimal b = new BigDecimal(price);
|
|
|
|
float m_price = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
|
|
|
|
map.put("sumAmount",m_price);
|
|
|
|
}
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
}
|
|
}
|