瀏覽代碼

代码修改

LAPTOP-KB9HII50\70708 2 年之前
父節點
當前提交
939b66c5ed
共有 56 個文件被更改,包括 175 次插入210 次删除
  1. 9 9
      business/base-service/src/main/java/com/yihu/jw/complaint/BaseComplaintService.java
  2. 7 19
      business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java
  3. 1 1
      business/base-service/src/main/java/com/yihu/jw/dict/service/DiseaseHomepageBannerService.java
  4. 3 3
      business/base-service/src/main/java/com/yihu/jw/dict/service/FollowUpDictService.java
  5. 2 2
      business/base-service/src/main/java/com/yihu/jw/dict/service/PrivateDictService.java
  6. 3 3
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java
  7. 1 1
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorService.java
  8. 2 2
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorSuggestService.java
  9. 1 1
      business/base-service/src/main/java/com/yihu/jw/healthUpload/service/BaseDoctorHealthUploadService.java
  10. 3 3
      business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/BaseIncentiveDictService.java
  11. 6 6
      business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/WlyyHospitalSysDictService.java
  12. 5 5
      business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/service/BaseDoctorBGService.java
  13. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/drugstore/service/BaseDrugStoreService.java
  14. 6 6
      business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java
  15. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/BaseOperateLogService.java
  16. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java
  17. 12 18
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerDoctorService.java
  18. 7 7
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerService.java
  19. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseUserMsgService.java
  20. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/SystemMessageService.java
  21. 3 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/HcyyPrescriptionService.java
  22. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/InspectionService.java
  23. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/NationalDrugDictService.java
  24. 3 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PayInfoNoticeService.java
  25. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionLogService.java
  26. 13 13
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  27. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/TnPrescriptionService.java
  28. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java
  29. 2 7
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DoctorPreSignService.java
  30. 3 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  31. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java
  32. 6 6
      business/base-service/src/main/java/com/yihu/jw/hospital/suggest/service/BaseSuggestionDictService.java
  33. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/suggest/service/BaseSuggestionService.java
  34. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java
  35. 3 5
      business/base-service/src/main/java/com/yihu/jw/hospital/team/service/WlyyAdminTeamService.java
  36. 3 6
      business/base-service/src/main/java/com/yihu/jw/hospital/ykyy/service/YkyyService.java
  37. 2 2
      business/base-service/src/main/java/com/yihu/jw/internet/service/DataGeneratorService.java
  38. 1 1
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  39. 9 10
      business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java
  40. 4 4
      business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientGroupDictService.java
  41. 3 3
      business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java
  42. 1 1
      business/base-service/src/main/java/com/yihu/jw/pay/service/CloudCarePayService.java
  43. 1 1
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/AchnsDoctorRecordService.java
  44. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/BaseNsOlineMedService.java
  45. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/BaseNsOnlineAskService.java
  46. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/BaseNsPrescriptionDrugService.java
  47. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpAppointmentOnlineService.java
  48. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpMedicalOnlineService.java
  49. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsDoctorRecordService.java
  50. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsDoctorScoreService.java
  51. 2 2
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsOrganBaseService.java
  52. 2 2
      business/base-service/src/main/java/com/yihu/jw/utils/YkyySMSService.java
  53. 3 6
      business/base-service/src/main/java/com/yihu/jw/wechat/enterprise/EnterpriseService.java
  54. 1 1
      business/base-service/src/main/java/com/yihu/jw/wechat/service/WxAccessTokenService.java
  55. 6 9
      business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java
  56. 2 2
      business/base-service/src/main/java/com/yihu/jw/wlyy/wlyyhttp/WlyyHttpService.java

+ 9 - 9
business/base-service/src/main/java/com/yihu/jw/complaint/BaseComplaintService.java

@ -224,7 +224,7 @@ public class BaseComplaintService {
     * 患者举报接口
     * */
    public BaseComplaintDO patiemtComplaint(String json) throws Exception{
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO= wlyyHospitalSysDictDao.getOne("complaintOpenControl");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO= wlyyHospitalSysDictDao.findById("complaintOpenControl").orElse(null);
        if (wlyyHospitalSysDictDO!=null){
            if (!"1".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                throw new Exception("投诉通道已关闭");
@ -279,7 +279,7 @@ public class BaseComplaintService {
     * 医生转交
     * */
    public BaseComplaintDO passTo(String id,String complaintId,String doctor,String operator,String reason){
        BaseComplaintDO baseComplaintDO = baseComplaintDao.getOne(id);
        BaseComplaintDO baseComplaintDO = baseComplaintDao.findById(id).orElse(null);
        BaseComplaintOperateLogDO baseComplaintOperateLogDO = new BaseComplaintOperateLogDO();
        String doctorName="";
        String complaitTypeName="";
@ -327,7 +327,7 @@ public class BaseComplaintService {
    }
    //接受投诉
    public BaseComplaintDO doctorAccept(String id,String doctor) throws Exception{
        BaseComplaintDO baseComplaintDO = baseComplaintDao.getOne(id);
        BaseComplaintDO baseComplaintDO = baseComplaintDao.findById(id).orElse(null);
        if (baseComplaintDO!=null){
            baseComplaintDO.setStatus("1");
            BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel(doctor);
@ -354,7 +354,7 @@ public class BaseComplaintService {
    }
    //反馈投诉
    public BaseComplaintDO dealComplaint(String id,String operator,String content,String imgUrl ,String deptCode) throws  Exception{
        BaseComplaintDO baseComplaintDO = baseComplaintDao.getOne(id);
        BaseComplaintDO baseComplaintDO = baseComplaintDao.findById(id).orElse(null);
        if (baseComplaintDO!=null){
            baseComplaintDO.setDealTime(new Date());
            baseComplaintDO.setFeedBack(content);
@ -554,12 +554,12 @@ public class BaseComplaintService {
        return mixEnvelop;
    }
    public BaseComplaintDO  findOnePaitentComplaint(String id){
        BaseComplaintDO baseComplaintDO = baseComplaintDao.getOne(id);
        BasePatientDO basePatientDO=basePatientDao.getOne(baseComplaintDO.getPatient());
        BaseComplaintDO baseComplaintDO = baseComplaintDao.findById(id).orElse(null);
        BasePatientDO basePatientDO=basePatientDao.findById(baseComplaintDO.getPatient()).orElse(null);
        if (null!=basePatientDO){
            baseComplaintDO.setMobile(basePatientDO.getMobile());
        }
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO =wlyyHospitalSysDictDao.getOne("latestFeedBackTime");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO =wlyyHospitalSysDictDao.findById("latestFeedBackTime").orElse(null);
        Integer timeOut=15;
        if (wlyyHospitalSysDictDO!=null){
            timeOut =Integer.parseInt(wlyyHospitalSysDictDO.getDictValue());
@ -834,7 +834,7 @@ public class BaseComplaintService {
        return map;
    }
    public BaseComplaintDO  cancelPaitentComplaint(String id,String patient) throws  Exception{
        BaseComplaintDO baseComplaintDO = baseComplaintDao.getOne(id);
        BaseComplaintDO baseComplaintDO = baseComplaintDao.findById(id).orElse(null);
       if (baseComplaintDO!=null){
           if ("0".equalsIgnoreCase(baseComplaintDO.getStatus())){
               baseComplaintDO.setStatus("-1");
@ -884,7 +884,7 @@ public class BaseComplaintService {
                        }
                    }
                    if ("0".equalsIgnoreCase(map.get("status").toString())||"-1".equalsIgnoreCase(map.get("status").toString())){
                        BasePatientDO basePatientDO = basePatientDao.getOne(map.get("operateFrom").toString());
                        BasePatientDO basePatientDO = basePatientDao.findById(map.get("operateFrom").toString()).orElse(null);
                        if (basePatientDO!=null){
                            map.put("operateFromName",basePatientDO.getName());
                        }

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

@ -2,7 +2,6 @@ package com.yihu.jw.dailyReport.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import com.yihu.jw.dailyReport.dao.*;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
@ -10,9 +9,6 @@ import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
import com.yihu.jw.entity.base.wx.WxAccessTokenDO;
import com.yihu.jw.entity.base.wx.WxPushLogDO;
import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
import com.yihu.jw.entity.dailyReport.*;
import com.yihu.jw.entity.healthUpload.BaseDoctorMemberDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
@ -31,20 +27,12 @@ import com.yihu.jw.wechat.dao.WxTemplateConfigDao;
import com.yihu.jw.wechat.enterprise.EnterpriseService;
import com.yihu.jw.wechat.enterprise.dao.WxEnterpriseUserDao;
import com.yihu.jw.wechat.service.WxAccessTokenService;
import jxl.Workbook;
import jxl.write.*;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.util.WorkbookUtil;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
@ -400,7 +388,7 @@ public class DailyReportUploadService {
                tmp.setReportItemId(reportItemDO.getId());
                tmp.setReportItemName(title);
            }
            BaseDailyReportItemDO reportItemDO = reportItemDao.getOne(tmp.getReportItemId());
            BaseDailyReportItemDO reportItemDO = reportItemDao.findById(tmp.getReportItemId()).orElse(null);
            if (null!=reportItemDO){
                if (StringUtils.isBlank(reportItemDO.getAcBeginTime())){
                    reportItemDO.setAcBeginTime(DateUtil.getStringDate());
@ -492,7 +480,7 @@ public class DailyReportUploadService {
            throw  new Exception("无权限审核");
        }
        BaseDailyReportUploadDO dailyReportUploadDO = null;
        dailyReportUploadDO = dailyReportUploadDao.getOne(reportId);
        dailyReportUploadDO = dailyReportUploadDao.findById(reportId).orElse(null);
        if (null==dailyReportUploadDO){
            throw  new Exception("核实记录未查询到");
        }
@ -580,7 +568,7 @@ public class DailyReportUploadService {
        }
        BaseDailyReportUploadDO dailyReportUploadDO = new BaseDailyReportUploadDO();
        if(detailDOList.size()>0) {
            dailyReportUploadDO = dailyReportUploadDao.getOne(detailDOList.get(0).getReportId());
            dailyReportUploadDO = dailyReportUploadDao.findById(detailDOList.get(0).getReportId()).orElse(null);
            if (null == dailyReportUploadDO) {
                throw new Exception("核实记录未查询到");
            }
@ -1937,7 +1925,7 @@ public class DailyReportUploadService {
        if (null==doctorDO){
            throw new Exception("用户不存在无权操作");
        }
        BaseDailyReportItemDO reportItemDO = reportItemDao.getOne(item_id);
        BaseDailyReportItemDO reportItemDO = reportItemDao.findById(item_id).orElse(null);
        if (null==reportItemDO){
            throw new Exception("日报项目不存在");
        }
@ -1998,7 +1986,7 @@ public class DailyReportUploadService {
        if (null==doctorDO){
            throw new Exception("用户不存在无权操作");
        }
        BaseDailyReportItemDO reportItemDO = reportItemDao.getOne(item_id);
        BaseDailyReportItemDO reportItemDO = reportItemDao.findById(item_id).orElse(null);
        if (null==reportItemDO){
            throw new Exception("日报项目不存在");
        }
@ -2051,7 +2039,7 @@ public class DailyReportUploadService {
        if (null==doctorDO){
            throw new Exception("用户不存在无权操作");
        }
        BaseDailyReportItemDO reportItemDO = reportItemDao.getOne(item_id);
        BaseDailyReportItemDO reportItemDO = reportItemDao.findById(item_id).orElse(null);
        if (null==reportItemDO){
            throw new Exception("日报项目不存在");
        }
@ -2067,7 +2055,7 @@ public class DailyReportUploadService {
     * 查询日报项目详情
     */
    public BaseDailyReportItemDO  findReportItemById(String item_id) throws Exception {
        BaseDailyReportItemDO reportItemDO = reportItemDao.getOne(item_id);
        BaseDailyReportItemDO reportItemDO = reportItemDao.findById(item_id).orElse(null);
        if (null==reportItemDO){
            throw new Exception("日报项目不存在");
        }

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/dict/service/DiseaseHomepageBannerService.java

@ -26,7 +26,7 @@ public class DiseaseHomepageBannerService extends BaseJpaService<BaseDiseaseHome
            diseaseHomepageBannerDO.setDel(1);
            return diseaseHomepageBannerDao.save(diseaseHomepageBannerDO);
        } else {
            BaseDiseaseHomepageBannerDO oldDiseaseHomepageBanner = diseaseHomepageBannerDao.getOne(diseaseHomepageBannerDO.getId());
            BaseDiseaseHomepageBannerDO oldDiseaseHomepageBanner = diseaseHomepageBannerDao.findById(diseaseHomepageBannerDO.getId()).orElse(null);
            BeanUtils.copyProperties(diseaseHomepageBannerDO, oldDiseaseHomepageBanner, getNullPropertyNames(diseaseHomepageBannerDO));
            return diseaseHomepageBannerDao.save(oldDiseaseHomepageBanner);
        }

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/dict/service/FollowUpDictService.java

@ -33,7 +33,7 @@ public class FollowUpDictService extends BaseJpaService<BaseFollowUpDictDO, Base
            if (baseDrugUseDictDO1!=null){
                throw  new Exception("该随访code已存在");
            }
            BaseFollowUpDictDO oldfollow= baseFollowUpDictDao.getOne(baseFollowUpDictDO.getId());
            BaseFollowUpDictDO oldfollow= baseFollowUpDictDao.findById(baseFollowUpDictDO.getId()).orElse(null);
            BeanUtils.copyProperties(baseFollowUpDictDO, oldfollow, getNullPropertyNames(baseFollowUpDictDO));
            baseFollowUpDictDao.save(oldfollow);
        }else {
@ -96,12 +96,12 @@ public class FollowUpDictService extends BaseJpaService<BaseFollowUpDictDO, Base
        return mixEnvelop;
    }
    public BaseFollowUpDictDO findOneDict(String dictId){
        return baseFollowUpDictDao.getOne(dictId);
        return baseFollowUpDictDao.findById(dictId).orElse(null);
    }
    public void updateFollowUpStatus(String id,String status,String del) throws  Exception{
        BaseFollowUpDictDO baseFollowUpDictDO = baseFollowUpDictDao.getOne(id);
        BaseFollowUpDictDO baseFollowUpDictDO = baseFollowUpDictDao.findById(id).orElse(null);
        if (baseFollowUpDictDO!=null){
            if (StringUtils.isNoneBlank(status)){
                baseFollowUpDictDO.setStatus(status);

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

@ -31,7 +31,7 @@ public class PrivateDictService extends BaseJpaService<PrivateDictDO, PrivateDic
        PrivateDictDO  privateDictDO = new PrivateDictDO();
        MixEnvelop mixEnvelop = new MixEnvelop();
        if (StringUtils.isNotBlank(id)){
            privateDictDO = privateDictDao.getOne(id);
            privateDictDO = privateDictDao.findById(id).orElse(null);
        }
        if (StringUtils.isNotBlank(dictCode)){
            privateDictDO.setDictCode(dictCode);
@ -52,7 +52,7 @@ public class PrivateDictService extends BaseJpaService<PrivateDictDO, PrivateDic
    }
    //删除隐私政策
    public MixEnvelop deleteById(String id){
        PrivateDictDO  privateDictDO = privateDictDao.getOne(id);
        PrivateDictDO  privateDictDO = privateDictDao.findById(id).orElse(null);
        MixEnvelop mixEnvelop = new MixEnvelop();
        if (null!=privateDictDO){
            privateDictDao.deleteById(id);

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

@ -460,7 +460,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
                return false;
            }
        }else if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
            BaseDoctorDO doctorDO = baseDoctorDao.getOne(id);
            BaseDoctorDO doctorDO = baseDoctorDao.findById(id).orElse(null);
            String orgPwMd5 = MD5.md5Hex(orgPw + "{" + doctorDO.getSalt() + "}");
            if(!orgPwMd5.equals(doctorDO.getPassword())){
@ -478,7 +478,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
            return true;
        }else {
            BaseDoctorDO doctorDO = baseDoctorDao.getOne(id);
            BaseDoctorDO doctorDO = baseDoctorDao.findById(id).orElse(null);
            String orgPwMd5 = MD5.md5Hex(orgPw + "{" + doctorDO.getSalt() + "}");
            if(!orgPwMd5.equals(doctorDO.getPassword())){
@ -599,7 +599,7 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
    }
    public void deleteChargeDict(String id,String del){
        WlyyChargeDictDO wlyyChargeDictDO =  wlyyChargeDictDao.getOne(id);
        WlyyChargeDictDO wlyyChargeDictDO =  wlyyChargeDictDao.findById(id).orElse(null);
        if (wlyyChargeDictDO!=null){
            wlyyChargeDictDO.setIsDel(del);
            wlyyChargeDictDao.save(wlyyChargeDictDO);

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorService.java

@ -297,7 +297,7 @@
//    }
//
//    public Boolean updateDoctorPw(String id,String pw,String orgPw){
//        BaseDoctorDO doctorDO = baseDoctorDao.getOne(id);
//        BaseDoctorDO doctorDO = baseDoctorDao.findById(id).orElse(null);
//
//        String orgPwMd5 = MD5.md5Hex(orgPw + "{" + doctorDO.getSalt() + "}");
//        if(!orgPwMd5.equals(doctorDO.getPassword())){

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorSuggestService.java

@ -51,7 +51,7 @@ public class BaseDoctorSuggestService  extends BaseJpaService<BaseDoctorSuggestD
        baseDoctorSuggestDO.setDoctor(doctor);
        baseDoctorSuggestDO.setCreateTime(new Date());
        baseDoctorSuggestDO.setIsDel("1");
        BasePatientDO basePatientDO=basePatientDao.getOne(baseDoctorSuggestDO.getCreateUser());
        BasePatientDO basePatientDO=basePatientDao.findById(baseDoctorSuggestDO.getCreateUser()).orElse(null);
        if (basePatientDO!=null){
            baseDoctorSuggestDO.setCreateUserName(basePatientDO.getName());
        }
@ -148,6 +148,6 @@ public class BaseDoctorSuggestService  extends BaseJpaService<BaseDoctorSuggestD
        return mixEnvelop;
    }
    public BaseDoctorSuggestDO findById(String id){
        return baseDoctorSuggestDao.getOne(id);
        return baseDoctorSuggestDao.findById(id).orElse(null);
    }
}

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

@ -316,7 +316,7 @@ public class BaseDoctorHealthUploadService extends BaseJpaService<BaseDoctorHeal
    }
    public BaseDoctorHealthUploadDO selectHealthInfoById(String id) {
        BaseDoctorHealthUploadDO baseDoctorHealthUploadDO = baseDoctorHealthUploadDao.getOne(id);
        BaseDoctorHealthUploadDO baseDoctorHealthUploadDO = baseDoctorHealthUploadDao.findById(id).orElse(null);
        return baseDoctorHealthUploadDO;
    }

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/BaseIncentiveDictService.java

@ -59,7 +59,7 @@ public class BaseIncentiveDictService extends BaseJpaService<BaseIncentiveDictDO
    /*
    * 查询单条*/
    public BaseIncentiveDictDO findOneById(String id){
        BaseIncentiveDictDO baseIncentiveDictDO = baseIncentiveDictDao.getOne(id);
        BaseIncentiveDictDO baseIncentiveDictDO = baseIncentiveDictDao.findById(id).orElse(null);
        return  baseIncentiveDictDO;
    }
    /*
@ -67,7 +67,7 @@ public class BaseIncentiveDictService extends BaseJpaService<BaseIncentiveDictDO
    public BaseIncentiveDictDO saveIncentive(String id,String code,String name ,String img ,String status){
        BaseIncentiveDictDO baseIncentiveDictDO = null;
        if(StringUtils.isNoneBlank(id)){
            baseIncentiveDictDO = baseIncentiveDictDao.getOne(id);
            baseIncentiveDictDO = baseIncentiveDictDao.findById(id).orElse(null);
            baseIncentiveDictDO.setIncentiveCode(code);
            baseIncentiveDictDO.setIncentiveImg(img);
            baseIncentiveDictDO.setIncentiveStatus(status);
@ -89,7 +89,7 @@ public class BaseIncentiveDictService extends BaseJpaService<BaseIncentiveDictDO
     * 删除单条*/
    public Map deleteOne(String id){
        Map<String,Object> map = new HashMap<>();
        BaseIncentiveDictDO baseIncentiveDictDO = baseIncentiveDictDao.getOne(id);
        BaseIncentiveDictDO baseIncentiveDictDO = baseIncentiveDictDao.findById(id).orElse(null);
        if (baseIncentiveDictDO!=null){
            baseIncentiveDictDO.setIsDel("0");
            baseIncentiveDictDao.save(baseIncentiveDictDO);

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

@ -99,7 +99,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
        }
        wlyyHospitalSysDictDO.setModelName(modelName);
        if(StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getId())){
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO1 = wlyyHospitalSysDictDao.getOne(wlyyHospitalSysDictDO.getId());
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO1 = wlyyHospitalSysDictDao.findById(wlyyHospitalSysDictDO.getId()).orElse(null);
            List<WlyyHospitalSysDictDO> wlyyHospitalSysDictDOList=new ArrayList<>();
            if (wlyyHospitalSysDictDO1!=null){
                wlyyHospitalSysDictDO1.setDictValue(wlyyHospitalSysDictDO.getDictValue());
@ -178,7 +178,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
    public String  deleteDictById(String id){
        String msg = "";
        if (StringUtils.isNoneBlank(id)){
           WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne(id);
           WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById(id).orElse(null);
           if (wlyyHospitalSysDictDO!=null) {
               wlyyHospitalSysDictDao.deleteById(id);
               msg = "删除成功";
@ -201,7 +201,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
        return doctorId;
    }
    public WlyyHospitalSysDictDO findOne(String id){
        return  wlyyHospitalSysDictDao.getOne(id);
        return  wlyyHospitalSysDictDao.findById(id).orElse(null);
    }
    //查字典
@ -289,7 +289,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
        return envelop;
    }
    public WlyyHospitalSysDictDO downDoctor(String id) throws Exception{
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.getOne(id);
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.findById(id).orElse(null);
        List<WlyyHospitalSysDictDO> maxSortList =  wlyyHospitalSysDictDao.getMaxSort(sysDictDO.getDictName(),sysDictDO.getHospital());
        int maxSort =0;
        if (maxSortList!=null&&maxSortList.size()>0){
@ -323,7 +323,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
    public WlyyHospitalSysDictDO upDoctor(String id) throws Exception{
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.getOne(id);
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.findById(id).orElse(null);
        List<WlyyHospitalSysDictDO> minSortList =  wlyyHospitalSysDictDao.getMinSort(sysDictDO.getDictName(),sysDictDO.getHospital());
        int minSort =0;
        if (minSortList!=null&&minSortList.size()>0){
@ -354,7 +354,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
        return sysDictDO;
    }
    public void insertSort(String id,Integer sort){
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.getOne(id);
        WlyyHospitalSysDictDO sysDictDO = wlyyHospitalSysDictDao.findById(id).orElse(null);
        if (sysDictDO!=null){
            Integer  max= 0;
            List<WlyyHospitalSysDictDO> maxList = wlyyHospitalSysDictDao.getMaxSort("doctorFrontList",sysDictDO.getHospital());

+ 5 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/service/BaseDoctorBGService.java

@ -35,7 +35,7 @@ public class BaseDoctorBGService extends BaseJpaService<BaseDoctorBackgroundDO,
    //医生选定背景
    @Transactional
    public BaseDoctorDO setDoctorBackground(String doctor,String id){
        BaseDoctorBackgroundDO baseDoctorBackgroundDO = baseDoctorBackgroundDao.getOne(id);
        BaseDoctorBackgroundDO baseDoctorBackgroundDO = baseDoctorBackgroundDao.findById(id).orElse(null);
        BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel(doctor);
        if(null!=baseDoctorBackgroundDO&&null!=baseDoctorDO){
            baseDoctorDO.setBackgroundId(baseDoctorBackgroundDO.getId());
@ -57,14 +57,14 @@ public class BaseDoctorBGService extends BaseJpaService<BaseDoctorBackgroundDO,
    }
    //删除背景
    public void deleteBg(String bgId){
        BaseDoctorBackgroundDO baseDoctorBackgroundDO = baseDoctorBackgroundDao.getOne(bgId);
        BaseDoctorBackgroundDO baseDoctorBackgroundDO = baseDoctorBackgroundDao.findById(bgId).orElse(null);
        if(null!=baseDoctorBackgroundDO){
            baseDoctorBackgroundDao.deleteById(bgId);
        }
    }
    //修改
    public BaseDoctorBackgroundDO updateBackground(String id,String bgUrl,String bgName){
        BaseDoctorBackgroundDO baseDoctorBackgroundDO =baseDoctorBackgroundDao.getOne(id);
        BaseDoctorBackgroundDO baseDoctorBackgroundDO =baseDoctorBackgroundDao.findById(id).orElse(null);
        if(null!=baseDoctorBackgroundDO){
            if (StringUtils.isNotEmpty(bgName)){
                baseDoctorBackgroundDO.setTitle(bgName);
@ -138,7 +138,7 @@ public class BaseDoctorBGService extends BaseJpaService<BaseDoctorBackgroundDO,
     */
    @Transactional
    public BaseDoctorMessageDO setMessageHead(String id){
        BaseDoctorMessageDO doctorMessageDO = doctorMessageDao.getOne(id);
        BaseDoctorMessageDO doctorMessageDO = doctorMessageDao.findById(id).orElse(null);
        String sql = "select max(dm.is_sort) as total from base_doctor_message dm where dm.del=1  ";
        List<Map<String,Object>> maps = jdbcTemplate.queryForList(sql);
        Integer isSort=0;
@ -161,7 +161,7 @@ public class BaseDoctorBGService extends BaseJpaService<BaseDoctorBackgroundDO,
    @Transactional
    public BaseDoctorMessageDO delDoctorMessage(String id){
        BaseDoctorMessageDO doctorMessageDO = doctorMessageDao.getOne(id);
        BaseDoctorMessageDO doctorMessageDO = doctorMessageDao.findById(id).orElse(null);
        doctorMessageDO.setDel(0);
        doctorMessageDO.setCreateTime(new Date());
        doctorMessageDO.setUpdateTime(new Date());

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

@ -153,7 +153,7 @@ public class BaseDrugStoreService extends BaseJpaService<BaseDrugStoreDO, BaseDr
    }
    //删除药房
    public void deleteDrugStore(String id,Integer isDel){
        BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreDao.getOne(id);
        BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreDao.findById(id).orElse(null);
        if (baseDrugStoreDO!=null){
            baseDrugStoreDO.setIsDel(isDel);
            baseDrugStoreDao.save(baseDrugStoreDO);
@ -161,7 +161,7 @@ public class BaseDrugStoreService extends BaseJpaService<BaseDrugStoreDO, BaseDr
    }
    //作废药房
    public void usedDrugStore(String id,String isUsed){
        BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreDao.getOne(id);
        BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreDao.findById(id).orElse(null);
        if (baseDrugStoreDO!=null){
            baseDrugStoreDO.setIsUsed(isUsed);
            baseDrugStoreDao.save(baseDrugStoreDO);

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

@ -78,7 +78,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
    public MixEnvelop addFamily(String id,String patientId, String familyName, String dictId, String cardType, String idCard, String phoneNum,boolean demo,String medicareType,String medicare,String clinicId) throws Exception {
        MixEnvelop mixEnvelop = new MixEnvelop();
        try{
        BasePatientMemberDictDO basePatientMemberDictDO = basePatientMemberDictDao.getOne(dictId);
        BasePatientMemberDictDO basePatientMemberDictDO = basePatientMemberDictDao.findById(dictId).orElse(null);
        BasePatientDO basePatientDO = null;
        if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
            /*List<BasePatientDO> listpatients=basePatientDao.findByMobileAndDel(phoneNum,"1");
@ -122,8 +122,8 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        }
        WlyyPatientFamilyMemberDO result = new WlyyPatientFamilyMemberDO();
        if (StringUtils.isNotBlank(id)){
            result = wlyyPatientFamilyMemberDao.getOne(id);
            basePatientDO = basePatientDao.getOne(result.getFamilyMember());
            result = wlyyPatientFamilyMemberDao.findById(id).orElse(null);
            basePatientDO = basePatientDao.findById(result.getFamilyMember()).orElse(null);
            patientMappingDO = patientMappingDao.findByPatient(result.getFamilyMember());
        }
@ -516,7 +516,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
     * @return
     */
    public BaseNatPatientFamilyMemberDO deleteMember(String id){
        BaseNatPatientFamilyMemberDO baseNatPatientFamilyMemberDO = natPatientFamilyMemberDao.getOne(id);
        BaseNatPatientFamilyMemberDO baseNatPatientFamilyMemberDO = natPatientFamilyMemberDao.findById(id).orElse(null);
        baseNatPatientFamilyMemberDO.setDel(0);
        return  natPatientFamilyMemberDao.save(baseNatPatientFamilyMemberDO);
    }
@ -598,7 +598,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
            }
            WlyyPatientFamilyMemberDO result = new WlyyPatientFamilyMemberDO();
            if (StringUtils.isNotBlank(id)){
                result = wlyyPatientFamilyMemberDao.getOne(id);
                result = wlyyPatientFamilyMemberDao.findById(id).orElse(null);
                basePatientDO = basePatientDao.getOne(result.getFamilyMember());
                patientMappingDO = patientMappingDao.findByPatient(result.getFamilyMember());
            }
@ -1009,7 +1009,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
    //删除家人信息
    public Envelop delMember(String id){
        Envelop envelop = new Envelop();
        WlyyPatientFamilyMemberDO wlyyPatientFamilyMemberDO = wlyyPatientFamilyMemberDao.getOne(id);
        WlyyPatientFamilyMemberDO wlyyPatientFamilyMemberDO = wlyyPatientFamilyMemberDao.findById(id).orElse(null);
        if (wlyyPatientFamilyMemberDO!=null){
            wlyyPatientFamilyMemberDO.setIsDel(0);
            if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/BaseOperateLogService.java

@ -54,7 +54,7 @@ public class BaseOperateLogService extends BaseJpaService<BaseOperateLogDO, Base
        if (baseDoctorDO!=null){
            baseOperateLogDO.setOperatorName(baseDoctorDO.getName());
        }
        BasePatientDO basePatientDO=basePatientDao.getOne(patient);
        BasePatientDO basePatientDO=basePatientDao.findById(patient).orElse(null);
        if (basePatientDO!=null){
            baseOperateLogDO.setPatientName(basePatientDO.getName());
        }

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -81,7 +81,7 @@ public class PatientMappingService {
     */
    public String findYkyyPatNoByPatient(String patient,boolean demoFlag)throws Exception{
        logger.info("findYkyyPatNoByPatient:"+patient);
        BasePatientDO patientDO = basePatientDao.getOne(patient);
        BasePatientDO patientDO = basePatientDao.findById(patient).orElse(null);
        if(patientDO == null){
            return patient;
        }
@ -116,7 +116,7 @@ public class PatientMappingService {
    public String findHisPatNoByPatient(String patient,String cardNo)throws Exception{
        logger.info("findHisPatNoByPatient:"+patient);
        BasePatientDO patientDO = basePatientDao.getOne(patient);
        BasePatientDO patientDO = basePatientDao.findById(patient).orElse(null);
        logger.info("patientDO:"+patientDO.toString());
        JSONArray rs = entranceService.BS15018(patientDO.getIdcard(),null,demoFlag);
        PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");

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

@ -10,26 +10,11 @@ import com.yihu.jw.entity.hospital.message.BaseUserMessageDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.message.dao.BaseBannerDoctorDao;
import com.yihu.jw.hospital.message.dao.BaseUserMessageDao;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.mysql.query.BaseJpaService;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import javax.imageio.ImageIO;
import javax.transaction.Transactional;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -38,6 +23,15 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import sun.misc.BASE64Encoder;
import javax.imageio.ImageIO;
import javax.transaction.Transactional;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
@Service
public class BaseBannerDoctorService
        extends BaseJpaService<BaseBannerDoctorDO, BaseBannerDoctorDao>
@ -69,7 +63,7 @@ public class BaseBannerDoctorService
        String patientName = null;
        List<BaseBannerDoctorDO> bannerList = new ArrayList();
        ObjEnvelop objEnvelop = new ObjEnvelop();
        BasePatientDO basePatientDO = this.patientDao.getOne(patientId);
        BasePatientDO basePatientDO = this.patientDao.findById(patientId).orElse(null);
        boolean checkTimeOut = checkGiveTimeOut(patientId, doctor);
        boolean checkMessageTimeout = checkMessageTimeOut(patientId,doctor);
        if ((org.apache.commons.lang.StringUtils.isNotBlank(key)) && (org.apache.commons.lang.StringUtils.isNotBlank(value))) {
@ -193,7 +187,7 @@ public class BaseBannerDoctorService
    {
        if (org.apache.commons.lang.StringUtils.isNotEmpty(messageId))
        {
            BaseUserMessageDO baseUserMessageDO = (BaseUserMessageDO)this.baseUserMessageDao.getOne(messageId);
            BaseUserMessageDO baseUserMessageDO = (BaseUserMessageDO)this.baseUserMessageDao.findById(messageId).orElse(null);
            if (null != baseUserMessageDO)
            {
                baseUserMessageDO.setIsRead(Integer.valueOf(1));

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

@ -77,7 +77,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
            if (listID.size()>0){
                bannerGiveId = listID.get(0).get("id").toString();
            }
            BaseBannerDoctorDO baseBannerDoctorDO = baseBannerDoctorDao.getOne(bannerGiveId);
            BaseBannerDoctorDO baseBannerDoctorDO = baseBannerDoctorDao.findById(bannerGiveId).orElse(null);
            if (null!=baseBannerDoctorDO){
                //1不能删除
                map.put("deleteFlag",1);
@ -144,7 +144,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
     * @throws Exception
     */
    public BaseBannerDO updateBanner(String id,String name,String img,String status,String updateUser,String updateUserName,String description){
        BaseBannerDO bannerDO = baseBannerDao.getOne(id);
        BaseBannerDO bannerDO = baseBannerDao.findById(id).orElse(null);
        if (null == bannerDO){
            return null;
        }
@ -177,7 +177,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
     * @throws Exception
     */
    public Boolean deleteBanner(String id){
        BaseBannerDO bannerDO = baseBannerDao.getOne(id);
        BaseBannerDO bannerDO = baseBannerDao.findById(id).orElse(null);
        if (null == bannerDO){
            return false;
        }
@ -191,7 +191,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
     * @throws Exception
     */
    public BaseBannerDO upBanner(String id) throws Exception{
        BaseBannerDO bannerDO = baseBannerDao.getOne(id);
        BaseBannerDO bannerDO = baseBannerDao.findById(id).orElse(null);
        int maxSort = baseBannerDao.getMaxSort();
        int sort = 0;
        if(null!=bannerDO){
@ -206,7 +206,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
        BaseBannerDO upPrevious = new BaseBannerDO();
        if (list.size()>0){
            String prviousBannerId = list.get(0).get("id").toString();
            upPrevious =baseBannerDao.getOne(prviousBannerId);
            upPrevious =baseBannerDao.findById(prviousBannerId).orElse(null);
        }
        //BaseBannerDO upPrevious = baseBannerDao.upBanner(sort);
@ -225,7 +225,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
     */
    public BaseBannerDO downBanner(String id) throws Exception{
        //当前banner
        BaseBannerDO bannerDO = baseBannerDao.getOne(id);
        BaseBannerDO bannerDO = baseBannerDao.findById(id).orElse(null);
        int minSort = baseBannerDao.getMinSort();
        int sort = 0;
        if(null!=bannerDO){
@ -257,7 +257,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
     * @throws Exception
     */
    public BaseBannerDO onOff(String id ,String status){
        BaseBannerDO bannerDO = baseBannerDao.getOne(id);
        BaseBannerDO bannerDO = baseBannerDao.findById(id).orElse(null);
        if(null!=bannerDO){
            bannerDO.setStatus(Integer.valueOf(status));
        }

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

@ -194,7 +194,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
    //修改留言显示
    @Transactional
    public BaseUserMessageDO updateIsShow(String id,Integer isShow) {
        BaseUserMessageDO baseUserMessageDOS = baseUserMessageDao.getOne(id);
        BaseUserMessageDO baseUserMessageDOS = baseUserMessageDao.findById(id).orElse(null);
        baseUserMessageDOS.setIsShow(isShow);
        return baseUserMessageDao.save(baseUserMessageDOS);
    }
@ -381,7 +381,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
    //获取单条评论详细信息
    public List<Map<String,Object>> getSingle(String id){
        BaseUserMessageDO baseUserMessageDO=baseUserMessageDao.getOne(id);
        BaseUserMessageDO baseUserMessageDO=baseUserMessageDao.findById(id).orElse(null);
        String patientId= baseUserMessageDO.getSender();
        Integer type = baseUserMessageDO.getType();
        List<BaseUserMsgContentDO> contentlist=baseUserMsgContentDao.getContentListByID(id);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/SystemMessageService.java

@ -70,7 +70,7 @@ public class SystemMessageService extends BaseJpaService<SystemMessageDO,SystemM
     * @throws Exception
     */
    public SystemMessageDO updateMessage(String id,String read,String del) throws Exception{
        SystemMessageDO systemMessageDO = systemMessageDao.getOne(id);
        SystemMessageDO systemMessageDO = systemMessageDao.findById(id).orElse(null);
        if (null == systemMessageDO){
            return null;
        }
@ -131,7 +131,7 @@ public class SystemMessageService extends BaseJpaService<SystemMessageDO,SystemM
        String msg = "";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            if (consultDo!=null){
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(consultDo.getRelationCode());
                WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(consultDo.getRelationCode()).orElse(null);
                if (wlyyOutpatientDO!=null){
                    BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel(wlyyOutpatientDO.getDoctor());
                    if (baseDoctorDO!=null){

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

@ -120,7 +120,7 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @return
     */
    public String savePatientMapping(String patient) throws Exception {
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        String mappingCode="";
        String obj =hcyyEntranceService.findPatientCard(patient);
@ -154,7 +154,7 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @throws Exception
     */
    public String updatePatientMapping(String patient,String cardNo) throws Exception {
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        String obj =hcyyEntranceService.findPatientCard(patient);
        if (StringUtils.isNoneBlank(obj)){
@ -237,7 +237,7 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        WlyyOutpatientVO outpatientVO = new WlyyOutpatientVO();
        JSONArray array = new JSONArray();
        String response="";
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        if (patientMappingDO!=null){
            patient = patientMappingDO.getMappingCode();

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

@ -118,7 +118,7 @@ public class InspectionService extends BaseJpaService<WlyyInspectionDO, WlyyInsp
            baseAdviceTreatmentDO.setDrugFee(price);
            baseAdviceTreatmentDao.save(baseAdviceTreatmentDO);
        }
        WlyyOutpatientDO wlyyOutpatientDO=outpatientDao.getOne(baseAdviceTreatmentDO.getRelationCode());
        WlyyOutpatientDO wlyyOutpatientDO=outpatientDao.findById(baseAdviceTreatmentDO.getRelationCode()).orElse(null);
        if(wlyyOutpatientDO!=null){
            wlyyOutpatientDO.setIcd10Name(baseAdviceTreatmentDO.getDiagnosisName());
            wlyyOutpatientDO.setStatus("2");

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/NationalDrugDictService.java

@ -37,7 +37,7 @@ public class NationalDrugDictService extends BaseJpaService<BaseNationalDrugDict
            nationalDrugDictDO.setUpdateTime(new Date());
            return nationalDrugDictDao.save(nationalDrugDictDO);
        }else {
            BaseNationalDrugDictDO oldDurgDictDO =  nationalDrugDictDao.getOne(nationalDrugDictDO.getId());
            BaseNationalDrugDictDO oldDurgDictDO =  nationalDrugDictDao.findById(nationalDrugDictDO.getId()).orElse(null);
            BeanUtils.copyProperties(nationalDrugDictDO, oldDurgDictDO, getNullPropertyNames(nationalDrugDictDO));
            oldDurgDictDO.setUpdateTime(new Date());
            return nationalDrugDictDao.save(oldDurgDictDO);
@ -94,6 +94,6 @@ public class NationalDrugDictService extends BaseJpaService<BaseNationalDrugDict
    }
    public BaseNationalDrugDictDO getNationalDrugById(Integer id) {
        return nationalDrugDictDao.getOne(id);
        return nationalDrugDictDao.findById(id).orElse(null);
    }
}

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

@ -37,7 +37,7 @@ public class PayInfoNoticeService {
    private boolean flag;
    public String pushPrescriptionPay(String patient,String doctorName,String orderNo,String outpatientId,String prescriptionId,String total,String title,String url){
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO!=null){
            String userName = patientDO.getName();
            String idcard = patientDO.getIdcard();
@ -65,7 +65,7 @@ public class PayInfoNoticeService {
     * @return
     */
    public String pushPrescriptionPayMedicare(String patient,String doctorName,String orderNo,String outpatientId,String prescriptionId,String total,String mipay,String selfPay,String title,String url){
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO!=null){
            String userName = patientDO.getName();
            String idcard = patientDO.getIdcard();
@ -82,7 +82,7 @@ public class PayInfoNoticeService {
    }
    public String pushPrescriptionPayAndHsjc(String patient,String doctorName,String orderNo,String id,String total,String title,String url,String realOrder){
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        if (patientDO!=null){
            String userName = patientDO.getName();
            String idcard = patientDO.getIdcard();

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

@ -43,7 +43,7 @@ public class PrescriptionLogService  extends BaseJpaService<WlyyPrescriptionLogD
     */
    public Boolean addPrescriptionLog(String prescriptionCode, Integer status, Integer userType, String userCode, String userName, String datajson, Date date){
        try{
            WlyyPrescriptionDO prescriptionDO = prescriptionDao.getOne(prescriptionCode);
            WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionCode).orElse(null);
            WlyyPrescriptionLogDO log = new WlyyPrescriptionLogDO();
            log.setOutpatientId(prescriptionDO.getOutpatientId());
            log.setPrescriptionCode(prescriptionCode);

+ 13 - 13
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -395,7 +395,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            ,String provinceCode,String provinceName,String cityCode,String cityName,String townCode,String townName
            ,String streetCode,String streetName){
        WlyyPrescriptionExpressageDO expressageDO = prescriptionExpressageDao.getOne(id);
        WlyyPrescriptionExpressageDO expressageDO = prescriptionExpressageDao.findById(id).orElse(null);
        expressageDO.setOneselfPickupFlg(oneselfPickupFlg);
        if(oneselfPickupFlg == 0){
            //自取
@ -468,7 +468,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     */
    public List<WlyyPrescriptionVO> findOriginPrescriptionList(String registerSn, String patient, String realOrder, String admNo, boolean demoFlag) throws Exception {
        /*String patNo = patientMappingService.findHisPatNoByPatient(patient);*/
        BasePatientDO patientDO = basePatientDao.getOne(patient);
        BasePatientDO patientDO = basePatientDao.findById(patient).orElse(null);
        if (patientDO==null){
            return null;
        }
@ -4214,7 +4214,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public List<Map<String, Object>> findWorkTimeInfo(String id) {
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.getOne(id);
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.findById(id).orElse(null);
        Long ss = timeDO.getEndTime().getTime() - timeDO.getStartTime().getTime();
        Long s = ss / timeDO.getSourceNumber();
@ -4275,7 +4275,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public Integer findWorkTimeInfoCout(String id) {
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.getOne(id);
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.findById(id).orElse(null);
        if (timeDO.getSourceNumber() == null || timeDO.getStartTime() == null || timeDO.getEndTime() == null) {
            return 0;
@ -4335,7 +4335,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    @Deprecated
    public List<Map<String, Object>> findWorkTimeInfoOld(String id) {
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.getOne(id);
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.findById(id).orElse(null);
        Calendar sc = Calendar.getInstance();
        sc.setTime(timeDO.getStartTime());
@ -4382,7 +4382,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public Integer findWorkTimeCount(String id) {
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.getOne(id);
        WlyyDoctorWorkTimeDO timeDO = doctorWorkTimeDao.findById(id).orElse(null);
        Calendar sc = Calendar.getInstance();
        sc.setTime(timeDO.getStartTime());
@ -6541,7 +6541,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public WlyyDoctorClinicRoomDO findClinicRoomStatus(String id) {
        return wlyyDoctorClinicRoomDao.getOne(id);
        return wlyyDoctorClinicRoomDao.findById(id).orElse(null);
    }
    /**
@ -11323,7 +11323,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            throw new Exception("微信配置不存在!");
        }
        BaseNatAppointmentDO natAppointmentDO = baseNatAppointmentDao.getOne(id);
        BaseNatAppointmentDO natAppointmentDO = baseNatAppointmentDao.findById(id).orElse(null);
        BasePatientDO patientDO = basePatientDao.getOne(natAppointmentDO.getPatientId());
        List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wxId, natAppointmentDO.getPatientId());
        if (patientWechatDos == null || patientWechatDos.size() == 0) {
@ -11541,7 +11541,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    //删除处方
    public WlyyPrescriptionDO deletePrescription(String id){
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.getOne(id);
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findById(id).orElse(null);
        if (null!=wlyyPrescriptionDO){
            wlyyPrescriptionDO.setCheckStatus(4);
            wlyyPrescriptionDO.setStatus(-1);
@ -13131,7 +13131,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public String sendMessage(Integer id,String pushChannel,String pushFlag) throws Exception {
        BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.getOne(id);
        BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(id).orElse(null);
        if (baseNatAppointmentDO==null){
            throw new Exception("预约记录不存在");
        }
@ -13242,7 +13242,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
         return "发送成功!";
    }
    public String sendYktemplateMessage(Integer id,boolean isPayed)  {
        BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.getOne(id);
        BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(id).orElse(null);
        if (baseNatAppointmentDO==null){
            return "核酸项目不存在,发送失败";
        }
@ -13477,7 +13477,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        String res = "";
        if (patientDO!=null){
            try {
                BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.getOne(id);
                BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(id).orElse(null);
                if (null!=baseNatAppointmentDO){
                    if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.getOne("natTimeConfig");
@ -13660,7 +13660,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            jsonObject.put("keyword2","申请人:"+patientDO.getName()+"\n" +
                    "预约时间:"+reserverTime+"\n" +
                    "发票流水号:"+realorder+"");
            BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.getOne(id);
            BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findById(id).orElse(null);
            WlyyHospitalSysDictDO hospitalSysDictDO1 = wlyyHospitalSysDictDao.getOne("natConfigTestNew");
            String addres = "我院五号楼北侧(急诊部后侧)";
            String timeDes = "6-8小时";

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

@ -193,7 +193,7 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
            if (patientMappingDO!=null){
                patNo = patientMappingDO.getMappingCode();
            }else {
                BasePatientDO basePatientDO = basePatientDao.getOne(patient);
                BasePatientDO basePatientDO = basePatientDao.findById(patient).orElse(null);
                if (basePatientDO!=null){
                    JSONArray res = tnyyEntranceService.selectPatientMappingCode(basePatientDO.getIdcard());
                    if (res!=null&&res.size()!=0){

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

@ -84,7 +84,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @return
     */
    public JSONObject registerOutPatient(String outPatientId, String doctor){
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outPatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outPatientId).orElse(null);
        List<WlyyPrescriptionExpressageDO> expressageDOS =prescriptionExpressageDao.findByOutpatientId(outPatientId);
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        BaseDoctorDO doctorDO = baseDoctorDao.findByIdAndDel(doctor);

+ 2 - 7
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DoctorPreSignService.java

@ -5,12 +5,8 @@ import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.dzqm.OauthDzqmConfigDO;
import com.yihu.jw.hospital.prescription.dao.OauthDzqmConfigDao;
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
import com.yihu.jw.utils.dzqm.SignPictureService;
import com.yihu.jw.utils.dzqm.SignPictureServiceImplServiceLocator;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpUtils;
import org.apache.commons.collections.map.HashedMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -18,7 +14,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.net.URL;
import java.util.Map;
/**
@ -45,10 +40,10 @@ public class DoctorPreSignService {
    public JSONObject getDoctorSign(String doctor)throws Exception{
        logger.info("getDoctorSign doctor:"+doctor);
        BaseDoctorDO doc = doctorDao.getOne(doctor);
        BaseDoctorDO doc = doctorDao.findById(doctor).orElse(null);
        //获取配置参数
        OauthDzqmConfigDO dzqmConfigDO = oauthDzqmConfigDao.getOne("base_dzqm");
        OauthDzqmConfigDO dzqmConfigDO = oauthDzqmConfigDao.findById("base_dzqm").orElse(null);
        SignPictureServiceImplServiceLocator locator = new SignPictureServiceImplServiceLocator();
        URL portAddress = new  URL(dzqmConfigDO.getUrl());
        SignPictureService service = locator.getSignPictureServiceImplPort(portAddress);

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

@ -1579,7 +1579,7 @@ public class EntranceService {
     */
    public JSONArray hisRefund(String outPatientId) throws Exception {
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outPatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outPatientId).orElse(null);
        if (outpatientDO == null){
            throw new Exception("门诊信息表为空");
        }
@ -1668,7 +1668,7 @@ public class EntranceService {
    }
    public String ylzRefund(String outPatientId,boolean sys) throws Exception {
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outPatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outPatientId).orElse(null);
        if (outpatientDO == null) {
            throw new Exception("门诊信息表为空");
        }
@ -3147,7 +3147,7 @@ public class EntranceService {
    public YlzMedicalRelationDO getSettleInfo(String cardno,String idcard,String outpatientId) throws Exception {
        WlyyOutpatientDO outpatientDO = outpatientDao.getOne(outpatientId);
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId).orElse(null);
        net.sf.json.JSONObject object1 = qutpatientBalance(outpatientDO.getCardNo(), false);
        Double cardFee = object1.getDouble("ZHYE");
/*        Double cardFee = 0.0;*/

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

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

+ 6 - 6
business/base-service/src/main/java/com/yihu/jw/hospital/suggest/service/BaseSuggestionDictService.java

@ -28,7 +28,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
     * @throws Exception
     */
    public BaseSuggestionDictDO upSuggestion(String id) throws Exception{
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.getOne(id);
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.findById(id).orElse(null);
        int maxSort = baseSuggestionDictDao.getMaxSort();
        int sort = 0;
        if(null!=baseSuggestionDictDO){
@ -43,7 +43,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
        BaseSuggestionDictDO upPrevious = new BaseSuggestionDictDO();
        if (list.size()>0){
            String prviousBannerId = list.get(0).get("id").toString();
            upPrevious =baseSuggestionDictDao.getOne(prviousBannerId);
            upPrevious =baseSuggestionDictDao.findById(prviousBannerId).orElse(null);
        }
        //交换sort值
        baseSuggestionDictDO.setIsSort(upPrevious.getIsSort());
@ -59,7 +59,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
     * @throws Exception
     */
    public BaseSuggestionDictDO downSuggestion(String id) throws Exception{
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.getOne(id);
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.findById(id).orElse(null);
        int minSort = baseSuggestionDictDao.getMinSort();
        int sort = 0;
        if(null!=baseSuggestionDictDO){
@ -73,7 +73,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
        BaseSuggestionDictDO downPrevious = new BaseSuggestionDictDO();
        if (list.size()>0){
            String prviousId = list.get(0).get("id").toString();
            downPrevious =baseSuggestionDictDao.getOne(prviousId);
            downPrevious =baseSuggestionDictDao.findById(prviousId).orElse(null);
        }
        //交换sort值
        baseSuggestionDictDO.setIsSort(downPrevious.getIsSort());
@ -114,7 +114,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
     * @throws Exception
     */
    public BaseSuggestionDictDO updateSuggest(String id,String suggestName,String suggestDes,String updateUser,String updateUserName){
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.getOne(id);
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.findById(id).orElse(null);
        if (null == baseSuggestionDictDO){
            return null;
        }
@ -141,7 +141,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
     * @throws Exception
     */
    public Boolean deleteSuggest(String id){
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.getOne(id);
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.findById(id).orElse(null);
        if (null == baseSuggestionDictDO){
            return false;
        }

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

@ -74,7 +74,7 @@ public class BaseSuggestionService extends BaseJpaService<BaseSuggestionDO, Base
    }
    //回复反馈
    public void reponseSuggestion(String id,String responseContent,String userId,String userName){
        BaseSuggestionDO baseSuggestionDO = baseSuggestionDao.getOne(id);
        BaseSuggestionDO baseSuggestionDO = baseSuggestionDao.findById(id).orElse(null);
        if (null!=baseSuggestionDO){
            baseSuggestionDO.setManagerRes(responseContent);
            baseSuggestionDO.setResUser(userId);
@ -85,7 +85,7 @@ public class BaseSuggestionService extends BaseJpaService<BaseSuggestionDO, Base
    }
    //查看单条
    public BaseSuggestionDO findSuggestionById(String id){
        BaseSuggestionDO baseSuggestionDO = baseSuggestionDao.getOne(id);
        BaseSuggestionDO baseSuggestionDO = baseSuggestionDao.findById(id).orElse(null);
        BaseSuggestionDictDO baseSuggestionDictDO = baseSuggestionDictDao.getOne(baseSuggestionDO.getSuggestId());
        baseSuggestionDO.setSuggestName(baseSuggestionDictDO.getSuggestName());
        return baseSuggestionDO;

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

@ -189,7 +189,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
     * @return
     */
    public WlyySurveyQuestionVO findBySurveyId(String surveyId){
        WlyySurveyQuestionDO sq = surveyQuestionDao.getOne(surveyId);
        WlyySurveyQuestionDO sq = surveyQuestionDao.findById(surveyId).orElse(null);
        WlyySurveyQuestionVO surveyQuestionVO = convertToModel(sq,WlyySurveyQuestionVO.class);
        List<WlyySurveyQuestionsOptionDO> optionDOs = surveyQuestionsOptionDao.findByQuestionCodeAndDelOrderBySortAsc(sq.getId(),"1");
        if(optionDOs!=null&&optionDOs.size()>0){
@ -264,7 +264,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        String sids[] =ids.split(",");
        if(sids!=null&&ids.length()>0){
            for(String id:sids){
                WlyySurveyQuestionDO del = surveyQuestionDao.getOne(id);
                WlyySurveyQuestionDO del = surveyQuestionDao.findById(id).orElse(null);
                if(del!=null){
                    surveyQuestionDao.delete(del);
                }

+ 3 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/team/service/WlyyAdminTeamService.java

@ -1,6 +1,5 @@
package com.yihu.jw.hospital.team.service;
import com.tencentcloudapi.tci.v20190318.models.Person;
import com.yihu.jw.area.dao.BaseTownDao;
import com.yihu.jw.entity.base.area.BaseTownDO;
import com.yihu.jw.entity.hospital.DmHospitalDO;
@ -15,7 +14,6 @@ import com.yihu.jw.utils.hibernate.HibenateUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.Comparator;
@ -92,7 +90,7 @@ public class WlyyAdminTeamService {
        MixEnvelop mixEnvelop = new MixEnvelop();
        String orgName="";
        List<WlyyAdminTeamMemberDO> list = wlyyAdminTeamMemberDao.findByTeamId(Long.parseLong(teamCode),pageRequest);
        WlyyAdminTeamDO wlyyAdminTeamDO1 =wlyyAdminTeamDao.getOne(Integer.parseInt(teamCode));
        WlyyAdminTeamDO wlyyAdminTeamDO1 =wlyyAdminTeamDao.findById(Integer.parseInt(teamCode)).orElse(null);
        if (wlyyAdminTeamDO1!=null){
            DmHospitalDO dmHospitalDO = hospitalDao.findByCode(wlyyAdminTeamDO1.getOrgCode());
            if (dmHospitalDO!=null){
@ -103,7 +101,7 @@ public class WlyyAdminTeamService {
        for (WlyyAdminTeamMemberDO wlyyAdminTeamMemberDO:list){
            /*Integer count = wlyySignFamilyDao.getCountByDoctorCode(wlyyAdminTeamMemberDO.getDoctorCode());
            wlyyAdminTeamMemberDO.setSignNum(count==null?0:count);*/
            WlyyAdminTeamDO wlyyAdminTeamDO = wlyyAdminTeamDao.getOne(wlyyAdminTeamMemberDO.getTeamId().intValue());
            WlyyAdminTeamDO wlyyAdminTeamDO = wlyyAdminTeamDao.findById(wlyyAdminTeamMemberDO.getTeamId().intValue()).orElse(null);
            if (wlyyAdminTeamDO != null) {
                if (wlyyAdminTeamDO.getLeaderCode().equalsIgnoreCase(wlyyAdminTeamMemberDO.getDoctorCode())) {
                    wlyyAdminTeamMemberDO.setTeamLeader(true);
@ -128,6 +126,6 @@ public class WlyyAdminTeamService {
    }
    public WlyyAdminTeamMemberDO findOneTeamMemberById(Integer id){
        return wlyyAdminTeamMemberDao.getOne(id);
        return wlyyAdminTeamMemberDao.findById(id).orElse(null);
    }
}

+ 3 - 6
business/base-service/src/main/java/com/yihu/jw/hospital/ykyy/service/YkyyService.java

@ -9,17 +9,14 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.ca.OauthCaConfigDO;
import com.yihu.jw.hospital.prescription.dao.OauthCaConfigDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.util.common.StringUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.encrypt.MD5;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.idcard.IdCardUtil;
import com.yihu.jw.util.encrypt.MD5;
import com.ylzinfo.ehc.common.utils.DateUtils;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.omg.CORBA.OBJ_ADAPTER;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -56,7 +53,7 @@ public class YkyyService {
    public String selectCards(String patient) throws Exception {
        String response = null;
        BasePatientDO basePatientDO  = patientDao.getOne(patient);
        BasePatientDO basePatientDO  = patientDao.findById(patient).orElse(null);
        if (basePatientDO!=null){
            String userId = basePatientDO.getUserId();
            if (StringUtils.isNoneBlank(userId)){
@ -155,7 +152,7 @@ public class YkyyService {
     */
    public String addYkCard(String patient,String card,String userId,String type){
        String response = null;
        BasePatientDO patientDO = patientDao.getOne(patient);
        BasePatientDO patientDO = patientDao.findById(patient).orElse(null);
        String user_id=null;
        if (StringUtils.isNoneBlank(userId)){
            user_id=userId;

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/internet/service/DataGeneratorService.java

@ -62,14 +62,14 @@ public class DataGeneratorService extends BaseJpaService<InternetUpErrorLogDO, I
        Iterable<PatientMappingDO> patientMappingDOs = patientMappingDao.findAll();
        Iterator it = patientMappingDOs.iterator();
        //医生信息数据源
        BaseDoctorDO doctorDO = baseDoctorDao.getOne(doctor);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor).orElse(null);
        //部门信息
        BaseDoctorHospitalDO hospitalDO = baseDoctorHospitalDao.findByDoctorCode(doctor).get(0);
        while (it.hasNext()){
            PatientMappingDO patientMappingDO = (PatientMappingDO)it.next();
            BasePatientDO patientDO = basePatientDao.getOne(patientMappingDO.getPatient());
            BasePatientDO patientDO = basePatientDao.findById(patientMappingDO.getPatient()).orElse(null);
            if(patientDO!=null){
                //1.生成门诊记录

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

@ -1337,7 +1337,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        return businessOrderDO;
    }
    public BusinessOrderDO selectStatusById(Integer id){
        BusinessOrderDO businessOrderDO = businessOrderDao.getOne(id);
        BusinessOrderDO businessOrderDO = businessOrderDao.findById(id).orElse(null);
        return businessOrderDO;
    }

+ 9 - 10
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -68,7 +68,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -148,7 +148,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -198,7 +198,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -261,7 +261,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_balance_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config").orElse(null);
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -333,7 +333,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_balance_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config").orElse(null);
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -400,7 +400,7 @@ public class YlzPayService {
        RechargeParams param = new RechargeParams();
        String error = null;
        try {
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_pay_config");
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
            if(oauthYlzConfigDO==null){
                return "未找到支付配置文件";
            }
@ -496,7 +496,7 @@ public class YlzPayService {
        RefundParams param = new RefundParams();
        String error = null;
        try {
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_pay_config");
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
            if(oauthYlzConfigDO==null){
                return "未找到支付配置文件";
            }
@ -547,7 +547,6 @@ public class YlzPayService {
     *
     * @param operatorId
     * @param operatorName
     * @param termNotermNo
     * @param tradeType
     * @param outTradeNo
     * @param traceNo
@ -559,7 +558,7 @@ public class YlzPayService {
        TradeQueryParams param = new TradeQueryParams();
        String error = null;
        try {
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_pay_config");
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config").orElse(null);
            if(oauthYlzConfigDO==null){
                return "未找到支付配置文件";
            }
@ -615,7 +614,7 @@ public class YlzPayService {
        String error = null;
        RequestParams requestParams = new RequestParams();
        try {
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.getOne("ylz_balance_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config").orElse(null);
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientGroupDictService.java

@ -37,7 +37,7 @@ public class BasePatientGroupDictService <T, R extends CrudRepository> extends B
        BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel(doctor);
        BasePatientGroupDictDO basePatientGroupDictDO=null;
        if (StringUtils.isNotBlank(dictId)){
            basePatientGroupDictDO = basePatientGroupDictDao.getOne(dictId);
            basePatientGroupDictDO = basePatientGroupDictDao.findById(dictId).orElse(null);
        }else {
            basePatientGroupDictDO = new BasePatientGroupDictDO();
        }
@ -53,7 +53,7 @@ public class BasePatientGroupDictService <T, R extends CrudRepository> extends B
    }
    //删除分组
    public BasePatientGroupDictDO delPatientGroupDict(String dictId,String del){
        BasePatientGroupDictDO  basePatientGroupDictDO = basePatientGroupDictDao.getOne(dictId);
        BasePatientGroupDictDO  basePatientGroupDictDO = basePatientGroupDictDao.findById(dictId).orElse(null);
        basePatientGroupDictDO.setDel(del);
        return basePatientGroupDictDao.save(basePatientGroupDictDO);
    }
@ -98,7 +98,7 @@ public class BasePatientGroupDictService <T, R extends CrudRepository> extends B
        if (basePatientGroupDO==null){
            basePatientGroupDO = new BasePatientGroupDO();
            basePatientGroupDO.setCreateTime(new Date());
            BasePatientDO basePatientDO = basePatientDao.getOne(patient);
            BasePatientDO basePatientDO = basePatientDao.findById(patient).orElse(null);
            if (basePatientDO!=null){
                basePatientGroupDO.setPatient(patient);
                basePatientGroupDO.setPatientName(basePatientDO.getName());
@ -116,7 +116,7 @@ public class BasePatientGroupDictService <T, R extends CrudRepository> extends B
    }
    //将患者从指定分组中删除
    public void delPatientGroup(String id) throws Exception{
        BasePatientGroupDO basePatientGroupDO= basePatientGroupDao.getOne(id);
        BasePatientGroupDO basePatientGroupDO= basePatientGroupDao.findById(id).orElse(null);
        if (basePatientGroupDO!=null){
            basePatientGroupDao.deleteById(id);
        }else {

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

@ -103,7 +103,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
     * @return
     */
    public BasePatientDO findPatientById(String patientId) throws Exception{
        return basePatientDao.getOne(patientId);
        return basePatientDao.findById(patientId).orElse(null);
    }
    public boolean findByIdCard(String idcard){
@ -125,7 +125,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
            result.put("result","parameter patientId is null");
            return result;
        }
        BasePatientDO basePatientDO = basePatientDao.getOne(patientId);
        BasePatientDO basePatientDO = basePatientDao.findById(patientId).orElse(null);
        /*List<BasePatientDO> patientDOList = this.findByField("id",patientId);
        if(CollectionUtils.isEmpty(patientDOList)){
            result.put("result","not exist patient for id:"+patientId);
@ -432,7 +432,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
    }
    public Boolean updatePatientPw(String id,String pw,String orgPw){
        BasePatientDO patientDO = basePatientDao.getOne(id);
        BasePatientDO patientDO = basePatientDao.findById(id).orElse(null);
        if (!"xm_ykyy_wx".equalsIgnoreCase(wxId)){
            String orgPwMd5 = MD5.md5Hex(orgPw + "{" + patientDO.getSalt() + "}");
            if(!orgPwMd5.equals(patientDO.getPassword())){

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/pay/service/CloudCarePayService.java

@ -63,7 +63,7 @@ public class CloudCarePayService {
        if (businessOrderDO==null){
            throw new Exception("this orderId not exit");
        }
        BasePatientDO patientDO = patientDao.getOne(businessOrderDO.getPatient());
        BasePatientDO patientDO = patientDao.findById(businessOrderDO.getPatient()).orElse(null);
        if (patientDO==null){
            throw new Exception("this patient not exit");
        }

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

@ -38,7 +38,7 @@ public class AchnsDoctorRecordService extends BaseJpaService<AchnsDoctorRecordDO
    }
    public void deleteById(String id){
        AchnsDoctorRecordDO achnsDoctorRecordDO =  achnsDoctorRecordDao.getOne(id);
        AchnsDoctorRecordDO achnsDoctorRecordDO =  achnsDoctorRecordDao.findById(id).orElse(null);
        if (achnsDoctorRecordDO!=null){
            achnsDoctorRecordDO.setIs_del("0");
            achnsDoctorRecordDao.save(achnsDoctorRecordDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/BaseNsOlineMedService.java

@ -23,7 +23,7 @@ public class BaseNsOlineMedService extends BaseJpaService<BaseNsOnlineMedDO, Bas
    public void saveNsOnlinemed(List<BaseNsOnlineMedDO> baseNsOnlineMedDOList)throws Exception{
        for (BaseNsOnlineMedDO baseNsOlineMedDO : baseNsOnlineMedDOList){
            if(StringUtils.isNoneBlank(baseNsOlineMedDO.getId())){
                BaseNsOnlineMedDO old = baseNsOlineMedDao.getOne(baseNsOlineMedDO.getId());
                BaseNsOnlineMedDO old = baseNsOlineMedDao.findById(baseNsOlineMedDO.getId()).orElse(null);
                BeanUtils.copyProperties(baseNsOlineMedDO,old,getNullPropertyNames(baseNsOlineMedDO));
                baseNsOlineMedDao.save(old);
            }else{
@ -33,7 +33,7 @@ public class BaseNsOlineMedService extends BaseJpaService<BaseNsOnlineMedDO, Bas
    }
    public void deleteById(String id) {
        BaseNsOnlineMedDO baseNsOnlineMedDO = baseNsOlineMedDao.getOne(id);
        BaseNsOnlineMedDO baseNsOnlineMedDO = baseNsOlineMedDao.findById(id).orElse(null);
        if(baseNsOnlineMedDO != null){
            baseNsOlineMedDao.deleteById(id);
        }

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/BaseNsOnlineAskService.java

@ -24,7 +24,7 @@ public class BaseNsOnlineAskService extends BaseJpaService<BaseNsOnlineAskDO, Ba
        for (BaseNsOnlineAskDO baseNsOnlineAskDO : baseNsOnlineAskDOS){
            if (StringUtils.isNotBlank(baseNsOnlineAskDO.getId())){
                BaseNsOnlineAskDO old = baseNsOnlineAskDao.getOne(baseNsOnlineAskDO.getId());
                BaseNsOnlineAskDO old = baseNsOnlineAskDao.findById(baseNsOnlineAskDO.getId()).orElse(null);
                BeanUtils.copyProperties(baseNsOnlineAskDO, old, getNullPropertyNames(baseNsOnlineAskDO));
                //待完善
                baseNsOnlineAskDao.save(old);
@ -38,7 +38,7 @@ public class BaseNsOnlineAskService extends BaseJpaService<BaseNsOnlineAskDO, Ba
    }
    public void deleteById(String id){
        BaseNsOnlineAskDO baseNsOnlineAskDO =  baseNsOnlineAskDao.getOne(id);
        BaseNsOnlineAskDO baseNsOnlineAskDO =  baseNsOnlineAskDao.findById(id).orElse(null);
        if (baseNsOnlineAskDO != null){
            baseNsOnlineAskDao.deleteById(id);
            //baseNsOnlineAskDO.setIs_del("0");

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/BaseNsPrescriptionDrugService.java

@ -24,7 +24,7 @@ public class BaseNsPrescriptionDrugService extends BaseJpaService<BaseNsPrescrip
        for (BaseNsPrescriptionDrugDO baseNsPrescriptionDrugDO : baseNsPrescriptionDrugDOS){
            if (StringUtils.isNoneBlank(baseNsPrescriptionDrugDO.getId())){
                BaseNsPrescriptionDrugDO old = baseNsPrescriptionDrugDao.getOne(baseNsPrescriptionDrugDO.getId());
                BaseNsPrescriptionDrugDO old = baseNsPrescriptionDrugDao.findById(baseNsPrescriptionDrugDO.getId()).orElse(null);
                BeanUtils.copyProperties(baseNsPrescriptionDrugDO, old, getNullPropertyNames(baseNsPrescriptionDrugDO));
                baseNsPrescriptionDrugDao.save(old);
            }else {
@ -35,7 +35,7 @@ public class BaseNsPrescriptionDrugService extends BaseJpaService<BaseNsPrescrip
    }
    public void deleteById(String id) {
        BaseNsPrescriptionDrugDO baseNsPrescriptionDrugDO = baseNsPrescriptionDrugDao.getOne(id);
        BaseNsPrescriptionDrugDO baseNsPrescriptionDrugDO = baseNsPrescriptionDrugDao.findById(id).orElse(null);
        if (baseNsPrescriptionDrugDO != null){
            baseNsPrescriptionDrugDao.deleteById(id);
        }

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpAppointmentOnlineService.java

@ -24,7 +24,7 @@ public class UpAppointmentOnlineService extends BaseJpaService<UpAppointmentOnli
        });*/
        for (UpAppointmentOnlineDO upAppointmentOnlineDO:upAppointmentOnlineDOS){
            if (StringUtils.isNotBlank(upAppointmentOnlineDO.getId())){
                UpAppointmentOnlineDO old= upAppointmentOnlineDao.getOne(upAppointmentOnlineDO.getId());
                UpAppointmentOnlineDO old= upAppointmentOnlineDao.findById(upAppointmentOnlineDO.getId()).orElse(null);
                BeanUtils.copyProperties(upAppointmentOnlineDO, old, getNullPropertyNames(upAppointmentOnlineDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
@ -38,7 +38,7 @@ public class UpAppointmentOnlineService extends BaseJpaService<UpAppointmentOnli
    }
    public void deleteById(String id){
        UpAppointmentOnlineDO upAppointmentOnlineDO =  upAppointmentOnlineDao.getOne(id);
        UpAppointmentOnlineDO upAppointmentOnlineDO =  upAppointmentOnlineDao.findById(id).orElse(null);
        if (upAppointmentOnlineDO!=null){
            upAppointmentOnlineDO.setIs_del("0");
            upAppointmentOnlineDao.save(upAppointmentOnlineDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpMedicalOnlineService.java

@ -24,7 +24,7 @@ public class UpMedicalOnlineService extends BaseJpaService<UpMedicalOnlineDO, Up
        });*/
        for (UpMedicalOnlineDO upMedicalOnlineDO:upMedicalOnlineDOS){
            if (StringUtils.isNotBlank(upMedicalOnlineDO.getId())){
                UpMedicalOnlineDO old= upMedicalOnlineDao.getOne(upMedicalOnlineDO.getId());
                UpMedicalOnlineDO old= upMedicalOnlineDao.findById(upMedicalOnlineDO.getId()).orElse(null);
                BeanUtils.copyProperties(upMedicalOnlineDO, old, getNullPropertyNames(upMedicalOnlineDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
@ -38,7 +38,7 @@ public class UpMedicalOnlineService extends BaseJpaService<UpMedicalOnlineDO, Up
    }
    public void deleteById(String id){
        UpMedicalOnlineDO upMedicalOnlineDO =  upMedicalOnlineDao.getOne(id);
        UpMedicalOnlineDO upMedicalOnlineDO =  upMedicalOnlineDao.findById(id).orElse(null);
        if (upMedicalOnlineDO!=null){
            upMedicalOnlineDO.setIs_del("0");
            upMedicalOnlineDao.save(upMedicalOnlineDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsDoctorRecordService.java

@ -24,7 +24,7 @@ public class UpnsDoctorRecordService extends BaseJpaService<UpnsDoctorRecordDO,
        });*/
        for (UpnsDoctorRecordDO upnsDoctorRecordDO:upnsDoctorRecordDOS){
            if (StringUtils.isNotBlank(upnsDoctorRecordDO.getId())){
                UpnsDoctorRecordDO old= upnsDoctorRecordDao.getOne(upnsDoctorRecordDO.getId());
                UpnsDoctorRecordDO old= upnsDoctorRecordDao.findById(upnsDoctorRecordDO.getId()).orElse(null);
                BeanUtils.copyProperties(upnsDoctorRecordDO, old, getNullPropertyNames(upnsDoctorRecordDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
@ -38,7 +38,7 @@ public class UpnsDoctorRecordService extends BaseJpaService<UpnsDoctorRecordDO,
    }
    public void deleteById(String id){
        UpnsDoctorRecordDO upnsDoctorRecordDO =  upnsDoctorRecordDao.getOne(id);
        UpnsDoctorRecordDO upnsDoctorRecordDO =  upnsDoctorRecordDao.findById(id).orElse(null);
        if (upnsDoctorRecordDO!=null){
            upnsDoctorRecordDO.setIs_del("0");
            upnsDoctorRecordDao.save(upnsDoctorRecordDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsDoctorScoreService.java

@ -24,7 +24,7 @@ public class UpnsDoctorScoreService extends BaseJpaService<UpnsDoctorScoreDO, Up
        });*/
        for (UpnsDoctorScoreDO upnsDoctorScoreDO:upnsDoctorScoreDOS){
            if (StringUtils.isNotBlank(upnsDoctorScoreDO.getId())){
                UpnsDoctorScoreDO old= upnsDoctorScoreDao.getOne(upnsDoctorScoreDO.getId());
                UpnsDoctorScoreDO old= upnsDoctorScoreDao.findById(upnsDoctorScoreDO.getId()).orElse(null);
                BeanUtils.copyProperties(upnsDoctorScoreDO, old, getNullPropertyNames(upnsDoctorScoreDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
@ -38,7 +38,7 @@ public class UpnsDoctorScoreService extends BaseJpaService<UpnsDoctorScoreDO, Up
    }
    public void deleteById(String id){
        UpnsDoctorScoreDO upnsDoctorScoreDO =  upnsDoctorScoreDao.getOne(id);
        UpnsDoctorScoreDO upnsDoctorScoreDO =  upnsDoctorScoreDao.findById(id).orElse(null);
        if (upnsDoctorScoreDO!=null){
            upnsDoctorScoreDO.setIs_del("0");
            upnsDoctorScoreDao.save(upnsDoctorScoreDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsOrganBaseService.java

@ -24,7 +24,7 @@ public class UpnsOrganBaseService extends BaseJpaService<UpNsOrganBaseDO, UpnsOr
        });*/
        for (UpNsOrganBaseDO upNsOrganBaseDO:upNsOrganBaseDOS){
            if (StringUtils.isNotBlank(upNsOrganBaseDO.getId())){
                UpNsOrganBaseDO old= upnsOrganBaseDao.getOne(upNsOrganBaseDO.getId());
                UpNsOrganBaseDO old= upnsOrganBaseDao.findById(upNsOrganBaseDO.getId()).orElse(null);
                BeanUtils.copyProperties(upNsOrganBaseDO, old, getNullPropertyNames(upNsOrganBaseDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
@ -38,7 +38,7 @@ public class UpnsOrganBaseService extends BaseJpaService<UpNsOrganBaseDO, UpnsOr
    }
    public void deleteById(String id){
        UpNsOrganBaseDO upNsOrganBaseDO =  upnsOrganBaseDao.getOne(id);
        UpNsOrganBaseDO upNsOrganBaseDO =  upnsOrganBaseDao.findById(id).orElse(null);
        if (upNsOrganBaseDO!=null){
            upNsOrganBaseDO.setIs_del("0");
            upnsOrganBaseDao.save(upNsOrganBaseDO);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/utils/YkyySMSService.java

@ -87,7 +87,7 @@ public class YkyySMSService {
        WxPushLogDO wxPushLogDODoctor = null;
        //新增字典判断是否发送短信
        String sendMesControl = "1";//1 开启发送短信 0 关闭
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.getOne("ykSmsControl");
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("ykSmsControl").orElse(null);
        if (wlyyHospitalSysDictDO!=null){
            sendMesControl = wlyyHospitalSysDictDO.getDictValue();
        }
@ -106,7 +106,7 @@ public class YkyySMSService {
                    sex = "女士";
                }
            }
            BasePatientDO basePatientDO = basePatientDao.getOne(wlyyOutpatientDO.getPatient());
            BasePatientDO basePatientDO = basePatientDao.findById(wlyyOutpatientDO.getPatient()).orElse(null);
            if (basePatientDO!=null&&StringUtils.isNoneBlank(basePatientDO.getMobile())){
                mobile = basePatientDO.getMobile();
            }else {

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

@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.wx.EnterpriseJsApiTicket;
import com.yihu.jw.entity.base.wx.JsApiTicket;
import com.yihu.jw.entity.base.wx.WxWechatDO;
import com.yihu.jw.entity.hospital.enterprise.WxEnterpriseDO;
import com.yihu.jw.entity.hospital.enterprise.WxEnterpriseTokenDO;
@ -19,7 +18,6 @@ import com.yihu.jw.wechat.enterprise.dao.WxEnterpriseTokenDao;
import com.yihu.jw.wechat.enterprise.dao.WxEnterpriseUserDao;
import com.yihu.jw.wechat.service.WxAccessTokenService;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -36,7 +34,6 @@ import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Random;
/**
@ -79,7 +76,7 @@ public class EnterpriseService {
            enterpriseId ="zsyy";
        }
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.getOne(enterpriseId);
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findById(enterpriseId).orElse(null);
        List<WxEnterpriseTokenDO> wxEnterpriseTokenDOs = wxEnterpriseTokenDao.findByCodeOrderByCreateTimeDesc(wxEnterpriseDO.getCorpid());
@ -121,7 +118,7 @@ public class EnterpriseService {
        logger.info("getXCXToken");
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.getOne(enterpriseId+"_xcx");
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findById(enterpriseId+"_xcx").orElse(null);
        List<WxEnterpriseTokenDO> wxEnterpriseTokenDOs = wxEnterpriseTokenDao.findByCodeOrderByCreateTimeDesc(enterpriseId+"_xcx");
@ -163,7 +160,7 @@ public class EnterpriseService {
        param.put("totag","");
        param.put("msgtype","text");
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.getOne(enterpriseId);
        WxEnterpriseDO wxEnterpriseDO = wxEnterpriseDao.findById(enterpriseId).orElse(null);
        param.put("agentid",wxEnterpriseDO.getAgentid());

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/wechat/service/WxAccessTokenService.java

@ -44,7 +44,7 @@ public class WxAccessTokenService extends BaseJpaService<WxAccessTokenDO, WxAcce
    public WxWechatDO getWxInfo(String wxId){
        return wechatDao.getOne(wxId);
        return wechatDao.findById(wxId).orElse(null);
    }
    /**
     * 根据原始id查找

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

@ -2,12 +2,10 @@ package com.yihu.jw.wlyy.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.dict.dao.DictDoctorDutyDao;
import com.yihu.jw.dict.dao.DictHospitalDeptDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
import com.yihu.jw.entity.base.dict.DictDoctorDutyDO;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
@ -17,7 +15,6 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.hospital.httplog.dao.BaseOperateLogDao;
import com.yihu.jw.hospital.httplog.service.BaseOperateLogService;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
@ -28,9 +25,9 @@ import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.encrypt.MD5;
import com.yihu.jw.util.wechat.wxhttp.HttpUtil;
import com.yihu.jw.wlyy.wlyyhttp.WlyyHttpService;
import com.yihu.jw.util.encrypt.MD5;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -100,11 +97,11 @@ public class WlyyBusinessService {
     */
    public Boolean sendWlyyOutpatientMes(String doctor,String outPatientId){
        BaseDoctorDO doctorDO = baseDoctorDao.getOne(doctor);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor).orElse(null);
        if(doctorDO!=null&& StringUtils.isNotBlank(doctorDO.getIdcard())){
            WlyyOutpatientDO outpatientDO =outpatientDao.getOne(outPatientId);
            BasePatientDO basePatientDO = basePatientDao.getOne(outpatientDO.getPatient());
            WlyyOutpatientDO outpatientDO =outpatientDao.findById(outPatientId).orElse(null);
            BasePatientDO basePatientDO = basePatientDao.findById(outpatientDO.getPatient()).orElse(null);
            JSONObject param = new JSONObject();
            param.put("idCard",doctorDO.getIdcard());
@ -145,10 +142,10 @@ public class WlyyBusinessService {
        Map<String,Object> res = new HashedMap();
        WlyyOutpatientDO outpatientDO =outpatientDao.getOne(outPatientId);
        WlyyOutpatientDO outpatientDO =outpatientDao.findById(outPatientId).orElse(null);
        if(outpatientDO!=null){
            BaseDoctorDO doctorDO = baseDoctorDao.getOne(outpatientDO.getDoctor());
            BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor()).orElse(null);
            JSONObject param = new JSONObject();
            param.put("idCard",doctorDO.getIdcard());

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/wlyy/wlyyhttp/WlyyHttpService.java

@ -47,7 +47,7 @@ public class WlyyHttpService {
        try{
            OauthWlyyConfigDO oauthWlyyConfigDO = oauthWlyyConfigDao.getOne(configId);
            OauthWlyyConfigDO oauthWlyyConfigDO = oauthWlyyConfigDao.findById(configId).orElse(null);
            //token获取accesstoken
            List<NameValuePair> params = new ArrayList<>();
            params.add(new BasicNameValuePair("appid", oauthWlyyConfigDO.getAppId()));
@ -109,7 +109,7 @@ public class WlyyHttpService {
        try{
            OauthWlyyConfigDO oauthWlyyConfigDO = oauthWlyyConfigDao.getOne(configId);
            OauthWlyyConfigDO oauthWlyyConfigDO = oauthWlyyConfigDao.findById(configId).orElse(null);
            //token获取accesstoken
            List<NameValuePair> params = new ArrayList<>();
            params.add(new BasicNameValuePair("appid", oauthWlyyConfigDO.getAppId()));