|
@ -5239,19 +5239,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (hospitalSysDictDO!=null){
|
|
|
if (hospitalSysDictDO.getDictValue().equalsIgnoreCase("1")){
|
|
|
if ("9".equals(type)) {
|
|
|
contentMsg = "您发起的图文复诊已被您取消。已支付的18元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
contentMsg = "您发起的图文复诊已被您取消。已支付的"+outpatientDO.getFee()+"元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
first = outpatientDO.getConsumerName() + ",您好!您的图文复诊已被您取消,您可重新发起";
|
|
|
}
|
|
|
if ("16".equals(type)) {
|
|
|
contentMsg = "您发起的视频复诊已被您取消。已支付的18元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
contentMsg = "您发起的视频复诊已被您取消。已支付的"+outpatientDO.getFee()+"元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
first = outpatientDO.getConsumerName() + ",您好!您的视频复诊已被您取消,您可重新发起";
|
|
|
}
|
|
|
if ("1".equals(type)) {
|
|
|
contentMsg = "您发起的图文咨询已被您取消。已支付的18元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
contentMsg = "您发起的图文咨询已被您取消。已支付的"+outpatientDO.getFee()+"元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
first = outpatientDO.getConsumerName() + ",您好!您的图文咨询已被您取消,您可重新发起";
|
|
|
}
|
|
|
if ("17".equals(type)) {
|
|
|
contentMsg = "您发起的视频咨询已被您取消。已支付的18元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
contentMsg = "您发起的视频咨询已被您取消。已支付的"+outpatientDO.getFee()+"元将原路退回,如有问诊需求,可重新发起或到医院门急诊就诊。";
|
|
|
first = outpatientDO.getConsumerName() + ",您好!您的视频咨询已被您取消,您可重新发起";
|
|
|
}
|
|
|
if ("12".equals(type)) {
|
|
@ -7158,14 +7158,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}else {
|
|
|
if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
if (flag){
|
|
|
sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+",dw.workTotal DESC";
|
|
|
sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+",dw.workTotal DESC";
|
|
|
}else{
|
|
|
sql += " and d.del='1' order by d.consult_status desc nulls last ,evaluate.score desc nulls last ,a.total " + consutlSort;
|
|
|
sql+=" NULLS LAST,\n" +
|
|
|
"\tD.id DESC,dw.workTotal DESC NULLS LAST";
|
|
|
}
|
|
|
}else {
|
|
|
sql += " and d.del='1' order by dw.workTotal desc,d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+"";
|
|
|
sql += " and d.del='1' GROUP BY d.id order by dw.workTotal desc,d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort+"";
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -14837,7 +14837,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
object.put("getSettlementResultUrl",getSettlementResultUrl);
|
|
|
}else if (flag==2){
|
|
|
logger.info("获取医保结算页面地址开始!");
|
|
|
String getSettlementResultUrlBase64 = healthCareService.getSettlementResultUrlBase64(outpatientId);
|
|
|
String getSettlementResultUrlBase64 = healthCareNewService.getSettlementResultUrlBase64(outpatientId);
|
|
|
logger.info("获取医保结算页面地址结束!");
|
|
|
object.put("getSettlementResultUrlBase64",getSettlementResultUrlBase64);
|
|
|
}
|
|
@ -14898,7 +14898,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}else {
|
|
|
if (StringUtils.isNoneBlank(ylzMedicalRelationDO.getDiseaseCode())){
|
|
|
throw new Exception("已存在医保结算记录,请先处理后再结算!");
|
|
|
object.put("code","403");
|
|
|
object.put("message","已存在医保结算记录,请先处理后再结算!");
|
|
|
return object;
|
|
|
}
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
@ -14926,7 +14928,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}else {
|
|
|
throw new Exception(jsonObject.getString("cause"));
|
|
|
object.put("code","403");
|
|
|
object.put("message",jsonObject.getString("cause"));
|
|
|
return object;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -14992,7 +14996,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
object.put("getSettlementResultUrl",getSettlementResultUrl);
|
|
|
}else if (flag==2){
|
|
|
logger.info("获取医保结算页面地址开始!");
|
|
|
String getSettlementResultUrlBase64 = healthCareService.getSettlementResultUrlBase64(outpatientId);
|
|
|
String getSettlementResultUrlBase64 = healthCareNewService.getSettlementResultUrlBase64(outpatientId);
|
|
|
logger.info("获取医保结算页面地址结束!");
|
|
|
object.put("getSettlementResultUrlBase64",getSettlementResultUrlBase64);
|
|
|
}
|
|
@ -15045,47 +15049,41 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
BigDecimal b5 = new BigDecimal(object1.getString("yljz_pay"));
|
|
|
BigDecimal b6 = new BigDecimal(object1.getString("other_pay"));
|
|
|
String payDateStr = object1.getString("pay_date");
|
|
|
/*Date payDate = DateUtil.strToDate(payDateStr);
|
|
|
Date payDate = DateUtil.strToDate(payDateStr);
|
|
|
Date now = DateUtil.getDateShort(new Date());
|
|
|
if (payDate.compareTo(now)==0){
|
|
|
BigDecimal b7 = new BigDecimal(object1.getString("enterprise_supplement"));
|
|
|
Double price = b1.add(b2).add(b3).add(b4).add(b5).add(b6).add(b7).doubleValue();
|
|
|
if (Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())==price){
|
|
|
ylzMedicalRelationDO.setStatus(1);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}
|
|
|
}else {
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}*/
|
|
|
String valiFlag = object1.getString("vali_flag");
|
|
|
if (valiFlag.equalsIgnoreCase("1")){
|
|
|
BigDecimal b7 = new BigDecimal(object1.getString("enterprise_supplement"));
|
|
|
Double price = b1.add(b2).add(b3).add(b4).add(b5).add(b6).add(b7).doubleValue();
|
|
|
if (Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())==price){
|
|
|
ylzMedicalRelationDO.setStatus(1);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}else {
|
|
|
if (StringUtils.isNoneBlank(ylzMedicalRelationDO.getDiseaseCode())){
|
|
|
throw new Exception("已存在医保结算记录,请先处理后再结算!");
|
|
|
if (payDate.compareTo(now)==0){
|
|
|
BigDecimal b7 = new BigDecimal(object1.getString("enterprise_supplement"));
|
|
|
Double price = b1.add(b2).add(b3).add(b4).add(b5).add(b6).add(b7).doubleValue();
|
|
|
if (Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())==price){
|
|
|
ylzMedicalRelationDO.setStatus(1);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}else {
|
|
|
object.put("code","403");
|
|
|
object.put("message","已存在医保结算记录,请先处理后再结算!");
|
|
|
return object;
|
|
|
}
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}else {
|
|
|
object.put("code","403");
|
|
|
object.put("message","已存在医保结算记录,请先处理后再结算!");
|
|
|
return object;
|
|
|
}
|
|
|
}else {
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}
|
|
|
|
|
|
}else {
|
|
|
if (jsonObject.getString("flag").equalsIgnoreCase("50204")){
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}else {
|
|
|
throw new Exception(jsonObject.getString("cause"));
|
|
|
object.put("code","403");
|
|
|
object.put("message",jsonObject.getString("cause"));
|
|
|
return object;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (ylzMedicalRelationDO!=null&&ylzMedicalRelationDO.getStatus()==1){
|
|
|
net.sf.json.JSONObject object2 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), false);
|
|
@ -15118,27 +15116,28 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (ylzMedicalRelationDO==null){
|
|
|
throw new Exception("无待结算信息");
|
|
|
}
|
|
|
|
|
|
logger.info("获取患者待结算信息结束!");
|
|
|
if(outpatientDO!=null&&outpatientDO.getMedicalState().equalsIgnoreCase("1")){
|
|
|
logger.info("医保挂号开始!");
|
|
|
String register = healthCareService.register(outpatientId);
|
|
|
String register = healthCareService.register(outpatientId,ylzMedicalRelationDO.getLogNo());
|
|
|
logger.info("医保挂号结束!");
|
|
|
logger.info("医保费用明细上传开始!");
|
|
|
String feeDetailUpload= healthCareService.feeDetailUpload(outpatientId);
|
|
|
String feeDetailUpload= healthCareService.feeDetailUpload(outpatientId,ylzMedicalRelationDO.getLogNo());
|
|
|
logger.info("医保费用明细上传结束!");
|
|
|
|
|
|
logger.info("医保预结算信息开始!");
|
|
|
ylzMedicalRelationDO = healthCareService.preSettlement(outpatientId);
|
|
|
ylzMedicalRelationDO = healthCareService.preSettlement(outpatientId,ylzMedicalRelationDO.getLogNo());
|
|
|
logger.info("医保预结算信息结束!");
|
|
|
|
|
|
if (flag==1){
|
|
|
logger.info("获取医保结算页面地址开始!");
|
|
|
String getSettlementResultUrl = healthCareService.getSettlementResultUrl(outpatientId);
|
|
|
String getSettlementResultUrl = healthCareService.getSettlementResultUrl(outpatientId,ylzMedicalRelationDO.getLogNo());
|
|
|
logger.info("获取医保结算页面地址结束!");
|
|
|
object.put("getSettlementResultUrl",getSettlementResultUrl);
|
|
|
}else if (flag==2){
|
|
|
logger.info("获取医保结算页面地址开始!");
|
|
|
String getSettlementResultUrlBase64 = healthCareService.getSettlementResultUrlBase64(outpatientId);
|
|
|
String getSettlementResultUrlBase64 = healthCareService.getSettlementResultUrlBase64(outpatientId,ylzMedicalRelationDO.getLogNo());
|
|
|
logger.info("获取医保结算页面地址结束!");
|
|
|
object.put("getSettlementResultUrlBase64",getSettlementResultUrlBase64);
|
|
|
}
|
|
@ -15467,7 +15466,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (registerbackObj.getString("flag").equalsIgnoreCase("1")){
|
|
|
com.alibaba.fastjson.JSONObject encryptData2 = registerbackObj.getJSONObject("encrypt_data");
|
|
|
logger.info("医保挂号冲销成功!");
|
|
|
ylzMedicalRelationDO.setStatus(1);
|
|
|
ylzMedicalRelationDO.setStatus(0);
|
|
|
ylzMedicailRelationDao.save(ylzMedicalRelationDO);
|
|
|
}
|
|
|
}
|