LAPTOP-KB9HII50\70708 2 سال پیش
والد
کامیت
f41ff828a3
24فایلهای تغییر یافته به همراه144 افزوده شده و 149 حذف شده
  1. 3 3
      business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java
  2. 3 3
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java
  3. 29 33
      business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java
  4. 1 1
      business/base-service/src/main/java/com/yihu/jw/healthUpload/service/BaseDoctorHealthUploadService.java
  5. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/WlyyHospitalSysDictService.java
  6. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/drugstore/service/BaseDrugStoreService.java
  7. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java
  8. 4 4
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerDoctorService.java
  9. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerService.java
  10. 9 9
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseUserMsgService.java
  11. 4 4
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionExpressageService.java
  12. 3 4
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/WorkTimeService.java
  13. 3 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java
  14. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  15. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java
  16. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  17. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/suggest/service/BaseSuggestionService.java
  18. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java
  19. 58 58
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  20. 3 3
      business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java
  21. 1 1
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/AchnsDoctorRecordService.java
  22. 2 2
      business/base-service/src/main/java/com/yihu/jw/wechat/enterprise/EnterpriseService.java
  23. 8 8
      business/base-service/src/main/java/com/yihu/jw/wechat/service/WxTemplateService.java
  24. 1 1
      business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java

@ -671,7 +671,7 @@ public class DailyReportUploadService {
     */
     */
    public BaseDailyReportUploadDO selectReportById(String reportId) throws Exception {
    public BaseDailyReportUploadDO selectReportById(String reportId) throws Exception {
        String nowDate = DateUtil.getStringDateShort();
        String nowDate = DateUtil.getStringDateShort();
        BaseDailyReportUploadDO reportUploadDO = dailyReportUploadDao.getOne(reportId);
        BaseDailyReportUploadDO reportUploadDO = dailyReportUploadDao.findById(reportId).orElse(null);
        if (null==reportUploadDO){
        if (null==reportUploadDO){
            throw new Exception("未找到日报记录");
            throw new Exception("未找到日报记录");
        }else {
        }else {
@ -898,7 +898,7 @@ public class DailyReportUploadService {
        }
        }
        if (StringUtils.isNoneBlank(doctor)){
        if (StringUtils.isNoneBlank(doctor)){
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("dailyHeshiConfig");
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("dailyHeshiConfig").orElse(null);
            String buffer = "";
            String buffer = "";
            if (hospitalSysDictDO!=null){
            if (hospitalSysDictDO!=null){
                JSONArray array = JSONArray.parseArray(hospitalSysDictDO.getDictValue());
                JSONArray array = JSONArray.parseArray(hospitalSysDictDO.getDictValue());
@ -1460,7 +1460,7 @@ public class DailyReportUploadService {
            sql += " AND h.dept_code = '" + dept + "'";
            sql += " AND h.dept_code = '" + dept + "'";
        }
        }
        if (StringUtils.isNoneBlank(doctor)){
        if (StringUtils.isNoneBlank(doctor)){
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("dailyHeshiConfig");
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("dailyHeshiConfig").orElse(null);
            String buffer = "";
            String buffer = "";
            if (hospitalSysDictDO!=null){
            if (hospitalSysDictDO!=null){
                JSONArray array = JSONArray.parseArray(hospitalSysDictDO.getDictValue());
                JSONArray array = JSONArray.parseArray(hospitalSysDictDO.getDictValue());

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -292,7 +292,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        String outpatientType = jsonObject.get("outpatientType").toString();
        String outpatientType = jsonObject.get("outpatientType").toString();
        String newSpecialDisease = jsonObject.get("specialDisease").toString();
        String newSpecialDisease = jsonObject.get("specialDisease").toString();
        String newSpecialDiseaseCode = jsonObject.get("specialDiseaseCode").toString();
        String newSpecialDiseaseCode = jsonObject.get("specialDiseaseCode").toString();
        BaseDoctorDO doctorDO = baseDoctorDao.getOne(doctorId);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctorId).orElse(null);
        if (doctorDO!=null){
        if (doctorDO!=null){
            doctorDO.setIntroduce(introduce);
            doctorDO.setIntroduce(introduce);
            doctorDO.setExpertise(expertise);
            doctorDO.setExpertise(expertise);
@ -392,7 +392,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        String doctorId = jsonObject.get("doctorId").toString();
        String doctorId = jsonObject.get("doctorId").toString();
        String outpatientType = jsonObject.get("outpatientType").toString();
        String outpatientType = jsonObject.get("outpatientType").toString();
        logger.info("doctor:"+doctorId+" outpatientType:"+outpatientType);
        logger.info("doctor:"+doctorId+" outpatientType:"+outpatientType);
        BaseDoctorDO doctorDO = baseDoctorDao.getOne(doctorId);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctorId).orElse(null);
        doctorDO.setOutpatientType(outpatientType);
        doctorDO.setOutpatientType(outpatientType);
        baseDoctorDao.save(doctorDO);
        baseDoctorDao.save(doctorDO);
        return true;
        return true;
@ -518,7 +518,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        com.alibaba.fastjson.JSONObject valueJson = null;
        com.alibaba.fastjson.JSONObject valueJson = null;
        if(StringUtils.isNotBlank(authPw)){
        if(StringUtils.isNotBlank(authPw)){
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne("pwOverDue");
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("pwOverDue").orElse(null);
            String code[] = wlyyHospitalSysDictDO.getDictCode().split(",");
            String code[] = wlyyHospitalSysDictDO.getDictCode().split(",");
            Integer maxDateInt = Integer.parseInt(code[0]);
            Integer maxDateInt = Integer.parseInt(code[0]);
            Integer remainDateInt = Integer.parseInt(code[1]);
            Integer remainDateInt = Integer.parseInt(code[1]);

+ 29 - 33
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -3,7 +3,6 @@ package com.yihu.jw.healthCare.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.sun.corba.se.spi.ior.IdentifiableFactory;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
@ -13,13 +12,14 @@ import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.healthCare.*;
import com.yihu.jw.entity.hospital.healthCare.*;
import com.yihu.jw.entity.hospital.httplog.YlzHttpLogDO;
import com.yihu.jw.entity.hospital.httplog.YlzHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.healthCare.utils.AES;
import com.yihu.jw.healthCare.utils.AES;
import com.yihu.jw.healthCare.utils.SafeUtil;
import com.yihu.jw.healthCare.utils.SafeUtil;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.healthCare.*;
import com.yihu.jw.hospital.healthCare.*;
import com.yihu.jw.hospital.httplog.dao.YlzHttpLogDao;
import com.yihu.jw.hospital.httplog.dao.YlzHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
@ -27,10 +27,7 @@ import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.util.common.LatitudeUtils;
import com.yihu.jw.util.common.LatitudeUtils;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.ylzinfo.ehc.common.utils.DateUtils;
import net.sf.json.util.JSONTokener;
import net.sf.json.util.JSONTokener;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.Logger;
@ -39,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.Date;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.Map;
@ -194,7 +190,7 @@ public class HealthCareService {
     */
     */
    public String doctorAuthentication(String doctorId){
    public String doctorAuthentication(String doctorId){
        try {
        try {
            BaseDoctorDO doctorDO = doctorDao.getOne(doctorId);
            BaseDoctorDO doctorDO = doctorDao.findById(doctorId).orElse(null);
            if (doctorDO == null){
            if (doctorDO == null){
                throw new Exception("医生不存在");
                throw new Exception("医生不存在");
            }
            }
@ -237,11 +233,11 @@ public class HealthCareService {
     * @throws Exception
     * @throws Exception
     */
     */
    public String doctorFaceCheckInAddress(String doctorId)throws Exception{
    public String doctorFaceCheckInAddress(String doctorId)throws Exception{
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("ylzConfigFaceReturnUrl");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("ylzConfigFaceReturnUrl").orElse(null);
        if(hospitalSysDictDO == null){
        if(hospitalSysDictDO == null){
            throw new Exception("未配置回调地址");
            throw new Exception("未配置回调地址");
        }
        }
        BaseDoctorDO doctorDO = doctorDao.getOne(doctorId);
        BaseDoctorDO doctorDO = doctorDao.findById(doctorId).orElse(null);
        if (doctorDO == null){
        if (doctorDO == null){
            throw new Exception("医生不存在");
            throw new Exception("医生不存在");
        }
        }
@ -267,7 +263,7 @@ public class HealthCareService {
     * 2.3.3	获取医师人脸签到数据
     * 2.3.3	获取医师人脸签到数据
     */
     */
    public String doctorFaceCheckInData(String doctorId)throws Exception{
    public String doctorFaceCheckInData(String doctorId)throws Exception{
        BaseDoctorDO doctorDO = doctorDao.getOne(doctorId);
        BaseDoctorDO doctorDO = doctorDao.findById(doctorId).orElse(null);
        if (doctorDO == null){
        if (doctorDO == null){
            throw new Exception("医生不存在");
            throw new Exception("医生不存在");
        }
        }
@ -294,11 +290,11 @@ public class HealthCareService {
     * @throws Exception
     * @throws Exception
     */
     */
    public String doctorFaceCheckInAddressBase64(String doctorId)throws Exception{
    public String doctorFaceCheckInAddressBase64(String doctorId)throws Exception{
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("ylzConfigFaceReturnUrl");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("ylzConfigFaceReturnUrl").orElse(null);
        if(hospitalSysDictDO == null){
        if(hospitalSysDictDO == null){
            throw new Exception("未配置回调地址");
            throw new Exception("未配置回调地址");
        }
        }
        BaseDoctorDO doctorDO = doctorDao.getOne(doctorId);
        BaseDoctorDO doctorDO = doctorDao.findById(doctorId).orElse(null);
        if (doctorDO == null){
        if (doctorDO == null){
            throw new Exception("医生不存在");
            throw new Exception("医生不存在");
        }
        }
@ -325,15 +321,15 @@ public class HealthCareService {
     */
     */
    public String advanceWarning(String prescriptionId){
    public String advanceWarning(String prescriptionId){
        try {
        try {
            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.getOne(prescriptionId);
            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findById(prescriptionId).orElse(null);
            if (wlyyPrescriptionDO == null){
            if (wlyyPrescriptionDO == null){
                throw new Exception("续方信息不存在");
                throw new Exception("续方信息不存在");
            }
            }
            WlyyOutpatientDO outpatientDO = outpatientDao.getOne(wlyyPrescriptionDO.getOutpatientId());
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
            if (outpatientDO == null){
            if (outpatientDO == null){
                throw new Exception("门诊信息不存在");
                throw new Exception("门诊信息不存在");
            }
            }
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("ylzConfigOrgCode");
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("ylzConfigOrgCode").orElse(null);
            if(hospitalSysDictDO == null){
            if(hospitalSysDictDO == null){
                throw new Exception("未配置网点编号");
                throw new Exception("未配置网点编号");
            }
            }
@ -379,11 +375,11 @@ public class HealthCareService {
     * 2.4.2	医师开方上传
     * 2.4.2	医师开方上传
     */
     */
    public String doctorPrescriptionUpload(String prescriptionId,String wxId) throws Exception{
    public String doctorPrescriptionUpload(String prescriptionId,String wxId) throws Exception{
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.getOne(prescriptionId);
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findById(prescriptionId).orElse(null);
        if (wlyyPrescriptionDO == null){
        if (wlyyPrescriptionDO == null){
            throw new Exception("续方信息不存在");
            throw new Exception("续方信息不存在");
        }
        }
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(wlyyPrescriptionDO.getOutpatientId());
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
        if (outpatientDO == null){
        if (outpatientDO == null){
            throw new Exception("门诊信息不存在");
            throw new Exception("门诊信息不存在");
        }
        }
@ -394,7 +390,7 @@ public class HealthCareService {
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("ylzConfigOrgCode");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("ylzConfigOrgCode").orElse(null);
        if(hospitalSysDictDO == null){
        if(hospitalSysDictDO == null){
            throw new Exception("未配置网点编号");
            throw new Exception("未配置网点编号");
        }
        }
@ -634,7 +630,7 @@ public class HealthCareService {
     * 2.6.1	电子处方订单接收(N20.17.05.02)
     * 2.6.1	电子处方订单接收(N20.17.05.02)
     */
     */
    public String electronicPrescriptionReceiving(String outpatientId)throws Exception{
    public String electronicPrescriptionReceiving(String outpatientId)throws Exception{
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (outpatientDO == null){
        if (outpatientDO == null){
            throw new Exception("门诊信息不存在");
            throw new Exception("门诊信息不存在");
        }
        }
@ -642,7 +638,7 @@ public class HealthCareService {
        if(expressageDOList.size()==0){
        if(expressageDOList.size()==0){
            throw new Exception("收获信息不存在");
            throw new Exception("收获信息不存在");
        }
        }
        BasePatientDO patientDO = patientDao.getOne(outpatientDO.getPatient());
        BasePatientDO patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
        if(patientDO==null){
        if(patientDO==null){
            throw new Exception("居民信息不存在");
            throw new Exception("居民信息不存在");
        }
        }
@ -748,7 +744,7 @@ public class HealthCareService {
     *2.6.2	电子处方订单取消(N20.17.05.03)
     *2.6.2	电子处方订单取消(N20.17.05.03)
     */
     */
    public String electronicPrescriptionCancle(String outpatientId)throws Exception{
    public String electronicPrescriptionCancle(String outpatientId)throws Exception{
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (outpatientDO == null){
        if (outpatientDO == null){
            throw new Exception("门诊信息不存在");
            throw new Exception("门诊信息不存在");
        }
        }
@ -784,7 +780,7 @@ public class HealthCareService {
     * 2.6.3 获取处方流转平台药师审方结果(N20.17.05.04)
     * 2.6.3 获取处方流转平台药师审方结果(N20.17.05.04)
     */
     */
    public String pharmacistReviewResults(String outpatientId)throws Exception{
    public String pharmacistReviewResults(String outpatientId)throws Exception{
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (outpatientDO == null){
        if (outpatientDO == null){
            throw new Exception("门诊信息不存在");
            throw new Exception("门诊信息不存在");
        }
        }
@ -813,7 +809,7 @@ public class HealthCareService {
     * 2.2.1	门诊提醒(N21.08.09.01)
     * 2.2.1	门诊提醒(N21.08.09.01)
     */
     */
    public String outpatientReminder(String outpatientId,String doctorCode)throws Exception{
    public String outpatientReminder(String outpatientId,String doctorCode)throws Exception{
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (outpatientDO == null){
        if (outpatientDO == null){
            throw new Exception("门诊信息不存在");
            throw new Exception("门诊信息不存在");
        }
        }
@ -853,7 +849,7 @@ public class HealthCareService {
     * 2.2.2	门诊事中提醒(N21.08.09.02)
     * 2.2.2	门诊事中提醒(N21.08.09.02)
     */
     */
    public String outpatientEventReminder(String outpatientId,String doctorCode)throws Exception{
    public String outpatientEventReminder(String outpatientId,String doctorCode)throws Exception{
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (outpatientDO == null){
        if (outpatientDO == null){
            throw new Exception("门诊信息不存在");
            throw new Exception("门诊信息不存在");
        }
        }
@ -1015,7 +1011,7 @@ public class HealthCareService {
     */
     */
    public String authorized(String patient) throws Exception{
    public String authorized(String patient) throws Exception{
        String funid = "N20.17.01.01";
        String funid = "N20.17.01.01";
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO==null){
        if (patientDO==null){
            throw new Exception("患者信息不存在");
            throw new Exception("患者信息不存在");
        }
        }
@ -1064,11 +1060,11 @@ public class HealthCareService {
     */
     */
    public String medicareOnline(String patient) throws Exception{
    public String medicareOnline(String patient) throws Exception{
        String funid = "N20.17.01.02";
        String funid = "N20.17.01.02";
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("ylzConfigRedirectUrl");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("ylzConfigRedirectUrl").orElse(null);
        if (hospitalSysDictDO==null){
        if (hospitalSysDictDO==null){
            throw new Exception("回调地址为空!");
            throw new Exception("回调地址为空!");
        }
        }
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO==null){
        if (patientDO==null){
            throw new Exception("患者信息不存在");
            throw new Exception("患者信息不存在");
        }
        }
@ -1118,11 +1114,11 @@ public class HealthCareService {
     */
     */
    public String medicareOnlineBase64(String patient) throws Exception{
    public String medicareOnlineBase64(String patient) throws Exception{
        String funid = "N20.17.01.03";
        String funid = "N20.17.01.03";
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("ylzConfigRedirectUrl");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("ylzConfigRedirectUrl").orElse(null);
        if (hospitalSysDictDO==null){
        if (hospitalSysDictDO==null){
            throw new Exception("回调地址为空!");
            throw new Exception("回调地址为空!");
        }
        }
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO==null){
        if (patientDO==null){
            throw new Exception("患者信息不存在");
            throw new Exception("患者信息不存在");
        }
        }
@ -1191,7 +1187,7 @@ public class HealthCareService {
        data.put("trauma_sign",ylzMedicalRelationDO.getTraumaSign());//外伤标志0 否,1 是
        data.put("trauma_sign",ylzMedicalRelationDO.getTraumaSign());//外伤标志0 否,1 是
        data.put("date", DateUtil.dateToStrFormatLong(ylzMedicalRelationDO.getDate()));//实际门诊/入院日期 若为空,默认取系统时间
        data.put("date", DateUtil.dateToStrFormatLong(ylzMedicalRelationDO.getDate()));//实际门诊/入院日期 若为空,默认取系统时间
        data.put("data_source",ylzMedicalRelationDO.getDataSource());//数据来源
        data.put("data_source",ylzMedicalRelationDO.getDataSource());//数据来源
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (outpatientDO!=null){
        if (outpatientDO!=null){
            BaseDoctorDO doctorDO = doctorDao.findByIdAndDel(outpatientDO.getDoctor());
            BaseDoctorDO doctorDO = doctorDao.findByIdAndDel(outpatientDO.getDoctor());
            if (doctorDO!=null){
            if (doctorDO!=null){
@ -1723,7 +1719,7 @@ public class HealthCareService {
        if (ylzMedicalRelationDO==null){
        if (ylzMedicalRelationDO==null){
            throw new Exception("获取医保结算页面地址:结算信息为空!");
            throw new Exception("获取医保结算页面地址:结算信息为空!");
        }
        }
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.getOne("ResultRedirectUrl");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("ResultRedirectUrl").orElse(null);
        if (wlyyHospitalSysDictDO==null){
        if (wlyyHospitalSysDictDO==null){
            throw new Exception("获取医保结算页面地址失败:回调地址为空");
            throw new Exception("获取医保结算页面地址失败:回调地址为空");
        }
        }
@ -1809,7 +1805,7 @@ public class HealthCareService {
        if (ylzMedicalRelationDO==null){
        if (ylzMedicalRelationDO==null){
            throw new Exception("获取医保结算页面地址:结算信息为空!");
            throw new Exception("获取医保结算页面地址:结算信息为空!");
        }
        }
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.getOne("ResultRedirectUrl");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("ResultRedirectUrl").orElse(null);
        if (wlyyHospitalSysDictDO==null){
        if (wlyyHospitalSysDictDO==null){
            throw new Exception("获取医保结算页面地址失败:回调地址为空");
            throw new Exception("获取医保结算页面地址失败:回调地址为空");
        }
        }
@ -1932,7 +1928,7 @@ public class HealthCareService {
    public String uploadMedicalHistory(String outpatientId) throws Exception{
    public String uploadMedicalHistory(String outpatientId) throws Exception{
        String funid = "N20.17.06.01";
        String funid = "N20.17.06.01";
        JSONObject data = new JSONObject();
        JSONObject data = new JSONObject();
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        if (wlyyOutpatientDO==null){
        if (wlyyOutpatientDO==null){
            throw new Exception("医保上传户病史病情及医学报告失败!门诊为空");
            throw new Exception("医保上传户病史病情及医学报告失败!门诊为空");
        }
        }

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/healthUpload/service/BaseDoctorHealthUploadService.java

@ -196,7 +196,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
                for (BaseDoctorRoleDO roleDO : roleDOS) {
                for (BaseDoctorRoleDO roleDO : roleDOS) {
                    BaseDoctorDO doctorDO = baseDoctorDao.findByIdAndDel(roleDO.getDoctorCode());
                    BaseDoctorDO doctorDO = baseDoctorDao.findByIdAndDel(roleDO.getDoctorCode());
                    if (doctorDO != null) {
                    if (doctorDO != null) {
                        WlyyHospitalSysDictDO hospitalSysDictDO  = hospitalSysDictDao.getOne("isYichangRemind");
                        WlyyHospitalSysDictDO hospitalSysDictDO  = hospitalSysDictDao.findById("isYichangRemind").orElse(null);
                        if (hospitalSysDictDO!=null){
                        if (hospitalSysDictDO!=null){
                            String value = hospitalSysDictDO.getDictValue();
                            String value = hospitalSysDictDO.getDictValue();
                            if (StringUtils.isNoneBlank(value)){
                            if (StringUtils.isNoneBlank(value)){

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/WlyyHospitalSysDictService.java

@ -309,7 +309,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
        WlyyHospitalSysDictDO upPrevious = new WlyyHospitalSysDictDO();
        WlyyHospitalSysDictDO upPrevious = new WlyyHospitalSysDictDO();
        if (list.size()>0){
        if (list.size()>0){
            String prviousId = list.get(0).get("id").toString();
            String prviousId = list.get(0).get("id").toString();
            upPrevious =wlyyHospitalSysDictDao.getOne(prviousId);
            upPrevious =wlyyHospitalSysDictDao.findById(prviousId).orElse(null);
        }
        }
        //BaseBannerDO upPrevious = baseBannerDao.upBanner(sort);
        //BaseBannerDO upPrevious = baseBannerDao.upBanner(sort);
@ -342,7 +342,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
        WlyyHospitalSysDictDO downPrevious = new WlyyHospitalSysDictDO();
        WlyyHospitalSysDictDO downPrevious = new WlyyHospitalSysDictDO();
        if (list.size()>0){
        if (list.size()>0){
            String prviousId = list.get(0).get("id").toString();
            String prviousId = list.get(0).get("id").toString();
            downPrevious =wlyyHospitalSysDictDao.getOne(prviousId);
            downPrevious =wlyyHospitalSysDictDao.findById(prviousId).orElse(null);
        }
        }
        //BaseBannerDO upPrevious = baseBannerDao.upBanner(sort);
        //BaseBannerDO upPrevious = baseBannerDao.upBanner(sort);

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/drugstore/service/BaseDrugStoreService.java

@ -110,7 +110,7 @@ public class BaseDrugStoreService extends BaseJpaService<BaseDrugStoreDO, BaseDr
                }
                }
            }
            }
            BaseDrugStoreDO baseDrugStorePre = baseDrugStoreDao.getOne(baseDrugStoreDO.getId());
            BaseDrugStoreDO baseDrugStorePre = baseDrugStoreDao.findById(baseDrugStoreDO.getId()).orElse(null);
            if (baseDrugStorePre!=null){
            if (baseDrugStorePre!=null){
                BaseOrgDO baseOrgDO = baseOrgDao.findByCode(baseDrugStoreDO.getHospitalCode());
                BaseOrgDO baseOrgDO = baseOrgDao.findByCode(baseDrugStoreDO.getHospitalCode());
                if (baseOrgDO!=null){
                if (baseOrgDO!=null){

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -167,12 +167,12 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                        sex = 3;
                        sex = 3;
                    }
                    }
                    String familyAge = String.valueOf(IdCardUtil.getAgeForIdcard(idCard));
                    String familyAge = String.valueOf(IdCardUtil.getAgeForIdcard(idCard));
                    BasePatientMemberDictDO basePatientMemberDictDO1 = basePatientMemberDictDao.getOne(dictId);
                    BasePatientMemberDictDO basePatientMemberDictDO1 = basePatientMemberDictDao.findById(dictId).orElse(null);
                    String relationName = "";
                    String relationName = "";
                    if (null!=basePatientMemberDictDO1){
                    if (null!=basePatientMemberDictDO1){
                        relationName=basePatientMemberDictDO1.getRelationName();
                        relationName=basePatientMemberDictDO1.getRelationName();
                    }
                    }
                    BasePatientDO basePatientDO1  = basePatientDao.getOne(patientId);
                    BasePatientDO basePatientDO1  = basePatientDao.findById(patientId).orElse(null);
                    String res = "";
                    String res = "";
                    //id不为空则为修改家人关系
                    //id不为空则为修改家人关系
                    if (StringUtils.isNotBlank(id)){
                    if (StringUtils.isNotBlank(id)){

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerDoctorService.java

@ -265,7 +265,7 @@ public class BaseBannerDoctorService
    {
    {
        List<BaseBannerDoctorDO> baseBannerDoctorDOS = this.baseBannerDoctorDao.getBannersBypatients(patientId, doctor);
        List<BaseBannerDoctorDO> baseBannerDoctorDOS = this.baseBannerDoctorDao.getBannersBypatients(patientId, doctor);
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.getOne("banner_give_timeout");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("banner_give_timeout").orElse(null);
        if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>0&&baseBannerDoctorDOS.size()>=1)
        if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>0&&baseBannerDoctorDOS.size()>=1)
        {
        {
            BaseBannerDoctorDO lastOne = (BaseBannerDoctorDO)baseBannerDoctorDOS.get(0);
            BaseBannerDoctorDO lastOne = (BaseBannerDoctorDO)baseBannerDoctorDOS.get(0);
@ -305,7 +305,7 @@ public class BaseBannerDoctorService
        }
        }
        sql.append(" group by t.relation_code,t.patient_id");
        sql.append(" group by t.relation_code,t.patient_id");
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.getOne("banner_gives_times");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("banner_gives_times").orElse(null);
        long countTimes = 5L;
        long countTimes = 5L;
        if (wlyyHospitalSysDictDO != null) {
        if (wlyyHospitalSysDictDO != null) {
            countTimes = wlyyHospitalSysDictDO.getDictValue() == null ? countTimes : Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue();
            countTimes = wlyyHospitalSysDictDO.getDictValue() == null ? countTimes : Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue();
@ -364,7 +364,7 @@ public class BaseBannerDoctorService
    public boolean checkMessageTimeOut(String sender, String reciver)
    public boolean checkMessageTimeOut(String sender, String reciver)
    {
    {
        List<BaseUserMessageDO> baseBannerDoctorDOS = this.baseUserMessageDao.getMessageByPatientAndDoctor(reciver, sender);
        List<BaseUserMessageDO> baseBannerDoctorDOS = this.baseUserMessageDao.getMessageByPatientAndDoctor(reciver, sender);
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.getOne("leave_message_timeout");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_timeout").orElse(null);
        if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>=1)
        if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>=1)
        {
        {
            BaseUserMessageDO lastOne = baseBannerDoctorDOS.get(0);
            BaseUserMessageDO lastOne = baseBannerDoctorDOS.get(0);
@ -404,7 +404,7 @@ public class BaseBannerDoctorService
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        }
        }
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.getOne("leave_message_times");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_times").orElse(null);
        long countTimes = 5L;
        long countTimes = 5L;
        if (wlyyHospitalSysDictDO != null) {
        if (wlyyHospitalSysDictDO != null) {
            countTimes = wlyyHospitalSysDictDO.getDictValue() == null ? countTimes : Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue();
            countTimes = wlyyHospitalSysDictDO.getDictValue() == null ? countTimes : Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue();

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerService.java

@ -239,7 +239,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
        BaseBannerDO downPrevious = new BaseBannerDO();
        BaseBannerDO downPrevious = new BaseBannerDO();
        if (list.size()>0){
        if (list.size()>0){
            String prviousBannerId = list.get(0).get("id").toString();
            String prviousBannerId = list.get(0).get("id").toString();
            downPrevious =baseBannerDao.getOne(prviousBannerId);
            downPrevious =baseBannerDao.findById(prviousBannerId).orElse(null);
        }
        }
        //获取的下一条banner
        //获取的下一条banner
        //BaseBannerDO downPrevious = baseBannerDao.downBanner(sort);
        //BaseBannerDO downPrevious = baseBannerDao.downBanner(sort);

+ 9 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseUserMsgService.java

@ -110,7 +110,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
        {
        {
            if (checkTimeOut)
            if (checkTimeOut)
            {
            {
                BasePatientDO patientDO = this.basePatientDao.getOne(senderId);
                BasePatientDO patientDO = this.basePatientDao.findById(senderId).orElse(null);
                String senderName = null;
                String senderName = null;
                if (null != patientDO) {
                if (null != patientDO) {
                    senderName = patientDO.getName();
                    senderName = patientDO.getName();
@ -151,7 +151,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
    //回复留言接口
    //回复留言接口
    @Transactional
    @Transactional
    public void responseMessage(String contentId,String content, String reciverId, String senderId,Integer isDoctor) {
    public void responseMessage(String contentId,String content, String reciverId, String senderId,Integer isDoctor) {
        BaseUserMessageDO baseUserMessageDOS = baseUserMessageDao.getOne(contentId);
        BaseUserMessageDO baseUserMessageDOS = baseUserMessageDao.findById(contentId).orElse(null);
        if(null!=baseUserMessageDOS&&1==isDoctor){
        if(null!=baseUserMessageDOS&&1==isDoctor){
            baseUserMessageDOS.setStatus(2);
            baseUserMessageDOS.setStatus(2);
            baseUserMessageDOS.setIsRead(1);
            baseUserMessageDOS.setIsRead(1);
@ -161,7 +161,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
        String senderName = null;
        String senderName = null;
        if(1==isDoctor){
        if(1==isDoctor){
            BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel(senderId);
            BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel(senderId);
            BasePatientDO reciver= basePatientDao.getOne(reciverId);
            BasePatientDO reciver= basePatientDao.findById(reciverId).orElse(null);
            if (null!=reciver){
            if (null!=reciver){
                baseUserMsgContentDO.setReceiverName(reciver.getName());
                baseUserMsgContentDO.setReceiverName(reciver.getName());
            }
            }
@ -170,7 +170,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
            }
            }
            baseUserMsgContentDO.setIsDoctor(1);
            baseUserMsgContentDO.setIsDoctor(1);
        }else {
        }else {
            BasePatientDO patientDO= basePatientDao.getOne(senderId);
            BasePatientDO patientDO= basePatientDao.findById(senderId).orElse(null);
            BaseDoctorDO reciver = baseDoctorDao.findByIdAndDel(reciverId);
            BaseDoctorDO reciver = baseDoctorDao.findByIdAndDel(reciverId);
            if(null!=reciver){
            if(null!=reciver){
                baseUserMsgContentDO.setReceiverName(reciver.getName());
                baseUserMsgContentDO.setReceiverName(reciver.getName());
@ -311,12 +311,12 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
            baseUserMsgDO.setRelationType(null==map.get("relation_type")?0:Integer.valueOf(map.get("relation_type").toString()));
            baseUserMsgDO.setRelationType(null==map.get("relation_type")?0:Integer.valueOf(map.get("relation_type").toString()));
            baseUserMsgDO.setRelationName(null==map.get("relation_name")?"":map.get("relation_name").toString());
            baseUserMsgDO.setRelationName(null==map.get("relation_name")?"":map.get("relation_name").toString());
            baseUserMsgDO.setStatus(null==map.get("status")?0:Integer.valueOf(map.get("status").toString()));
            baseUserMsgDO.setStatus(null==map.get("status")?0:Integer.valueOf(map.get("status").toString()));
            BasePatientDO patientDO = basePatientDao.getOne(null==map.get("sender")?"":map.get("sender").toString());
            BasePatientDO patientDO = basePatientDao.findById(null==map.get("sender")?"":map.get("sender").toString()).orElse(null);
            List<BaseBannerDoctorDO> ba =  baseBannerDoctorDao.getBanners(baseUserMsgDO.getReceiver(),baseUserMsgDO.getSender(),baseUserMsgDO.getRelationCode());
            List<BaseBannerDoctorDO> ba =  baseBannerDoctorDao.getBanners(baseUserMsgDO.getReceiver(),baseUserMsgDO.getSender(),baseUserMsgDO.getRelationCode());
            if(ba.size()>0){
            if(ba.size()>0){
                List<BaseBannerDO> bannerLits= new ArrayList<>();
                List<BaseBannerDO> bannerLits= new ArrayList<>();
                for (BaseBannerDoctorDO bannerDoctorDO:ba){
                for (BaseBannerDoctorDO bannerDoctorDO:ba){
                    BaseBannerDO bannerDO = bannerDao.getOne(bannerDoctorDO.getBannerId());
                    BaseBannerDO bannerDO = bannerDao.findById(bannerDoctorDO.getBannerId()).orElse(null);
                    bannerLits.add(bannerDO);
                    bannerLits.add(bannerDO);
                    baseUserMsgDO.setBaseBannerDOS(bannerLits);
                    baseUserMsgDO.setBaseBannerDOS(bannerLits);
                }
                }
@ -399,7 +399,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
        List<BaseEvaluateDO> baseEvaluateDO=baseEvaluateDao.findByRelationCode(relationCode);
        List<BaseEvaluateDO> baseEvaluateDO=baseEvaluateDao.findByRelationCode(relationCode);
        if (baseEvaluateDO.size()>0){
        if (baseEvaluateDO.size()>0){
            String findRC=baseEvaluateDO.get(0).getRelationCode();
            String findRC=baseEvaluateDO.get(0).getRelationCode();
            scoreList= baseEvaluateScoreDao.getOne(relationCode);
            scoreList= baseEvaluateScoreDao.findById(relationCode).orElse(null);
            if(null!=scoreList){
            if(null!=scoreList){
                map.put("everangScore",scoreList);
                map.put("everangScore",scoreList);
                map.put("scoreList",baseEvaluateDO);
                map.put("scoreList",baseEvaluateDO);
@ -544,7 +544,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        }
        }
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.getOne("leave_message_times");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_times").orElse(null);
        long countTimes = 5L;
        long countTimes = 5L;
        if (wlyyHospitalSysDictDO != null) {
        if (wlyyHospitalSysDictDO != null) {
            countTimes = wlyyHospitalSysDictDO.getDictValue() == null ? countTimes : Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue();
            countTimes = wlyyHospitalSysDictDO.getDictValue() == null ? countTimes : Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue();
@ -556,7 +556,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
    }
    }
    public void deleteMessageOrMessageContent(String msgId,String isDelParent){
    public void deleteMessageOrMessageContent(String msgId,String isDelParent){
        if ("1".equalsIgnoreCase(isDelParent)){
        if ("1".equalsIgnoreCase(isDelParent)){
            BaseUserMessageDO baseUserMessageDO = baseUserMessageDao.getOne(msgId);
            BaseUserMessageDO baseUserMessageDO = baseUserMessageDao.findById(msgId).orElse(null);
            if (baseUserMessageDO!=null){
            if (baseUserMessageDO!=null){
                BaseOperateLogDO baseOperateLogDO = new BaseOperateLogDO();
                BaseOperateLogDO baseOperateLogDO = new BaseOperateLogDO();
                JSONObject jsonObject = new JSONObject();
                JSONObject jsonObject = new JSONObject();

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionExpressageService.java

@ -212,9 +212,9 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
    public WlyyPrescriptionExpressageDO postSFOrderService(WlyyPrescriptionExpressageDO sfexpress_obj) throws Exception {
    public WlyyPrescriptionExpressageDO postSFOrderService(WlyyPrescriptionExpressageDO sfexpress_obj) throws Exception {
        //获取医生所处的医院详细地址,作为寄件人地址
        //获取医生所处的医院详细地址,作为寄件人地址
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(sfexpress_obj.getOutpatientId());
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(sfexpress_obj.getOutpatientId()).orElse(null);
        BaseOrgDO hospital = baseOrgDao.findByCode(outpatientDO.getHospital());
        BaseOrgDO hospital = baseOrgDao.findByCode(outpatientDO.getHospital());
        BasePatientDO basePatientDO = basePatientDao.getOne(outpatientDO.getPatient());
        BasePatientDO basePatientDO = basePatientDao.findById(outpatientDO.getPatient()).orElse(null);
        JSONObject params = SFUtils.postSFOrderServiceV2(sfexpress_obj,hospital,basePatientDO);
        JSONObject params = SFUtils.postSFOrderServiceV2(sfexpress_obj,hospital,basePatientDO);
        String re = this.SFExpressPostV2(params);
        String re = this.SFExpressPostV2(params);
@ -257,7 +257,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
    public JSONObject postSFOrderQueryService(WlyyPrescriptionExpressageDO sfexpress_obj) throws Exception {
    public JSONObject postSFOrderQueryService(WlyyPrescriptionExpressageDO sfexpress_obj) throws Exception {
        //获取医生所处的医院详细地址,作为寄件人地址
        //获取医生所处的医院详细地址,作为寄件人地址
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(sfexpress_obj.getOutpatientId());
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(sfexpress_obj.getOutpatientId()).orElse(null);
        String orderNo=sfexpress_obj.getBspOrderNo();
        String orderNo=sfexpress_obj.getBspOrderNo();
        String re = this.SFExpressQueryPostV2(orderNo);
        String re = this.SFExpressQueryPostV2(orderNo);
@ -285,7 +285,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
    public String postOrderConfirmService(WlyyPrescriptionExpressageDO sfexpress_obj) throws Exception {
    public String postOrderConfirmService(WlyyPrescriptionExpressageDO sfexpress_obj) throws Exception {
        //获取医生所处的医院详细地址,作为寄件人地址
        //获取医生所处的医院详细地址,作为寄件人地址
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(sfexpress_obj.getOutpatientId());
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(sfexpress_obj.getOutpatientId()).orElse(null);
        BaseOrgDO hospital = baseOrgDao.findByCode(outpatientDO.getHospital());
        BaseOrgDO hospital = baseOrgDao.findByCode(outpatientDO.getHospital());
        String xml = SFUtils.SFOrderConfirmXml(sf_code,sfexpress_obj.getId(),sfexpress_obj.getMailno(),2);
        String xml = SFUtils.SFOrderConfirmXml(sf_code,sfexpress_obj.getId(),sfexpress_obj.getMailno(),2);

+ 3 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/WorkTimeService.java

@ -17,7 +17,6 @@ import com.yihu.jw.hospital.doctor.dao.DoctorWorkTimeDao;
import com.yihu.jw.hospital.prescription.dao.WlyyHospitalWorkRuleDao;
import com.yihu.jw.hospital.prescription.dao.WlyyHospitalWorkRuleDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
@ -79,7 +78,7 @@ public class WorkTimeService {
            if (jsonArray!=null&&jsonArray.size()>0){
            if (jsonArray!=null&&jsonArray.size()>0){
                for(int i=0;i<jsonArray.size();i++){
                for(int i=0;i<jsonArray.size();i++){
                    JSONObject jsonObject = jsonArray.getJSONObject(i);
                    JSONObject jsonObject = jsonArray.getJSONObject(i);
                    WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne(jsonObject.getString("id"));
                    WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById(jsonObject.getString("id")).orElse(null);
                    if (wlyyHospitalSysDictDO!=null&&StringUtils.isNoneBlank(jsonObject.get("value")==null?"":jsonObject.getString("value"))){
                    if (wlyyHospitalSysDictDO!=null&&StringUtils.isNoneBlank(jsonObject.get("value")==null?"":jsonObject.getString("value"))){
                        wlyyHospitalSysDictDO.setDictValue(jsonObject.getString("value"));
                        wlyyHospitalSysDictDO.setDictValue(jsonObject.getString("value"));
                        wlyyHospitalSysDictDao.save(wlyyHospitalSysDictDO);
                        wlyyHospitalSysDictDao.save(wlyyHospitalSysDictDO);
@ -115,7 +114,7 @@ public class WorkTimeService {
                String[] split = ywCode.split(",");
                String[] split = ywCode.split(",");
                Integer j =0;
                Integer j =0;
                for (int i = 0;i<split.length;i++){
                for (int i = 0;i<split.length;i++){
                    WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne(split[i]);
                    WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById(split[i]).orElse(null);
                    String isCheckDoctorWork = "";
                    String isCheckDoctorWork = "";
                    if (wlyyHospitalSysDictDO!=null){
                    if (wlyyHospitalSysDictDO!=null){
                        isCheckDoctorWork = wlyyHospitalSysDictDO.getDictValue();
                        isCheckDoctorWork = wlyyHospitalSysDictDO.getDictValue();
@ -159,7 +158,7 @@ public class WorkTimeService {
                    return false;
                    return false;
                }
                }
            }else {
            }else {
                WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne(ywCode);
                WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById(ywCode).orElse(null);
                String isCheckDoctorWork = "1";
                String isCheckDoctorWork = "1";
                if (wlyyHospitalSysDictDO!=null){
                if (wlyyHospitalSysDictDO!=null){
                    isCheckDoctorWork = wlyyHospitalSysDictDO.getDictValue();
                    isCheckDoctorWork = wlyyHospitalSysDictDO.getDictValue();

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -321,7 +321,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        List<WlyyOutpatientVO> wlyyOutpatientVOS = ykyyEntranceService.BS30025(patNo,conNo,null,null,demoFlag,ksdm);
        List<WlyyOutpatientVO> wlyyOutpatientVOS = ykyyEntranceService.BS30025(patNo,conNo,null,null,demoFlag,ksdm);
        if (wlyyOutpatientVOS!=null&&wlyyOutpatientVOS.size()!=0){
        if (wlyyOutpatientVOS!=null&&wlyyOutpatientVOS.size()!=0){
            WlyyOutpatientVO outpatientVO = wlyyOutpatientVOS.get(0);
            WlyyOutpatientVO outpatientVO = wlyyOutpatientVOS.get(0);
            BasePatientDO patientDO = basePatientDao.getOne(patient);
            BasePatientDO patientDO = basePatientDao.findById(patient).orElse(null);
            outpatientVO.setSex(patientDO.getSex()+"");
            outpatientVO.setSex(patientDO.getSex()+"");
            outpatientVO.setBirthday(patientDO.getBirthday());
            outpatientVO.setBirthday(patientDO.getBirthday());
            outpatientVO.setIdcard(patientDO.getIdcard());
            outpatientVO.setIdcard(patientDO.getIdcard());
@ -346,7 +346,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        //1.保存就诊实体
        //1.保存就诊实体
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson, WlyyOutpatientDO.class);
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson, WlyyOutpatientDO.class);
        System.out.print("getDescription::"+outpatientDO.getDescription());
        System.out.print("getDescription::"+outpatientDO.getDescription());
        BasePatientDO patientDO = basePatientDao.getOne(outpatientDO.getPatient());
        BasePatientDO patientDO = basePatientDao.findById(outpatientDO.getPatient()).orElse(null);
        BaseDoctorDO doctorDO = doctorDao.findByIdAndDel(outpatientDO.getDoctor());
        BaseDoctorDO doctorDO = doctorDao.findByIdAndDel(outpatientDO.getDoctor());
        outpatientDO.setMjz("mz");
        outpatientDO.setMjz("mz");
        outpatientDO.setStatus("0");
        outpatientDO.setStatus("0");
@ -395,7 +395,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                businessOrderDO.setOrderCategory("3");
                businessOrderDO.setOrderCategory("3");
            }
            }
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("WX_MONEY");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("WX_MONEY").orElse(null);
        Double price = 0.0;
        Double price = 0.0;
        String chargeType1 = null;
        String chargeType1 = null;
        if (doctorDO!=null){
        if (doctorDO!=null){

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -3948,7 +3948,7 @@ public class EntranceService {
    public String zsMsgFlow(String visitId,String msgId,String idType,String idNo,String patientName,
    public String zsMsgFlow(String visitId,String msgId,String idType,String idNo,String patientName,
                            String msgTime,String msgType,String msgContent,String jumpType
                            String msgTime,String msgType,String msgContent,String jumpType
                                ,String jumpUrl,String miniAppId,String miniAppUrl,String remark,String sender) throws Exception{
                                ,String jumpUrl,String miniAppId,String miniAppUrl,String remark,String sender) throws Exception{
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.getOne("zsMsgFlowUrl");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("zsMsgFlowUrl").orElse(null);
        String url = "";
        String url = "";
        String pyCode=null;
        String pyCode=null;
        if (wlyyHospitalSysDictDO!=null){
        if (wlyyHospitalSysDictDO!=null){

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java

@ -1146,7 +1146,7 @@ public class TnyyEntranceService {
                                if (object!=null){
                                if (object!=null){
                                    sbxh = object.getInteger("sbxh");
                                    sbxh = object.getInteger("sbxh");
                                    logger.info("kaishi=========="+cfsb);
                                    logger.info("kaishi=========="+cfsb);
                                    WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO = prescriptionInfoDao.getOne(wlyyPrescriptionInfoVO.getId());
                                    WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO = prescriptionInfoDao.findById(wlyyPrescriptionInfoVO.getId()).orElse(null);
                                    if (wlyyPrescriptionInfoDO!=null){
                                    if (wlyyPrescriptionInfoDO!=null){
                                        wlyyPrescriptionInfoDO.setHisCode(sbxh);
                                        wlyyPrescriptionInfoDO.setHisCode(sbxh);
                                        prescriptionInfoDao.save(wlyyPrescriptionInfoDO);
                                        prescriptionInfoDao.save(wlyyPrescriptionInfoDO);

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -191,7 +191,7 @@ public class XzzxEntranceService{
    }
    }
    public String getWXTokenUrl(){
    public String getWXTokenUrl(){
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.getOne("getXzToken");
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.findById("getXzToken").orElse(null);
        return sysDictDO.getDictCode();
        return sysDictDO.getDictCode();
    }
    }

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/suggest/service/BaseSuggestionService.java

@ -86,7 +86,7 @@ public class BaseSuggestionService extends BaseJpaService<BaseSuggestionDO, Base
    //查看单条
    //查看单条
    public BaseSuggestionDO findSuggestionById(String id){
    public BaseSuggestionDO findSuggestionById(String id){
        BaseSuggestionDO baseSuggestionDO = baseSuggestionDao.findById(id).orElse(null);
        BaseSuggestionDO baseSuggestionDO = baseSuggestionDao.findById(id).orElse(null);
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.getOne(baseSuggestionDO.getSuggestId());
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.findById(baseSuggestionDO.getSuggestId()).orElse(null);
        baseSuggestionDO.setSuggestName(baseSuggestionDictDO.getSuggestName());
        baseSuggestionDO.setSuggestName(baseSuggestionDictDO.getSuggestName());
        return baseSuggestionDO;
        return baseSuggestionDO;

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java

@ -410,7 +410,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
     * @return
     * @return
     */
     */
    public WlyySurveyTemplateVO findSurveyTemplateById(String tempId,String userCode ){
    public WlyySurveyTemplateVO findSurveyTemplateById(String tempId,String userCode ){
        WlyySurveyTemplateDO templateDO = surveyTemplateDao.getOne(tempId);
        WlyySurveyTemplateDO templateDO = surveyTemplateDao.findById(tempId).orElse(null);
        WlyySurveyTemplateVO templateVO = convertToModel(templateDO,WlyySurveyTemplateVO.class);
        WlyySurveyTemplateVO templateVO = convertToModel(templateDO,WlyySurveyTemplateVO.class);
        templateVO.setLabels(findSurveyTemplateLabel(tempId));
        templateVO.setLabels(findSurveyTemplateLabel(tempId));
        templateVO.setInsplabels(findSurveyInspTemplateLabel(tempId));
        templateVO.setInsplabels(findSurveyInspTemplateLabel(tempId));
@ -472,7 +472,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        WlyySurveyTemplateDO temp = objectMapper.readValue(tempJson,WlyySurveyTemplateDO.class);
        WlyySurveyTemplateDO temp = objectMapper.readValue(tempJson,WlyySurveyTemplateDO.class);
        if (StringUtils.isNotEmpty(temp.getId())){
        if (StringUtils.isNotEmpty(temp.getId())){
            WlyySurveyTemplateDO templateDO = surveyTemplateDao.getOne(temp.getId());
            WlyySurveyTemplateDO templateDO = surveyTemplateDao.findById(temp.getId()).orElse(null);
            if(null!=templateDO){
            if(null!=templateDO){
                temp.setCreater(templateDO.getCreater());
                temp.setCreater(templateDO.getCreater());
                temp.setCreaterCode(templateDO.getCreaterCode());
                temp.setCreaterCode(templateDO.getCreaterCode());

+ 58 - 58
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -173,7 +173,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        List<BusinessOrderDO> businessOrderDOS = new ArrayList<>();
        List<BusinessOrderDO> businessOrderDOS = new ArrayList<>();
        if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
        if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
            WlyyOutpatientDO outpatientDO = outpatientDao.getOne(wlyyPrescriptionDO.getOutpatientId());
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(wlyyPrescriptionDO.getId());
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(wlyyPrescriptionDO.getId());
            if (businessOrderDO==null) {
            if (businessOrderDO==null) {
                businessOrderDO = new BusinessOrderDO();
                businessOrderDO = new BusinessOrderDO();
@ -211,7 +211,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                JSONArray array = new JSONArray();
                JSONArray array = new JSONArray();
                List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(code, 1);
                List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(code, 1);
                if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                    WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("YKTCONTROL");
                    WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
                    for (WlyyPrescriptionInfoDO prescriptionInfoDO : wlyyPrescriptionInfoDOS) {
                    for (WlyyPrescriptionInfoDO prescriptionInfoDO : wlyyPrescriptionInfoDOS) {
                        JSONObject object = new JSONObject();
                        JSONObject object = new JSONObject();
                        //{"commodityName":"","commodityPrice":"","DrugUnit":"","MedicineDoctor":""}
                        //{"commodityName":"","commodityPrice":"","DrugUnit":"","MedicineDoctor":""}
@ -240,7 +240,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                        object.put("MedicineDoctor", yktDoctor);
                        object.put("MedicineDoctor", yktDoctor);
                        array.add(object);
                        array.add(object);
                    }
                    }
                    BasePatientDO patientDO = patientDao.getOne(businessOrderDO.getPatient());
                    BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
                    String userId = null;
                    String userId = null;
                    if (patientDO != null) {
                    if (patientDO != null) {
                        userId = patientDO.getUserId();
                        userId = patientDO.getUserId();
@ -323,10 +323,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        }
        }
        businessOrderDO = businessOrderDao.save(businessOrderDO);
        businessOrderDO = businessOrderDao.save(businessOrderDO);
        String patient = businessOrderDO.getPatient();
        String patient = businessOrderDO.getPatient();
        BasePatientDO basePatientDO = patientDao.getOne(patient);
        BasePatientDO basePatientDO = patientDao.findById(patient).orElse(null);
        String orderNo = businessOrderDO.getOrderNo();
        String orderNo = businessOrderDO.getOrderNo();
        String patientId = "";
        String patientId = "";
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("YKTCONTROL");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
        if (StringUtils.isNoneBlank(basePatientDO.getYktId())){
        if (StringUtils.isNoneBlank(basePatientDO.getYktId())){
            patientId = basePatientDO.getYktId();
            patientId = basePatientDO.getYktId();
        }else {
        }else {
@ -422,7 +422,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            throw new Exception("can't find wechat:the wxId is "+wechatId);
            throw new Exception("can't find wechat:the wxId is "+wechatId);
        }
        }
        String patient = businessOrderDO.getPatient();
        String patient = businessOrderDO.getPatient();
        BasePatientDO basePatientDO = patientDao.getOne(patient);
        BasePatientDO basePatientDO = patientDao.findById(patient).orElse(null);
        String orderNo = businessOrderDO.getOrderNo();
        String orderNo = businessOrderDO.getOrderNo();
        String patientId = basePatientDO.getYktId();
        String patientId = basePatientDO.getYktId();
        String orderAmout = businessOrderDO.getPayPrice()/100+"";
        String orderAmout = businessOrderDO.getPayPrice()/100+"";
@ -449,7 +449,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                doctorId="hlwyymrys001";
                doctorId="hlwyymrys001";
            }
            }
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("YKTCONTROL");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
        if (null != hospitalSysDictDO && "0".equalsIgnoreCase(hospitalSysDictDO.getDictValue())) {
        if (null != hospitalSysDictDO && "0".equalsIgnoreCase(hospitalSysDictDO.getDictValue())) {
        } else {
        } else {
@ -482,7 +482,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     */
     */
    @Transactional(rollbackFor = Exception.class)
    @Transactional(rollbackFor = Exception.class)
    public String refund(Map<String,String> par,String appKey) throws Exception {
    public String refund(Map<String,String> par,String appKey) throws Exception {
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("REFUND");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("REFUND").orElse(null);
        if(StringUtils.isNoneBlank(hospitalSysDictDO.getImgUrl())){
        if(StringUtils.isNoneBlank(hospitalSysDictDO.getImgUrl())){
            //公网域名必须为https
            //公网域名必须为https
            par.put("notify_url",hospitalSysDictDO.getImgUrl());
            par.put("notify_url",hospitalSysDictDO.getImgUrl());
@ -515,7 +515,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        WxWechatDO wxWechatDO = wechatDao.findByIdAndStatus(wechatId);
        WxWechatDO wxWechatDO = wechatDao.findByIdAndStatus(wechatId);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        if (NumberUtils.isDigits(relationCode) ){
        if (NumberUtils.isDigits(relationCode) ){
            BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.getOne(Integer.valueOf(relationCode));
            BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(Integer.valueOf(relationCode)).orElse(null);
            if (baseNatAppointmentDO!=null&&"-1".equalsIgnoreCase(baseNatAppointmentDO.getIsSuccess())){
            if (baseNatAppointmentDO!=null&&"-1".equalsIgnoreCase(baseNatAppointmentDO.getIsSuccess())){
                throw new Exception("订单已取消");
                throw new Exception("订单已取消");
            }
            }
@ -523,7 +523,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                throw new Exception("订单已支付");
                throw new Exception("订单已支付");
            }
            }
        }
        }
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(relationCode);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(relationCode).orElse(null);
        if (wlyyOutpatientDO!=null){
        if (wlyyOutpatientDO!=null){
            if ("-1".equalsIgnoreCase(wlyyOutpatientDO.getStatus())){
            if ("-1".equalsIgnoreCase(wlyyOutpatientDO.getStatus())){
                throw new Exception("订单已取消");
                throw new Exception("订单已取消");
@ -919,8 +919,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            //更改业务状态,做日志保存等操作
            //更改业务状态,做日志保存等操作
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(seqNo);
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(seqNo);
            businessOrderDO.setPayTime(DateUtil.strToDate(timeEnd,DateUtil.YYYY_MM_DD_HH_MM_SS));
            businessOrderDO.setPayTime(DateUtil.strToDate(timeEnd,DateUtil.YYYY_MM_DD_HH_MM_SS));
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("YKTCONTROL");
            WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.getOne("consultPay");
            WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
            WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").orElse(null);
            String changeflag="0";
            String changeflag="0";
            String type="";
            String type="";
            if(null!=changeMethod){
            if(null!=changeMethod){
@ -929,11 +929,11 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            if (businessOrderDO!=null){
            if (businessOrderDO!=null){
                if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
                    if ("0".equalsIgnoreCase(changeflag)){
                    if ("0".equalsIgnoreCase(changeflag)){
                        ConsultDo consultDo = consultOrderDao.getOne(businessOrderDO.getRelationCode());
                        ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                        consultDo.setPayStatus(1);
                        consultDo.setPayStatus(1);
                        consultOrderDao.save(consultDo);
                        consultOrderDao.save(consultDo);
                    }else {
                    }else {
                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                        wlyyOutpatientDO.setPayStatus(1);
                        wlyyOutpatientDO.setPayStatus(1);
                        outpatientDao.save(wlyyOutpatientDO);
                        outpatientDao.save(wlyyOutpatientDO);
                        prescriptionService.wxTempalteJPush("outpatient_remind",wlyyOutpatientDO,null,"","","","");
                        prescriptionService.wxTempalteJPush("outpatient_remind",wlyyOutpatientDO,null,"","","","");
@ -948,7 +948,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    }
                    }
                }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
                }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
                    WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
                    WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                    wlyyOutpatientDO.setPayStatus(1);
                    wlyyOutpatientDO.setPayStatus(1);
                    outpatientDao.save(wlyyOutpatientDO);
                    outpatientDao.save(wlyyOutpatientDO);
                    if (StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
                    if (StringUtils.isNoneBlank(wlyyOutpatientDO.getDoctor())){
@ -1008,7 +1008,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                                                " where "+condition+" t.CFSB ='"+wlyyPrescriptionDO.getRealOrder()+"'";
                                                " where "+condition+" t.CFSB ='"+wlyyPrescriptionDO.getRealOrder()+"'";
                                        ykyyEntranceService.updateHisStatus(updatesql);
                                        ykyyEntranceService.updateHisStatus(updatesql);
                                        logger.info("自取写入更新his");
                                        logger.info("自取写入更新his");
                                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(wlyyPrescriptionDO.getOutpatientId());
                                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId()).orElse(null);
                                        ykyySMSService.sendSmsByTempcode("oneself_pick",wlyyOutpatientDO,wlyyPrescriptionDO,"");
                                        ykyySMSService.sendSmsByTempcode("oneself_pick",wlyyOutpatientDO,wlyyPrescriptionDO,"");
                                    }else {
                                    }else {
@ -1064,7 +1064,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
                }else if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("6")){
                    String price = Integer.parseInt(totalFee)/100+"";
                    String price = Integer.parseInt(totalFee)/100+"";
                    BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.getOne(Integer.parseInt(businessOrderDO.getRelationCode()));
                    BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(Integer.parseInt(businessOrderDO.getRelationCode())).orElse(null);
                    baseNatAppointmentDO.setPayStatus("1");
                    baseNatAppointmentDO.setPayStatus("1");
                    baseNatAppointmentDao.save(baseNatAppointmentDO);
                    baseNatAppointmentDao.save(baseNatAppointmentDO);
@ -1113,7 +1113,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    public String sendDataToYkt(String orderNo){
    public String sendDataToYkt(String orderNo){
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        String patient = businessOrderDO.getPatient();
        String patient = businessOrderDO.getPatient();
        BasePatientDO basePatientDO = patientDao.getOne(patient);
        BasePatientDO basePatientDO = patientDao.findById(patient).orElse(null);
        String patientId = basePatientDO.getYktId();
        String patientId = basePatientDO.getYktId();
        String orderAmout = businessOrderDO.getPayPrice()/100+"";
        String orderAmout = businessOrderDO.getPayPrice()/100+"";
        String description = businessOrderDO.getDescription();
        String description = businessOrderDO.getDescription();
@ -1226,10 +1226,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if(wxWechatDO==null){
        if(wxWechatDO==null){
            throw new Exception("can't find wechat:the wxId is "+wechatId);
            throw new Exception("can't find wechat:the wxId is "+wechatId);
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.getOne("YLZ_NOTIFY_URL");
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").orElse(null);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        if (businessOrderDO!=null){
        if (businessOrderDO!=null){
            BasePatientDO patientDO = patientDao.getOne(businessOrderDO.getPatient());
            BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
            String idcard = "";
            String idcard = "";
            String ssc = "";
            String ssc = "";
            if (patientDO!=null){
            if (patientDO!=null){
@ -1287,10 +1287,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if(wxWechatDO==null){
        if(wxWechatDO==null){
            throw new Exception("can't find wechat:the wxId is "+wechatId);
            throw new Exception("can't find wechat:the wxId is "+wechatId);
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.getOne("YLZ_NOTIFY_URL");
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").orElse(null);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        if (businessOrderDO!=null){
        if (businessOrderDO!=null){
            BasePatientDO patientDO = patientDao.getOne(businessOrderDO.getPatient());
            BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
            String idcard = "";
            String idcard = "";
            String ssc = "";
            String ssc = "";
            if (patientDO!=null){
            if (patientDO!=null){
@ -1372,7 +1372,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (businessOrderDO==null){
        if (businessOrderDO==null){
            throw new Exception("this orderId not exit");
            throw new Exception("this orderId not exit");
        }
        }
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO==null){
        if (patientDO==null){
            throw new Exception("this patient not exit");
            throw new Exception("this patient not exit");
        }
        }
@ -1436,23 +1436,23 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            throw new Exception("查不到订单!");
            throw new Exception("查不到订单!");
        }
        }
        String newPayFlag = "0";
        String newPayFlag = "0";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.getOne("consultPay");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("consultPay").orElse(null);
        if (null!=wlyyHospitalSysDictDO){
        if (null!=wlyyHospitalSysDictDO){
            newPayFlag = wlyyHospitalSysDictDO.getDictValue();
            newPayFlag = wlyyHospitalSysDictDO.getDictValue();
        }
        }
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
            if ("0".equalsIgnoreCase(newPayFlag)){
            if ("0".equalsIgnoreCase(newPayFlag)){
                ConsultDo consultDo = consultOrderDao.getOne(businessOrderDO.getRelationCode());
                ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                consultDo.setPayStatus(2);
                consultDo.setPayStatus(2);
                consultOrderDao.save(consultDo);
                consultOrderDao.save(consultDo);
            }else {
            }else {
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                wlyyOutpatientDO.setPayStatus(2);
                wlyyOutpatientDO.setPayStatus(2);
                outpatientDao.save(wlyyOutpatientDO);
                outpatientDao.save(wlyyOutpatientDO);
            }
            }
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
            wlyyOutpatientDO.setPayStatus(2);
            wlyyOutpatientDO.setPayStatus(2);
            outpatientDao.save(wlyyOutpatientDO);
            outpatientDao.save(wlyyOutpatientDO);
        }
        }
@ -1472,7 +1472,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        logger.info("入参:"+orderNo);
        logger.info("入参:"+orderNo);
        String baseUrl = prescriptionService.findDomainUrlInDict();
        String baseUrl = prescriptionService.findDomainUrlInDict();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(orderNo);
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.getOne("consultPay");
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").orElse(null);
        String changeflag="0";
        String changeflag="0";
        if(null!=changeMethod){
        if(null!=changeMethod){
            changeflag = changeMethod.getDictValue();
            changeflag = changeMethod.getDictValue();
@ -1482,7 +1482,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        }
        }
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")&&businessOrderDO.getStatus()==0){
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")&&businessOrderDO.getStatus()==0){
            if ("0".equalsIgnoreCase(changeflag)){
            if ("0".equalsIgnoreCase(changeflag)){
                ConsultDo consultDo = consultOrderDao.getOne(businessOrderDO.getRelationCode());
                ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                consultDo.setPayStatus(1);
                consultDo.setPayStatus(1);
                consultOrderDao.save(consultDo);
                consultOrderDao.save(consultDo);
            }else {
            }else {
@ -1491,7 +1491,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                //发送企业模板消息给医生
                //发送企业模板消息给医生
                BasePatientDO patientDO = new BasePatientDO();
                BasePatientDO patientDO = new BasePatientDO();
                patientDO = patientDao.getOne(outpatientDO.getPatient());
                patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
                String msg = "";
                String msg = "";
                String name=outpatientDO.getPatientName();
                String name=outpatientDO.getPatientName();
                String sex = "";
                String sex = "";
@ -1539,7 +1539,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            }
            }
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")||businessOrderDO.getOrderCategory().equalsIgnoreCase("5")){
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")||businessOrderDO.getOrderCategory().equalsIgnoreCase("5")){
           WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
           WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
           wlyyOutpatientDO.setPayStatus(1);
           wlyyOutpatientDO.setPayStatus(1);
           WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
           WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
           try {
           try {
@ -1553,7 +1553,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
           if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
           if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
               //发送企业模板消息给医生
               //发送企业模板消息给医生
               BasePatientDO patientDO = new BasePatientDO();
               BasePatientDO patientDO = new BasePatientDO();
               patientDO = patientDao.getOne(outpatientDO.getPatient());
               patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
               String msg = "";
               String msg = "";
               String name=outpatientDO.getPatientName();
               String name=outpatientDO.getPatientName();
               String sex = "";
               String sex = "";
@ -1631,7 +1631,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        logger.info("进入无需支付");
        logger.info("进入无需支付");
        String baseUrl = prescriptionService.findDomainUrlInDict();
        String baseUrl = prescriptionService.findDomainUrlInDict();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.getOne("consultPay");
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay").orElse(null);
        String changeflag="0";
        String changeflag="0";
        if(null!=changeMethod){
        if(null!=changeMethod){
            changeflag = changeMethod.getDictValue();
            changeflag = changeMethod.getDictValue();
@ -1641,17 +1641,17 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        }
        }
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")&&0==businessOrderDO.getStatus()){
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")&&0==businessOrderDO.getStatus()){
            if ("0".equalsIgnoreCase(changeflag)){
            if ("0".equalsIgnoreCase(changeflag)){
                ConsultDo consultDo = consultOrderDao.getOne(businessOrderDO.getRelationCode());
                ConsultDo consultDo = consultOrderDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                consultDo.setPayStatus(1);
                consultDo.setPayStatus(1);
                consultOrderDao.save(consultDo);
                consultOrderDao.save(consultDo);
            }else {
            }else {
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
                wlyyOutpatientDO.setPayStatus(1);
                wlyyOutpatientDO.setPayStatus(1);
                WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
                if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
                if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
                    //发送企业模板消息给医生
                    //发送企业模板消息给医生
                    BasePatientDO patientDO = new BasePatientDO();
                    BasePatientDO patientDO = new BasePatientDO();
                    patientDO = patientDao.getOne(outpatientDO.getPatient());
                    patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
                    String msg = "";
                    String msg = "";
                    String name=outpatientDO.getPatientName();
                    String name=outpatientDO.getPatientName();
                    String sex = "";
                    String sex = "";
@ -1693,13 +1693,13 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                }
                }
            }
            }
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")||businessOrderDO.getOrderCategory().equalsIgnoreCase("5")&&0==businessOrderDO.getStatus()){
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")||businessOrderDO.getOrderCategory().equalsIgnoreCase("5")&&0==businessOrderDO.getStatus()){
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(businessOrderDO.getRelationCode());
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode()).orElse(null);
            wlyyOutpatientDO.setPayStatus(1);
            wlyyOutpatientDO.setPayStatus(1);
            WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
            WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
            if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
            if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()==0){
                //发送企业模板消息给医生
                //发送企业模板消息给医生
                BasePatientDO patientDO = new BasePatientDO();
                BasePatientDO patientDO = new BasePatientDO();
                patientDO = patientDao.getOne(outpatientDO.getPatient());
                patientDO = patientDao.findById(outpatientDO.getPatient()).orElse(null);
                String msg = "";
                String msg = "";
                String name=outpatientDO.getPatientName();
                String name=outpatientDO.getPatientName();
                String sex = "";
                String sex = "";
@ -1764,7 +1764,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    public JSONObject selectOrderTime(String relationCode){
    public JSONObject selectOrderTime(String relationCode){
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.getOne("PAY_TIME");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("PAY_TIME").orElse(null);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        Date createDate = businessOrderDO.getCreateTime();
        Date createDate = businessOrderDO.getCreateTime();
        Calendar calendar = Calendar.getInstance();
        Calendar calendar = Calendar.getInstance();
@ -1797,11 +1797,11 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if(wxWechatDO==null){
        if(wxWechatDO==null){
            throw new Exception("can't find wechat:the wxId is "+wechatId);
            throw new Exception("can't find wechat:the wxId is "+wechatId);
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.getOne("YLZ_NOTIFY_URL");
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").orElse(null);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(code);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(code).orElse(null);
        if (businessOrderDO!=null){
        if (businessOrderDO!=null){
            BasePatientDO patientDO = patientDao.getOne(businessOrderDO.getPatient());
            BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
            String idcard = "";
            String idcard = "";
            if (patientDO!=null){
            if (patientDO!=null){
                idcard = patientDO.getIdcard();
                idcard = patientDO.getIdcard();
@ -1847,11 +1847,11 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                }
                }
                doctorFee= Double.parseDouble(fee);
                doctorFee= Double.parseDouble(fee);
            }else {
            }else {
                WlyyHospitalSysDictDO wlyyHospitalSysDictDO =hospitalSysDictDao.getOne("WX_MONEY");
                WlyyHospitalSysDictDO wlyyHospitalSysDictDO =hospitalSysDictDao.findById("WX_MONEY").orElse(null);
                doctorFee = Double.parseDouble(wlyyHospitalSysDictDO.getDictValue());
                doctorFee = Double.parseDouble(wlyyHospitalSysDictDO.getDictValue());
            }
            }
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO =hospitalSysDictDao.getOne("YLZ_YE");
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO =hospitalSysDictDao.findById("YLZ_YE").orElse(null);
            if (wlyyHospitalSysDictDO!=null&&wlyyHospitalSysDictDO.getDictValue().equalsIgnoreCase("0")){
            if (wlyyHospitalSysDictDO!=null&&wlyyHospitalSysDictDO.getDictValue().equalsIgnoreCase("0")){
                businessOrderDO.setPayPrice(doctorFee);
                businessOrderDO.setPayPrice(doctorFee);
            }else {
            }else {
@ -1944,8 +1944,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if(wxWechatDO==null){
        if(wxWechatDO==null){
            throw new Exception("can't find wechat:the wxId is "+wechatId);
            throw new Exception("can't find wechat:the wxId is "+wechatId);
        }
        }
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.getOne("YLZ_NOTIFY_URL");
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(code);
        WlyyHospitalSysDictDO hospitalSysDictDO =hospitalSysDictDao.findById("YLZ_NOTIFY_URL").orElse(null);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(code).orElse(null);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(code);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(code);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(ylzMedicalRelationDO.getId());
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(ylzMedicalRelationDO.getId());
        BigDecimal b1 = new BigDecimal(ylzMedicalRelationDO.getBcwkje());//总金额
        BigDecimal b1 = new BigDecimal(ylzMedicalRelationDO.getBcwkje());//总金额
@ -1954,7 +1954,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        Double fee = b1.subtract(b2).subtract(b3).doubleValue();
        Double fee = b1.subtract(b2).subtract(b3).doubleValue();
        if (businessOrderDO!=null){
        if (businessOrderDO!=null){
            BasePatientDO patientDO = patientDao.getOne(businessOrderDO.getPatient());
            BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
            String idcard = "";
            String idcard = "";
            if (patientDO!=null){
            if (patientDO!=null){
                idcard = patientDO.getIdcard();
                idcard = patientDO.getIdcard();
@ -2031,7 +2031,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            }
            }
        }else {
        }else {
            businessOrderDO = new BusinessOrderDO();
            businessOrderDO = new BusinessOrderDO();
            BasePatientDO patientDO = patientDao.getOne(wlyyOutpatientDO.getPatient());
            BasePatientDO patientDO = patientDao.findById(wlyyOutpatientDO.getPatient()).orElse(null);
            String idcard = "";
            String idcard = "";
            if (patientDO!=null){
            if (patientDO!=null){
                idcard = patientDO.getIdcard();
                idcard = patientDO.getIdcard();
@ -2150,14 +2150,14 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     */
     */
    public String yktAppPayJson(String relationCode) throws UnknownHostException {
    public String yktAppPayJson(String relationCode) throws UnknownHostException {
        String serverIp = getServerIp();
        String serverIp = getServerIp();
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("YKT_NOTIFY_URL");
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKT_NOTIFY_URL").orElse(null);
        String url = hospitalSysDictDO.getDictCode();
        String url = hospitalSysDictDO.getDictCode();
        String notifyUrl =url;
        String notifyUrl =url;
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        businessOrderDO.setPayType(5);
        businessOrderDO.setPayType(5);
        businessOrderDao.save(businessOrderDO);
        businessOrderDao.save(businessOrderDO);
        String totalFee =(int)(businessOrderDO.getPayPrice()*100)+"";
        String totalFee =(int)(businessOrderDO.getPayPrice()*100)+"";
        WlyyHospitalSysDictDO hospitalSysD2ictDO = hospitalSysDictDao.getOne("YKTCONTROL");
        WlyyHospitalSysDictDO hospitalSysD2ictDO = hospitalSysDictDao.findById("YKTCONTROL").orElse(null);
        if (null != hospitalSysD2ictDO && "0".equalsIgnoreCase(hospitalSysD2ictDO.getDictValue())) {
        if (null != hospitalSysD2ictDO && "0".equalsIgnoreCase(hospitalSysD2ictDO.getDictValue())) {
            return null;
            return null;
        } else {
        } else {
@ -2254,13 +2254,13 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    logger.info("price"+prie);
                    logger.info("price"+prie);
                    map.put("payPrice",prie);
                    map.put("payPrice",prie);
                }if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
                }if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
                    WlyyOutpatientDO outpatientDO = outpatientDao.getOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).orElse(null);
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("patientName",outpatientDO.getPatientName());
                    map.put("patientName",outpatientDO.getPatientName());
                }else if (orderCategoryFlag.equalsIgnoreCase("4")){
                }else if (orderCategoryFlag.equalsIgnoreCase("4")){
                    WlyyPrescriptionDO prescriptionDO = prescriptionDao.getOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.getOne(prescriptionDO.getOutpatientId());
                    WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).orElse(null);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).orElse(null);
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("doctorName",outpatientDO.getDoctorName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("consumerName",outpatientDO.getConsumerName());
                    map.put("patientName",outpatientDO.getPatientName());
                    map.put("patientName",outpatientDO.getPatientName());
@ -2377,7 +2377,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    map.put("payPrice",prie);
                    map.put("payPrice",prie);
                }
                }
                if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
                if (orderCategoryFlag.equalsIgnoreCase("1")||orderCategoryFlag.equalsIgnoreCase("2")||orderCategoryFlag.equalsIgnoreCase("3")){
                    WlyyOutpatientDO outpatientDO = outpatientDao.getOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).orElse(null);
                    if (outpatientDO!=null){
                    if (outpatientDO!=null){
                        map.put("doctorName",outpatientDO.getDoctorName());
                        map.put("doctorName",outpatientDO.getDoctorName());
                        map.put("consumerName",outpatientDO.getPatientName());
                        map.put("consumerName",outpatientDO.getPatientName());
@ -2387,8 +2387,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    }
                    }
                }else if (orderCategoryFlag.equalsIgnoreCase("4")){
                }else if (orderCategoryFlag.equalsIgnoreCase("4")){
                    WlyyPrescriptionDO prescriptionDO = prescriptionDao.getOne(relationCode);
                    WlyyOutpatientDO outpatientDO = outpatientDao.getOne(prescriptionDO.getOutpatientId());
                    WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).orElse(null);
                    WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).orElse(null);
                    if (outpatientDO!=null){
                    if (outpatientDO!=null){
                        map.put("doctorName",outpatientDO.getDoctorName());
                        map.put("doctorName",outpatientDO.getDoctorName());
                        map.put("consumerName",outpatientDO.getPatientName());
                        map.put("consumerName",outpatientDO.getPatientName());
@ -2439,7 +2439,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    ,String geetestValidate,String geetestSeccode) throws Exception {
    ,String geetestValidate,String geetestSeccode) throws Exception {
        String isNeedGeet= "0";//1需要 0不需要
        String isNeedGeet= "0";//1需要 0不需要
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO1= hospitalSysDictDao.getOne("isCardNeedGeet");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO1= hospitalSysDictDao.findById("isCardNeedGeet").orElse(null);
        if (wlyyHospitalSysDictDO1!=null){
        if (wlyyHospitalSysDictDO1!=null){
            isNeedGeet=wlyyHospitalSysDictDO1.getDictValue();
            isNeedGeet=wlyyHospitalSysDictDO1.getDictValue();
        }
        }
@ -2449,7 +2449,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                throw new  Exception("验证失败");
                throw new  Exception("验证失败");
            }
            }
        }
        }
        BasePatientDO patientDO = patientDao.getOne(patientId);
        BasePatientDO patientDO = patientDao.findById(patientId).orElse(null);
        BusinessOrderDO businessOrderDO = new BusinessOrderDO();
        BusinessOrderDO businessOrderDO = new BusinessOrderDO();
        businessOrderDO.setPatient(patientId);
        businessOrderDO.setPatient(patientId);
        businessOrderDO.setPatientName(patientDO.getName());
        businessOrderDO.setPatientName(patientDO.getName());

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -253,7 +253,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
        if(StringUtils.isEmpty(basePatientDO.getId())){
        if(StringUtils.isEmpty(basePatientDO.getId())){
            return ConstantUtils.FAIL;
            return ConstantUtils.FAIL;
        }
        }
        BasePatientDO basePatientDO1 = basePatientDao.getOne(basePatientDO.getId());
        BasePatientDO basePatientDO1 = basePatientDao.findById(basePatientDO.getId()).orElse(null);
        if (null!=basePatientDO1){
        if (null!=basePatientDO1){
            basePatientDO1.setName(basePatientDO.getName());
            basePatientDO1.setName(basePatientDO.getName());
@ -316,7 +316,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
        if(StringUtils.isEmpty(basePatientDO.getId())){
        if(StringUtils.isEmpty(basePatientDO.getId())){
            return ConstantUtils.FAIL;
            return ConstantUtils.FAIL;
        }
        }
        BasePatientDO basePatientDO1 = basePatientDao.getOne(basePatientDO.getId());
        BasePatientDO basePatientDO1 = basePatientDao.findById(basePatientDO.getId()).orElse(null);
        if (null!=basePatientDO1){
        if (null!=basePatientDO1){
            basePatientDO1.setName(basePatientDO.getName());
            basePatientDO1.setName(basePatientDO.getName());
            basePatientDO1.setSex(basePatientDO.getSex());
            basePatientDO1.setSex(basePatientDO.getSex());
@ -387,7 +387,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
     * @return
     * @return
     */
     */
    public BasePatientDO findByIdAndDel(String patient) throws Exception{
    public BasePatientDO findByIdAndDel(String patient) throws Exception{
        BasePatientDO basePatientDO = basePatientDao.getOne(patient);
        BasePatientDO basePatientDO = basePatientDao.findById(patient).orElse(null);
        if(basePatientDO==null){
        if(basePatientDO==null){
            throw new Exception("用户不存在");
            throw new Exception("用户不存在");
        }
        }

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/AchnsDoctorRecordService.java

@ -24,7 +24,7 @@ public class AchnsDoctorRecordService extends BaseJpaService<AchnsDoctorRecordDO
        });*/
        });*/
        for (AchnsDoctorRecordDO achnsDoctorRecordDO:achnsDoctorRecordDOs){
        for (AchnsDoctorRecordDO achnsDoctorRecordDO:achnsDoctorRecordDOs){
            if (StringUtils.isNotBlank(achnsDoctorRecordDO.getId())){
            if (StringUtils.isNotBlank(achnsDoctorRecordDO.getId())){
                AchnsDoctorRecordDO oldFrequency= achnsDoctorRecordDao.getOne(achnsDoctorRecordDO.getId());
                AchnsDoctorRecordDO oldFrequency= achnsDoctorRecordDao.findById(achnsDoctorRecordDO.getId()).orElse(null);
                BeanUtils.copyProperties(achnsDoctorRecordDO, oldFrequency, getNullPropertyNames(achnsDoctorRecordDO));
                BeanUtils.copyProperties(achnsDoctorRecordDO, oldFrequency, getNullPropertyNames(achnsDoctorRecordDO));
                oldFrequency.setUpdate_time(new Date());
                oldFrequency.setUpdate_time(new Date());
                oldFrequency.setIs_del("1");
                oldFrequency.setIs_del("1");

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/wechat/enterprise/EnterpriseService.java

@ -295,7 +295,7 @@ public class EnterpriseService {
        param.put("toparty","");
        param.put("toparty","");
        param.put("totag","");
        param.put("totag","");
        param.put("msgtype","news");
        param.put("msgtype","news");
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.getOne(enterpriseId);
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findById(enterpriseId).orElse(null);
        param.put("agentid",wxEnterpriseDO.getAgentid());
        param.put("agentid",wxEnterpriseDO.getAgentid());
@ -362,7 +362,7 @@ public class EnterpriseService {
        param.put("toparty","");
        param.put("toparty","");
        param.put("totag","");
        param.put("totag","");
        param.put("msgtype","markdown");
        param.put("msgtype","markdown");
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.getOne(enterpriseId);
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findById(enterpriseId).orElse(null);
        param.put("agentid",wxEnterpriseDO.getAgentid());
        param.put("agentid",wxEnterpriseDO.getAgentid());

+ 8 - 8
business/base-service/src/main/java/com/yihu/jw/wechat/service/WxTemplateService.java

@ -124,7 +124,7 @@ public class WxTemplateService {
     * @param session_id 会话ID
     * @param session_id 会话ID
     */
     */
    public String sendWeTempMesMiniProgram(String sender_id, String sender_name, String reciver_id, String reciver_name,String session_id)throws Exception {
    public String sendWeTempMesMiniProgram(String sender_id, String sender_name, String reciver_id, String reciver_name,String session_id)throws Exception {
        BasePatientDO basePatientDO = basePatientDao.getOne(reciver_id);
        BasePatientDO basePatientDO = basePatientDao.findById(reciver_id).orElse(null);
        if(basePatientDO!=null){
        if(basePatientDO!=null){
            List<BasePatientWechatDo> ps = basePatientWechatDao.findByWechatIdAndPatientId(wechatId,reciver_id);
            List<BasePatientWechatDo> ps = basePatientWechatDao.findByWechatIdAndPatientId(wechatId,reciver_id);
            if(ps.isEmpty()){
            if(ps.isEmpty()){
@ -168,7 +168,7 @@ public class WxTemplateService {
                        ConsultTeamDo consultDo = consultTeamOrderDao.findByConsult(session_id);
                        ConsultTeamDo consultDo = consultTeamOrderDao.findByConsult(session_id);
                        WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
                        WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
                        if (consultDo!=null){
                        if (consultDo!=null){
                            wlyyOutpatientDO = outpatientDao.getOne(consultDo.getRelationCode());
                            wlyyOutpatientDO = outpatientDao.findById(consultDo.getRelationCode()).orElse(null);
                        }
                        }
                        if (wlyyOutpatientDO!=null){
                        if (wlyyOutpatientDO!=null){
                            config.setKeyword2(DateUtil.dateToStrLong(wlyyOutpatientDO.getCreateTime()));
                            config.setKeyword2(DateUtil.dateToStrLong(wlyyOutpatientDO.getCreateTime()));
@ -234,8 +234,8 @@ public class WxTemplateService {
        if (yxTokenMappingDO!=null){
        if (yxTokenMappingDO!=null){
            return yxTokenMappingDO.getToken();
            return yxTokenMappingDO.getToken();
        }
        }
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.getOne("YXAPPKEY");
        WlyyHospitalSysDictDO hospitalSysDictDO =  hospitalSysDictDao.getOne("YXAPPSECRET");
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.findById("YXAPPKEY").orElse(null);
        WlyyHospitalSysDictDO hospitalSysDictDO =  hospitalSysDictDao.findById("YXAPPSECRET").orElse(null);
        if (sysDictDO==null){
        if (sysDictDO==null){
            return  "找不到对应的key";
            return  "找不到对应的key";
        }
        }
@ -288,8 +288,8 @@ public class WxTemplateService {
        if (yxTokenMappingDO!=null){
        if (yxTokenMappingDO!=null){
            return yxTokenMappingDO.getToken();
            return yxTokenMappingDO.getToken();
        }
        }
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.getOne("YXAPPKEY");
        WlyyHospitalSysDictDO hospitalSysDictDO =  hospitalSysDictDao.getOne("YXAPPSECRET");
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.findById("YXAPPKEY").orElse(null);
        WlyyHospitalSysDictDO hospitalSysDictDO =  hospitalSysDictDao.findById("YXAPPSECRET").orElse(null);
        if (sysDictDO==null){
        if (sysDictDO==null){
            return  "找不到对应的key";
            return  "找不到对应的key";
        }
        }
@ -436,7 +436,7 @@ public class WxTemplateService {
    public void updateStatusByPayTime() throws Exception{
    public void updateStatusByPayTime() throws Exception{
        if("xm_ykyy_wx".equals(wechatId)){
        if("xm_ykyy_wx".equals(wechatId)){
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.getOne("PAY_TIME");
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("PAY_TIME").orElse(null);
            if (wlyyHospitalSysDictDO!=null){
            if (wlyyHospitalSysDictDO!=null){
                String remind = wlyyHospitalSysDictDO.getDictValue();
                String remind = wlyyHospitalSysDictDO.getDictValue();
                String close = wlyyHospitalSysDictDO.getDictCode();
                String close = wlyyHospitalSysDictDO.getDictCode();
@ -457,7 +457,7 @@ public class WxTemplateService {
                            consultTeamDo.setStatus(-1);
                            consultTeamDo.setStatus(-1);
                            consultTeamOrderDao.save(consultTeamDo);
                            consultTeamOrderDao.save(consultTeamDo);
                        }else if (orderCategory.equalsIgnoreCase("2")){
                        }else if (orderCategory.equalsIgnoreCase("2")){
                            WlyyOutpatientDO outpatientDO = outpatientDao.getOne(relationCode);
                            WlyyOutpatientDO outpatientDO = outpatientDao.findById(relationCode).orElse(null);
                            outpatientDO.setStatus("-1");
                            outpatientDO.setStatus("-1");
                            outpatientDao.save(outpatientDO);
                            outpatientDao.save(outpatientDO);
                        }
                        }

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -280,7 +280,7 @@ public class WlyyBusinessService {
        
        
        String idcard = "";
        String idcard = "";
        String result = "";
        String result = "";
        BasePatientDO basePatientDO = basePatientDao.getOne(patientId);
        BasePatientDO basePatientDO = basePatientDao.findById(patientId).orElse(null);
        if(basePatientDO != null){
        if(basePatientDO != null){
            idcard = basePatientDO.getIdcard();
            idcard = basePatientDO.getIdcard();