|
@ -121,6 +121,7 @@ import com.ylzinfo.ehc.trans.TransResponse;
|
|
|
import com.zaxxer.hikari.HikariDataSource;
|
|
|
import com.zaxxer.hikari.HikariPoolMXBean;
|
|
|
import jxl.format.*;
|
|
|
import jxl.format.VerticalAlignment;
|
|
|
import jxl.write.*;
|
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.JSONObject;
|
|
@ -3885,6 +3886,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
Label label = new Label(column, row, data);
|
|
|
WritableCellFormat cellFormat = new WritableCellFormat();
|
|
|
cellFormat.setAlignment(jxl.format.Alignment.CENTRE);
|
|
|
cellFormat.setVerticalAlignment(VerticalAlignment.CENTRE);
|
|
|
label.setCellFormat(cellFormat);
|
|
|
ws.addCell(label);
|
|
|
}
|
|
@ -13792,8 +13794,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
price4=m.get("payPrice").toString();
|
|
|
}
|
|
|
}
|
|
|
DecimalFormat df = new DecimalFormat("#.00");
|
|
|
Double price5 =Double.parseDouble(price2)+Double.parseDouble(price3);
|
|
|
String[] header2 = {"咨询费",price1,"复诊费",price5+"","处方费",price4};//
|
|
|
String[] header2 = {"咨询费",df.format(Double.parseDouble(price1)),"复诊费",df.format(price5),"处方费",df.format(Double.parseDouble(price4))};//
|
|
|
int k2 = 0;
|
|
|
for (String h : header2) {
|
|
|
addCell(ws, 2, k2, h);//表名,行,列,header
|
|
@ -13875,7 +13878,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
price1=m.get("payPrice").toString();
|
|
|
}
|
|
|
}
|
|
|
String[] header3 = {"","",price1,price1,""};//
|
|
|
DecimalFormat df = new DecimalFormat("#.00");
|
|
|
String[] header3 = {"无","无",df.format(Double.parseDouble(price1)),df.format(Double.parseDouble(price1)),"无"};//
|
|
|
int k3 = 0;
|
|
|
for (String h : header3) {
|
|
|
addCell(ws, 3, k3, h);//表名,行,列,header
|
|
@ -13927,7 +13931,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 资金分部报表
|
|
|
* 资金分部报表导出
|
|
|
* @param os
|
|
|
* @param ls
|
|
|
* @param startTime
|
|
@ -13989,7 +13993,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
Double price6 = Double.parseDouble(price1)+Double.parseDouble(price2)+Double.parseDouble(price3);//问诊费
|
|
|
Double price7 = Double.parseDouble(price4);//处方费
|
|
|
Double price8 = Double.parseDouble(price5);//就诊卡充值
|
|
|
String[] header3 = {"",price6+price7+price8+"",price8+"",price7+"",price6+""};//
|
|
|
DecimalFormat df = new DecimalFormat("#.00");
|
|
|
String[] header3 = {"无",df.format(price6+price7+price8)+"",df.format(price8)+"",df.format(price7)+"",df.format(price6)+""};//
|
|
|
int k3 = 0;
|
|
|
for (String h : header3) {
|
|
|
addCell(ws, 3, k3, h);//表名,行,列,header
|
|
@ -14069,11 +14074,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
|
|
|
int i = 3;
|
|
|
String n = " ";
|
|
|
|
|
|
DecimalFormat df = new DecimalFormat("#.00");
|
|
|
for (Map<String, Object> m : ls) {
|
|
|
addCell(ws, i, 0,m.get("doctorName")!=null?m.get("doctorName").toString():n);
|
|
|
addCell(ws, i, 1, "");
|
|
|
addCell(ws, i, 2, m.get("fee")!=null?m.get("fee").toString():n);
|
|
|
addCell(ws, i, 1, "无");
|
|
|
addCell(ws, i, 2, m.get("fee")!=null?df.format(Double.parseDouble(m.get("fee").toString())):n);
|
|
|
i++;
|
|
|
}
|
|
|
ws.mergeCells(0,0,2,0);
|
|
@ -14138,7 +14143,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
addCell(ws, 1, k1, h);//表名,行,列,header
|
|
|
k1++;
|
|
|
}
|
|
|
String[] header2 = {"患者名称","订单药品","规格","总量","进价","零售价","进货金额","零售金额","发药时间"};//
|
|
|
String[] header2 = {"患者名称","订单药品","规格","总量","单位","进价","零售价","进货金额","零售金额","发药时间","审方时间","开方时间"};//
|
|
|
int k2 = 0;
|
|
|
for (String h : header2) {
|
|
|
addCell(ws, 2, k2, h);//表名,行,列,header
|
|
@ -14151,30 +14156,41 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
for (Map<String, Object> m : ls) {
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(m.get("prescription").toString());
|
|
|
com.alibaba.fastjson.JSONArray array = jsonObject.getJSONArray("info");
|
|
|
int j = i;
|
|
|
addCell(ws, i, 0,jsonObject.get("patientName")!=null?jsonObject.get("patientName").toString():n);
|
|
|
for (int z=0;z<array.size();z++){
|
|
|
com.alibaba.fastjson.JSONObject object = array.getJSONObject(z);
|
|
|
addCell(ws, i, 1, object.get("drugName")!=null?object.get("drugName").toString():n);
|
|
|
addCell(ws, i, 2, object.get("specification")!=null?object.get("specification").toString():n);
|
|
|
addCell(ws, i, 3, object.get("quantity")!=null?object.get("quantity").toString():n);
|
|
|
addCell(ws, i, 4, "");
|
|
|
addCell(ws, i, 5, object.get("packRetprice")!=null?object.get("packRetprice").toString():n);
|
|
|
addCell(ws, i, 6, "");
|
|
|
if (object.get("quantity")!=null){
|
|
|
Double quantity = Double.parseDouble(object.get("quantity").toString());
|
|
|
Double packRetprice = Double.parseDouble(object.get("packRetprice").toString());
|
|
|
addCell(ws, i, 7,packRetprice*quantity+"");
|
|
|
}else {
|
|
|
addCell(ws, i, 7,"");
|
|
|
DecimalFormat df = new DecimalFormat("#.00");
|
|
|
if(array!=null&&array.size()!=0){
|
|
|
for (int z=0;z<array.size();z++){
|
|
|
com.alibaba.fastjson.JSONObject object = array.getJSONObject(z);
|
|
|
addCell(ws, i, 1, object.get("drugName")!=null?object.get("drugName").toString():n);
|
|
|
addCell(ws, i, 2, object.get("specification")!=null?object.get("specification").toString():n);
|
|
|
addCell(ws, i, 3, object.get("quantity")!=null?object.get("quantity").toString():n);
|
|
|
addCell(ws, i, 4, object.get("packUnitName")!=null?object.get("packUnitName").toString():n);
|
|
|
addCell(ws, i, 5, "无");
|
|
|
addCell(ws, i, 6, object.get("packRetprice")!=null?object.get("packRetprice").toString():n);
|
|
|
addCell(ws, i, 7, "无");
|
|
|
if (object.get("quantity")!=null){
|
|
|
Double quantity = Double.parseDouble(object.get("quantity").toString());
|
|
|
Double packRetprice = Double.parseDouble(object.get("packRetprice").toString());
|
|
|
addCell(ws, i, 8,df.format(packRetprice*quantity));
|
|
|
}else {
|
|
|
addCell(ws, i, 8,"");
|
|
|
}
|
|
|
addCell(ws, i, 9,jsonObject.get("dispDate")!=null?DateUtil.stampToString(jsonObject.get("dispDate").toString()):n);
|
|
|
addCell(ws, i, 10,jsonObject.get("checkTime")!=null?DateUtil.stampToString(jsonObject.get("checkTime").toString()):n);
|
|
|
addCell(ws, i, 11,jsonObject.get("createTime")!=null?DateUtil.stampToString(jsonObject.get("createTime").toString()):n);
|
|
|
i++;
|
|
|
}
|
|
|
addCell(ws, i, 8,jsonObject.get("createTime")!=null?DateUtil.stampToString(jsonObject.get("createTime").toString()):n);
|
|
|
ws.mergeCells(0,j,0,i-1);
|
|
|
}else {
|
|
|
i++;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
ws.mergeCells(0,0,8,0);
|
|
|
ws.mergeCells(0,1,8,1);
|
|
|
ws.mergeCells(0,0,11,0);
|
|
|
ws.mergeCells(0,1,11,1);
|
|
|
wwb.write();
|
|
|
wwb.close();
|
|
|
} catch (IOException e) {
|