|
@ -24,9 +24,11 @@ import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
|
|
|
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
|
|
|
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
|
|
|
import com.yihu.jw.hospital.prescription.dao.*;
|
|
|
import com.yihu.jw.hospital.prescription.service.HcyyPrescriptionService;
|
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
|
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.HcyyEntranceService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
|
|
|
import com.yihu.jw.hospital.ykyy.service.YkyyService;
|
|
@ -151,6 +153,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
private HttpClientUtil httpClientUtil;
|
|
|
@Autowired
|
|
|
private YlzMedicailRelationDao ylzMedicailRelationDao;
|
|
|
@Autowired
|
|
|
private HcyyPrescriptionService hcyyPrescriptionService;
|
|
|
|
|
|
|
|
|
/**
|
|
@ -1815,28 +1819,34 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
String fee = null;
|
|
|
if (wechatId.equalsIgnoreCase("xm_zsyy_wx")||wechatId.equalsIgnoreCase("xm_xzzx_wx")||wechatId.equalsIgnoreCase("xm_hcyy_wx")){
|
|
|
if (wlyyOutpatientDO!=null){
|
|
|
if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwfzChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpfzChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwzxChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpzxChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("2".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getXtfzChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getJyzxChargeType(),"6");
|
|
|
if (wlyyOutpatientDO.getVisitType()!=null&&wlyyOutpatientDO.getVisitType().equalsIgnoreCase("1")){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getXgszChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else {
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwfzChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpfzChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getTwzxChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getSpzxChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("2".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getXtfzChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getJyzxChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}else {
|
|
|
WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeTypeAndDeptTypeCode(doctorDO.getChargeType(),"6");
|
|
|
fee = chargeDictDO.getReqFee()+"";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}else {
|
|
@ -2145,7 +2155,20 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
}
|
|
|
logger.info("开始1"+idcard);
|
|
|
String openId = "";
|
|
|
businessOrderDO.setPayPrice(b1.doubleValue());
|
|
|
|
|
|
JSONObject object1 = hcyyPrescriptionService.selectCardInfo(cardNo);
|
|
|
Double cardFee = object1.getDouble("ZHYE");
|
|
|
BigDecimal b = new BigDecimal(String.valueOf(cardFee));
|
|
|
BigDecimal c = new BigDecimal(String.valueOf(fee));
|
|
|
if (b.compareTo(c) == 1){
|
|
|
return "无需线上支付";
|
|
|
}
|
|
|
BigDecimal balance = c.subtract(b);
|
|
|
|
|
|
if (balance.doubleValue()<=0){
|
|
|
return "无需线上支付";
|
|
|
}
|
|
|
businessOrderDO.setPayPrice(balance.doubleValue());
|
|
|
businessOrderDO.setPayType(4);
|
|
|
businessOrderDO.setHistoryOrder(businessOrderDO.getOrderNo());
|
|
|
businessOrderDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
|
|
@ -2209,7 +2232,19 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
}
|
|
|
logger.info("开始2"+idcard);
|
|
|
String openId = "";
|
|
|
businessOrderDO.setPayPrice(b1.doubleValue());
|
|
|
JSONObject object1 = hcyyPrescriptionService.selectCardInfo(cardNo);
|
|
|
Double cardFee = object1.getDouble("ZHYE");
|
|
|
BigDecimal b = new BigDecimal(String.valueOf(cardFee));
|
|
|
BigDecimal c = new BigDecimal(String.valueOf(fee));
|
|
|
if (b.compareTo(c) == 1){
|
|
|
return "无需线上支付";
|
|
|
}
|
|
|
BigDecimal balance = c.subtract(b);
|
|
|
|
|
|
if (balance.doubleValue()<=0){
|
|
|
return "无需线上支付";
|
|
|
}
|
|
|
businessOrderDO.setPayPrice(balance.doubleValue());
|
|
|
businessOrderDO.setPayType(4);
|
|
|
businessOrderDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
|
|
|
businessOrderDO.setDepositType(depositType);
|