|
@ -2698,7 +2698,16 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
" case t.order_category when '2' then '2' when '3' then '2' else t.order_category end as \"orderCategory\", "+
|
|
|
"ymr.person_cash as \"personCash\",\n" +
|
|
|
"ymr.person_account as \"personAccount\",\n" +
|
|
|
"ymr.medical_price as \"medicalPrice\" "+
|
|
|
"ymr.medical_price as \"medicalPrice\", "+
|
|
|
"ymr.fund_price as \"fundPrice\", "+
|
|
|
"ymr.tcjj_pay as \"tcjjPay\" , "+
|
|
|
"ymr.sbjj_pay as \"sbjjPay\" , "+
|
|
|
"ymr.gwy_pay as \"gwyPay\" , "+
|
|
|
"ymr.jzfp_pay as \"jzfpPay\" , "+
|
|
|
"ymr.yljz_pay as \"yljzPay\" , "+
|
|
|
"ymr.other_pay as \"otherPay\" , "+
|
|
|
"ymr.enterprise_supplement as \"enterpriseSupplement\" , "+
|
|
|
"ymr.jtgj_pay as \"jtgjPay\" "+
|
|
|
" from base_business_order_pay t" +
|
|
|
" left join base_patient b on t.patient = b.id" +
|
|
|
" left join base_ylz_medical_relation ymr on ymr.id=t.relation_code "+
|
|
@ -2760,35 +2769,39 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
for (Map<String,Object> map:list){
|
|
|
if (map.get("orderCategory")!=null){
|
|
|
String orderCategoryFlag = map.get("orderCategory").toString();
|
|
|
String relationCode =map.get("relationCode").toString();
|
|
|
if (!orderCategoryFlag.equalsIgnoreCase("5")){
|
|
|
Double price = Double.parseDouble(map.get("payPrice").toString());
|
|
|
Double prie = price/100;
|
|
|
logger.info("price"+prie);
|
|
|
map.put("payPrice",prie);
|
|
|
map.put("medicalPrice",0);
|
|
|
}if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode);
|
|
|
map.put("doctorName",outpatientDO.getDoctorName());
|
|
|
map.put("consumerName",outpatientDO.getConsumerName());
|
|
|
map.put("patientName",outpatientDO.getPatientName());
|
|
|
map.put("medicalPrice",0);
|
|
|
}else if (orderCategoryFlag.equalsIgnoreCase("4")){
|
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(relationCode);
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
map.put("doctorName",outpatientDO.getDoctorName());
|
|
|
map.put("consumerName",outpatientDO.getConsumerName());
|
|
|
map.put("patientName",outpatientDO.getPatientName());
|
|
|
map.put("medicalPrice",0);
|
|
|
}else if (orderCategoryFlag.equalsIgnoreCase("6")){
|
|
|
YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findOne(relationCode);
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode());
|
|
|
Double personAccount = Double.parseDouble(map.get("personAccount").toString());
|
|
|
Double medicalPrice = Double.parseDouble(map.get("medicalPrice").toString());
|
|
|
map.put("medicalPrice",medicalPrice+personAccount);
|
|
|
map.put("doctorName",outpatientDO.getDoctorName());
|
|
|
map.put("consumerName",outpatientDO.getConsumerName());
|
|
|
map.put("patientName",outpatientDO.getPatientName());
|
|
|
if (map.get("relationCode")!=null){
|
|
|
String relationCode =map.get("relationCode").toString();
|
|
|
if (!orderCategoryFlag.equalsIgnoreCase("5")){
|
|
|
Double price = Double.parseDouble(map.get("payPrice").toString());
|
|
|
Double prie = price/100;
|
|
|
logger.info("price"+prie);
|
|
|
map.put("payPrice",prie);
|
|
|
map.put("medicalPrice",0);
|
|
|
}if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode);
|
|
|
map.put("doctorName",outpatientDO.getDoctorName());
|
|
|
map.put("consumerName",outpatientDO.getConsumerName());
|
|
|
map.put("patientName",outpatientDO.getPatientName());
|
|
|
map.put("medicalPrice",0);
|
|
|
}else if (orderCategoryFlag.equalsIgnoreCase("4")){
|
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(relationCode);
|
|
|
if (prescriptionDO!=null){
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
map.put("doctorName",outpatientDO.getDoctorName());
|
|
|
map.put("consumerName",outpatientDO.getConsumerName());
|
|
|
map.put("patientName",outpatientDO.getPatientName());
|
|
|
map.put("medicalPrice",0);
|
|
|
}
|
|
|
}else if (orderCategoryFlag.equalsIgnoreCase("6")){
|
|
|
YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findOne(relationCode);
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode());
|
|
|
Double personAccount = Double.parseDouble(map.get("personAccount").toString());
|
|
|
Double medicalPrice = Double.parseDouble(map.get("medicalPrice").toString());
|
|
|
map.put("medicalPrice",medicalPrice+personAccount);
|
|
|
map.put("doctorName",outpatientDO.getDoctorName());
|
|
|
map.put("consumerName",outpatientDO.getConsumerName());
|
|
|
map.put("patientName",outpatientDO.getPatientName());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -2834,7 +2847,16 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
"\tt.order_category AS \"orderCategory\",\n" +
|
|
|
"ymr.person_cash as \"personCash\",\n" +
|
|
|
"ymr.person_account as \"personAccount\",\n" +
|
|
|
"ymr.medical_price as \"medicalPrice\" "+
|
|
|
"ymr.medical_price as \"medicalPrice\" , "+
|
|
|
"ymr.fund_price as \"fundPrice\", "+
|
|
|
"ymr.tcjj_pay as \"tcjjPay\" , "+
|
|
|
"ymr.sbjj_pay as \"sbjjPay\" , "+
|
|
|
"ymr.gwy_pay as \"gwyPay\" , "+
|
|
|
"ymr.jzfp_pay as \"jzfpPay\" , "+
|
|
|
"ymr.yljz_pay as \"yljzPay\" , "+
|
|
|
"ymr.other_pay as \"otherPay\" , "+
|
|
|
"ymr.enterprise_supplement as \"enterpriseSupplement\" , "+
|
|
|
"ymr.jtgj_pay as \"jtgjPay\" "+
|
|
|
"FROM\n" +
|
|
|
"\tbase_business_order_pay t\n" +
|
|
|
"LEFT JOIN base_patient b ON t.patient = b.id\n" +
|