Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

yeshijie 4 years ago
parent
commit
4059de8738
32 changed files with 815 additions and 80 deletions
  1. 18 0
      business/base-service/src/main/java/com/yihu/jw/hospital/drugstore/dao/BaseDrugStoreDao.java
  2. 69 0
      business/base-service/src/main/java/com/yihu/jw/hospital/drugstore/service/BaseDrugStoreService.java
  3. 38 8
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  4. 3 2
      business/base-service/src/main/java/com/yihu/jw/hospital/survey/dao/SurveyTemplateOptionDao.java
  5. 4 4
      business/base-service/src/main/java/com/yihu/jw/hospital/survey/dao/SurveyUserAnswerDao.java
  6. 93 22
      business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java
  7. 10 0
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  8. 3 0
      business/base-service/src/main/java/com/yihu/jw/patient/dao/BasePatientBusinessDao.java
  9. 32 0
      business/base-service/src/main/java/com/yihu/jw/utils/CountDistance.java
  10. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  11. 151 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseDrugStoreDO.java
  12. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java
  13. 9 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/login/BaseLoginLogDO.java
  14. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
  15. 9 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyTemplateDO.java
  16. 10 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  17. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  18. 1 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/ResultStatus.java
  19. 30 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/survey/WlyySurveyTemplateVO.java
  20. 49 3
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java
  21. 18 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/BaseLoginLogDao.java
  22. 87 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/BaseLoginLogService.java
  23. 9 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/WlyyHospitalSysDictDao.java
  24. 3 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/login/dao/BaseLoginLogDao.java
  25. 45 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/login/service/BaseLoginLogService.java
  26. 0 2
      server/svr-authentication/src/main/java/com/yihu/jw/security/service/OauthYlzConfigService.java
  27. 1 1
      svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java
  28. 84 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/drugstore/BaseDrugStoreEndpoint.java
  29. 4 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java
  30. 9 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/survey/SurveyEndpoint.java
  31. 20 26
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/BasePatientBusinessService.java
  32. 2 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java

+ 18 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/drugstore/dao/BaseDrugStoreDao.java

@ -0,0 +1,18 @@
package com.yihu.jw.hospital.drugstore.dao;
import com.yihu.jw.entity.base.area.BaseDrugStoreDO;
import com.yihu.jw.entity.hospital.message.BaseBannerDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface BaseDrugStoreDao extends PagingAndSortingRepository<BaseDrugStoreDO, String>, JpaSpecificationExecutor<BaseDrugStoreDO> {
    @Query(value = " from  BaseDrugStoreDO  where (drugStoreName like %?1% or ?1 is null ) or ( hospitalName like %?1% or ?1 is null)")
    List<BaseDrugStoreDO> findDrugByName(String storeName);
    @Query(value = " from  BaseDrugStoreDO  where drugStoreCode =?1 and hospitalCode = ?2 ")
    BaseDrugStoreDO findDrugByNameAndCode(String drugStoreCode,String hospitalCode);
}

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

@ -0,0 +1,69 @@
package com.yihu.jw.hospital.drugstore.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.j2objc.annotations.AutoreleasePool;
import com.yihu.jw.entity.base.area.BaseDrugStoreDO;
import com.yihu.jw.entity.hospital.message.BaseBannerDoctorDO;
import com.yihu.jw.hospital.drugstore.dao.BaseDrugStoreDao;
import com.yihu.jw.hospital.message.dao.BaseBannerDoctorDao;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.utils.CountDistance;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.provider.HibernateUtils;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class BaseDrugStoreService extends BaseJpaService<BaseDrugStoreDO, BaseDrugStoreDao> {
    @Autowired
    private BaseDrugStoreDao baseDrugStoreDao;
    @Autowired
    private ObjectMapper objectMapper;
    @Autowired
    private HibenateUtils hibenateUtils;
   //根据经纬度计算距离通过代码
   public List<BaseDrugStoreDO> countDistanceListIncode(String latitude,String longitude,String drugStoreName,String hospitalName) throws ParseException {
       List<BaseDrugStoreDO> list = new ArrayList<>();
       if (StringUtils.isNotEmpty(drugStoreName)||StringUtils.isNotEmpty(hospitalName)){
           list = baseDrugStoreDao.findDrugByName(drugStoreName);
       }else {
           String filters= null;
           list= this.search(filters);
       }
       List<BaseDrugStoreDO> resultlist = new ArrayList<>();
       CountDistance countDistance = new CountDistance();
       latitude=StringUtils.isEmpty(latitude)?"0":latitude;
       longitude=StringUtils.isEmpty(longitude)?"0":longitude;
        for (BaseDrugStoreDO baseDrugStoreDO:list){
            double storeLatitude = Double.parseDouble(baseDrugStoreDO.getLatitude());
            double storeLongitude = Double.parseDouble(baseDrugStoreDO.getLongitude());
            double distance = countDistance.getDistance(Double.parseDouble(latitude),Double.parseDouble(longitude),storeLatitude,storeLongitude);
            baseDrugStoreDO.setDistance(distance);
        }
        list.stream().sorted((x,y)->Double.compare(x.getDistance(),y.getDistance()));
        return list;
   }
    public BaseDrugStoreDO getById(String id,String latitude,String longitude){
        BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreDao.findOne(id);
        CountDistance countDistance = new CountDistance();
        latitude=StringUtils.isEmpty(latitude)?"0":latitude;
        longitude=StringUtils.isEmpty(longitude)?"0":longitude;
        double storeLatitude = Double.parseDouble(baseDrugStoreDO.getLatitude());
        double storeLongitude = Double.parseDouble(baseDrugStoreDO.getLongitude());
        double distance = countDistance.getDistance(Double.parseDouble(latitude),Double.parseDouble(longitude),storeLatitude,storeLongitude);
        baseDrugStoreDO.setDistance(distance);
        return baseDrugStoreDO;
    }
}

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

@ -6,8 +6,8 @@ import com.yihu.jw.dict.dao.DictDeptDescDao;
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.BaseDoctorPatientDao;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.entity.base.area.BaseDrugStoreDO;
import com.yihu.jw.entity.base.dict.DictDeptDescDO;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
@ -40,6 +40,7 @@ import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.doctor.dao.DoctorWorkTimeDao;
import com.yihu.jw.hospital.doctor.dao.PatientRegisterTimeDao;
import com.yihu.jw.hospital.doctor.dao.WlyyDoctorOnlineTimeDao;
import com.yihu.jw.hospital.drugstore.dao.BaseDrugStoreDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.mapping.service.DoctorMappingService;
@ -74,7 +75,6 @@ import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.LatitudeUtils;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.wechat.WeixinMessagePushUtils;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.WebserviceUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
@ -244,6 +244,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private BaseSensitiveFilterWordsService baseSensitiveFilterWordsService;
    @Autowired
    private BaseBannerDoctorDao baseBannerDoctorDao;
    @Autowired
    private BaseDrugStoreDao baseDrugStoreDao;
@ -822,10 +824,33 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //2.物流信息
        WlyyPrescriptionExpressageDO expressageDO = objectMapper.readValue(expressageJson, WlyyPrescriptionExpressageDO.class);
        expressageDO.setDel(1);
        expressageDO.setCreateTime(new Date());
        expressageDO.setOutpatientId(outpatient.getId());
        prescriptionExpressageDao.save(expressageDO);
        if (0==expressageDO.getOneselfPickupFlg()){
            System.out.println("进入物流信息");
            expressageDO.setDel(1);
            expressageDO.setCreateTime(new Date());
            expressageDO.setOutpatientId(outpatient.getId());
            prescriptionExpressageDao.save(expressageDO);
        }else {
            System.out.println("写入自取信息");
            String drugStoreCode = expressageDO.getHospitalCode();
            BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreDao.findOne(drugStoreCode);
            if (null!=baseDrugStoreDO){
                expressageDO.setCityCode(baseDrugStoreDO.getCityCode());
                expressageDO.setCityName(baseDrugStoreDO.getCityName());
                expressageDO.setProvinceCode(baseDrugStoreDO.getProvinceCode());
                expressageDO.setProvinceName(baseDrugStoreDO.getProvinceName());
                expressageDO.setTownCode(baseDrugStoreDO.getTownCode());
                expressageDO.setTownName(baseDrugStoreDO.getTownName());
                expressageDO.setHospitalCode(baseDrugStoreDO.getDrugStoreCode());
                expressageDO.setHospitalName(baseDrugStoreDO.getHospitalName());
                expressageDO.setHospitalAddress(baseDrugStoreDO.getAddress());
            }
            expressageDO.setDel(1);
            expressageDO.setCreateTime(new Date());
            expressageDO.setOutpatientId(outpatient.getId());
            prescriptionExpressageDao.save(expressageDO);
        }
        //3.创建候诊室
        createRoom(outpatient, chargeType);
@ -841,7 +866,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public Boolean createRoom(WlyyOutpatientDO outpatientDO, String chargeType) {
        System.out.println("进入创建候诊室");
        WlyyHospitalWaitingRoomDO waitingRoom = new WlyyHospitalWaitingRoomDO();
        waitingRoom.setDept(outpatientDO.getDept());
@ -851,6 +876,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //是否是有协同门诊医生
        if (StringUtils.isNotBlank(outpatientDO.getGeneralDoctor())) {
            System.out.println("是否是有协同门诊医生");
            waitingRoom.setGeneralDoctor(outpatientDO.getGeneralDoctor());
            waitingRoom.setGeneralDoctorName(outpatientDO.getGeneralDoctorName());
        }
@ -4295,7 +4321,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "FROM wlyy_outpatient op,wlyy_hospital_waiting_room room ," +
                "base_patient p " +
                "WHERE  room.outpatient_id=op.id AND room.consult_type=2  AND p.id = op.patient" +
                " AND room.doctor IS NOT NULL and (p.online=0 OR P.online IS NULL) ";
                " AND room.doctor IS NOT NULL and (p.on_line=0 OR p.on_line IS NULL) ";
        if (StringUtils.isNoneBlank(dept)) {
            disconnectSql = disconnectSql + " and op.dept = '" + dept + "' ";
        }
@ -5884,6 +5910,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public SystemMessageDO sendOutPatientMes(WlyyOutpatientDO outpatient,boolean payFlag) {
        System.out.println("发送新增门诊信息");
        SystemMessageDO systemMessageDO = new SystemMessageDO();
        String msg = "";
        JSONObject data = new JSONObject();
@ -7543,6 +7570,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    /**
     * 关注医生
     * @param doctorId

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

@ -2,6 +2,7 @@ package com.yihu.jw.hospital.survey.dao;
import com.yihu.jw.entity.hospital.survey.WlyySurveyTemplateOptionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
@ -10,8 +11,8 @@ import java.util.List;
 * Created by Trick on 2019/9/6.
 */
public interface SurveyTemplateOptionDao extends PagingAndSortingRepository<WlyySurveyTemplateOptionDO, String>, JpaSpecificationExecutor<WlyySurveyTemplateOptionDO> {
    List<WlyySurveyTemplateOptionDO> findByQuestionCodeAndDelOrderBySortAsc(String questionCode,String del);
    @Query("From WlyySurveyTemplateOptionDO c WHERE c.questionCode = ?1 and c.templateCode = ?2 and c.del = ?3 order by c.sort asc ")
    List<WlyySurveyTemplateOptionDO> findByQuestionCodeAndDelOrderBySortAsc(String questionCode,String templateCode,String del);
    List<WlyySurveyTemplateOptionDO> findByTemplateCodeAndDelOrderBySortAsc(String templateCode,String del);

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/survey/dao/SurveyUserAnswerDao.java

@ -18,11 +18,11 @@ public interface SurveyUserAnswerDao extends PagingAndSortingRepository<WlyySurv
    List<WlyySurveyUserAnswerDO> findBySurverUserId(String surverUserId);
    List<WlyySurveyUserAnswerDO> findByTempQuestionCode(String tempQuestionCode);
    @Query("From WlyySurveyUserAnswerDO c WHERE c.tempOptionCode = ?1 and c.surveyTempCode = ?2")
    List<WlyySurveyUserAnswerDO> findBytempOptionCode(String tempOptionCode,String surveyTempCode);
    List<WlyySurveyUserAnswerDO> findBytempOptionCode(String tempOptionCode);
    @Query("SELECT DISTINCT c.patient from WlyySurveyUserAnswerDO c WHERE c.tempQuestionCode = ?1")
    List<WlyySurveyUserAnswerDO> findByTempQuestionCodeDistinctPatient(String tempQuestionCode);
    @Query("SELECT DISTINCT c.patient from WlyySurveyUserAnswerDO c WHERE c.tempQuestionCode = ?1 and c.surveyTempCode = ?2")
    List<WlyySurveyUserAnswerDO> findByTempQuestionCodeDistinctPatient(String tempQuestionCode,String surveyTempCode );
}

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

@ -1,10 +1,14 @@
package com.yihu.jw.hospital.survey.service;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientBusinessDO;
import com.yihu.jw.entity.hospital.survey.*;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.survey.dao.*;
import com.yihu.jw.patient.dao.BasePatientBusinessDao;
import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO;
import com.yihu.jw.restmodel.hospital.survey.*;
import com.yihu.jw.restmodel.web.MixEnvelop;
@ -12,12 +16,13 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.PercentageUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.utils.EntityUtils;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
@ -64,6 +69,21 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
    private SurveyUserAnswerDao surveyUserAnswerDao;
    @Autowired
    private HibenateUtils hibenateUtils;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private BasePatientBusinessDao basePatientBusinessDao;
    @Value("${wechat.id}")
    private String wxId;
    @Value("${wechat.flag}")
    private boolean flag;
    @Autowired
    private HttpClientUtil HttpClientUtil;
    @Value("${im.im_list_get}")
    private String im_host;
    /**
     * 查询字典
     * 1.surveyLabel;2.surveyScreenLabel
@ -283,6 +303,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
                " t.template_comment AS templateComment, " +
                " t.organization, " +
                " t.creater, " +
                " t.creater_code, " +
                " t.create_time AS createTime, " +
                " t.del, " +
                " t.update_time AS updateTime" +
@ -300,7 +321,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
            sql += " AND  i.label_code ='"+label+"'";
        }
        if (StringUtils.isNoneBlank(creater)){
            sql +=" AND  t.creater = '"+creater+"' ";
            sql +=" AND  t.creater_code = '"+creater+"' ";
        }
        sql += " ORDER BY t.create_time DESC LIMIT " + (page - 1) * size + "," + size + " ";
@ -363,13 +384,14 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        String sqlUsed = "select t.used as \"used\" from wlyy_knowledge_article_user t where t.relation_code = '"+templateCode +"'";
        if(StringUtils.isNotEmpty(userCode)){
            sqlUsed += " and t.user_code = '"+userCode+"'";
            System.out.println(sqlUsed);
            List<Map<String,Object>> listUsed = hibenateUtils.createSQLQuery(sqlUsed);
            if (listUsed.size()>0){
                String used = null!=listUsed.get(0).get("used")?listUsed.get(0).get("used").toString():"0";
                templateVO.setUsed(Integer.valueOf(used));
            }
        }
        System.out.println(sqlUsed);
        List<Map<String,Object>> listUsed = hibenateUtils.createSQLQuery(sqlUsed);
        if (listUsed.size()>0){
            String used = null!=listUsed.get(0).get("used")?listUsed.get(0).get("used").toString():"0";
            templateVO.setUsed(Integer.valueOf(used));
        }
        List<WlyySurveyTemplateQuestionDO> tqDOs = surveyTemplateQuestionDao.findByTemplateCodeAndDelOrderBySortAsc(tempId,"1");
        if(tqDOs!=null&&tqDOs.size()>0){
            //设置问题
@ -379,7 +401,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
            //设置选项
            for(WlyySurveyTemplateQuestionVO tq:tqVOs){
                List<WlyySurveyTemplateOptionDO> optionDOs  = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),"1");
                List<WlyySurveyTemplateOptionDO> optionDOs  = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),tq.getTemplateCode(),"1");
                List<WlyySurveyTemplateOptionVO> optionVOs = new ArrayList<>();
                convertToModels(optionDOs,optionVOs,WlyySurveyTemplateOptionVO.class);
                tq.setOptionVOs(optionVOs);
@ -411,8 +433,8 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
    public Boolean saveSurveyTemplate(String tempJson,String tempQJson,String tempOpJson,String labelJson,String labelInspJson)throws Exception{
        WlyySurveyTemplateDO temp = objectMapper.readValue(tempJson,WlyySurveyTemplateDO.class);
        String doctor = temp.getCreaterCode();
        temp = surveyTemplateDao.save(temp);
        //删除原有问题
        List<WlyySurveyTemplateQuestionDO> questionDODels = surveyTemplateQuestionDao.findByTemplateCodeAndDelOrderBySortAsc(temp.getId(),"1");
        if(questionDODels!=null&&questionDODels.size()>0){
@ -615,6 +637,14 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
                answerDO.setSurverUserId(surveyUserDO.getId());
            }
            surveyUserAnswerDao.save(answerDOs);
            BasePatientBusinessDO basePatientBusinessDO = basePatientBusinessDao.findByDoctorPatientRelationCode(surveyUserDO.getPatient(),surveyUserDO.getSurveyTempCode(),surveyUserDO.getDoctor());
            JSONObject object = new JSONObject();
            if (null!=basePatientBusinessDO){
                object.put("title",surveyUserDO.getSurveyTempTitle());
                object.put("content",answerDOs);
                object.put("id",surveyUserDO.getSurveyTempCode());
            }
            this.sendImMsg(basePatientBusinessDO.getPatient(), basePatientBusinessDO.getPatientName(), basePatientBusinessDO.getSessionId(), "36", object.toJSONString(),"1");
        }
        return true;
    }
@ -644,7 +674,11 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        WlyySurveyTemplateVO templateVO = convertToModel(templateDO,WlyySurveyTemplateVO.class);
        templateVO.setLabels(findSurveyTemplateLabel(tempId));
        templateVO.setInsplabels(findSurveyInspTemplateLabel(tempId));
        BaseDoctorDO doctor = baseDoctorDao.findById(templateDO.getCreaterCode());
        if (null!=doctor){
            templateVO.setVisitDept(doctor.getVisitDept());
            templateVO.setVisitDeptName(doctor.getVisitDeptName());
        }
        //查询所有答题过的用户,计算答题总数
        List<WlyySurveyUserDO> surveyUsers = surveyUserDao.findBySurveyTempCodeAndStatus(templateVO.getId(),1);
        Integer total =0;
@ -662,11 +696,11 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
            //设置选项
            for(WlyySurveyTemplateQuestionVO tq:tqVOs){
                List<WlyySurveyTemplateOptionDO> optionDOs  = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),"1");
                List<WlyySurveyTemplateOptionDO> optionDOs  = surveyTemplateOptionDao.findByQuestionCodeAndDelOrderBySortAsc(tq.getId(),tq.getTemplateCode(),"1");
                List<WlyySurveyTemplateOptionVO> optionVOs = new ArrayList<>();
                convertToModels(optionDOs,optionVOs,WlyySurveyTemplateOptionVO.class);
                int tpCount = 0;
                List<WlyySurveyUserAnswerDO> answerQuestionDOs = surveyUserAnswerDao.findByTempQuestionCodeDistinctPatient(tq.getId());
                List<WlyySurveyUserAnswerDO> answerQuestionDOs = surveyUserAnswerDao.findByTempQuestionCodeDistinctPatient(tq.getId(),tempId);
                if(answerQuestionDOs!=null&&answerQuestionDOs.size()>0){
                    tpCount = answerQuestionDOs.size();
                }
@ -677,7 +711,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
                if(optionVOs!=null&&optionVOs.size()>0){
                    for(WlyySurveyTemplateOptionVO vo:optionVOs){
                        Integer answerCount =0;
                        List<WlyySurveyUserAnswerDO> answerDOs = surveyUserAnswerDao.findBytempOptionCode(vo.getId());
                        List<WlyySurveyUserAnswerDO> answerDOs = surveyUserAnswerDao.findBytempOptionCode(vo.getId(),vo.getTemplateCode());
                        if(answerDOs!=null&&answerDOs.size()>0){
                            answerCount = answerDOs.size();
                        }
@ -765,18 +799,18 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
    /**
     * 查询
     * @param title
     * @param page
     * @param size
     * @param
     * @param
     * @param
     * @return
     */
    public MixEnvelop findAnswerList(String tempId,String patient,String title,Integer page,Integer size){
    public MixEnvelop findAnswerList(String tempId,String patient,String patientName,String title,Integer page,Integer size){
        String totalSql ="SELECT " +
                " COUNT(1) AS total" +
                " FROM " +
                " wlyy_survey_user t " +
                " WHERE 1=1 ";
                " WHERE 1=1 and t.status = 1 ";
        if(StringUtils.isNotBlank(title)){
            totalSql += " AND t.survey_temp_title like '%"+title+"%' ";
        }
@ -786,6 +820,9 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        if(StringUtils.isNotBlank(tempId)){
            totalSql += " AND t.survey_temp_code = '"+tempId+"' ";
        }
        if(StringUtils.isNotBlank(patientName)){
            totalSql += " AND t.patient_name like  '%"+patientName+"%' ";
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        Long count = 0L;
@ -811,18 +848,38 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
                " FROM " +
                " wlyy_survey_user t " +
                " JOIN base_patient p ON t.patient = p.id " +
                " WHERE 1=1 ";
                " WHERE 1=1 and t.status = 1 ";
        if(StringUtils.isNotBlank(title)){
            sql += " AND t.survey_temp_title like '%"+title+"%' ";
        }
        if(StringUtils.isNotBlank(patient)){
            sql += " AND t.patient = '"+patient+"' ";
        }
        if(StringUtils.isNotBlank(patientName)){
            sql += " AND t.patient_name like  '%"+patientName+"%' ";
        }
        if(StringUtils.isNotBlank(tempId)){
            sql += " AND t.survey_temp_code = '"+tempId+"' ";
        }
        sql += " ORDER BY t.create_time DESC LIMIT " + (page - 1) * size + "," + size + " ";
        sql += " ORDER BY t.create_time DESC " ;
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){
                sql ="SELECT * FROM\n" +
                        "( SELECT A.*, ROWNUM RN FROM\n" +
                        "    ("+sql+") A \n" +
                        "    WHERE ROWNUM <= "+page*size+" ) \n" +
                        "       WHERE RN >= "+((page-1)*size+1);
            }else {
                sql+="LIMIT "+ (page - 1) * size + "," + size + " ";
            }
        } else {
            sql+="LIMIT "+ (page - 1) * size + "," + size + " ";
        }
        System.out.println(sql);
        List<WlyySurveyUserVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyySurveyUserVO.class));
        if(list!=null&&list.size()>0){
@ -833,4 +890,18 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, size, count);
    }
    public String sendImMsg(String from, String fromName, String sessionId, String contentType, String content, String businessType) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/messages";
        System.out.println("im地址"+imAddr);
        JSONObject params = new JSONObject();
        params.put("sender_id", from);
        params.put("sender_name", fromName);
        params.put("content_type", contentType);
        params.put("content", content);
        params.put("session_id", sessionId);
        params.put("business_type", businessType);
        String response = HttpClientUtil.postBody(imAddr, params);
        return response;
    }
}

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

@ -430,6 +430,15 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (tradeType.equalsIgnoreCase("JSAPI")){
            map.put("openid", openId);
        }
        if (tradeType.equalsIgnoreCase("MWEB")){
            JSONObject jsonObject = new JSONObject();
            JSONObject object = new JSONObject();
            object.put("type","Wap");
            object.put("wap_url","");
            object.put("wap_name","");
            jsonObject.put("h5_info",object);
            map.put("scene_info",jsonObject.toJSONString());
        }
      /*  String token_url = "https://api.weixin.qq.com/cgi-bin/token";
        String params = "grant_type=client_credential&appid=" + wxWechatDO.getAppId() + "&secret=" + wxWechatDO.getAppSecret();
        String result = HttpUtil.sendGet(token_url, params);
@ -774,6 +783,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                 businessOrderDO = new BusinessOrderDO();
             }
        }
        System.out.println(relationCode+"----"+relationName+"----"+orderCategory+"----"+remark+"----"+patient+"----"+patientName+"----"+doctor+"----"+payPrice+"----");
        businessOrderDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
        businessOrderDO.setCreateTime(new Date());
        businessOrderDO.setUpdateTime(new Date());

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/patient/dao/BasePatientBusinessDao.java

@ -16,4 +16,7 @@ public interface BasePatientBusinessDao extends PagingAndSortingRepository<BaseP
    @Query("select a from BasePatientBusinessDO a where a.del=1 and a.patient=?1 and a.relationCode=?2")
    BasePatientBusinessDO findByPatientAndRelationCodeAndDel(String patient,String relationCode);
    @Query("from BasePatientBusinessDO a where a.del=1 and a.patient=?1 and a.relationCode=?2 and a.doctor = ?3")
    BasePatientBusinessDO findByDoctorPatientRelationCode(String patient,String relationCode,String doctor);
}

+ 32 - 0
business/base-service/src/main/java/com/yihu/jw/utils/CountDistance.java

@ -0,0 +1,32 @@
package com.yihu.jw.utils;
public class CountDistance {
    private static double EARTH_RADIUS = 6378.137;// 6378.137赤道半径6378137
    private static double rad(double d) {
        return d * Math.PI / 180.0;
    }
    /**
     * 通过经纬度计算两点之间的距离(单位:米)
     * @param latone
     * @param lngone
     * @param lattwo
     * @param lngtwo
     * @return
     */
    public  double getDistance(double latone, double lngone, double lattwo, double lngtwo) {
        double radlatone = rad(latone);
        double radlattwo = rad(lattwo);
        double a = radlatone - radlattwo;
        double b = rad(lngone) - rad(lngtwo);
        double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2)
                + Math.cos(radlatone) * Math.cos(radlattwo)
                * Math.pow(Math.sin(b / 2), 2)));
        s = s * EARTH_RADIUS;
        s = Math.round(s * 10000d) / 10000d;
        s = s*1000;
        return s;
    }
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -25,7 +25,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
   /*@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
  /* @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 151 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/area/BaseDrugStoreDO.java

@ -0,0 +1,151 @@
package com.yihu.jw.entity.base.area;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Table(name = "base_drug_store")
public class BaseDrugStoreDO extends UuidIdentityEntityWithOperator {
    private String hospitalCode;
    private String hospitalName;
    private String provinceCode;
    private String provinceName;
    private String cityCode;
    private String cityName;
    private String townCode;
    private String townName;
    private String longitude;
    private String latitude;
    private String address;
    private String drugStoreCode;
    private String drugStoreName;
    private Integer isDel;
    @Transient
    private double distance ;
    @Transient
    public double getDistance() {
        return distance;
    }
    public void setDistance(double distance) {
        this.distance = distance;
    }
    @Column(name = "address")
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    @Column(name = "hospital_code")
    public String getHospitalCode() {
        return hospitalCode;
    }
    public void setHospitalCode(String hospitalCode) {
        this.hospitalCode = hospitalCode;
    }
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
    @Column(name = "province_code")
    public String getProvinceCode() {
        return provinceCode;
    }
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }
    @Column(name = "province_name")
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
    @Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    @Column(name = "town_code")
    public String getTownCode() {
        return townCode;
    }
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }
    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }
    public void setTownName(String townName) {
        this.townName = townName;
    }
    @Column(name = "longitude")
    public String getLongitude() {
        return longitude;
    }
    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
    @Column(name = "latitude")
    public String getLatitude() {
        return latitude;
    }
    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }
    @Column(name = "drug_store_code")
    public String getDrugStoreCode() {
        return drugStoreCode;
    }
    public void setDrugStoreCode(String drugStoreCode) {
        this.drugStoreCode = drugStoreCode;
    }
    @Column(name = "drug_store_name")
    public String getDrugStoreName() {
        return drugStoreName;
    }
    public void setDrugStoreName(String drugStoreName) {
        this.drugStoreName = drugStoreName;
    }
    @Column(name = "is_del")
    public Integer getIsDel() {
        return isDel;
    }
    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java

@ -611,7 +611,7 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
    }
    @Column(name = "online")
    @Column(name = "on_line")
    public String getOnline() {
        return online;
    }

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/login/BaseLoginLogDO.java

@ -19,6 +19,15 @@ public class BaseLoginLogDO extends UuidIdentityEntity implements java.io.Serial
	private String userAgent;//wlyyusersimple json串
	private String openid;//微信openid
	private String loginType;
	private Date operateTime;
	@Column(name="operate_time")
	public Date getOperateTime() {
		return operateTime;
	}
	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}
	@Column(name="user_id")
	public String getUserId() {

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java

@ -652,7 +652,7 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
    }
    @Column(name = "online")
    @Column(name = "on_line")
    public String getOnline() {
        return online;
    }

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyTemplateDO.java

@ -20,12 +20,21 @@ public class WlyySurveyTemplateDO {
    private String title;//模板标题',
    private String templateComment;//模板说明',
    private String creater;//创建人',
    private String createrCode;//创建人code',
    private String organization;//发布机构',
    private String del;//删除标志(1正常,0删除)',
    private Integer used;//常用量',
    private Date createTime;//创建时间',
    private Date updateTime;//修改时间',
    public String getCreaterCode() {
        return createrCode;
    }
    public void setCreaterCode(String createrCode) {
        this.createrCode = createrCode;
    }
    @Id
    @Column(name = "id", unique = true, nullable = false)
    public String getId() {

+ 10 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -748,4 +748,14 @@ public class BaseRequestMapping {
        public static final String queryHealthIdCard  = "/queryHealthIdCard";
    }
    /**
     * 药店管理接口
     */
    public static class drugStoreManage extends Basic {
        public static final String PREFIX  = "/drugStore";
        public static final String findDrugstore  = "/findDrugstore";
        public static final String findDrugstoreByDistance  = "/findDrugstoreByDistance";
        public static final String findDrugstoreById  = "/findDrugstoreById";
    }
}

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -1290,6 +1290,7 @@ public class BaseHospitalRequestMapping {
        public static final String findWorkTimeInfo="/findWorkTimeInfo";
        public static final String findLevelOneDoctorUpcoming="/findLevelOneDoctorUpcoming";
        public static final String getUpcomingByDoctor="/getUpcomingByDoctor";
        public static final String checkOperateTime="/checkOperateTime";
    }
    /**

+ 1 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/ResultStatus.java

@ -16,6 +16,7 @@ public class ResultStatus {
    public static final Integer INVALID_GRANT = 1102; //授权失败,看具体报错信息,如验证码错误,密码错误等,  [登陆时候,用户不存在/应用不存在,归位此类,方便前端判断]
    public static final Integer NO_PERMI = 1103; //无权限访问
    public static final Integer INVALID_TOKEN = 1104;//被踢了 ,账号在别处登陆
    public static final Integer OPERATE_TIME=1105;//长时间未操作
    /**

+ 30 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/survey/WlyySurveyTemplateVO.java

@ -21,6 +21,8 @@ public class WlyySurveyTemplateVO extends UuidIdentityVO {
    private String templateComment;//模板说明',
    @ApiModelProperty(value = "创建人", example = "模块1")
    private String creater;//创建人',
    @ApiModelProperty(value = "创建人code", example = "模块1")
    private String createrCode;//创建人name',
    @ApiModelProperty(value = "发布机构", example = "模块1")
    private String organization;//发布机构',
    @ApiModelProperty(value = "删除标志(1正常,0删除)", example = "模块1")
@ -41,6 +43,34 @@ public class WlyySurveyTemplateVO extends UuidIdentityVO {
    private Integer answerCount;//修改时间',
    @ApiModelProperty(value = "是否常用", example = "模块1")
    private Integer used;//是否常用1常用0不常用,
    @ApiModelProperty(value = "出诊科室code", example = "模块1")
    private String visitDept;
    @ApiModelProperty(value = "出诊科室名称", example = "模块1")
    private String visitDeptName;
    public String getCreaterCode() {
        return createrCode;
    }
    public void setCreaterCode(String createrCode) {
        this.createrCode = createrCode;
    }
    public String getVisitDept() {
        return visitDept;
    }
    public void setVisitDept(String visitDept) {
        this.visitDept = visitDept;
    }
    public String getVisitDeptName() {
        return visitDeptName;
    }
    public void setVisitDeptName(String visitDeptName) {
        this.visitDeptName = visitDeptName;
    }
    public Integer getUsed() {
        return used;

+ 49 - 3
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -3,7 +3,9 @@ package com.yihu.jw.gateway.filter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.yihu.jw.gateway.methlog.BaseLoginLogService;
import com.yihu.jw.gateway.methlog.BaseMethodLogService;
import com.yihu.jw.gateway.useragent.UserAgent;
import com.yihu.jw.restmodel.ResultStatus;
import com.yihu.jw.restmodel.web.Envelop;
import org.slf4j.Logger;
@ -46,6 +48,13 @@ public class BasicZuulFilter extends ZuulFilter {
    private StringRedisTemplate redisTemplate;
    @Autowired
    private BaseMethodLogService baseMethodLogService;
    @Autowired
    private BaseLoginLogService baseLoginLogService;
    @Autowired
    private UserAgent userAgent;
    @Autowired
    private RedisTokenStore redisTokenStore;
    @Override
    public String filterType() {
@ -97,6 +106,7 @@ public class BasicZuulFilter extends ZuulFilter {
                || url.contains("/image/")) {//获取默认图片
            return true;
        }
        System.out.println("进入token验证");
        return this.authenticate(ctx, request, url);
    }
@ -108,7 +118,9 @@ public class BasicZuulFilter extends ZuulFilter {
     * @return
     */
    private Object authenticate(RequestContext ctx, HttpServletRequest request, String path) {
        System.out.println("获取token");
        String accessToken = this.extractToken(request);
        System.out.println("获取token"+accessToken);
        if (null == accessToken) {
            return this.forbidden(ctx, ResultStatus.NULL_TOKEN, "token can not be null");
        }
@ -130,9 +142,21 @@ public class BasicZuulFilter extends ZuulFilter {
        }
        //获取所有token资源
        String resourceIds[] = urls.split(",");
        String platform = request.getHeader("platform");
        for (String resourceId : resourceIds) {
            if (resourceId.equals("/**")) {
                System.out.println("/**"+true);
                //判断用户操作间隔
                if (null!=platform&&"city-ihealth-admin-web".equalsIgnoreCase(platform)){
                    //判断用户操作间隔
                    String userId = userAgent.getUID();
                    System.out.println(userId);
                    Boolean checkTimeOut = baseLoginLogService.checkTime(userId);
                    System.out.println("即将进入验证操作时间接口");
                    if (!checkTimeOut){
                        return this.forbidden(ctx, ResultStatus.OPERATE_TIME, "expired token");
                    }
                }
                return true;
            }
            if (!resourceId.startsWith("/")) {
@ -141,9 +165,32 @@ public class BasicZuulFilter extends ZuulFilter {
            path = path.toLowerCase();
            if (path.startsWith(resourceId)
                    && (path.length() == resourceId.length() || path.charAt(resourceId.length()) == '/')) {
                System.out.println("158"+true);
                //判断用户操作间隔
                if (null!=platform&&"city-ihealth-admin-web".equalsIgnoreCase(platform)){
                    //判断用户操作间隔
                    String userId = userAgent.getUID();
                    System.out.println(userId);
                    Boolean checkTimeOut = baseLoginLogService.checkTime(userId);
                    System.out.println("即将进入验证操作时间接口");
                    if (!checkTimeOut){
                        return this.forbidden(ctx, ResultStatus.OPERATE_TIME, "expired token");
                    }
                }
                return true;
            }
        }
        if (null!=platform&&"city-ihealth-admin-web".equalsIgnoreCase(platform)){
            //判断用户操作间隔
            String userId = userAgent.getUID();
            System.out.println(userId);
            Boolean checkTimeOut = baseLoginLogService.checkTime(userId);
            System.out.println("即将进入验证操作时间接口");
            if (!checkTimeOut){
                return this.forbidden(ctx, ResultStatus.OPERATE_TIME, "expired token");
            }
        }
        return this.forbidden(ctx, ResultStatus.NO_PERMI, "invalid token does not contain request resource " + path);
    }
@ -218,8 +265,7 @@ public class BasicZuulFilter extends ZuulFilter {
        String badStr = "and |exec |execute |insert |select |delete |update |drop |chr |mid |master |truncate |" +
                "declare | sitename |net user|xp_cmdshell|or |exec |execute |create |" +
                "table |from |grant |use |group_concat|column_name|" +
                "information_schema.columns|table_schema|union |where |select |update |order |by |like |" +
                "--|%";//过滤掉的sql关键字,可以手动添加
                "information_schema.columns|table_schema|union |where |select |update |order |by |like |" ;//过滤掉的sql关键字,可以手动添加
        String[] badStrs = badStr.split("\\|");
        for (int i = 0; i < badStrs.length; i++) {
            if (str.indexOf(badStrs[i]) >= 0) {

+ 18 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/BaseLoginLogDao.java

@ -0,0 +1,18 @@
package com.yihu.jw.gateway.methlog;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface BaseLoginLogDao extends PagingAndSortingRepository<BaseLoginLogDO, String>, JpaSpecificationExecutor<BaseLoginLogDO> {
    @Query("from BaseLoginLogDO l where l.openid=?1 order by l.createTime desc")
    List<BaseLoginLogDO> findByOpenId(String openid);
    @Query("from BaseLoginLogDO l where l.userId=?1 order by l.createTime desc")
    List<BaseLoginLogDO> findByUserId(String openid);
}

+ 87 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/BaseLoginLogService.java

@ -0,0 +1,87 @@
package com.yihu.jw.gateway.methlog;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Date;
import java.util.List;
@Service
@Transactional
public class BaseLoginLogService {
    @Autowired
    private BaseLoginLogDao baseLoginLogDao;
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    /**
     * 根据openid 获取最新的一条数据
     * @param openid
     * @return
     */
    public BaseLoginLogDO findByOpenId(String openid) {
        List<BaseLoginLogDO> loginLogs = baseLoginLogDao.findByOpenId(openid);
        if(!CollectionUtils.isEmpty(loginLogs)){
            return loginLogs.get(0);
        }
        return null;
    }
    /*
     *根据userid获取数据
     *
     */
    public Boolean checkTime(String userId){
        List<BaseLoginLogDO> list = baseLoginLogDao.findByUserId(userId);
        long between = 0l;
        long timeOut = 1000*60*5;
        String idOperate = "OPERATE_TIME";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findOne(idOperate);
        if (null!=wlyyHospitalSysDictDO){
            String dictValue =wlyyHospitalSysDictDO.getDictValue()==null?"5":wlyyHospitalSysDictDO.getDictValue();
            timeOut = 1000*60*Integer.valueOf(dictValue);
        }
        if (list.size()>0){
            BaseLoginLogDO baseLoginLogDO = list.get(0);
            Date optiondate = baseLoginLogDO.getOperateTime();
            //如果操作时间为空则拿创建时间比较
            if (null==optiondate){
                optiondate = baseLoginLogDO.getCreateTime();
                Date nowTime = new Date(System.currentTimeMillis());
                between = nowTime.getTime() - optiondate.getTime();
                if (between>timeOut){
                    baseLoginLogDO.setOperateTime(new Date());
                    baseLoginLogDao.save(baseLoginLogDO);
                    return false;
                }else {
                    baseLoginLogDO.setOperateTime(new Date());
                    baseLoginLogDao.save(baseLoginLogDO);
                    return true;
                }
            }else {
                Date nowTime = new Date(System.currentTimeMillis());
                between = nowTime.getTime() - optiondate.getTime();
                if (between>timeOut){
                    baseLoginLogDO.setOperateTime(new Date());
                    baseLoginLogDao.save(baseLoginLogDO);
                    return false;
                }else {
                    baseLoginLogDO.setOperateTime(new Date());
                    baseLoginLogDao.save(baseLoginLogDO);
                    return true;
                }
            }
        }else {
            return false;
        }
    }
}

+ 9 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/WlyyHospitalSysDictDao.java

@ -0,0 +1,9 @@
package com.yihu.jw.gateway.methlog;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface WlyyHospitalSysDictDao extends PagingAndSortingRepository<WlyyHospitalSysDictDO, String>, JpaSpecificationExecutor<WlyyHospitalSysDictDO> {
}

+ 3 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/login/dao/BaseLoginLogDao.java

@ -12,4 +12,7 @@ public interface BaseLoginLogDao extends PagingAndSortingRepository<BaseLoginLog
    @Query("from BaseLoginLogDO l where l.openid=?1 order by l.createTime desc")
    List<BaseLoginLogDO> findByOpenId(String openid);
    @Query("from BaseLoginLogDO l where l.userId=?1 order by l.createTime desc")
    List<BaseLoginLogDO> findByUserId(String openid);
}

+ 45 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/login/service/BaseLoginLogService.java

@ -3,13 +3,16 @@ package com.yihu.jw.security.login.service;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import com.yihu.jw.security.login.dao.BaseLoginLogDao;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Date;
@Service
public class BaseLoginLogService<T, R extends CrudRepository> extends BaseJpaService<BaseLoginLogDO, BaseLoginLogDao> {
@ -27,6 +30,47 @@ public class BaseLoginLogService<T, R extends CrudRepository> extends BaseJpaSer
            return loginLogs.get(0);
        }
        return null;
    }
    /*
     *根据userid获取数据
     *
     */
    public Boolean checkTime(String userId){
        List<BaseLoginLogDO> list = baseLoginLogDao.findByUserId(userId);
        long between = 0l;
        long timeOut = 1000*60*5;
        if (list.size()>0){
            BaseLoginLogDO baseLoginLogDO = list.get(0);
            Date optiondate = baseLoginLogDO.getOperateTime();
            //如果操作时间为空则拿创建时间比较
            if (null==optiondate){
                optiondate = baseLoginLogDO.getCreateTime();
                Date nowTime = new Date(System.currentTimeMillis());
                between = nowTime.getTime() - optiondate.getTime();
                if (between>timeOut){
                    return false;
                }else {
                    baseLoginLogDO.setOperateTime(new Date());
                    baseLoginLogDao.save(baseLoginLogDO);
                    return true;
                }
            }else {
                Date nowTime = new Date(System.currentTimeMillis());
                between = nowTime.getTime() - optiondate.getTime();
                if (between>timeOut){
                    return false;
                }else {
                    baseLoginLogDO.setOperateTime(new Date());
                    baseLoginLogDao.save(baseLoginLogDO);
                    return true;
                }
            }
        }else {
            return false;
        }
    }
}

+ 0 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/service/OauthYlzConfigService.java

@ -44,8 +44,6 @@ public class OauthYlzConfigService {
    @Autowired
    private OauthYlzConfigDao oauthYlzConfigDao;
    @Autowired
    private FileUploadService fileUploadService;
    @Autowired
    private BasePatientDao basePatientDao;
//    @Value("${fastDFS.fastdfs_file_url}")

+ 1 - 1
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java

@ -287,7 +287,7 @@ public class PrescriptionStatusUpdateService {
                for(WlyyOutpatientDO outpatientDO:outpatientDOs){
                    //结束门诊
                    outpatientDO.setStatus("2");
                    outpatientDO.setStatus("3");
    
                    String consultCode = imService.getConsultCodeByOutpatientId(outpatientDO.getId());
                    if(StringUtils.isNoneBlank(consultCode)){

+ 84 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/drugstore/BaseDrugStoreEndpoint.java

@ -0,0 +1,84 @@
package com.yihu.jw.hospital.endpoint.drugstore;
import com.yihu.jw.entity.base.area.BaseDrugStoreDO;
import com.yihu.jw.entity.base.area.BaseProvinceDO;
import com.yihu.jw.hospital.drugstore.service.BaseDrugStoreService;
import com.yihu.jw.restmodel.base.area.BaseProvinceVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.management.MXBean;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping(value = BaseRequestMapping.drugStoreManage.PREFIX)
@Api(value = "药店管理", description = "药店管理接口", tags = {"药店管理接口"})
public class BaseDrugStoreEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private BaseDrugStoreService baseDrugStoreService;
    @GetMapping(value = BaseRequestMapping.drugStoreManage.findDrugstore)
    @ApiOperation(value = "药店查询")
    public MixEnvelop findDrugstore (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<BaseDrugStoreDO> baseProvinces = baseDrugStoreService.search(fields, filters, sorts, page, size);
        int count = (int)baseDrugStoreService.getCount(filters);
        MixEnvelop mixEnvelop = new MixEnvelop();
        mixEnvelop.setDetailModelList(baseProvinces);
        mixEnvelop.setCurrPage(page);
        mixEnvelop.setTotalCount(count);
        mixEnvelop.setPageSize(size);
        return mixEnvelop;
    }
    @GetMapping(value = BaseRequestMapping.drugStoreManage.findDrugstoreByDistance)
    @ApiOperation(value = "药店距离查询")
    public MixEnvelop findDrugstoreBydistance (
            @ApiParam(name = "latitude", value = "经度")
            @RequestParam(value = "latitude", required = false) String latitude,
            @ApiParam(name = "longitude", value = "纬度")
            @RequestParam(value = "longitude", required = false) String longitude,
            @ApiParam(name = "drugStoreName", value = "药店名称")
            @RequestParam(value = "drugStoreName", required = false) String drugStoreName,
            @ApiParam(name = "hospitalName", value = "医院名称")
            @RequestParam(value = "hospitalName", required = false) String hospitalName) throws Exception {
        List<BaseDrugStoreDO> list = baseDrugStoreService.countDistanceListIncode(latitude,longitude,drugStoreName,hospitalName);
        MixEnvelop mixEnvelop = new MixEnvelop();
        mixEnvelop.setDetailModelList(list);
        return mixEnvelop;
    }
    @GetMapping(value = BaseRequestMapping.drugStoreManage.findDrugstoreById)
    @ApiOperation(value = "药店id查询")
    public Envelop findDrugStoreById(@ApiParam(name = "latitude", value = "经度")
                                         @RequestParam(value = "latitude", required = false) String latitude,
                                     @ApiParam(name = "longitude", value = "纬度")
                                         @RequestParam(value = "longitude", required = false) String longitude,
                                        @ApiParam(name = "id", value = "药店id")
                                     @RequestParam(value = "id", required = false) String id){
        BaseDrugStoreDO baseDrugStoreDO = baseDrugStoreService.getById(id,latitude,longitude);
        if (null!=baseDrugStoreDO){
            return success(baseDrugStoreDO);
        }else {
            return failed("查询失败");
        }
    }
}

+ 4 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -42,6 +42,7 @@ import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.patient.PatientRequestMapping;
import com.yihu.jw.util.common.XMLUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.wechat.dao.WechatDao;
@ -138,6 +139,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @Autowired
    private WechatDao wechatDao;
    private String successxml = "SUCCESS";
    private String failedxml = "FALSE";
@ -728,4 +730,6 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        String uri = qrcodeService.makeSpecialistQrcode(doctor);
        return success("操作成功",uri);
    }
}

+ 9 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/survey/SurveyEndpoint.java

@ -107,7 +107,7 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
    public ObjEnvelop findSurveyTemplateById(@ApiParam(name = "tempId", value = "模板ID")
                                             @RequestParam(value = "tempId",required = true) String tempId,
                                             @ApiParam(name = "userCode", value = "当前用户id")
                                             @RequestParam(value = "userCode",required = true) String userCode ) throws Exception {
                                             @RequestParam(value = "userCode",required = false) String userCode ) throws Exception {
        return success(surveyService.findSurveyTemplateById(tempId,userCode));
    }
@ -159,6 +159,7 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
        return success(surveyService.findSurveyByDept(dept));
    }
    @GetMapping(value = BaseHospitalRequestMapping.WlyySurvey.findSurveyByDeptAndPatient)
    @ApiOperation(value = "模板-查询部门下发放的问卷用户答题情况")
    public ListEnvelop findSurveyByDeptAndPatient(@ApiParam(name = "dept", value = "科室")
@ -225,13 +226,15 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
                                     @RequestParam(value = "tempId",required = false) String tempId,
                                     @ApiParam(name = "patient", value = "标题")
                                     @RequestParam(value = "patient",required = false) String patient,
                                     @ApiParam(name = "patientName", value = "患者名字")
                                         @RequestParam(value = "patientName",required = false) String patientName,
                                     @ApiParam(name = "title", value = "标题")
                                     @RequestParam(value = "title",required = false) String title,
                                     @ApiParam(name = "page", value = "第几页,1开始")
                                     @RequestParam(value = "page",required = true)Integer page,
                                     @ApiParam(name = "size", value = "每页大小")
                                     @RequestParam(value = "size",required = true)Integer size)throws Exception {
        return surveyService.findAnswerList(tempId,patient,title,page,size);
        return surveyService.findAnswerList(tempId,patient,patientName,title,page,size);
    }
    //=================
@ -241,13 +244,15 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
                                     @RequestParam(value = "title",required = false) String title,
                               @ApiParam(name = "doctor", value = "医生id")
                                     @RequestParam(value = "doctor",required = false) String doctor,
                               @ApiParam(name = "used", value = "是否常用")
                               @ApiParam(name = "used", value = "used")
                                     @RequestParam(value = "used",required = false) Integer used,
                                  @ApiParam(name = "labelCode", value = "labelCode")
                                      @RequestParam(value = "labelCode",required = false) String labelCode,
                               @ApiParam(name = "page", value = "第几页,1开始",defaultValue = "1")
                                     @RequestParam(value = "page",required = true,defaultValue = "1")Integer page,
                               @ApiParam(name = "pageSize", value = "每页大小",defaultValue = "10")
                                     @RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize)throws Exception {
        return businessService.getUsedList(title,doctor,used,page,pageSize);
        return businessService.getUsedList(title,doctor,labelCode,used,page,pageSize);
    }
    @GetMapping(value = BaseHospitalRequestMapping.WlyySurvey.setUsed)

+ 20 - 26
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/BasePatientBusinessService.java

@ -16,6 +16,7 @@ import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.hospital.survey.WlyySurveyLabelInfoVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
@ -210,9 +211,10 @@ public class BasePatientBusinessService extends BaseJpaService<BasePatientBusine
		knowledgeArticleUserDao.save(knowledgeArticleUserDO);
		surveyTemplateDao.save(wlyySurveyTemplateDO);
	}
	public MixEnvelop getUsedList(String title, String doctor, Integer used, Integer page, Integer pageSize) {
	public MixEnvelop getUsedList(String title, String doctor,String labelCode,  Integer used, Integer page, Integer pageSize) {
		StringBuffer sql = new StringBuffer();
		MixEnvelop mixEnvelop = new MixEnvelop();
		sql.append("SELECT " +
				" t.id, " +
				" b.used as \"used\","+
@ -220,6 +222,7 @@ public class BasePatientBusinessService extends BaseJpaService<BasePatientBusine
				" t.template_comment AS templateComment, " +
				" t.organization, " +
				" t.creater, " +
				" t.creater_code, " +
				" t.create_time AS createTime, " +
				" t.del, " +
				" t.update_time AS updateTime" +
@ -228,17 +231,23 @@ public class BasePatientBusinessService extends BaseJpaService<BasePatientBusine
		//1为查询常用
		if (null != used) {
			if (1 == used) {
				sql.append("JOIN wlyy_knowledge_article_user b on t.id = b.relation_code ");
				sql.append("JOIN wlyy_survey_label_info i ON t.id = i.survey_temp_code where 1=1");
				if (StringUtils.isNotEmpty(labelCode)){
					sql.append(" JOIN wlyy_survey_label_info i on t.id = i.survey_temp_code ");
				}
				sql.append(" JOIN wlyy_knowledge_article_user b on t.id = b.relation_code where 1=1 ");
				sql.append(" and b.used = 1");
				if (StringUtils.isNotEmpty(doctor)) {
				if (StringUtils.isNotEmpty(title)) {
					sql.append(" and t.title like '%" + title + "%'");
				}
				if (StringUtils.isNotEmpty(doctor)) {
					sql.append(" and t.creater = '" + doctor + "'");
					sql.append(" and b.user_code ='"+doctor+"'");
				}
				if (StringUtils.isNotEmpty(labelCode)){
					sql.append(" and i.label_code = '"+labelCode+"'");
				}
				System.out.println(sql);
				String sqlCount = "select Count(1) as \"total\" from ("+sql+") l";
				List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql.toString(), page, pageSize);
				List<Map<String, Object>> listCount = hibenateUtils.createSQLQuery(sqlCount);
@ -251,14 +260,9 @@ public class BasePatientBusinessService extends BaseJpaService<BasePatientBusine
						List<WlyySurveyLabelInfoVO>  wlyySurveyLabelInfoVOS= surveyService.findSurveyTemplateLabel(null==map.get("id")?"":map.get("id").toString());
						String createTime = null == map.get("createTime") ? "" : map.get("createTime").toString();
                        String updateTime = null == map.get("updateTime") ? "" : map.get("updateTime").toString();
						String creater = null == map.get("creater") ? "" : map.get("creater").toString();
						map.put("create_time", DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime)));
                        map.put("update_time", DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
						map.put("createTime", DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime)));
                        map.put("updateTime", DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
						map.put("labels",wlyySurveyLabelInfoVOS);
						BaseDoctorDO doctorDO = doctorDao.findById(creater);
						if (null!=doctor){
							map.put("doctrName", doctorDO.getName());
						}
					}
				}
				mixEnvelop.setPageSize(pageSize);
@ -286,13 +290,8 @@ public class BasePatientBusinessService extends BaseJpaService<BasePatientBusine
						map.put("labels",wlyySurveyLabelInfoVOS);
                        String createTime = null == map.get("createTime") ? "" : map.get("createTime").toString();
                        String updateTime = null == map.get("updateTime") ? "" : map.get("updateTime").toString();
                        map.put("create_time", DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime)));
                        map.put("update_time", DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
                        String creater = null == map.get("creater") ? "" : map.get("creater").toString();
						BaseDoctorDO doctorDO = doctorDao.findById(creater);
						if (null!=doctor){
							map.put("doctrName", doctorDO.getName());
						}
                        map.put("createTime", DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime)));
                        map.put("updateTime", DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
					}
				}
				mixEnvelop.setPageSize(pageSize);
@ -324,13 +323,8 @@ public class BasePatientBusinessService extends BaseJpaService<BasePatientBusine
					map.put("labels",wlyySurveyLabelInfoVOS);
                    String createTime = null == map.get("createTime") ? "" : map.get("createTime").toString();
                    String updateTime = null == map.get("updateTime") ? "" : map.get("updateTime").toString();
                    map.put("create_time", DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime)));
                    map.put("update_time", DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
					String creater = null == map.get("creater") ? "" : map.get("creater").toString();
					BaseDoctorDO doctorDO = doctorDao.findById(creater);
					if (null!=doctor){
						map.put("doctrName", doctorDO.getName());
					}
                    map.put("createTime", DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime)));
                    map.put("updateTime", DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
				}
			}

+ 2 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java

@ -86,8 +86,7 @@ public class QrcodeService {
        for (BaseDoctorDO doctorDO :doctors){
            if (null==doctorDO.getQrcode()||"".equals(doctorDO.getQrcode())){
                // 二维码内容
                String doctorname = doctorDO.getName().length()>4?doctorDO.getName().substring(0,4):doctorDO.getName();
                String content = "doctor_" + doctorDO.getId() +"_"+doctorname;
                String content = "doctor_" + doctorDO.getId() +"_"+doctorDO.getName();
                System.out.println("content"+content);
                // 二维码图片文件名
                String fileName = doctorDO.getId()+"_"+doctorDO.getMobile()+".png";
@ -134,8 +133,7 @@ public class QrcodeService {
        if (null!=baseDoctorDO){
            if (null==baseDoctorDO.getQrcode()||"".equals(baseDoctorDO.getQrcode())){
                // 二维码内容
                String doctorname = baseDoctorDO.getName().length()>4?baseDoctorDO.getName().substring(0,4):baseDoctorDO.getName();
                String content = "doctor_" + baseDoctorDO.getId() +"_"+doctorname;
                String content = "doctor_" + baseDoctorDO.getId() +"_"+baseDoctorDO.getName();
                System.out.println("content"+content);
                // 二维码图片文件名
                String fileName = baseDoctorDO.getId()+".png";