|
@ -10495,16 +10495,39 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
public Map saveNatAppointment(String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
|
|
|
public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
|
|
|
String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushChannel,String pushFlag,String cardNoType,String consumer) throws Exception {
|
|
|
Map returnMap = new HashMap();
|
|
|
List<WlyyHospitalSysDictDO> natConfigList = wlyyHospitalSysDictDao.findByDictName("natConfigList");
|
|
|
String checkPart = "鼻/咽拭子";
|
|
|
String chargeFlag = "2";
|
|
|
String chargeCode = "361322";
|
|
|
String icdCode = "Z00.000";
|
|
|
Integer winNo = 6;
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:natConfigList){
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"checkPart".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
checkPart = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeFlag".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
chargeFlag = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
chargeCode = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"icdCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
icdCode = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"winNo".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
winNo = Integer.parseInt(wlyyHospitalSysDictDO.getDictValue());
|
|
|
}
|
|
|
}
|
|
|
if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
net.sf.json.JSONObject jsondate = new JSONObject();
|
|
|
jsondate.put("checkPart","鼻/咽拭子");
|
|
|
jsondate.put("checkPart",checkPart);
|
|
|
jsondate.put("cardNo",mediaCard);
|
|
|
jsondate.put("chargeFlag","2");
|
|
|
jsondate.put("chargeCode","361322");
|
|
|
jsondate.put("icdCode","Z00.000");
|
|
|
jsondate.put("chargeFlag",chargeFlag);
|
|
|
jsondate.put("chargeCode",chargeCode);
|
|
|
jsondate.put("icdCode",icdCode);
|
|
|
jsondate.put("socialNo",cardNo);
|
|
|
jsondate.put("tellPhone",mobile);
|
|
|
jsondate.put("address1",provinceName);
|
|
@ -10513,7 +10536,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
jsondate.put("address4",streetName);
|
|
|
jsondate.put("address5",address);
|
|
|
jsondate.put("area",townName);
|
|
|
jsondate.put("winNo",6);
|
|
|
jsondate.put("winNo",winNo);
|
|
|
if (StringUtils.isNoneBlank(secondJobName)){
|
|
|
jsondate.put("target",secondJobName);
|
|
|
}else {
|
|
@ -10541,6 +10564,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
if (flag){
|
|
|
BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
|
|
|
baseNatAppointmentDO.setChargeAmount(chargeAmount);
|
|
|
baseNatAppointmentDO.setMedicare(mediaCard);
|
|
|
baseNatAppointmentDO.setName(name);
|
|
|
baseNatAppointmentDO.setCardNo(cardNo);
|
|
@ -10561,11 +10585,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
baseNatAppointmentDO.setPayStatus("0");
|
|
|
baseNatAppointmentDO.setCreateTime(new Date());
|
|
|
baseNatAppointmentDO.setMobile(mobile);
|
|
|
baseNatAppointmentDO.setInspectionCode("鼻/咽拭子");
|
|
|
baseNatAppointmentDO.setInspectionName("鼻/咽拭子");
|
|
|
baseNatAppointmentDO.setIcdCode("Z00.000");
|
|
|
baseNatAppointmentDO.setChargeCode("361322");
|
|
|
baseNatAppointmentDO.setWinNo("6");
|
|
|
baseNatAppointmentDO.setInspectionCode(chargeCode);
|
|
|
baseNatAppointmentDO.setInspectionName(inspectionName);
|
|
|
baseNatAppointmentDO.setIcdCode(icdCode);
|
|
|
baseNatAppointmentDO.setChargeCode(chargeCode);
|
|
|
baseNatAppointmentDO.setWinNo(String.valueOf(winNo));
|
|
|
baseNatAppointmentDO.setDept("3150000");
|
|
|
baseNatAppointmentDO.setDeptName("感染疾病科");
|
|
|
baseNatAppointmentDO.setAmpm(pm);
|
|
@ -10703,8 +10727,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
return returnMap;
|
|
|
}else if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
|
|
|
Double natFee = 8000.0;
|
|
|
if(StringUtils.isNoneBlank(chargeAmount)){
|
|
|
natFee= Double.parseDouble(chargeAmount);
|
|
|
}
|
|
|
BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
|
|
|
baseNatAppointmentDO.setMedicare(mediaCard);
|
|
|
baseNatAppointmentDO.setChargeAmount(chargeAmount);
|
|
|
baseNatAppointmentDO.setName(name);
|
|
|
baseNatAppointmentDO.setCardNo(cardNo);
|
|
|
baseNatAppointmentDO.setCardType(cardType);
|
|
@ -10723,11 +10752,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
baseNatAppointmentDO.setPayStatus("0");
|
|
|
baseNatAppointmentDO.setCreateTime(new Date());
|
|
|
baseNatAppointmentDO.setMobile(mobile);
|
|
|
baseNatAppointmentDO.setInspectionCode("鼻/咽拭子");
|
|
|
baseNatAppointmentDO.setInspectionName("鼻/咽拭子");
|
|
|
baseNatAppointmentDO.setIcdCode("Z00.000");
|
|
|
baseNatAppointmentDO.setChargeCode("361322");
|
|
|
baseNatAppointmentDO.setWinNo("6");
|
|
|
baseNatAppointmentDO.setInspectionCode(chargeCode);
|
|
|
baseNatAppointmentDO.setInspectionName(inspectionName);
|
|
|
baseNatAppointmentDO.setIcdCode(icdCode);
|
|
|
baseNatAppointmentDO.setChargeCode(chargeCode);
|
|
|
baseNatAppointmentDO.setWinNo(String.valueOf(winNo));
|
|
|
baseNatAppointmentDO.setDept("3150000");
|
|
|
baseNatAppointmentDO.setDeptName("感染疾病科");
|
|
|
baseNatAppointmentDO.setAmpm(pm);
|
|
@ -10747,7 +10776,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
businessDO.setRelationName("核酸检测订单");
|
|
|
businessDO.setOrderCategory("6");
|
|
|
businessDO.setOrderType(12);
|
|
|
businessDO.setPayPrice(8000.0);
|
|
|
businessDO.setPayPrice(natFee);
|
|
|
businessDO.setRematk("核酸检测订单");
|
|
|
businessDO.setDescription("核酸检测订单");
|
|
|
businessDO.setPayType(1);
|
|
@ -10964,6 +10993,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"t.id as \"id\"," +
|
|
|
"t.card_no_type as \"cardNoType\"," +
|
|
|
"t.HOSPITAL_FLAG as \"hospitalFlag\"," +
|
|
|
"t.charge_amount as \"chargeAmount\"," +
|
|
|
"t.appointment_time as \"appointmentTime\" " +
|
|
|
" from base_nat_appointment t where 1=1 ";
|
|
|
if (StringUtils.isNoneBlank(patientId)){
|
|
@ -11093,24 +11123,51 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
baseNatAppointmentDO.setCancelBy(patientId);
|
|
|
baseNatAppointmentDao.save(baseNatAppointmentDO);
|
|
|
if (StringUtils.isNoneBlank(baseNatAppointmentDO.getRealOrder())){
|
|
|
List<WlyyHospitalSysDictDO> natConfigList = wlyyHospitalSysDictDao.findByDictName("natConfigList");
|
|
|
String checkPart = "鼻/咽拭子";
|
|
|
String chargeFlag = "2";
|
|
|
String chargeCode = "361322";
|
|
|
String icdCode = "Z00.000";
|
|
|
Integer winNo = 6;
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:natConfigList){
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"checkPart".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
checkPart = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeFlag".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
chargeFlag = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
chargeCode = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"icdCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
icdCode = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"winNo".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
winNo = Integer.parseInt(wlyyHospitalSysDictDO.getDictValue());
|
|
|
}
|
|
|
}
|
|
|
//删除处方
|
|
|
logger.info("删除处方开始");
|
|
|
net.sf.json.JSONObject jsondate = new JSONObject();
|
|
|
jsondate.put("checkPart","鼻/咽拭子");
|
|
|
jsondate.put("checkPart",checkPart);
|
|
|
jsondate.put("cardNo",baseNatAppointmentDO.getMedicare());
|
|
|
jsondate.put("chargeFlag","2");
|
|
|
jsondate.put("chargeCode","361322");
|
|
|
jsondate.put("icdCode","Z00.000");
|
|
|
jsondate.put("chargeFlag",chargeFlag);
|
|
|
jsondate.put("chargeCode",chargeCode);
|
|
|
jsondate.put("icdCode",icdCode);
|
|
|
jsondate.put("socialNo",baseNatAppointmentDO.getCardNo());
|
|
|
jsondate.put("tellPhone",baseNatAppointmentDO.getMobile());
|
|
|
jsondate.put("address1",baseNatAppointmentDO.getProvinceName());
|
|
|
jsondate.put("address2",baseNatAppointmentDO.getCityName());
|
|
|
jsondate.put("address3",baseNatAppointmentDO.getTownName());
|
|
|
jsondate.put("address4",baseNatAppointmentDO.getStreetName());
|
|
|
jsondate.put("address5",2);
|
|
|
jsondate.put("area",baseNatAppointmentDO.getAddress());
|
|
|
jsondate.put("winNo",6);
|
|
|
jsondate.put("target",2);
|
|
|
jsondate.put("address5",baseNatAppointmentDO.getAddress());
|
|
|
jsondate.put("area",baseNatAppointmentDO.getTownName());
|
|
|
jsondate.put("winNo",winNo);
|
|
|
if (StringUtils.isNoneBlank(baseNatAppointmentDO.getSecondJobName())){
|
|
|
jsondate.put("target",baseNatAppointmentDO.getSecondJobName());
|
|
|
}else {
|
|
|
jsondate.put("target",baseNatAppointmentDO.getFirstJobName());
|
|
|
}
|
|
|
jsondate.put("quantity",1);
|
|
|
jsondate.put("serialNo",baseNatAppointmentDO.getRegisterNo());
|
|
|
jsondate.put("dept",baseNatAppointmentDO.getDept());
|
|
@ -11222,7 +11279,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize) {
|
|
|
public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize,String orderNo) {
|
|
|
String sql = "select t.name as \"name\"," +
|
|
|
"t.card_no as \"cardNo\"," +
|
|
|
"t.card_type as \"cardType\"," +
|
|
@ -11239,8 +11296,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"t.id as \"id\"," +
|
|
|
"t.card_no_type as \"cardNoType\"," +
|
|
|
"t.HOSPITAL_FLAG as \"hospitalFlag\"," +
|
|
|
"m.order_no as \"orderNo\"," +
|
|
|
"t.charge_amount as \"chargeAmount\"," +
|
|
|
"t.appointment_time as \"appointmentTime\" " +
|
|
|
" from base_nat_appointment t where 1=1 ";
|
|
|
" from base_nat_appointment t left join base_business_order_pay m ";
|
|
|
if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
sql+=" on to_char(t.id) = m.relation_code " +
|
|
|
" where 1=1 ";
|
|
|
}else{
|
|
|
sql+=" on cast(t.id as char) = m.relation_code " +
|
|
|
" where 1=1 ";
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(realOrder)) {
|
|
|
sql += " and t.real_order like '%" + realOrder + "%' ";
|
|
|
}
|
|
@ -11253,6 +11319,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (StringUtils.isNotBlank(idcard)) {
|
|
|
sql += " and t.card_no like '%" + idcard + "%' ";
|
|
|
}
|
|
|
if (StringUtils.isNoneBlank(orderNo)){
|
|
|
sql+=" and m.order_no = '"+orderNo+"' ";
|
|
|
}
|
|
|
//支付状态
|
|
|
if (StringUtils.isNotBlank(payStatus)) {
|
|
|
sql += " and t.pay_status ='" + payStatus + "' ";
|