瀏覽代碼

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

liubing 3 年之前
父節點
當前提交
e2f9589825
共有 100 個文件被更改,包括 5384 次插入156 次删除
  1. 6 1
      business/base-service/src/main/java/com/yihu/jw/file_upload/FileManageService.java
  2. 14 0
      business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcClientDetailsDao.java
  3. 11 0
      business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcHttpLogDao.java
  4. 29 0
      business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcTokenDao.java
  5. 11 0
      business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcTokenLogDao.java
  6. 39 0
      business/base-service/src/main/java/com/yihu/jw/gateway/service/GcClientDetailsService.java
  7. 119 0
      business/base-service/src/main/java/com/yihu/jw/gateway/service/GcTokenService.java
  8. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/WlyyHospitalSysDictService.java
  9. 16 17
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseUserMsgService.java
  10. 7 1
      business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java
  11. 27 0
      business/base-service/src/main/java/com/yihu/jw/internet/service/YKYKCommonService.java
  12. 16 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/AchnsDoctorRecordDao.java
  13. 16 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpAppointmentOnlineDao.java
  14. 15 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpMedicalOnlineDao.java
  15. 16 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpnsDoctorRecordDao.java
  16. 16 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpnsDoctorScoreDao.java
  17. 16 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpnsOrganBaseDao.java
  18. 61 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/AchnsDoctorRecordService.java
  19. 57 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpAppointmentOnlineService.java
  20. 57 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpMedicalOnlineService.java
  21. 57 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsDoctorRecordService.java
  22. 57 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsDoctorScoreService.java
  23. 57 0
      business/base-service/src/main/java/com/yihu/jw/thirdUpload/service/UpnsOrganBaseService.java
  24. 367 27
      business/es-service/src/main/java/com/yihu/jw/es/service/yqfk/YqfkService.java
  25. 87 1
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  26. 99 0
      common/common-entity/sql记录
  27. 11 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
  28. 157 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/searchClient/BaseSearchNoveltyRepeatDO.java
  29. 2 3
      common/common-entity/src/main/java/com/yihu/jw/entity/care/assistance/EmergencyAssistanceDO.java
  30. 253 0
      common/common-entity/src/main/java/com/yihu/jw/entity/care/common/DoctorServicePermissionsDO.java
  31. 10 1
      common/common-entity/src/main/java/com/yihu/jw/entity/care/contacts/PatientSosContactsDO.java
  32. 46 0
      common/common-entity/src/main/java/com/yihu/jw/entity/care/device/BaseYxDeviceIndex.java
  33. 89 0
      common/common-entity/src/main/java/com/yihu/jw/entity/care/device/DeviceDataPushLog.java
  34. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/care/device/DevicePatientDevice.java
  35. 57 0
      common/common-entity/src/main/java/com/yihu/jw/entity/care/device/OnenetDevice.java
  36. 66 0
      common/common-entity/src/main/java/com/yihu/jw/entity/care/device/PatientSafeAreaDO.java
  37. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/care/lifeCare/LifeCareOrderDO.java
  38. 52 2
      common/common-entity/src/main/java/com/yihu/jw/entity/care/message/BaseServiceNews.java
  39. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/care/securitymonitoring/SecurityMonitoringOrderDO.java
  40. 96 0
      common/common-entity/src/main/java/com/yihu/jw/entity/door/BaseAdminServiceDynamic.java
  41. 10 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDictDO.java
  42. 4 5
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcClientDetails.java
  43. 5 1
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcHttpLog.java
  44. 5 1
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcToken.java
  45. 5 1
      common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcTokenLog.java
  46. 71 0
      common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/AchnsDoctorRecordDO.java
  47. 210 0
      common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpAppointmentOnlineDO.java
  48. 200 0
      common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpMedicalOnlineDO.java
  49. 539 0
      common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpNsOrganBaseDO.java
  50. 268 0
      common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpnsDoctorRecordDO.java
  51. 144 0
      common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpnsDoctorScoreDO.java
  52. 14 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  53. 65 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/regulatory/BaseRegulatoryRequestMapping.java
  54. 19 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  55. 23 1
      common/common-util/src/main/java/com/yihu/jw/util/common/GpsUtil.java
  56. 44 1
      common/common-util/src/main/java/com/yihu/jw/util/common/LatitudeUtils.java
  57. 46 0
      common/common-util/src/main/java/com/yihu/jw/util/http/HttpClientUtil.java
  58. 2 1
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java
  59. 7 6
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java
  60. 2 0
      gateway/ag-basic/src/main/resources/application.yml
  61. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  62. 37 0
      svr/svr-base/src/main/java/com/yihu/jw/base/aop/ClientSearchRequestAspect.java
  63. 18 0
      svr/svr-base/src/main/java/com/yihu/jw/base/aop/ClientSearchRequestLimit.java
  64. 4 4
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/article/KnowledgeArticleDictDao.java
  65. 17 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/doctor/DoctorServicePermissionsDao.java
  66. 17 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/searchClient/BaseSearchNoveltyRepeatDao.java
  67. 70 3
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java
  68. 110 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/DoctorServicePermissionsEndpoint.java
  69. 4 2
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/menu/BaseMenuManageEndpoint.java
  70. 137 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/searchClient/ClientSearchEndpoint.java
  71. 109 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/clientSearch/ClientSearchService.java
  72. 23 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/DoctorServicePermissionsService.java
  73. 40 8
      svr/svr-base/src/main/java/com/yihu/jw/base/service/menu/BaseMenuManageService.java
  74. 1 1
      svr/svr-base/src/main/resources/bootstrap.yml
  75. 6 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/contacts/PatientSosContactsDao.java
  76. 20 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseYxDeviceIndexDao.java
  77. 2 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DevicePatientHealthIndexDao.java
  78. 7 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientDeviceDao.java
  79. 21 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientSafeAreaDao.java
  80. 18 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doctor/DoctorServicePermissionsDao.java
  81. 15 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/BaseAdminServiceDynamicDao.java
  82. 18 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/BaseController.java
  83. 645 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/admin/AdminDoorCoachOrderController.java
  84. 2 4
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/assistance/EmergencyAssistanceEndpoint.java
  85. 6 4
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/consult/PatientConsultEndpoint.java
  86. 1 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/DoctorDeviceController.java
  87. 40 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/PadDeviceController.java
  88. 17 13
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/PatientDeviceController.java
  89. 29 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorEndpoint.java
  90. 2 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/family/FamilyMemberEndpoint.java
  91. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/DoctorLifeCareEndpoint.java
  92. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PadLifeCareEndpoint.java
  93. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PatientLifeCareEndpoint.java
  94. 5 3
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/PatientMessageEndpoint.java
  95. 19 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java
  96. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java
  97. 108 5
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/statistics/DetectionPlatformEndpoint.java
  98. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/assistance/EmeAsEndpoint.java
  99. 11 9
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/device/PDeviceController.java
  100. 0 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/platForm/PatientInfoPlatFormEndpoint.java

+ 6 - 1
business/base-service/src/main/java/com/yihu/jw/file_upload/FileManageService.java

@ -46,6 +46,7 @@ public class FileManageService {
            param.setTaskId(UUID.randomUUID().toString());
            param.setTaskId(UUID.randomUUID().toString());
        }
        }
        boolean copflag =false;
        boolean copflag =false;
        long chunkFileSize = 5 * 1024 * 1024;
        /**
        /**
         * basePath是我的路径,可以替换为你的
         * basePath是我的路径,可以替换为你的
         * 1:原文件名改为UUID
         * 1:原文件名改为UUID
@ -66,9 +67,11 @@ public class FileManageService {
        //第二步
        //第二步
        FileChannel fileChannel = raf.getChannel();
        FileChannel fileChannel = raf.getChannel();
        //第三步
        //第三步
        long offset = param.getChunk() * param.getSize();
        long offset = param.getChunk() * chunkFileSize;
        //第四步
        //第四步
        byte[] fileData = param.getFile().getBytes();
        byte[] fileData = param.getFile().getBytes();
        logger.info("offset"+offset);
        logger.info("fileData.length"+fileData.length);
        //第五步
        //第五步
        MappedByteBuffer mappedByteBuffer = fileChannel.map(FileChannel.MapMode.READ_WRITE,offset,fileData.length);
        MappedByteBuffer mappedByteBuffer = fileChannel.map(FileChannel.MapMode.READ_WRITE,offset,fileData.length);
        //第六步
        //第六步
@ -80,9 +83,11 @@ public class FileManageService {
        //第八步
        //第八步
        boolean isComplete = checkUploadStatus(param,fileName,filePath);
        boolean isComplete = checkUploadStatus(param,fileName,filePath);
        if(isComplete){
        if(isComplete){
            logger.info("unCompelete size:"+tempFile.getTotalSpace());
            renameFile(tempFile,fileName);
            renameFile(tempFile,fileName);
            return filePath+"/"+fileName;
            return filePath+"/"+fileName;
        }else {
        }else {
            logger.info("unCompelete size:"+tempFile.getTotalSpace());
            return "unCompelete";
            return "unCompelete";
        }
        }

+ 14 - 0
business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcClientDetailsDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.gateway.dao;
import com.yihu.jw.entity.iot.gateway.GcClientDetails;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/8/17.
 */
public interface GcClientDetailsDao extends PagingAndSortingRepository<GcClientDetails, Long>, JpaSpecificationExecutor<GcClientDetails> {
    @Query("from GcClientDetails where appId=?1 and del=1")
    GcClientDetails findByAppid(String appid);
}

+ 11 - 0
business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcHttpLogDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.gateway.dao;
import com.yihu.jw.entity.iot.gateway.GcHttpLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/8/17.
 */
public interface GcHttpLogDao extends PagingAndSortingRepository<GcHttpLog, Long>, JpaSpecificationExecutor<GcHttpLog> {
}

+ 29 - 0
business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcTokenDao.java

@ -0,0 +1,29 @@
package com.yihu.jw.gateway.dao;
import com.yihu.jw.entity.iot.gateway.GcToken;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
/**
 * Created by chenweida on 2017/8/17.
 */
public interface GcTokenDao extends PagingAndSortingRepository<GcToken, Long>, JpaSpecificationExecutor<GcToken> {
    @Query("update GcToken g set g.del=0 where g.appid=?1 and g.del=1")
    @Modifying
    void updateDel(String appid);
    @Query("from GcToken where accesstoken=?1")
    GcToken findByToken(String token);
    @Query("from GcToken where appid=?1 and outTime >= ?1")
    List<GcToken> findByAppIdByDate(String token,Date date);
    @Query("from GcToken where appid=?1 and outTime >= now () ")
    List<GcToken> findByAppId(String token);
}

+ 11 - 0
business/base-service/src/main/java/com/yihu/jw/gateway/dao/GcTokenLogDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.gateway.dao;
import com.yihu.jw.entity.iot.gateway.GcTokenLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/8/17.
 */
public interface GcTokenLogDao extends PagingAndSortingRepository<GcTokenLog, Long>, JpaSpecificationExecutor<GcTokenLog> {
}

+ 39 - 0
business/base-service/src/main/java/com/yihu/jw/gateway/service/GcClientDetailsService.java

@ -0,0 +1,39 @@
package com.yihu.jw.gateway.service;
import com.yihu.jw.entity.iot.gateway.GcClientDetails;
import com.yihu.jw.gateway.dao.GcClientDetailsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import static com.sun.xml.internal.ws.util.JAXWSUtils.getUUID;
/**
 * Created by chenweida on 2017/8/17.
 */
@Service
public class GcClientDetailsService{
    @Autowired
    private GcClientDetailsDao gtClientDetailsDao;
    public GcClientDetails findByAppId(String appid) {
        return gtClientDetailsDao.findByAppid(appid);
    }
    @Transactional
    public GcClientDetails createClientDetails(String appUri,String createUserName,String creatieUser,String remark) throws Exception{
        GcClientDetails gcClientDetails = new GcClientDetails();
        gcClientDetails.setAppId(getUUID());
        gcClientDetails.setAppSecret(getUUID());
        gcClientDetails.setAppUri(appUri);
        gcClientDetails.setCreateUserName(createUserName);
        gcClientDetails.setCreatieUser(creatieUser);
        gcClientDetails.setCreatieTime(new Date());
        gcClientDetails.setDel(1);
        gcClientDetails.setRemark(remark);
        return gtClientDetailsDao.save(gcClientDetails);
    }
}

+ 119 - 0
business/base-service/src/main/java/com/yihu/jw/gateway/service/GcTokenService.java

@ -0,0 +1,119 @@
package com.yihu.jw.gateway.service;
import com.yihu.jw.entity.iot.gateway.GcToken;
import com.yihu.jw.entity.iot.gateway.GcTokenLog;
import com.yihu.jw.gateway.dao.GcTokenDao;
import com.yihu.jw.gateway.dao.GcTokenLogDao;
import com.yihu.jw.util.date.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.util.*;
/**
 * Created by chenweida on 2017/8/17.
 */
@Service
public class GcTokenService {
    @Autowired
    private GcTokenLogDao tokenLogDao;
    @Autowired
    private GcTokenDao tokenDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    /**
     * 根据appid生成token
     *
     * @param appid
     * @param appSecret
     * @return
     */
    @Transactional
    public GcToken createToken(String appid, String appSecret, String ip, String overTime,Integer tokenTime) {
        try {
            //把该用户之前有效的token设置为无效
            tokenDao.updateDel(appid);
            //创新新的appId
            Date date = new Date();
            String token = UUID.randomUUID().toString();
            GcToken gc = new GcToken();
            gc.setAppid(appid);
            gc.setCreateTime(date);
            //2小时过期
            if(StringUtils.isEmpty(overTime)){
                if(tokenTime==null){
                    tokenTime=2;
                }
                gc.setOutTime(DateUtil.getNextMin(date, tokenTime*60));
            }else{
                gc.setOutTime(DateUtil.strToDate(overTime));
            }
            gc.setAccesstoken(token);
            gc.setDel(1);
            tokenDao.save(gc);
            //保存日志
            GcTokenLog gcTokenLog = new GcTokenLog();
            gcTokenLog.setAppIp(appid);
            gcTokenLog.setCreateTime(new Date());
            gcTokenLog.setAppIp(ip);
            gcTokenLog.setMessage("创建token");
            gcTokenLog.setAccesstoken(token);
            gcTokenLog.setFlag(1);
            tokenLogDao.save(gcTokenLog);
            return gc;
        } catch (Exception e) {
            //保存失败日志
            GcTokenLog gcTokenLog = new GcTokenLog();
            gcTokenLog.setAppIp(appid);
            gcTokenLog.setCreateTime(new Date());
            gcTokenLog.setAppIp(ip);
            gcTokenLog.setMessage("创建token");
            gcTokenLog.setFlag(0);
            tokenLogDao.save(gcTokenLog);
        }
        return null;
    }
    /**
     * 根据token获取GcToken对象
     * @param token
     * @return
     */
    public GcToken getToken(String token) {
        return tokenDao.findByToken(token);
    }
    public List<GcToken> findByAppId(String appid,String wxId){
        if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
            String sql = "select ID AS \"id\",APPID as \"appId\",ACCESSTOKEN as \"accessToken\",CREATE_TIME as \"createTime\",to_char(OUT_TIME,'yyyy-MM-dd hh24:mi:ss') as \"outTime\" from GC_TOKEN where APPID = '"+appid+"' and OUT_TIME >= to_date('"+DateUtil.getStringDate()+"','YYYY-MM-DD HH24:MI:SS')";
            List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
            List<GcToken> gcTokens = new ArrayList<>();
            for (Map<String,Object> map:mapList){
                GcToken gcToken = new GcToken();
                gcToken.setId(Integer.parseInt(map.get("id").toString()));
                gcToken.setAccesstoken(map.get("accessToken").toString());
                gcToken.setAppid(map.get("appId").toString());
                gcToken.setOutTime(DateUtil.strToDate(map.get("outTime").toString()));
                gcTokens.add(gcToken);
                System.out.print("gcToken"+gcToken.getOutTime());
            }
            return gcTokens;
        }else {
            return tokenDao.findByAppId(appid);
        }
    }
}

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

@ -55,7 +55,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
                " t.hospital  as \"hospital\","+
                " t.hospital  as \"hospital\","+
                " t.img_url  as \"imgUrl\","+
                " t.img_url  as \"imgUrl\","+
                " t.create_time as \"createTime\""+
                " t.create_time as \"createTime\""+
                " from wlyy_hospital_sys_dict t where 1=1 ";
                " from wlyy_hospital_sys_dict t where 1=1  ";
        if (StringUtils.isNoneBlank(name)){
        if (StringUtils.isNoneBlank(name)){
            sql+=" and t.dict_name = '"+name+"'";
            sql+=" and t.dict_name = '"+name+"'";
        }
        }

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

@ -98,8 +98,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
    private boolean flag;
    private boolean flag;
    public ObjEnvelop leaveMessage(String content, String reciverId, String reciverName, String senderId, Integer type, String key, String value)
    public ObjEnvelop leaveMessage(String content, String reciverId, String reciverName, String senderId, Integer type, String key, String value)
            throws IOException
    {
            throws IOException {
        BaseUserMessageDO baseUserMessageDO = new BaseUserMessageDO();
        BaseUserMessageDO baseUserMessageDO = new BaseUserMessageDO();
        ObjEnvelop objEnvelop = new ObjEnvelop();
        ObjEnvelop objEnvelop = new ObjEnvelop();
        boolean checkTimeOut = checkGiveTimeOut(senderId, reciverId);
        boolean checkTimeOut = checkGiveTimeOut(senderId, reciverId);
@ -498,23 +497,23 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
        }
        }
        return sql.toString();
        return sql.toString();
    }
    }
    public boolean checkGiveTimeOut(String sender, String reciver)
{
    List<BaseUserMessageDO> baseBannerDoctorDOS = this.baseUserMessageDao.getMessageByPatientAndDoctor(reciver, sender);
    WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_timeout");
    if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>=1)
    {
        BaseUserMessageDO lastOne = (BaseUserMessageDO)baseBannerDoctorDOS.get(0);
        Date lastDate = lastOne.getCreateTime();
        long timeOut = wlyyHospitalSysDictDO.getDictValue() != null ? Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue() : 5L;
        Date current = new Date();
        if (current.getTime() - lastDate.getTime() > timeOut * 1000L * 60L) {
            return true;
    public boolean checkGiveTimeOut(String sender, String reciver) {
        List<BaseUserMessageDO> baseBannerDoctorDOS = this.baseUserMessageDao.getMessageByPatientAndDoctor(reciver, sender);
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_timeout");
        if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>=1)
        {
            BaseUserMessageDO lastOne = (BaseUserMessageDO)baseBannerDoctorDOS.get(0);
            Date lastDate = lastOne.getCreateTime();
            long timeOut = wlyyHospitalSysDictDO.getDictValue() != null ? Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue() : 5L;
            Date current = new Date();
            if (current.getTime() - lastDate.getTime() > timeOut * 1000L * 60L) {
                return true;
            }
            return false;
        }
        }
        return false;
        return true;
    }
    }
    return true;
}
    public boolean checkGiveTimes(String patientId, String doctorId)
    public boolean checkGiveTimes(String patientId, String doctorId)
    {
    {

+ 7 - 1
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -1232,7 +1232,13 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                jb.put("mobility_flag", "3");
                jb.put("mobility_flag", "3");
                jb.put("long_medical_flag", "3");
                jb.put("long_medical_flag", "3");
                jb.put("pres_effec_days", 0);
                jb.put("pres_effec_days", 0);
                jb.put("total_price",info.get("drug_fee")== null?  0 : info.get("drug_fee"));
                String realOrder = "";
                if (info.get("real_order")!= null){
                    realOrder = info.get("real_order").toString();
                }
                String priceTotal="select sum(drug_fee) AS drug_fee from wlyy_prescription where real_order='"+realOrder+"'";
                Map<String,Object> map = jdbcTemplate.queryForMap(priceTotal);
                jb.put("total_price",map.get("drug_fee")== null?  0 : map.get("drug_fee"));
                jb.put("upload_time", DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
                jb.put("upload_time", DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
                jb.put("pres_photo", "");
                jb.put("pres_photo", "");
                jb.put("pres_photos_list", "");
                jb.put("pres_photos_list", "");

+ 27 - 0
business/base-service/src/main/java/com/yihu/jw/internet/service/YKYKCommonService.java

@ -0,0 +1,27 @@
package com.yihu.jw.internet.service;
import com.yihu.jw.internet.dao.InternetUpLogDao;
import com.yihu.jw.internet.entity.InternetUpErrorLogDO;
import com.yihu.mysql.query.BaseJpaService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
/**
 * Created by wsy on 2021/9/7.
 */
public class YKYKCommonService extends BaseJpaService<InternetUpErrorLogDO, InternetUpLogDao> {
    private org.slf4j.Logger logger = LoggerFactory.getLogger(YKYKCommonService.class);
    @Autowired
    private InternetUpErrorLogService internetUpErrorLogService;
    @Autowired
    private InternetUpLogDao internetUpLogDao;
    @Value("{fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/thirdUpload/AchnsDoctorRecordDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.thirdUpload;
import com.yihu.jw.entity.thirdUpload.AchnsDoctorRecordDO;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
public interface AchnsDoctorRecordDao extends PagingAndSortingRepository<AchnsDoctorRecordDO, String>, JpaSpecificationExecutor<AchnsDoctorRecordDO> {
    @Query("from AchnsDoctorRecordDO t where t.is_del='1' and t.create_time>=?1 and t.create_time<=?2")
    List<AchnsDoctorRecordDO> findAchnsDoctorRecordDOByCreateTime(Date startTime, Date endTime);
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpAppointmentOnlineDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.thirdUpload;
import com.yihu.jw.entity.base.team.BaseTeamDO;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpNsOrganBaseDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
public interface UpAppointmentOnlineDao extends PagingAndSortingRepository<UpAppointmentOnlineDO, String>, JpaSpecificationExecutor<UpAppointmentOnlineDO> {
    @Query("from UpAppointmentOnlineDO t where t.is_del='1' and t.create_time>=?1 and t.create_time<=?2")
    List<UpAppointmentOnlineDO> findByCreateTime(Date startTime, Date endTime);
}

+ 15 - 0
business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpMedicalOnlineDao.java

@ -0,0 +1,15 @@
package com.yihu.jw.thirdUpload;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpMedicalOnlineDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
public interface UpMedicalOnlineDao extends PagingAndSortingRepository<UpMedicalOnlineDO, String>, JpaSpecificationExecutor<UpMedicalOnlineDO> {
    @Query("from UpMedicalOnlineDO t where t.is_del='1' and t.create_time>=?1 and t.create_time<=?2")
    List<UpMedicalOnlineDO> findByCreateTime(Date startTime, Date endTime);
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpnsDoctorRecordDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.thirdUpload;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorRecordDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorScoreDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
public interface UpnsDoctorRecordDao extends PagingAndSortingRepository<UpnsDoctorRecordDO, String>, JpaSpecificationExecutor<UpnsDoctorRecordDO> {
    @Query("from UpnsDoctorRecordDO t where t.is_del='1' and t.create_time>=?1 and t.create_time<=?2")
    List<UpnsDoctorRecordDO> findByCreateTime(Date startTime, Date endTime);
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpnsDoctorScoreDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.thirdUpload;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpMedicalOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorScoreDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
public interface UpnsDoctorScoreDao extends PagingAndSortingRepository<UpnsDoctorScoreDO, String>, JpaSpecificationExecutor<UpnsDoctorScoreDO> {
    @Query("from UpnsDoctorScoreDO t where t.is_del='1' and t.create_time>=?1 and t.create_time<=?2")
    List<UpnsDoctorScoreDO> findByCreateTime(Date startTime, Date endTime);
}

+ 16 - 0
business/base-service/src/main/java/com/yihu/jw/thirdUpload/UpnsOrganBaseDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.thirdUpload;
import com.yihu.jw.entity.thirdUpload.AchnsDoctorRecordDO;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpNsOrganBaseDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
public interface UpnsOrganBaseDao extends PagingAndSortingRepository<UpNsOrganBaseDO, String>, JpaSpecificationExecutor<UpNsOrganBaseDO> {
    @Query("from UpNsOrganBaseDO t where t.is_del='1' and t.create_time>=?1 and t.create_time<=?2")
    List<UpNsOrganBaseDO> findByCreateTime(Date startTime, Date endTime);
}

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

@ -0,0 +1,61 @@
package com.yihu.jw.thirdUpload.service;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.dict.BaseFrequencyDictDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.thirdUpload.AchnsDoctorRecordDO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportVO;
import com.yihu.jw.thirdUpload.AchnsDoctorRecordDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import static com.yihu.jw.util.common.BeanUtils.getNullPropertyNames;
@Service
public class AchnsDoctorRecordService extends BaseJpaService<AchnsDoctorRecordDO, AchnsDoctorRecordDao> {
    @Autowired
    private AchnsDoctorRecordDao achnsDoctorRecordDao;
    public void saveAchns(List<AchnsDoctorRecordDO> achnsDoctorRecordDOs) throws Exception{
        /*List<IotDeviceImportVO> importVOList = objectMapper.readValue(JSONObject.toJSONString(correctLs), new TypeReference<List<IotDeviceImportVO>>() {
        });*/
        for (AchnsDoctorRecordDO achnsDoctorRecordDO:achnsDoctorRecordDOs){
            if (StringUtils.isNotBlank(achnsDoctorRecordDO.getId())){
                AchnsDoctorRecordDO oldFrequency= achnsDoctorRecordDao.findOne(achnsDoctorRecordDO.getId());
                BeanUtils.copyProperties(achnsDoctorRecordDO, oldFrequency, getNullPropertyNames(achnsDoctorRecordDO));
                oldFrequency.setUpdate_time(new Date());
                oldFrequency.setIs_del("1");
                achnsDoctorRecordDao.save(oldFrequency);
            }else {
                achnsDoctorRecordDO.setCreate_time(new Date());
                achnsDoctorRecordDO.setIs_del("1");
                achnsDoctorRecordDao.save(achnsDoctorRecordDO);
            }
        }
    }
    public void deleteById(String id){
        AchnsDoctorRecordDO achnsDoctorRecordDO =  achnsDoctorRecordDao.findOne(id);
        if (achnsDoctorRecordDO!=null){
            achnsDoctorRecordDO.setIs_del("0");
            achnsDoctorRecordDao.save(achnsDoctorRecordDO);
        }
    }
    public List<AchnsDoctorRecordDO> findByCreateTime(String createTime){
        Date startTime= DateUtil.strToDate(createTime+" 00:00:00");
        Date endTime= DateUtil.strToDate(createTime+" 23:59:59");
        return achnsDoctorRecordDao.findAchnsDoctorRecordDOByCreateTime(startTime,endTime);
    }
}

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

@ -0,0 +1,57 @@
package com.yihu.jw.thirdUpload.service;
import com.yihu.jw.entity.thirdUpload.UpAppointmentOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorRecordDO;
import com.yihu.jw.thirdUpload.UpAppointmentOnlineDao;
import com.yihu.jw.thirdUpload.UpnsDoctorRecordDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import static com.yihu.jw.util.common.BeanUtils.getNullPropertyNames;
@Service
public class UpAppointmentOnlineService extends BaseJpaService<UpAppointmentOnlineDO, UpAppointmentOnlineDao> {
    @Autowired
    private UpAppointmentOnlineDao upAppointmentOnlineDao;
    public void saveUpAppointment(List<UpAppointmentOnlineDO> upAppointmentOnlineDOS) throws Exception{
        /*List<IotDeviceImportVO> importVOList = objectMapper.readValue(JSONObject.toJSONString(correctLs), new TypeReference<List<IotDeviceImportVO>>() {
        });*/
        for (UpAppointmentOnlineDO upAppointmentOnlineDO:upAppointmentOnlineDOS){
            if (StringUtils.isNotBlank(upAppointmentOnlineDO.getId())){
                UpAppointmentOnlineDO old= upAppointmentOnlineDao.findOne(upAppointmentOnlineDO.getId());
                BeanUtils.copyProperties(upAppointmentOnlineDO, old, getNullPropertyNames(upAppointmentOnlineDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
                upAppointmentOnlineDao.save(old);
            }else {
                upAppointmentOnlineDO.setCreate_time(new Date());
                upAppointmentOnlineDO.setIs_del("1");
                upAppointmentOnlineDao.save(upAppointmentOnlineDO);
            }
        }
    }
    public void deleteById(String id){
        UpAppointmentOnlineDO upAppointmentOnlineDO =  upAppointmentOnlineDao.findOne(id);
        if (upAppointmentOnlineDO!=null){
            upAppointmentOnlineDO.setIs_del("0");
            upAppointmentOnlineDao.save(upAppointmentOnlineDO);
        }
    }
    public List<UpAppointmentOnlineDO> findByCreateTime(String createTime){
        Date startTime= DateUtil.strToDate(createTime+" 00:00:00");
        Date endTime= DateUtil.strToDate(createTime+" 23:59:59");
        return upAppointmentOnlineDao.findByCreateTime(startTime,endTime);
    }
}

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

@ -0,0 +1,57 @@
package com.yihu.jw.thirdUpload.service;
import com.yihu.jw.entity.thirdUpload.UpMedicalOnlineDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorRecordDO;
import com.yihu.jw.thirdUpload.UpMedicalOnlineDao;
import com.yihu.jw.thirdUpload.UpnsDoctorRecordDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import static com.yihu.jw.util.common.BeanUtils.getNullPropertyNames;
@Service
public class UpMedicalOnlineService extends BaseJpaService<UpMedicalOnlineDO, UpMedicalOnlineDao> {
    @Autowired
    private UpMedicalOnlineDao upMedicalOnlineDao;
    public void saveUpMedicalOnline(List<UpMedicalOnlineDO> upMedicalOnlineDOS) throws Exception{
        /*List<IotDeviceImportVO> importVOList = objectMapper.readValue(JSONObject.toJSONString(correctLs), new TypeReference<List<IotDeviceImportVO>>() {
        });*/
        for (UpMedicalOnlineDO upMedicalOnlineDO:upMedicalOnlineDOS){
            if (StringUtils.isNotBlank(upMedicalOnlineDO.getId())){
                UpMedicalOnlineDO old= upMedicalOnlineDao.findOne(upMedicalOnlineDO.getId());
                BeanUtils.copyProperties(upMedicalOnlineDO, old, getNullPropertyNames(upMedicalOnlineDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
                upMedicalOnlineDao.save(old);
            }else {
                upMedicalOnlineDO.setCreate_time(new Date());
                upMedicalOnlineDO.setIs_del("1");
                upMedicalOnlineDao.save(upMedicalOnlineDO);
            }
        }
    }
    public void deleteById(String id){
        UpMedicalOnlineDO upMedicalOnlineDO =  upMedicalOnlineDao.findOne(id);
        if (upMedicalOnlineDO!=null){
            upMedicalOnlineDO.setIs_del("0");
            upMedicalOnlineDao.save(upMedicalOnlineDO);
        }
    }
    public List<UpMedicalOnlineDO> findByCreateTime(String createTime){
        Date startTime= DateUtil.strToDate(createTime+" 00:00:00");
        Date endTime= DateUtil.strToDate(createTime+" 23:59:59");
        return upMedicalOnlineDao.findByCreateTime(startTime,endTime);
    }
}

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

@ -0,0 +1,57 @@
package com.yihu.jw.thirdUpload.service;
import com.yihu.jw.entity.thirdUpload.UpNsOrganBaseDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorRecordDO;
import com.yihu.jw.thirdUpload.UpnsDoctorRecordDao;
import com.yihu.jw.thirdUpload.UpnsOrganBaseDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import static com.yihu.jw.util.common.BeanUtils.getNullPropertyNames;
@Service
public class UpnsDoctorRecordService extends BaseJpaService<UpnsDoctorRecordDO, UpnsDoctorRecordDao> {
    @Autowired
    private UpnsDoctorRecordDao upnsDoctorRecordDao;
    public void saveUpnsDoctorRecord(List<UpnsDoctorRecordDO> upnsDoctorRecordDOS) throws Exception{
        /*List<IotDeviceImportVO> importVOList = objectMapper.readValue(JSONObject.toJSONString(correctLs), new TypeReference<List<IotDeviceImportVO>>() {
        });*/
        for (UpnsDoctorRecordDO upnsDoctorRecordDO:upnsDoctorRecordDOS){
            if (StringUtils.isNotBlank(upnsDoctorRecordDO.getId())){
                UpnsDoctorRecordDO old= upnsDoctorRecordDao.findOne(upnsDoctorRecordDO.getId());
                BeanUtils.copyProperties(upnsDoctorRecordDO, old, getNullPropertyNames(upnsDoctorRecordDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
                upnsDoctorRecordDao.save(old);
            }else {
                upnsDoctorRecordDO.setCreate_time(new Date());
                upnsDoctorRecordDO.setIs_del("1");
                upnsDoctorRecordDao.save(upnsDoctorRecordDO);
            }
        }
    }
    public void deleteById(String id){
        UpnsDoctorRecordDO upnsDoctorRecordDO =  upnsDoctorRecordDao.findOne(id);
        if (upnsDoctorRecordDO!=null){
            upnsDoctorRecordDO.setIs_del("0");
            upnsDoctorRecordDao.save(upnsDoctorRecordDO);
        }
    }
    public List<UpnsDoctorRecordDO> findByCreateTime(String createTime){
        Date startTime= DateUtil.strToDate(createTime+" 00:00:00");
        Date endTime= DateUtil.strToDate(createTime+" 23:59:59");
        return upnsDoctorRecordDao.findByCreateTime(startTime,endTime);
    }
}

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

@ -0,0 +1,57 @@
package com.yihu.jw.thirdUpload.service;
import com.yihu.jw.entity.thirdUpload.AchnsDoctorRecordDO;
import com.yihu.jw.entity.thirdUpload.UpnsDoctorScoreDO;
import com.yihu.jw.thirdUpload.AchnsDoctorRecordDao;
import com.yihu.jw.thirdUpload.UpnsDoctorScoreDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import static com.yihu.jw.util.common.BeanUtils.getNullPropertyNames;
@Service
public class UpnsDoctorScoreService extends BaseJpaService<UpnsDoctorScoreDO, UpnsDoctorScoreDao> {
    @Autowired
    private UpnsDoctorScoreDao upnsDoctorScoreDao;
    public void saveUpnsDoctorScore(List<UpnsDoctorScoreDO> upnsDoctorScoreDOS) throws Exception{
        /*List<IotDeviceImportVO> importVOList = objectMapper.readValue(JSONObject.toJSONString(correctLs), new TypeReference<List<IotDeviceImportVO>>() {
        });*/
        for (UpnsDoctorScoreDO upnsDoctorScoreDO:upnsDoctorScoreDOS){
            if (StringUtils.isNotBlank(upnsDoctorScoreDO.getId())){
                UpnsDoctorScoreDO old= upnsDoctorScoreDao.findOne(upnsDoctorScoreDO.getId());
                BeanUtils.copyProperties(upnsDoctorScoreDO, old, getNullPropertyNames(upnsDoctorScoreDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
                upnsDoctorScoreDao.save(old);
            }else {
                upnsDoctorScoreDO.setCreate_time(new Date());
                upnsDoctorScoreDO.setIs_del("1");
                upnsDoctorScoreDao.save(upnsDoctorScoreDO);
            }
        }
    }
    public void deleteById(String id){
        UpnsDoctorScoreDO upnsDoctorScoreDO =  upnsDoctorScoreDao.findOne(id);
        if (upnsDoctorScoreDO!=null){
            upnsDoctorScoreDO.setIs_del("0");
            upnsDoctorScoreDao.save(upnsDoctorScoreDO);
        }
    }
    public List<UpnsDoctorScoreDO> findByCreateTime(String createTime){
        Date startTime= DateUtil.strToDate(createTime+" 00:00:00");
        Date endTime= DateUtil.strToDate(createTime+" 23:59:59");
        return upnsDoctorScoreDao.findByCreateTime(startTime,endTime);
    }
}

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

@ -0,0 +1,57 @@
package com.yihu.jw.thirdUpload.service;
import com.yihu.jw.entity.thirdUpload.AchnsDoctorRecordDO;
import com.yihu.jw.entity.thirdUpload.UpNsOrganBaseDO;
import com.yihu.jw.thirdUpload.AchnsDoctorRecordDao;
import com.yihu.jw.thirdUpload.UpnsOrganBaseDao;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import static com.yihu.jw.util.common.BeanUtils.getNullPropertyNames;
@Service
public class UpnsOrganBaseService extends BaseJpaService<UpNsOrganBaseDO, UpnsOrganBaseDao> {
    @Autowired
    private UpnsOrganBaseDao upnsOrganBaseDao;
    public void saveUpnsOrganBase(List<UpNsOrganBaseDO> upNsOrganBaseDOS) throws Exception{
        /*List<IotDeviceImportVO> importVOList = objectMapper.readValue(JSONObject.toJSONString(correctLs), new TypeReference<List<IotDeviceImportVO>>() {
        });*/
        for (UpNsOrganBaseDO upNsOrganBaseDO:upNsOrganBaseDOS){
            if (StringUtils.isNotBlank(upNsOrganBaseDO.getId())){
                UpNsOrganBaseDO old= upnsOrganBaseDao.findOne(upNsOrganBaseDO.getId());
                BeanUtils.copyProperties(upNsOrganBaseDO, old, getNullPropertyNames(upNsOrganBaseDO));
                old.setUpdate_time(new Date());
                old.setIs_del("1");
                upnsOrganBaseDao.save(old);
            }else {
                upNsOrganBaseDO.setCreate_time(new Date());
                upNsOrganBaseDO.setIs_del("1");
                upnsOrganBaseDao.save(upNsOrganBaseDO);
            }
        }
    }
    public void deleteById(String id){
        UpNsOrganBaseDO upNsOrganBaseDO =  upnsOrganBaseDao.findOne(id);
        if (upNsOrganBaseDO!=null){
            upNsOrganBaseDO.setIs_del("0");
            upnsOrganBaseDao.save(upNsOrganBaseDO);
        }
    }
    public List<UpNsOrganBaseDO> findByCreateTime(String createTime){
        Date startTime= DateUtil.strToDate(createTime+" 00:00:00");
        Date endTime= DateUtil.strToDate(createTime+" 23:59:59");
        return upnsOrganBaseDao.findByCreateTime(startTime,endTime);
    }
}

+ 367 - 27
business/es-service/src/main/java/com/yihu/jw/es/service/yqfk/YqfkService.java

@ -2,12 +2,18 @@ package com.yihu.jw.es.service.yqfk;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.IntegerIdentityEntity;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import javax.persistence.criteria.CriteriaBuilder;
import java.util.ArrayList;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.Map;
@ -34,49 +40,381 @@ public class YqfkService {
     */
     */
    public JSONObject yqfkStatisticsHead(String startTime,String endTime){
    public JSONObject yqfkStatisticsHead(String startTime,String endTime){
        JSONObject object = new JSONObject();
        JSONObject object = new JSONObject();
        String sql = "select COUNT(1) as confirmedTotal from MID_CDC_CASE_INFO where ";
        object.put("confirmed","");//现有确诊
        object.put("newHome","");//新增本土
        object.put("newAsymptomatic","");//新增无症状;
        object.put("confirmedTotal","");//累计确诊
        object.put("cureTotal","");//累计治愈
        object.put("deathTotal","");//累计死亡
        //现有确诊
        String nowConfirmedSql = "SELECT\n" +
                "\tCOUNT(1) AS confirmedTotal\n" +
                "FROM\n" +
                "\tMID_CDC_CASE_INFO\n" +
                "WHERE\n" +
                "\tdim_cond IS NOT NULL\n" +
                "AND dim_cond NOT IN ('6', '7')\n" +
                "AND dim_input_case = '99'\n" +
                "AND DIM_CASE_TYPE = '1'\n" +
                "and LOCAL_CASE_FLAG ='是'";
        logger.info("nowConfirmedSql"+nowConfirmedSql);
        Map<String,Object> confirmedMap = jdbcTemplate.queryForMap(nowConfirmedSql);
        Integer newConfirmedTotal = 0;
        if (confirmedMap!=null){
            newConfirmedTotal=Integer.parseInt(confirmedMap.get("confirmedTotal").toString());
        }
        //新增本土
        String newHomeSql = "select COUNT(1) as newHomeTotal from MID_CDC_CASE_INFO where dim_cond is not null AND dim_input_case = '99' AND dim_cond not in('6','7') AND DIM_CASE_TYPE = '1' and LOCAL_CASE_FLAG ='是' and diag_time >='"+ DateUtil.getStringDateShort()+" 00:00:00"+"'"+" and diag_time >='"+ DateUtil.getStringDateShort()+" 23:59:59"+"'";
        logger.info("newHomeSql"+newHomeSql);
        Map<String,Object> newHomeMap = jdbcTemplate.queryForMap(newHomeSql);
        Integer newHomeTotal = 0;
        if (newHomeMap!=null){
            newHomeTotal=Integer.parseInt(newHomeMap.get("newHomeTotal").toString());
        }
        //新增无症状
        String newAsymptomaticSql = "select COUNT(1) as newAsymptomaticTotal from MID_CDC_CASE_INFO where dim_cond is not null AND dim_cond in('0') AND dim_input_case = '99' AND DIM_CASE_TYPE = '1' and LOCAL_CASE_FLAG ='是' and diag_time >='"+ DateUtil.getStringDateShort()+" 00:00:00"+"'"+" and diag_time >='"+ DateUtil.getStringDateShort()+" 23:59:59"+"'";
        logger.info("newAsymptomaticSql"+newAsymptomaticSql);
        Map<String,Object> newAsymptomaticeMap = jdbcTemplate.queryForMap(newAsymptomaticSql);
        Integer newAsymptomaticTotal = 0;
        if (newAsymptomaticeMap!=null){
            newAsymptomaticTotal=Integer.parseInt(newAsymptomaticeMap.get("newAsymptomaticTotal").toString());
        }
        //累计确诊
        String confirmedTotalSql = "select COUNT(1) as confirmedTotal from MID_CDC_CASE_INFO where  DIM_CASE_TYPE = '1' and LOCAL_CASE_FLAG ='是' AND dim_input_case = '99' AND dim_cond is not null ";
        logger.info("confirmedTotalSql"+confirmedTotalSql);
        Map<String,Object> confirmedTotalMap = jdbcTemplate.queryForMap(confirmedTotalSql);
        Integer confirmedTotalTotal = 0;
        if (confirmedTotalMap!=null){
            confirmedTotalTotal=Integer.parseInt(confirmedTotalMap.get("confirmedTotal").toString());
        }
        //累计治愈
        String cureTotalSql = "select COUNT(1) as cureTotal from MID_CDC_CASE_INFO where dim_cond is not null AND DIM_CASE_TYPE = '1' and LOCAL_CASE_FLAG ='是' AND dim_input_case = '99' AND dim_cond in('6') ";
        logger.info("cureTotalSql"+cureTotalSql);
        Map<String,Object> cureTotalMap = jdbcTemplate.queryForMap(cureTotalSql);
        Integer cureTotalTotal = 0;
        if (cureTotalMap!=null){
            cureTotalTotal=Integer.parseInt(cureTotalMap.get("cureTotal").toString());
        }
        //累计死亡
        String deathTotalSql = "select COUNT(1) as deathTotal from MID_CDC_CASE_INFO where dim_cond is not null AND DIM_CASE_TYPE = '1' and LOCAL_CASE_FLAG ='是' AND dim_input_case = '99' AND dim_cond in('7') ";
        logger.info("deathTotalSql"+deathTotalSql);
        Map<String,Object> deathTotalMap = jdbcTemplate.queryForMap(deathTotalSql);
        Integer deathTotalTotal = 0;
        if (deathTotalMap!=null){
            deathTotalTotal=Integer.parseInt(deathTotalMap.get("deathTotal").toString());
        }
        object.put("confirmed",newConfirmedTotal);//现有确诊
        object.put("newHome",newHomeTotal);//新增本土
        object.put("newAsymptomatic",newAsymptomaticTotal);//新增无症状;
        object.put("confirmedTotal",confirmedTotalTotal);//累计确诊
        object.put("cureTotal",cureTotalTotal);//累计治愈
        object.put("deathTotal",deathTotalTotal);//累计死亡
        return object;
        return object;
    }
    }
    public JSONObject yqfkStatisticsTail(String startTime,String endTime){
    /**
     * 疫情防控底部-密接次接数据统计
     * @param patientId
     * @param endTime
     * @return
     */
    public JSONObject yqfkStatisticsTail(String patientId,String endTime){
        JSONObject object = new JSONObject();
        JSONObject object = new JSONObject();
        String patientSql = "";
        if (StringUtils.isNoneBlank(patientId)){
            String[] str= patientId.split(",");
            String patientList = "";
            for (int i=0;i<str.length;i++){
                patientList+="'"+str[i]+"',";
            }
            if (StringUtils.isNoneBlank(patientList)){
                patientList=patientList.substring(0,patientList.length()-1);
            }
            patientSql=" AND PATIENT_ID IN ("+patientList+")   ";
        }else {
            patientSql = "  AND PATIENT_ID IN (SELECT md.PATIENT_ID FROM MID_CDC_CASE_INFO md where  md.DIM_CASE_TYPE IN ('1','3'))   ";
        }
        JSONObject MjObject = new JSONObject();//在厦密接
        JSONObject MjObject = new JSONObject();//在厦密接
        MjObject.put("zyTotal","");//正转运
        MjObject.put("jdTotal","");//在酒店/已采核酸
        MjObject.put("dlsTotal","");//待落实
        MjObject.put("total","");//总计
        //密接已隔离
        String mjGlSql = "select count(1) as \"glTotal\" from MID_CDC_CCC_INFO where  dim_track_stat=1 AND dim_mg_mode=1"+patientSql;
        logger.info("mjGlSql"+mjGlSql);
        Map<String,Object> mjglMap= jdbcTemplate.queryForMap(mjGlSql);
        Integer mjglTotal = 0;
        if (mjglMap!=null){
            mjglTotal = Integer.parseInt(mjglMap.get("glTotal").toString());
        }
        //县区列表
        String countySqlList = "select DIM_COUNTY as \"code\",DIM_COUNTY_NAME as \"area\" from DIM_COUNTY_DICT where DIM_AREA = '350200'";
        List<Map<String,Object>> countySqlMapList = jdbcTemplate.queryForList(countySqlList);
        logger.info("countySqlList"+countySqlList);
        //密接已隔离列表
        String mjGlSqlList = "select dim_county,COUNT(1) as total  from MID_CDC_CCC_INFO  where  dim_track_stat=1 and dim_county is not NULL AND dim_mg_mode=1 "+patientSql+"  GROUP BY dim_county ORDER BY COUNT(1) DESC   ";
        List<Map<String,Object>> mjGlSqlMapList = jdbcTemplate.queryForList(mjGlSqlList);
        //密接待落实列表
        String mjDlsSqlList = "select dim_county,COUNT(1) as total  from MID_CDC_CCC_INFO  where  dim_imp_stat NOT IN('1') and dim_imp_stat is not NULL AND dim_mg_mode=1 "+patientSql+"  GROUP BY dim_county ORDER BY COUNT(1) DESC   ";
        List<Map<String,Object>> mjDlsSqlMapList = jdbcTemplate.queryForList(mjDlsSqlList);
        List<Map<String,Object>> mjList = countySqlMapList;
        for (Map<String,Object> map:mjList){
            String code = map.get("code").toString();
            for (Map<String,Object> map1:mjGlSqlMapList){
                String dimCounty = map1.get("dim_county").toString();
                if (code.equalsIgnoreCase(dimCounty)){
                    map.put("ygl",map1.get("total"));
                }
            }
        }
        for (Map<String,Object> map:mjList){
            String code = map.get("code").toString();
            for (Map<String,Object> map1:mjDlsSqlMapList){
                String dimCounty = map1.get("dim_county").toString();
                if (code.equalsIgnoreCase(dimCounty)){
                    map.put("dls",map1.get("total"));
                }
            }
        }
        for (Map<String,Object> map:mjList){
            Integer total = 0;
            if (map.get("ygl")!=null){
                Integer ygl = Integer.parseInt(map.get("ygl").toString());
                if (map.get("dls")!=null){
                    Integer dls = Integer.parseInt(map.get("dls").toString());
                    total = ygl+dls;
                }else {
                    map.put("dls",0);
                    total = ygl;
                }
            }else {
                map.put("ygl",0);
                if (map.get("dls")!=null){
                    Integer dls = Integer.parseInt(map.get("dls").toString());
                    total = dls;
                }else {
                    map.put("dls",0);
                }
            }
            map.put("total",total);
        }
        //密接待落实
        String mjDlsSql = "select count(1) as \"dlsTotal\" from MID_CDC_CCC_INFO where dim_imp_stat NOT IN('1') and dim_imp_stat is not NULL AND dim_mg_mode=1 "+patientSql;
        logger.info("mjDlsSql"+mjDlsSql);
        Map<String,Object> mjdlsMap= jdbcTemplate.queryForMap(mjDlsSql);
        Integer mjDlsTotal = 0;
        if (mjdlsMap!=null){
            mjDlsTotal = Integer.parseInt(mjdlsMap.get("dlsTotal").toString());
        }
        /*   MjObject.put("zyTotal","");//正转运*/
        MjObject.put("ygl",mjglTotal);//已隔离
        MjObject.put("dls",mjDlsTotal);//待落实
        MjObject.put("total",mjglTotal+mjDlsTotal);//总计
        MjObject.put("list",mjList);//列表
        //次密接已隔离
        String cmglSql = "select count(1) as \"glTotal\" from MID_CDC_CCC_SED_INFO where dim_track_stat=1 AND dim_mg_mode=1 "+patientSql;;
        logger.info("cmglSql"+cmglSql);
        Map<String,Object> cmglMap= jdbcTemplate.queryForMap(cmglSql);
        Integer cmglTotal = 0;
        if (cmglMap!=null){
            cmglTotal = Integer.parseInt(cmglMap.get("glTotal").toString());
        }
        //次密接待落实
        String cmDlsSql = "select count(1) as \"dlsTotal\" from MID_CDC_CCC_SED_INFO where dim_imp_stat NOT IN('1') and dim_imp_stat is not NULL AND dim_mg_mode=1 "+patientSql;;
        logger.info("cmDlsSql"+cmDlsSql);
        Map<String,Object> cmdlsMap= jdbcTemplate.queryForMap(cmDlsSql);
        Integer cmDlsTotal = 0;
        if (cmdlsMap!=null){
            cmDlsTotal = Integer.parseInt(cmdlsMap.get("dlsTotal").toString());
        }
        //县区列表
        String cmCountySqlList = "select DIM_COUNTY as \"code\",DIM_COUNTY_NAME as \"area\" from DIM_COUNTY_DICT where DIM_AREA = '350200'";
        List<Map<String,Object>> cmCountySqlMapList = jdbcTemplate.queryForList(cmCountySqlList);
        logger.info("cmCountySqlMapList"+cmCountySqlMapList);
        //次密接已隔离列表
        String cmGlSqlList = "select dim_county,COUNT(1) as total  from MID_CDC_CCC_SED_INFO  where  dim_track_stat=1 and dim_county is not NULL AND dim_mg_mode=1 "+patientSql+"  GROUP BY dim_county ORDER BY COUNT(1) DESC   ";
        List<Map<String,Object>> cmGlSqlMapList = jdbcTemplate.queryForList(cmGlSqlList);
        //次密接待落实列表
        String cmDlsSqlList = "select dim_county,COUNT(1) as total  from MID_CDC_CCC_SED_INFO  where  dim_imp_stat NOT IN('1') and dim_imp_stat is not NULL AND dim_mg_mode=1 "+patientSql+"  GROUP BY dim_county ORDER BY COUNT(1) DESC   ";
        List<Map<String,Object>> cmDlsSqlMapList = jdbcTemplate.queryForList(cmDlsSqlList);
        List<Map<String,Object>> cmList = cmCountySqlMapList;
        logger.info("cmList"+cmList);
        for (Map<String,Object> map:cmList){
            String code = map.get("code").toString();
            for (Map<String,Object> map1:cmGlSqlMapList){
                String dimCounty = map1.get("dim_county").toString();
                if (code.equalsIgnoreCase(dimCounty)){
                    map.put("ygl",map1.get("total"));
                }
            }
        }
        for (Map<String,Object> map:cmList){
            String code = map.get("code").toString();
            for (Map<String,Object> map1:cmDlsSqlMapList){
                String dimCounty = map1.get("dim_county").toString();
                if (code.equalsIgnoreCase(dimCounty)){
                    map.put("dls",map1.get("total"));
                }
            }
        }
        for (Map<String,Object> map:cmList){
            Integer total = 0;
            if (map.get("ygl")!=null){
                Integer ygl = Integer.parseInt(map.get("ygl").toString());
                if (map.get("dls")!=null){
                    Integer dls = Integer.parseInt(map.get("dls").toString());
                    total = ygl+dls;
                }else {
                    map.put("dls",0);
                    total = ygl;
                }
            }else {
                map.put("ygl",0);
                if (map.get("dls")!=null){
                    Integer dls = Integer.parseInt(map.get("dls").toString());
                    total = dls;
                }else {
                    map.put("dls",0);
                }
            }
            map.put("total",total);
        }
        JSONObject CmObject = new JSONObject();//在厦次密
        JSONObject CmObject = new JSONObject();//在厦次密
        CmObject.put("zyTotal","");//正转运
        CmObject.put("jdTotal","");//在酒店/已采核酸
        CmObject.put("dlsTotal","");//待落实
        CmObject.put("total","");//总计
      /*  CmObject.put("zyTotal","");//正转运*/
        CmObject.put("ygl",cmglTotal);//已隔离
        CmObject.put("dls",cmDlsTotal);//待落实
        CmObject.put("total",cmglTotal+cmDlsTotal);//总计
        CmObject.put("list",cmList);//列表
        //一般密接已隔离
        String ybglSql = "select count(1) as \"glTotal\" from MID_KEYNOTE_CROWD_INFO where dim_track_stat=1 AND dim_mg_mode=1 "+patientSql;
        logger.info("ybglSql"+ybglSql);
        Map<String,Object> ybglMap= jdbcTemplate.queryForMap(ybglSql);
        Integer ybglTotal = 0;
        if (ybglMap!=null){
            ybglTotal = Integer.parseInt(ybglMap.get("glTotal").toString());
        }
        //一般密接待落实
        String ybDlsSql = "select count(1) as \"dlsTotal\" from MID_KEYNOTE_CROWD_INFO where dim_imp_stat NOT IN('1') and dim_imp_stat is not NULL AND dim_mg_mode=1 "+patientSql;;
        logger.info("ybDlsSql"+ybDlsSql);
        Map<String,Object> ybdlsMap= jdbcTemplate.queryForMap(ybDlsSql);
        Integer ybDlsTotal = 0;
        if (ybdlsMap!=null){
            ybDlsTotal = Integer.parseInt(ybdlsMap.get("dlsTotal").toString());
        }
        //县区列表
        String ybCountySqlList = "select DIM_COUNTY as \"code\",DIM_COUNTY_NAME as \"area\" from DIM_COUNTY_DICT where DIM_AREA = '350200'";
        List<Map<String,Object>> ybCountySqlMapList = jdbcTemplate.queryForList(ybCountySqlList);
        logger.info("ybCountySqlMapList"+ybCountySqlList);
        //次密接已隔离列表
        String ybGlSqlList = "select dim_county,COUNT(1) as total  from MID_KEYNOTE_CROWD_INFO  where  dim_track_stat=1 and dim_county is not NULL AND dim_mg_mode=1 "+patientSql+"  GROUP BY dim_county ORDER BY COUNT(1) DESC   ";
        List<Map<String,Object>> ybGlSqlMapList = jdbcTemplate.queryForList(ybGlSqlList);
        //次密接待落实列表
        String ybDlsSqlList = "select dim_county,COUNT(1) as total  from MID_KEYNOTE_CROWD_INFO  where  dim_imp_stat NOT IN('1') and dim_imp_stat is not NULL AND dim_mg_mode=1 "+patientSql+"  GROUP BY dim_county ORDER BY COUNT(1) DESC   ";
        List<Map<String,Object>> ybDlsSqlMapList = jdbcTemplate.queryForList(ybDlsSqlList);
        List<Map<String,Object>> ybList = ybCountySqlMapList;
        logger.info("ybList="+ybList);
        for (Map<String,Object> map:ybList){
            String code = map.get("code").toString();
            for (Map<String,Object> map1:ybGlSqlMapList){
                String dimCounty = map1.get("dim_county").toString();
                if (code.equalsIgnoreCase(dimCounty)){
                    map.put("ygl",map1.get("total"));
                }
            }
        }
        for (Map<String,Object> map:ybList){
            String code = map.get("code").toString();
            for (Map<String,Object> map1:ybDlsSqlMapList){
                String dimCounty = map1.get("dim_county").toString();
                if (code.equalsIgnoreCase(dimCounty)){
                    map.put("dls",map1.get("total"));
                }
            }
        }
        for (Map<String,Object> map:ybList){
            Integer total = 0;
            if (map.get("ygl")!=null){
                Integer ygl = Integer.parseInt(map.get("ygl").toString());
                if (map.get("dls")!=null){
                    Integer dls = Integer.parseInt(map.get("dls").toString());
                    total = ygl+dls;
                }else {
                    map.put("dls",0);
                    total = ygl;
                }
            }else {
                map.put("ygl",0);
                if (map.get("dls")!=null){
                    Integer dls = Integer.parseInt(map.get("dls").toString());
                    total = dls;
                }else {
                    map.put("dls",0);
                }
            }
            map.put("total",total);
        }
        JSONObject ybObject = new JSONObject();//在厦一般接触者
        JSONObject ybObject = new JSONObject();//在厦一般接触者
        ybObject.put("zyTotal","");//正转运
        ybObject.put("jdTotal","");//在酒店/已采核酸
        ybObject.put("dlsTotal","");//待落实
        ybObject.put("total","");//总计
        object.put("MjObject",MjObject);
        object.put("CmObject", CmObject);
        object.put("ybObject",ybObject);
/*        ybObject.put("zyTotal","");//正转运*/
        ybObject.put("ygl",ybglTotal);//已隔离
        ybObject.put("dls",ybDlsTotal);//待落实
        ybObject.put("total",ybDlsTotal+ybglTotal);//总计
        ybObject.put("list",ybList);
        object.put("zxmj",MjObject);
        object.put("zxcm", CmObject);
        object.put("zxybjcz",ybObject);
        return object;
        return object;
    }
    }
    public  List<Map<String, Object>> confirmedList(){
        String confirmedListSql = "select PATIENT_ID as \"patientId\",PATIENT_NAME as \"patientName\",PATIENT_SEX as \"patientSex\",PATIENT_AGE as \"patientAge\",DIAG_TIME as \"diagTime\" from MID_CDC_CASE_INFO ";
    /**
     * 确诊人数详情
     * @return
     * @param flag 1、本地 2、外地协查,3、境外输入,4全部,5、本地阳性、6、境外阳性
     */
    public  List<Map<String, Object>> confirmedList(String name,String flag){
        String localSql = "";
        if (StringUtils.isNoneBlank(flag)&&flag!=null){
            if (flag.equalsIgnoreCase("1")){//本地
                localSql=" and  md.LOCAL_CASE_FLAG = '是' AND md.dim_input_case = '99' and md.DIM_CASE_TYPE = '1'  ";
            }else if (flag.equalsIgnoreCase("2")){//外地协查
                localSql=" and  md.LOCAL_CASE_FLAG = '否'  and md.DIM_CASE_TYPE = '1'  ";
            }else if (flag.equalsIgnoreCase("3")){//境外输入
                localSql=" and  md.LOCAL_CASE_FLAG = '是'  and md.DIM_CASE_TYPE = '1' AND md.dim_input_case != '99' ";
            }else if (flag.equalsIgnoreCase("4")){//全部
                localSql=" and md.DIM_CASE_TYPE IN ('1','3') ";
            }else if (flag.equalsIgnoreCase("5")){//本地阳性
                localSql=" and md.DIM_CASE_TYPE IN ('3') and  md.LOCAL_CASE_FLAG = '是' AND md.dim_input_case = '99' ";
            }else if (flag.equalsIgnoreCase("6")){//境外阳性
                localSql=" and md.DIM_CASE_TYPE IN ('3') and  md.LOCAL_CASE_FLAG = '是' AND md.dim_input_case != '99' ";
            }
        }
        String confirmedListSql = "SELECT\n" +
                "\tmd.PATIENT_ID AS \"patientId\",\n" +
                "\tmd.PATIENT_NAME AS \"patientName\",\n" +
                "\tmd.PATIENT_SEX AS \"patientSex\",\n" +
                "\tmd.PATIENT_AGE AS \"patientAge\",\n" +
                "\tmd.DIAG_TIME AS \"diagTime\",\n" +
                "\tmd.DIM_COND AS \"dimCond\",\n" +
                "\tp.DIM_PROV_NAME AS \"dimProvName\",\n" +
                "\ta.DIM_AREA_NAME AS \"dimAreaName\",\n" +
                "\tmj.total as \"mjTotal\",\n" +
                "\tcm.total as \"cmjTotal\",\n" +
                "\tyb.total as \"ybmjTotal\"\n" +
                "FROM\n" +
                "\tMID_CDC_CASE_INFO md\n" +
                "LEFT JOIN DIM_PROV_DICT p ON p.DIM_PROV = md.DIM_CS_PROV\n" +
                "LEFT JOIN DIM_AREA_DICT a ON a.DIM_AREA = md.DIM_CS_AREA\n" +
                "LEFT JOIN MID_CDC_CCC_INFO_COUNT mj ON mj.patientId = md.PATIENT_ID\n" +
                "LEFT JOIN MID_CDC_CCC_SED_INFO_COUNT cm ON cm.patientId = md.PATIENT_ID\n" +
                "LEFT JOIN MID_KEYNOTE_CROWD_INFO_COUNT yb ON yb.patientId = md.PATIENT_ID" +
                " WHERE\n" +
                "   1=1 "+localSql;
        if (name!=null&&name!=""){
            confirmedListSql =confirmedListSql+" and md.PATIENT_NAME LIKE '%"+name+"%'";
        }
        logger.info("confirmedListSql"+confirmedListSql);
        List<Map<String, Object>> confirmedList = jdbcTemplate.queryForList(confirmedListSql);
        List<Map<String, Object>> confirmedList = jdbcTemplate.queryForList(confirmedListSql);
        if (confirmedList!=null&&confirmedList.size()!=0){
      /*  if (confirmedList!=null&&confirmedList.size()!=0){
            for (Map<String,Object> map:confirmedList){
            for (Map<String,Object> map:confirmedList){
                String patientId = map.get("patientId").toString();
                String patientId = map.get("patientId").toString();
                //密接人数计算
                //密接人数计算
                String mjTotalSql = "select count(1) as total from MID_CDC_CCC_INFO where PATIENT_ID='"+patientId+"'";
                String mjTotalSql = "select count(1) as total from MID_CDC_CCC_INFO where PATIENT_ID='"+patientId+"'";
                logger.info("mjTotalSql"+mjTotalSql);
                List<Map<String, Object>> mjList = jdbcTemplate.queryForList(mjTotalSql);
                List<Map<String, Object>> mjList = jdbcTemplate.queryForList(mjTotalSql);
                Integer mjTotal = 0;//密接人数
                Integer mjTotal = 0;//密接人数
                if (mjList!=null&&mjList.size()!=0){
                if (mjList!=null&&mjList.size()!=0){
@ -86,6 +424,7 @@ public class YqfkService {
                //次密接人数计算
                //次密接人数计算
                String cmjTotalSql = "select count(1) as total from MID_CDC_CCC_SED_INFO where PATIENT_ID='"+patientId+"'";
                String cmjTotalSql = "select count(1) as total from MID_CDC_CCC_SED_INFO where PATIENT_ID='"+patientId+"'";
                logger.info("cmjTotalSql"+cmjTotalSql);
                List<Map<String, Object>> cmjList = jdbcTemplate.queryForList(cmjTotalSql);
                List<Map<String, Object>> cmjList = jdbcTemplate.queryForList(cmjTotalSql);
                Integer cmjTotal = 0;//密接人数
                Integer cmjTotal = 0;//密接人数
                if (cmjList!=null&&cmjList.size()!=0){
                if (cmjList!=null&&cmjList.size()!=0){
@ -96,6 +435,7 @@ public class YqfkService {
                //一般接触人数计算
                //一般接触人数计算
                String ybmjTotalSql = "select count(1) as total from MID_KEYNOTE_CROWD_INFO where PATIENT_ID='"+patientId+"'";
                String ybmjTotalSql = "select count(1) as total from MID_KEYNOTE_CROWD_INFO where PATIENT_ID='"+patientId+"'";
                logger.info("ybmjTotalSql"+ybmjTotalSql);
                List<Map<String, Object>> ybmjList = jdbcTemplate.queryForList(ybmjTotalSql);
                List<Map<String, Object>> ybmjList = jdbcTemplate.queryForList(ybmjTotalSql);
                Integer ybmjTotal = 0;//密接人数
                Integer ybmjTotal = 0;//密接人数
                if (ybmjList!=null&&ybmjList.size()!=0){
                if (ybmjList!=null&&ybmjList.size()!=0){
@ -103,7 +443,7 @@ public class YqfkService {
                }
                }
                map.put("ybmjTotal",ybmjTotal);
                map.put("ybmjTotal",ybmjTotal);
            }
            }
        }
        }*/
        return confirmedList;
        return confirmedList;
    }
    }

+ 87 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -454,6 +454,85 @@ public class ImService {
	}
	}
	/**
	 * 居民咨询发消息(追问接口)
	 * @param consult 咨询标识-咨询CODE
	 * @param content 消息内容
	 * @param type 消息类型
	 * @param times 次数
	 * @param patientcode 发送的居民CODE
	 * @param wechat_appid 微信公众号appid
	 * @return
	 */
	public List<String> append(String consult, String content, Integer type, Integer times,String patientcode,String wechat_appid,String agent) throws Exception {
		List<ConsultTeamLogDo> logs = new ArrayList<ConsultTeamLogDo>();
		ConsultTeamDo consultModel = consultTeamDao.findByConsult(consult);
		if (consultModel == null) {
			throw new Exception("咨询记录不存在!");
		}
		try {
			if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
				prescriptionService.wxTempalteJPush("consult_remind_doctor",null,consultModel,content,"","","");
			}
		}catch (Exception e){
			e.printStackTrace();
		}
		if (consultModel.getEndMsgId() != null) {
			throw new Exception("咨询已结束!");
		}
		String[] arr = null;
		if (type == 3) {//语音文件处理
			ConsultTeamLogDo log = new ConsultTeamLogDo();
			log.setConsult(consult);
			log.setContent(content);
			log.setDel("1");
			log.setChatType(type);
			log.setType(type);
			logs.add(log);
		} else if (type == 2) {
//			// 图片消息
			String[] images = content.split(",");
			for (String image : images) {
				ConsultTeamLogDo log = new ConsultTeamLogDo();
				log.setConsult(consult);
				log.setContent(image);
				log.setDel("1");
				log.setChatType(type);
				log.setType(type);
				logs.add(log);
			}
		} else {
			ConsultTeamLogDo log = new ConsultTeamLogDo();
			log.setConsult(consult);
			log.setContent(content);
			log.setDel("1");
			log.setChatType(type);
			log.setType(type);
			logs.add(log);
			arr = new String[]{content};
		}
//            Patient patient = patientDao.findByCode(getUID());
		BasePatientDO patient = basePatientDao.findById(patientcode);
		int i = 0;
		List<String> failed = new ArrayList<>();
		for (ConsultTeamLogDo log : logs) {
			String response = imUtil.sendTopicIM(patientcode, patient.getName(), consult, String.valueOf(log.getType()), log.getContent(),agent,patient.getName(),Integer.parseInt(IdCardUtil.getSexForIdcard_new(patient.getIdcard())), IdCardUtil.getAgeForIdcard(patient.getIdcard()));
			if (org.apache.commons.lang3.StringUtils.isNotEmpty(response)) {
				JSONObject resObj = JSON.parseObject(response);
				if (resObj.getInteger("status")  == -1) {
					throw new Exception("追问失败!" + resObj.getString("message"));
				}
				failed.add(String.valueOf(resObj.get("data")));
			}
		}
		return failed;
	}
	/**
	/**
	 * 居民咨询发消息(追问接口)
	 * 居民咨询发消息(追问接口)
	 * @param consult 咨询标识-咨询CODE
	 * @param consult 咨询标识-咨询CODE
@ -3807,12 +3886,19 @@ public class ImService {
	 * @throws Exception
	 * @throws Exception
	 */
	 */
	public List<Map<String,Object>>  getDoctorConsultCount(String doctorids) throws Exception{
	public List<Map<String,Object>>  getDoctorConsultCount(String doctorids) throws Exception{
		String ids[] = doctorids.replace("'","").split(",");
		String dotorIds = "";
		for (int i=0;i<ids.length;i++){
			dotorIds = "'"+ids[i]+"',";
		}
		dotorIds = dotorIds.substring(0,dotorIds.length()-1);
		//医生角色
		//医生角色
		String sql = "SELECT " +
		String sql = "SELECT " +
				"count(id) AS \"total\"," +
				"count(id) AS \"total\"," +
				"doctor as \"doctor\"" +
				"doctor as \"doctor\"" +
				"FROM wlyy_consult_team " +
				"FROM wlyy_consult_team " +
				"WHERE doctor IN ("+doctorids+") AND (type=1 OR type=15 OR type=9 OR type =16) and status = 0 GROUP BY doctor";
				"WHERE doctor IN ("+dotorIds+") AND (type=1 OR type=15 OR type=9 OR type =16) and status = 0 GROUP BY doctor";
		List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
		List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
		return list;
		return list;
	}
	}

+ 99 - 0
common/common-entity/sql记录

@ -1377,3 +1377,102 @@ alter table base_security_monitoring_order add COLUMN warn_info varchar(3000) DE
-- 20210825
-- 20210825
alter table wlyy_devices add COLUMN contact_status_time datetime DEFAULT NULL COMMENT '失联状态更新时间';
alter table wlyy_devices add COLUMN contact_status_time datetime DEFAULT NULL COMMENT '失联状态更新时间';
alter table wlyy_devices add COLUMN contact_status tinyint(2) DEFAULT NULL COMMENT '失联状态 1未失联 0失联';
alter table wlyy_devices add COLUMN contact_status tinyint(2) DEFAULT NULL COMMENT '失联状态 1未失联 0失联';
-- 20210826
CREATE TABLE `base_yxdevice_index` (
  `id` varchar(50) NOT NULL,
  `sn` varchar(50) DEFAULT NULL COMMENT '设备sn码',
  `lat` varchar(50) DEFAULT NULL COMMENT '纬度',
  `lon` varchar(50) DEFAULT NULL COMMENT '经度',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='云芯拐杖设备上传记录';
-- 20210828
ALTER table base_patient_sos_contacts add column update_info VARCHAR(1000) default null comment '同步信息 1成功,-1失败'
-- 20210828
alter table base_patient add `sign_status` tinyint(1) DEFAULT NULL COMMENT '签约状态 1已签约 0未签约';
-- 20210831 已执行
CREATE TABLE `base_admin_service_dynamic` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `patient` varchar(255) DEFAULT NULL COMMENT '居民code',
  `name` varchar(50) DEFAULT NULL COMMENT '居民姓名',
  `type` int(1) DEFAULT NULL COMMENT '1上门辅导   2生活照料',
  `number` varchar(20) DEFAULT NULL COMMENT '工单编号',
  `value` varchar(255) DEFAULT NULL COMMENT '操作',
  `doctor` varchar(255) DEFAULT NULL COMMENT '接单医生code',
  `doctor_name` varchar(255) DEFAULT NULL COMMENT '接单医生',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='调度分析,管理员调度实时动态';
-- 20210831
CREATE TABLE `wlyy_patient_safe_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `patient` varchar(50) DEFAULT NULL COMMENT '居民id',
  `safe_area_gz` varchar(255) DEFAULT NULL COMMENT '围栏地址5个坐标组成封闭区域 a>b>c>d>a',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建日期',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '更新日期',
  `success_flag` tinyint(4) DEFAULT NULL COMMENT '是否同步至设备 -1失败 1成功',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='患者设备安全区域';
-- 2021-09-02
CREATE TABLE `device_data_push_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `patient` varchar(50) DEFAULT NULL,
  `patient_name` varchar(50) DEFAULT NULL,
  `device_sn` varchar(50) DEFAULT NULL,
  `device_name` varchar(50) DEFAULT NULL,
  `device_category` varchar(50) DEFAULT NULL,
  `api_name` varchar(50) DEFAULT NULL,
  `data` varchar(1000) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=449 DEFAULT CHARSET=utf8mb4 COMMENT='设备项目推送数据日志';
-- 2021-09-07
alter table base_patient modify column archive_type  tinyint(2) DEFAULT NULL COMMENT '档案类型 1老人 2新生儿';
-- 2021-09-08
alter table base_service_news add column relation_code varchar(50) default null COMMENT '对应工单id/咨询Id';
alter table base_service_news add column user_type TINYINT(2) default null COMMENT '1居民2助老员';
CREATE TABLE `base_doctor_service_permissions` (
  `id` varchar(50) NOT NULL,
  `org_code` varchar(50) DEFAULT NULL,
  `org_name` varchar(50) DEFAULT NULL,
  `doctor` varchar(50) DEFAULT NULL,
  `doctor_name` varchar(50) DEFAULT NULL,
  `service1` tinyint(1) DEFAULT NULL,
  `service2` tinyint(1) DEFAULT NULL,
  `service3` tinyint(1) DEFAULT NULL,
  `service4` tinyint(1) DEFAULT NULL,
  `service5` tinyint(1) DEFAULT NULL,
  `service6` tinyint(1) DEFAULT NULL,
  `service7` tinyint(1) DEFAULT NULL,
  `service8` tinyint(1) DEFAULT NULL,
  `service9` tinyint(1) DEFAULT NULL,
  `service10` tinyint(1) DEFAULT NULL,
  `service11` tinyint(1) DEFAULT NULL,
  `service12` tinyint(1) DEFAULT NULL,
  `service13` tinyint(1) DEFAULT NULL,
  `service14` tinyint(1) DEFAULT NULL,
  `service15` tinyint(1) DEFAULT NULL,
  `service16` tinyint(1) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index1` (`doctor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生服务权限表';
--2021-09-08 ysj
CREATE TABLE `base_onenet_device` (
  `id` varchar(50) NOT NULL,
  `sn` varchar(50) DEFAULT NULL COMMENT '设备sn码imei',
  `imsi` varchar(50) DEFAULT NULL COMMENT 'sim的imsi',
  `device_id` varchar(50) DEFAULT NULL COMMENT 'onenet平台设备id',
  `category_code` varchar(10) DEFAULT NULL COMMENT '设备类型标识 14气感,15烟感',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='onenet平台设备信息';

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

@ -272,7 +272,7 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
    private String medicareNumber;//医疗保险号
    private String medicareNumber;//医疗保险号
    private Integer archiveStatus;//档案状态【1.未管理 2.死亡 3.正常 4.高危】【必填】
    private Integer archiveStatus;//档案状态【1.未管理 2.死亡 3.正常 4.高危】【必填】
    private Integer archiveType;// 档案类型 1老人 2新生儿
    private Integer archiveType;// 档案类型 1老人 2新生儿 3老人家属
    private String archiveStatusName;
    private String archiveStatusName;
    private String archiveTypeName;
    private String archiveTypeName;
@ -282,6 +282,7 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
    private String latLon;//定位经纬度
    private String latLon;//定位经纬度
    private String padImei;//绑定平板标志
    private String padImei;//绑定平板标志
    private String residentialArea;//居住小区
    private String residentialArea;//居住小区
    private Integer signStatus;// 签约状态【0未签约,1已签约】
    private Integer deviceFlag;//绑定设备标识 大于0为绑定了设备
    private Integer deviceFlag;//绑定设备标识 大于0为绑定了设备
@ -872,6 +873,15 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
        this.residentialArea = residentialArea;
        this.residentialArea = residentialArea;
    }
    }
    @Column(name = "sign_status")
    public Integer getSignStatus() {
        return signStatus;
    }
    public void setSignStatus(Integer signStatus) {
        this.signStatus = signStatus;
    }
    @Transient
    @Transient
    public Integer getDeviceFlag() {
    public Integer getDeviceFlag() {
        return deviceFlag;
        return deviceFlag;

+ 157 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/searchClient/BaseSearchNoveltyRepeatDO.java

@ -0,0 +1,157 @@
package com.yihu.jw.entity.base.searchClient;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by wsy on 2021/9/4.
 */
@Entity
@Table(name = "base_search_novelty_repeat")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class BaseSearchNoveltyRepeatDO extends UuidIdentityEntityWithOperator {
    private String Name;         //委托人
    private String Phone;        //联系电话
    private String Email;        //联系邮箱
    private String Address;      //联系地址
    private String subject;             //申请主题
    private String mechanism;           //机构
    private String content;             //申请内容
    private String file;            //文件
    private Integer status;              //状态码
    private String number;              //委托单号
    //private String createTime;            //生成时间
    private String reversion;                 //答复
   /* private String update_time;           //更新时间
    private String update_user_name;      //更新用户*/
    private String statusName;            //状态名称
    public String getStatusName() {
        return statusName;
    }
    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
/*  public String getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }
    public String getUpdate_user_name() {
        return update_user_name;
    }
    public void setUpdate_user_name(String update_user_name) {
        this.update_user_name = update_user_name;
    }
*/
    public String getReversion() {
        return reversion;
    }
    public void setReversion(String reversion) {
        this.reversion = reversion;
    }
    /*public String getCreateTime() {
        return createTime;
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }*/
    public String getName() {
        return Name;
    }
    public void setName(String Name) {
        this.Name = Name;
    }
    public String getPhone() {
        return Phone;
    }
    public void setPhone(String Phone) {
        this.Phone = Phone;
    }
    public String getEmail() {
        return Email;
    }
    public void setEmail(String Email) {
        this.Email = Email;
    }
    public String getAddress() {
        return Address;
    }
    public void setAddress(String Address) {
        this.Address = Address;
    }
    public String getSubject() {
        return subject;
    }
    public void setSubject(String subject) {
        this.subject = subject;
    }
    public String getMechanism() {
        return mechanism;
    }
    public void setMechanism(String mechanism) {
        this.mechanism = mechanism;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getFile() {
        return file;
    }
    public void setFile(String file) {
        this.file = file;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getNumber() {
        return number;
    }
    public void setNumber(String number) {
        this.number = number;
    }
}

+ 2 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/care/assistance/EmergencyAssistanceDO.java

@ -2,7 +2,6 @@ package com.yihu.jw.entity.care.assistance;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.care.securitymonitoring.EmergencyWarnConclusionDO;
import com.yihu.jw.entity.care.securitymonitoring.EmergencyWarnConclusionDO;
import netscape.javascript.JSObject;
import javax.persistence.Entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Table;
@ -66,8 +65,8 @@ public class EmergencyAssistanceDO extends UuidIdentityEntityWithOperator {
    private Integer status;
    private Integer status;
    private Date completeTime;//完成时间
    private Date completeTime;//完成时间
    private String teamCode;
    private String teamCode;
    private Integer type; //发起类型(1本人发起 2家人待预约 3医生代预约)
    private Integer orderSource;//工单发起来源状态 1APP 2手环 3居家报警
    private Integer type; //发起类型(1本人发起 2家人待预约 3医生代预约 4家属代预约)
    private Integer orderSource;//工单发起来源状态 1APP 2手环 3居家报警,4拐杖发起
    private Integer emergencyCancel;// 紧急预警工单误报警原因 字典emergency_cancel
    private Integer emergencyCancel;// 紧急预警工单误报警原因 字典emergency_cancel
    private String deviceSn;//设备sn  设备触发是才有该字段值
    private String deviceSn;//设备sn  设备触发是才有该字段值

+ 253 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/care/common/DoctorServicePermissionsDO.java

@ -0,0 +1,253 @@
package com.yihu.jw.entity.care.common;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
 * Created with IntelliJ IDEA.
 * 医生服务权限表
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
@Entity
@Table(name="base_doctor_service_permissions")
public class DoctorServicePermissionsDO extends UuidIdentityEntityWithCreateTime{
    private String orgCode;
    private String orgName;
    private String doctor;
    private String doctorName;
    /**
     * 1有权限 0无权限
     * 1签约管理
     2待办工作
     3我的评价
     4我的居民
     5代预约
     6能力评估
     7生活照料
     8紧急救助
     9人文关怀
     10安防监护
     11我的服务
     12通讯录
     */
    private Integer service1;
    private Integer service2;
    private Integer service3;
    private Integer service4;
    private Integer service5;
    private Integer service6;
    private Integer service7;
    private Integer service8;
    private Integer service9;
    private Integer service10;
    private Integer service11;
    private Integer service12;
    /**
     * 备用字段
     */
    private Integer service13;
    private Integer service14;
    private Integer service15;
    private Integer service16;
    private String sex;//性别
    private String mobile;//手机
    private String idcard;//身份证
    @Column(name = "org_code")
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    @Column(name = "service1")
    public Integer getService1() {
        return service1;
    }
    public void setService1(Integer service1) {
        this.service1 = service1;
    }
    @Column(name = "service2")
    public Integer getService2() {
        return service2;
    }
    public void setService2(Integer service2) {
        this.service2 = service2;
    }
    @Column(name = "service3")
    public Integer getService3() {
        return service3;
    }
    public void setService3(Integer service3) {
        this.service3 = service3;
    }
    @Column(name = "service4")
    public Integer getService4() {
        return service4;
    }
    public void setService4(Integer service4) {
        this.service4 = service4;
    }
    @Column(name = "service5")
    public Integer getService5() {
        return service5;
    }
    public void setService5(Integer service5) {
        this.service5 = service5;
    }
    @Column(name = "service6")
    public Integer getService6() {
        return service6;
    }
    public void setService6(Integer service6) {
        this.service6 = service6;
    }
    @Column(name = "service7")
    public Integer getService7() {
        return service7;
    }
    public void setService7(Integer service7) {
        this.service7 = service7;
    }
    @Column(name = "service8")
    public Integer getService8() {
        return service8;
    }
    public void setService8(Integer service8) {
        this.service8 = service8;
    }
    @Column(name = "service9")
    public Integer getService9() {
        return service9;
    }
    public void setService9(Integer service9) {
        this.service9 = service9;
    }
    @Column(name = "service10")
    public Integer getService10() {
        return service10;
    }
    public void setService10(Integer service10) {
        this.service10 = service10;
    }
    @Column(name = "service11")
    public Integer getService11() {
        return service11;
    }
    public void setService11(Integer service11) {
        this.service11 = service11;
    }
    @Column(name = "service12")
    public Integer getService12() {
        return service12;
    }
    public void setService12(Integer service12) {
        this.service12 = service12;
    }
    @Column(name = "service13")
    public Integer getService13() {
        return service13;
    }
    public void setService13(Integer service13) {
        this.service13 = service13;
    }
    @Column(name = "service14")
    public Integer getService14() {
        return service14;
    }
    public void setService14(Integer service14) {
        this.service14 = service14;
    }
    @Column(name = "service15")
    public Integer getService15() {
        return service15;
    }
    public void setService15(Integer service15) {
        this.service15 = service15;
    }
    @Column(name = "service16")
    public Integer getService16() {
        return service16;
    }
    public void setService16(Integer service16) {
        this.service16 = service16;
    }
    @Transient
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    @Transient
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    @Transient
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
}

+ 10 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/care/contacts/PatientSosContactsDO.java

@ -21,9 +21,10 @@ public class PatientSosContactsDO extends IdEntity {
    private String sosPhone; //联系电话
    private String sosPhone; //联系电话
    private Integer relation; //与联系人关系 同base_patient_family_member
    private Integer relation; //与联系人关系 同base_patient_family_member
    private Date updateTime; //修改日期
    private Date updateTime; //修改日期
    private Integer successFlag;//联系人是否同步成功 -2删除失败 -1添加失败 0待同步 1添加成功 2删除成功
    private Integer successFlag;//联系人是否同步成功 -1失败 0待同步 1成功
    private Integer del;
    private Integer del;
    private Integer phoneSeqid;// 联系人序号 1 或2
    private Integer phoneSeqid;// 联系人序号 1 或2
    private String updateInfo;//同步信息 -1失败 1成功
    private String relationName;
    private String relationName;
@ -100,4 +101,12 @@ public class PatientSosContactsDO extends IdEntity {
    public void setPhoneSeqid(Integer phoneSeqid) {
    public void setPhoneSeqid(Integer phoneSeqid) {
        this.phoneSeqid = phoneSeqid;
        this.phoneSeqid = phoneSeqid;
    }
    }
    public String getUpdateInfo() {
        return updateInfo;
    }
    public void setUpdateInfo(String updateInfo) {
        this.updateInfo = updateInfo;
    }
}
}

+ 46 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/care/device/BaseYxDeviceIndex.java

@ -0,0 +1,46 @@
package com.yihu.jw.entity.care.device;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created with IntelliJ IDEA.
 * 云芯拐杖设备上传记录
 * @Author: yeshijie
 * @Date: 2021/8/26
 * @Description:
 */
@Entity
@Table(name = "base_yxdevice_index")
public class BaseYxDeviceIndex extends UuidIdentityEntityWithCreateTime{
    private String sn;//设备sn码
    private String lat;//纬度
    private String lon;//经度
    public String getSn() {
        return sn;
    }
    public void setSn(String sn) {
        this.sn = sn;
    }
    public String getLat() {
        return lat;
    }
    public void setLat(String lat) {
        this.lat = lat;
    }
    public String getLon() {
        return lon;
    }
    public void setLon(String lon) {
        this.lon = lon;
    }
}

+ 89 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/care/device/DeviceDataPushLog.java

@ -0,0 +1,89 @@
package com.yihu.jw.entity.care.device;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Bing on 2021/9/2.
 */
@Entity
@Table(name="device_data_push_log")
public class DeviceDataPushLog extends IdEntity {
    private String patient;
    private String patientName;
    private String deviceSn;
    private String deviceName;
    private String deviceCategory;
    private String apiName;
    private String data;//上传数据
    private Date createTime;
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    public String getDeviceSn() {
        return deviceSn;
    }
    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }
    public String getDeviceName() {
        return deviceName;
    }
    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }
    public String getDeviceCategory() {
        return deviceCategory;
    }
    public void setDeviceCategory(String deviceCategory) {
        this.deviceCategory = deviceCategory;
    }
    public String getApiName() {
        return apiName;
    }
    public void setApiName(String apiName) {
        this.apiName = apiName;
    }
    public String getData() {
        return data;
    }
    public void setData(String data) {
        this.data = data;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/care/device/DevicePatientDevice.java

@ -21,7 +21,7 @@ public class DevicePatientDevice extends IdEntity {
    private String deviceName;
    private String deviceName;
    // 用户code
    // 用户code
    private String user;
    private String user;
    // 设备类型标识 1血糖仪,2.血压计,3药盒,4智能手表,7 = 居家报警器,12 监控器 13 睡眠带 14气感报警器 15烟感报警器
    // 设备类型标识 1血糖仪,2.血压计,3药盒,4智能手表,7 = 居家报警器,12 监控器 13 睡眠带 14气感报警器 15烟感报警器 16拐杖 17随身wifi
    private String categoryCode;
    private String categoryCode;
    // 用户类型标准 -1代表单用户
    // 用户类型标准 -1代表单用户
    private String userType;
    private String userType;

+ 57 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/care/device/OnenetDevice.java

@ -0,0 +1,57 @@
package com.yihu.jw.entity.care.device;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/8
 * @Description:
 */
@Entity
@Table(name = "base_onenet_device")
public class OnenetDevice extends UuidIdentityEntityWithCreateTime{
    private String sn;//设备sn码imei
    private String imsi;//sim的imsi
    private String deviceId;//onenet平台设备id
    private String categoryCode;//设备类型标识 14气感,15烟感
    @Column(name="sn")
    public String getSn() {
        return sn;
    }
    public void setSn(String sn) {
        this.sn = sn;
    }
    @Column(name="imsi")
    public String getImsi() {
        return imsi;
    }
    public void setImsi(String imsi) {
        this.imsi = imsi;
    }
    @Column(name="device_id")
    public String getDeviceId() {
        return deviceId;
    }
    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }
    @Column(name="category_code")
    public String getCategoryCode() {
        return categoryCode;
    }
    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }
}

+ 66 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/care/device/PatientSafeAreaDO.java

@ -0,0 +1,66 @@
package com.yihu.jw.entity.care.device;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by Bing on 2021/8/31.
 */
@Entity
@Table(name="wlyy_patient_safe_area")
public class PatientSafeAreaDO extends IdEntity {
    private String patient;
    private String safeAreaGz;
    private Integer successFlag; //围栏同步至设备 -1失败 1成功
    private Date createTime;
    private Date updateTime;
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    @Column(name="safe_area_gz")
    public String getSafeAreaGz() {
        return safeAreaGz;
    }
    public void setSafeAreaGz(String safeAreaGz) {
        this.safeAreaGz = safeAreaGz;
    }
    public Integer getSuccessFlag() {
        return successFlag;
    }
    public void setSuccessFlag(Integer successFlag) {
        this.successFlag = successFlag;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/care/lifeCare/LifeCareOrderDO.java

@ -296,7 +296,7 @@ public class LifeCareOrderDO extends UuidIdentityEntityWithOperator {
     */
     */
    private String hospital;
    private String hospital;
    private String hospitalName;
    private String hospitalName;
    private Integer type;//发起工单类型(1本人发起 2家人待预约 3医生代预约)
    private Integer type;//发起工单类型(1本人发起 2家人待预约 3医生代预约 4家属预约)
    private String relationCode;//业务关联
    private String relationCode;//业务关联
    /**
    /**
     * 医生签到时间
     * 医生签到时间

+ 52 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/care/message/BaseServiceNews.java

@ -4,6 +4,7 @@ import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Entity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
/**
 * Created with IntelliJ IDEA.
 * Created with IntelliJ IDEA.
@ -20,9 +21,15 @@ public class BaseServiceNews extends UuidIdentityEntityWithCreateTime {
    private String content;
    private String content;
    //姓名
    //姓名
    private String name;
    private String name;
    private String code;
    //类型 1上门辅导、2发起咨询、3发起生活照料、4代预约
    private String code; //居民code
    //类型 1上门辅导、2发起咨询、3发起生活照料、4生活照料代预约
    private String type;
    private String type;
    private String relationCode;//type对应工单id 或咨询id
    private Integer userType;//用户类型 1居民 2助老员
    private Integer archiveType;//居民类型
    private String residentialArea;//居住小区;
    private String serveItems;//
    public String getContent() {
    public String getContent() {
        return content;
        return content;
@ -55,4 +62,47 @@ public class BaseServiceNews extends UuidIdentityEntityWithCreateTime {
    public void setType(String type) {
    public void setType(String type) {
        this.type = type;
        this.type = type;
    }
    }
    public String getRelationCode() {
        return relationCode;
    }
    public void setRelationCode(String relationCode) {
        this.relationCode = relationCode;
    }
    public Integer getUserType() {
        return userType;
    }
    public void setUserType(Integer userType) {
        this.userType = userType;
    }
    @Transient
    public Integer getArchiveType() {
        return archiveType;
    }
    public void setArchiveType(Integer archiveType) {
        this.archiveType = archiveType;
    }
    @Transient
    public String getResidentialArea() {
        return residentialArea;
    }
    public void setResidentialArea(String residentialArea) {
        this.residentialArea = residentialArea;
    }
    @Transient
    public String getServeItems() {
        return serveItems;
    }
    public void setServeItems(String serveItems) {
        this.serveItems = serveItems;
    }
}
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/care/securitymonitoring/SecurityMonitoringOrderDO.java

@ -318,7 +318,7 @@ public class SecurityMonitoringOrderDO extends UuidIdentityEntityWithOperator {
    private String serviceStatus;//服务类型 1-预约项目 2-即时项目
    private String serviceStatus;//服务类型 1-预约项目 2-即时项目
    private String orderInfo;//工单详情 0-未推送 1-未确认 2-已确认
    private String orderInfo;//工单详情 0-未推送 1-未确认 2-已确认
    private String doctorConfirmFinishImg;
    private String doctorConfirmFinishImg;
    private Integer orderSource;//工单发起来源状态 1APP 2手环 3居家报警 4监控器发起 5睡眠带 6气感报警器 7 烟感报警器
    private Integer orderSource;//工单发起来源状态 1APP 2手环 3居家报警 4监控器发起 5睡眠带 6气感报警器 7 烟感报警器 8拐杖发起
    private Integer emergencyCancel;// 紧急预警工单误报警原因 字典emergency_cancel
    private Integer emergencyCancel;// 紧急预警工单误报警原因 字典emergency_cancel
    private String topicItem;//安防工单所属专题 base_system_dict_entry表service_item
    private String topicItem;//安防工单所属专题 base_system_dict_entry表service_item
    private String sceneImg;//现场照片
    private String sceneImg;//现场照片

+ 96 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/door/BaseAdminServiceDynamic.java

@ -0,0 +1,96 @@
package com.yihu.jw.entity.door;
/***
 * @ClassName: BaseAdminServiceDynamic
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/31 15:24
 */
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.iot.gateway.IdEntity;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "base_admin_service_dynamic")
@SequenceGenerator(name="id_generated", sequenceName="base_admin_service_dynamic")
public class BaseAdminServiceDynamic extends IdEntity {
    private String patient;
    private String name;
    private Integer type;  //1上门辅导   2生活照料
    private String number;
    private String value;
    private Date createTime;
    private String doctor;
    private String doctorName;
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getNumber() {
        return number;
    }
    public void setNumber(String number) {
        this.number = number;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
}

+ 10 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDictDO.java

@ -30,6 +30,7 @@ public class KnowledgeArticleDictDO extends UuidIdentityEntity {
	private String content; // 文章内容
	private String content; // 文章内容
	private String source;  // 文章来源--客服
	private String source;  // 文章来源--客服
	private String image;   // 封面图片
	private String image;   // 封面图片
	private String vedioUrl;//视频url
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	private Date createTime;  // 添加时间
	private Date createTime;  // 添加时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
@ -306,4 +307,13 @@ public class KnowledgeArticleDictDO extends UuidIdentityEntity {
	public void setIntro(String intro) {
	public void setIntro(String intro) {
		this.intro = intro;
		this.intro = intro;
	}
	}
	@Column(name = "vedio_url")
	public String getVedioUrl() {
		return vedioUrl;
	}
	public void setVedioUrl(String vedioUrl) {
		this.vedioUrl = vedioUrl;
	}
}
}

+ 4 - 5
common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcClientDetails.java

@ -2,12 +2,10 @@ package com.yihu.jw.entity.iot.gateway;
import com.yihu.jw.entity.IntegerIdentityEntity;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import com.yihu.jw.entity.util.StringFStringEncryptConverter;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.sql.Timestamp;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Date;
@ -16,7 +14,8 @@ import java.util.Date;
 */
 */
@Entity
@Entity
@Table(name = "gc_client_details")
@Table(name = "gc_client_details")
public class GcClientDetails extends IdEntity implements java.io.Serializable {
@SequenceGenerator(name="id_generated", sequenceName="GC_CLIENT_DETAILS_SQU")
public class GcClientDetails extends IntegerIdentityEntity implements java.io.Serializable {
    // Fields
    // Fields

+ 5 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcHttpLog.java

@ -1,7 +1,10 @@
package com.yihu.jw.entity.iot.gateway;
package com.yihu.jw.entity.iot.gateway;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Date;
@ -11,7 +14,8 @@ import java.util.Date;
 */
 */
@Entity
@Entity
@Table(name = "gc_http_log")
@Table(name = "gc_http_log")
public class GcHttpLog extends IdEntity implements java.io.Serializable {
@SequenceGenerator(name="id_generated", sequenceName="GC_HTTP_LOG_SQU")
public class GcHttpLog extends IntegerIdentityEntity implements java.io.Serializable {
    // Fields
    // Fields

+ 5 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcToken.java

@ -1,7 +1,10 @@
package com.yihu.jw.entity.iot.gateway;
package com.yihu.jw.entity.iot.gateway;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Table;
import java.util.Date;
import java.util.Date;
@ -10,7 +13,8 @@ import java.util.Date;
 */
 */
@Entity
@Entity
@Table(name = "gc_token")
@Table(name = "gc_token")
public class GcToken extends IdEntity implements java.io.Serializable {
@SequenceGenerator(name="id_generated", sequenceName="GC_TOKEN_SQU")
public class GcToken extends IntegerIdentityEntity implements java.io.Serializable {
    // Fields
    // Fields

+ 5 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/iot/gateway/GcTokenLog.java

@ -1,7 +1,10 @@
package com.yihu.jw.entity.iot.gateway;
package com.yihu.jw.entity.iot.gateway;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Date;
@ -11,7 +14,8 @@ import java.util.Date;
 */
 */
@Entity
@Entity
@Table(name = "gc_token_log")
@Table(name = "gc_token_log")
public class GcTokenLog extends IdEntity implements java.io.Serializable {
@SequenceGenerator(name="id_generated", sequenceName="GC_TOKEN_LOG_SQU")
public class GcTokenLog extends IntegerIdentityEntity implements java.io.Serializable {
    // Fields
    // Fields

+ 71 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/AchnsDoctorRecordDO.java

@ -0,0 +1,71 @@
package com.yihu.jw.entity.thirdUpload;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "achns_doctor_record")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class AchnsDoctorRecordDO extends UuidIdentityEntity {
    private String organ_code;
    private String organ_name;
    private String id_card;
    private Date create_time;
    private Date update_time;
    private String is_del;
    @Column(name = "is_del")
    public String getIs_del() {
        return is_del;
    }
    public void setIs_del(String is_del) {
        this.is_del = is_del;
    }
    @Column(name = "update_time")
    public Date getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    @Column(name = "organ_code")
    public String getOrgan_code() {
        return organ_code;
    }
    public void setOrgan_code(String organ_code) {
        this.organ_code = organ_code;
    }
    @Column(name = "organ_name")
    public String getOrgan_name() {
        return organ_name;
    }
    public void setOrgan_name(String organ_name) {
        this.organ_name = organ_name;
    }
    @Column(name = "id_card")
    public String getId_card() {
        return id_card;
    }
    public void setId_card(String id_card) {
        this.id_card = id_card;
    }
    @Column(name = "create_time")
    public Date getCreate_time() {
        return create_time;
    }
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
}

+ 210 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpAppointmentOnlineDO.java

@ -0,0 +1,210 @@
package com.yihu.jw.entity.thirdUpload;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
@Entity
@Table(name = "up_appointment_online")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class UpAppointmentOnlineDO extends UuidIdentityEntity {
    private String origin_id;
    private String cd_org;
    private String cd_area;
    private String cd_org_sub;
    private String reg_time;
    private String fg_visit;
    private String reg_dep_code;
    private String reg_dep_name;
    private String reg_subject_code;
    private String reg_subject_name;
    private BigDecimal reg_price;
    private String pt_name;
    private String ge_code;
    private String pt_age;
    private String card_type;
    private String id_no;
    private String pt_tel;
    private String crt_date;
    private Date create_time;
    private Date update_time;
    private String is_del;
    @Column(name = "cd_org_sub")
    public String getCd_org_sub() {
        return cd_org_sub;
    }
    public void setCd_org_sub(String cd_org_sub) {
        this.cd_org_sub = cd_org_sub;
    }
    @Column(name = "is_del")
    public String getIs_del() {
        return is_del;
    }
    public void setIs_del(String is_del) {
        this.is_del = is_del;
    }
    @Column(name = "update_time")
    public Date getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    @Column(name = "create_time")
    public Date getCreate_time() {
        return create_time;
    }
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
    @Column(name = "origin_id")
    public String getOrigin_id() {
        return origin_id;
    }
    public void setOrigin_id(String origin_id) {
        this.origin_id = origin_id;
    }
    @Column(name = "cd_org")
    public String getCd_org() {
        return cd_org;
    }
    public void setCd_org(String cd_org) {
        this.cd_org = cd_org;
    }
    @Column(name = "cd_area")
    public String getCd_area() {
        return cd_area;
    }
    public void setCd_area(String cd_area) {
        this.cd_area = cd_area;
    }
    @Column(name = "reg_time")
    public String getReg_time() {
        return reg_time;
    }
    public void setReg_time(String reg_time) {
        this.reg_time = reg_time;
    }
    @Column(name = "fg_visit")
    public String getFg_visit() {
        return fg_visit;
    }
    public void setFg_visit(String fg_visit) {
        this.fg_visit = fg_visit;
    }
    @Column(name = "reg_dep_code")
    public String getReg_dep_code() {
        return reg_dep_code;
    }
    public void setReg_dep_code(String reg_dep_code) {
        this.reg_dep_code = reg_dep_code;
    }
    @Column(name = "reg_dep_name")
    public String getReg_dep_name() {
        return reg_dep_name;
    }
    public void setReg_dep_name(String reg_dep_name) {
        this.reg_dep_name = reg_dep_name;
    }
    @Column(name = "reg_subject_code")
    public String getReg_subject_code() {
        return reg_subject_code;
    }
    public void setReg_subject_code(String reg_subject_code) {
        this.reg_subject_code = reg_subject_code;
    }
    @Column(name = "reg_subject_name")
    public String getReg_subject_name() {
        return reg_subject_name;
    }
    public void setReg_subject_name(String reg_subject_name) {
        this.reg_subject_name = reg_subject_name;
    }
    @Column(name = "reg_price")
    public BigDecimal getReg_price() {
        return reg_price;
    }
    public void setReg_price(BigDecimal reg_price) {
        this.reg_price = reg_price;
    }
    @Column(name = "pt_name")
    public String getPt_name() {
        return pt_name;
    }
    public void setPt_name(String pt_name) {
        this.pt_name = pt_name;
    }
    @Column(name = "ge_code")
    public String getGe_code() {
        return ge_code;
    }
    public void setGe_code(String ge_code) {
        this.ge_code = ge_code;
    }
    @Column(name = "pt_age")
    public String getPt_age() {
        return pt_age;
    }
    public void setPt_age(String pt_age) {
        this.pt_age = pt_age;
    }
    @Column(name = "card_type")
    public String getCard_type() {
        return card_type;
    }
    public void setCard_type(String card_type) {
        this.card_type = card_type;
    }
    @Column(name = "id_no")
    public String getId_no() {
        return id_no;
    }
    public void setId_no(String id_no) {
        this.id_no = id_no;
    }
    @Column(name = "pt_tel")
    public String getPt_tel() {
        return pt_tel;
    }
    public void setPt_tel(String pt_tel) {
        this.pt_tel = pt_tel;
    }
    @Column(name = "crt_date")
    public String getCrt_date() {
        return crt_date;
    }
    public void setCrt_date(String crt_date) {
        this.crt_date = crt_date;
    }
}

+ 200 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpMedicalOnlineDO.java

@ -0,0 +1,200 @@
package com.yihu.jw.entity.thirdUpload;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "up_medical_online")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class UpMedicalOnlineDO extends UuidIdentityEntity {
    private String cd_org;
    private String cd_area;
    private String cd_org_sub;
    private String app_time;
    private String app_dep_code;
    private String app_class_code;
    private String app_class_name;
    private String id_doctor;
    private String fg_handle;
    private String handle_time;
    private String pt_name;
    private String ge_code;
    private String card_type;
    private String id_no;
    private String pt_tel;
    private String crt_date;
    private String origin_id;
    private Date create_time;
    private Date update_time;
    private String is_del;
    @Column(name = "is_del")
    public String getIs_del() {
        return is_del;
    }
    public void setIs_del(String is_del) {
        this.is_del = is_del;
    }
    @Column(name = "update_time")
    public Date getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    @Column(name = "create_time")
    public Date getCreate_time() {
        return create_time;
    }
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
    @Column(name = "cd_org")
    public String getCd_org() {
        return cd_org;
    }
    public void setCd_org(String cd_org) {
        this.cd_org = cd_org;
    }
    @Column(name = "cd_area")
    public String getCd_area() {
        return cd_area;
    }
    public void setCd_area(String cd_area) {
        this.cd_area = cd_area;
    }
    @Column(name = "cd_org_sub")
    public String getCd_org_sub() {
        return cd_org_sub;
    }
    public void setCd_org_sub(String cd_org_sub) {
        this.cd_org_sub = cd_org_sub;
    }
    @Column(name = "app_time")
    public String getApp_time() {
        return app_time;
    }
    public void setApp_time(String app_time) {
        this.app_time = app_time;
    }
    @Column(name = "app_dep_code")
    public String getApp_dep_code() {
        return app_dep_code;
    }
    public void setApp_dep_code(String app_dep_code) {
        this.app_dep_code = app_dep_code;
    }
    @Column(name = "app_class_code")
    public String getApp_class_code() {
        return app_class_code;
    }
    public void setApp_class_code(String app_class_code) {
        this.app_class_code = app_class_code;
    }
    @Column(name = "app_class_name")
    public String getApp_class_name() {
        return app_class_name;
    }
    public void setApp_class_name(String app_class_name) {
        this.app_class_name = app_class_name;
    }
    @Column(name = "id_doctor")
    public String getId_doctor() {
        return id_doctor;
    }
    public void setId_doctor(String id_doctor) {
        this.id_doctor = id_doctor;
    }
    @Column(name = "fg_handle")
    public String getFg_handle() {
        return fg_handle;
    }
    public void setFg_handle(String fg_handle) {
        this.fg_handle = fg_handle;
    }
    @Column(name = "handle_time")
    public String getHandle_time() {
        return handle_time;
    }
    public void setHandle_time(String handle_time) {
        this.handle_time = handle_time;
    }
    @Column(name = "pt_name")
    public String getPt_name() {
        return pt_name;
    }
    public void setPt_name(String pt_name) {
        this.pt_name = pt_name;
    }
    @Column(name = "ge_code")
    public String getGe_code() {
        return ge_code;
    }
    public void setGe_code(String ge_code) {
        this.ge_code = ge_code;
    }
    @Column(name = "card_type")
    public String getCard_type() {
        return card_type;
    }
    public void setCard_type(String card_type) {
        this.card_type = card_type;
    }
    @Column(name = "id_no")
    public String getId_no() {
        return id_no;
    }
    public void setId_no(String id_no) {
        this.id_no = id_no;
    }
    @Column(name = "pt_tel")
    public String getPt_tel() {
        return pt_tel;
    }
    public void setPt_tel(String pt_tel) {
        this.pt_tel = pt_tel;
    }
    @Column(name = "crt_date")
    public String getCrt_date() {
        return crt_date;
    }
    public void setCrt_date(String crt_date) {
        this.crt_date = crt_date;
    }
    @Column(name = "origin_id")
    public String getOrigin_id() {
        return origin_id;
    }
    public void setOrigin_id(String origin_id) {
        this.origin_id = origin_id;
    }
}

+ 539 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpNsOrganBaseDO.java

@ -0,0 +1,539 @@
package com.yihu.jw.entity.thirdUpload;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "upns_organ_base")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class UpNsOrganBaseDO extends UuidIdentityEntity {
    private String organ_code;
    private String organ_name;
    private String corporation;
    private String no_pra_lic;
    private String  second_organ_name;
    private String charge_person;
    private String org_levelorgan_type;
    private String economic_type;
    private String organ_type;
    private String organ_sub;
    private String hospital_district;
    private String hospital_address;
    private String hospital_phone;
    private String hospital_img;
    private String bus_lic;
    private String corp_idcord_head;
    private String corp_idcord_tail;
    private String pra_lic;
    private String net_service;
    private String net_service_ot;
    private String service_dept;
    private String txt_introduction;
    private String protocol_type;
    private String protocol_content;
    private String publish_date;
    private String protocol_name;
    private String quai_mang_dept;
    private String info_mang_dept;
    private String medi_service_dept;
    private String server_type;
    private String server_total;
    private String server_ip;
    private String mp_system_type;
    private String mp_system_total;
    private String tran_link;
    private String tran_link_band;
    private String server_system_name;
    private String server_system_ip;
    private String tech_manual;
    private String server_manual;
    private String secu_level;
    private String secu_level_cert;
    private String emr_level;
    private String emr_level_cert;
    private String zone_record_share;
    private String prov_monitor;
    private String prov_service;
    private String server_func;
    private String third_compeny_name;
    private String third_compeny_code;
    private String third_compeny_cert;
    private String third_compeny_corp;
    private String third_compeny_corp_id;
    private String third_compeny_prot;
    private String green_road;
    private Date create_time;
    private Date update_time;
    private String is_del;
    @Column(name = "update_time")
    public Date getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    @Column(name = "is_del")
    public String getIs_del() {
        return is_del;
    }
    public void setIs_del(String is_del) {
        this.is_del = is_del;
    }
    @Column(name = "organ_code")
    public String getOrgan_code() {
        return organ_code;
    }
    public void setOrgan_code(String organ_code) {
        this.organ_code = organ_code;
    }
    @Column(name = "organ_name")
    public String getOrgan_name() {
        return organ_name;
    }
    public void setOrgan_name(String organ_name) {
        this.organ_name = organ_name;
    }
    @Column(name = "corporation")
    public String getCorporation() {
        return corporation;
    }
    public void setCorporation(String corporation) {
        this.corporation = corporation;
    }
    @Column(name = "no_pra_lic")
    public String getNo_pra_lic() {
        return no_pra_lic;
    }
    public void setNo_pra_lic(String no_pra_lic) {
        this.no_pra_lic = no_pra_lic;
    }
    @Column(name = " second_organ_name")
    public String getSecond_organ_name() {
        return second_organ_name;
    }
    public void setSecond_organ_name(String second_organ_name) {
        this.second_organ_name = second_organ_name;
    }
    @Column(name = "charge_person")
    public String getCharge_person() {
        return charge_person;
    }
    public void setCharge_person(String charge_person) {
        this.charge_person = charge_person;
    }
    @Column(name = "org_levelorgan_type")
    public String getOrg_levelorgan_type() {
        return org_levelorgan_type;
    }
    public void setOrg_levelorgan_type(String org_levelorgan_type) {
        this.org_levelorgan_type = org_levelorgan_type;
    }
    @Column(name = "economic_type")
    public String getEconomic_type() {
        return economic_type;
    }
    public void setEconomic_type(String economic_type) {
        this.economic_type = economic_type;
    }
    @Column(name = "organ_type")
    public String getOrgan_type() {
        return organ_type;
    }
    public void setOrgan_type(String organ_type) {
        this.organ_type = organ_type;
    }
    @Column(name = "organ_sub")
    public String getOrgan_sub() {
        return organ_sub;
    }
    public void setOrgan_sub(String organ_sub) {
        this.organ_sub = organ_sub;
    }
    @Column(name = "hospital_district")
    public String getHospital_district() {
        return hospital_district;
    }
    public void setHospital_district(String hospital_district) {
        this.hospital_district = hospital_district;
    }
    @Column(name = "hospital_address")
    public String getHospital_address() {
        return hospital_address;
    }
    public void setHospital_address(String hospital_address) {
        this.hospital_address = hospital_address;
    }
    @Column(name = "hospital_phone")
    public String getHospital_phone() {
        return hospital_phone;
    }
    public void setHospital_phone(String hospital_phone) {
        this.hospital_phone = hospital_phone;
    }
    @Column(name = "hospital_img")
    public String getHospital_img() {
        return hospital_img;
    }
    public void setHospital_img(String hospital_img) {
        this.hospital_img = hospital_img;
    }
    @Column(name = "bus_lic")
    public String getBus_lic() {
        return bus_lic;
    }
    public void setBus_lic(String bus_lic) {
        this.bus_lic = bus_lic;
    }
    @Column(name = "corp_idcord_head")
    public String getCorp_idcord_head() {
        return corp_idcord_head;
    }
    public void setCorp_idcord_head(String corp_idcord_head) {
        this.corp_idcord_head = corp_idcord_head;
    }
    @Column(name = "corp_idcord_tail")
    public String getCorp_idcord_tail() {
        return corp_idcord_tail;
    }
    public void setCorp_idcord_tail(String corp_idcord_tail) {
        this.corp_idcord_tail = corp_idcord_tail;
    }
    @Column(name = "pra_lic")
    public String getPra_lic() {
        return pra_lic;
    }
    public void setPra_lic(String pra_lic) {
        this.pra_lic = pra_lic;
    }
    @Column(name = "net_service")
    public String getNet_service() {
        return net_service;
    }
    public void setNet_service(String net_service) {
        this.net_service = net_service;
    }
    @Column(name = "net_service_ot")
    public String getNet_service_ot() {
        return net_service_ot;
    }
    public void setNet_service_ot(String net_service_ot) {
        this.net_service_ot = net_service_ot;
    }
    @Column(name = "service_dept")
    public String getService_dept() {
        return service_dept;
    }
    public void setService_dept(String service_dept) {
        this.service_dept = service_dept;
    }
    @Column(name = "txt_introduction")
    public String getTxt_introduction() {
        return txt_introduction;
    }
    public void setTxt_introduction(String txt_introduction) {
        this.txt_introduction = txt_introduction;
    }
    @Column(name = "protocol_type")
    public String getProtocol_type() {
        return protocol_type;
    }
    public void setProtocol_type(String protocol_type) {
        this.protocol_type = protocol_type;
    }
    @Column(name = "protocol_content")
    public String getProtocol_content() {
        return protocol_content;
    }
    public void setProtocol_content(String protocol_content) {
        this.protocol_content = protocol_content;
    }
    @Column(name = "publish_date")
    public String getPublish_date() {
        return publish_date;
    }
    public void setPublish_date(String publish_date) {
        this.publish_date = publish_date;
    }
    @Column(name = "protocol_name")
    public String getProtocol_name() {
        return protocol_name;
    }
    public void setProtocol_name(String protocol_name) {
        this.protocol_name = protocol_name;
    }
    @Column(name = "quai_mang_dept")
    public String getQuai_mang_dept() {
        return quai_mang_dept;
    }
    public void setQuai_mang_dept(String quai_mang_dept) {
        this.quai_mang_dept = quai_mang_dept;
    }
    @Column(name = "info_mang_dept")
    public String getInfo_mang_dept() {
        return info_mang_dept;
    }
    public void setInfo_mang_dept(String info_mang_dept) {
        this.info_mang_dept = info_mang_dept;
    }
    @Column(name = "medi_service_dept")
    public String getMedi_service_dept() {
        return medi_service_dept;
    }
    public void setMedi_service_dept(String medi_service_dept) {
        this.medi_service_dept = medi_service_dept;
    }
    @Column(name = "server_type")
    public String getServer_type() {
        return server_type;
    }
    public void setServer_type(String server_type) {
        this.server_type = server_type;
    }
    @Column(name = "server_total")
    public String getServer_total() {
        return server_total;
    }
    public void setServer_total(String server_total) {
        this.server_total = server_total;
    }
    @Column(name = "server_ip")
    public String getServer_ip() {
        return server_ip;
    }
    public void setServer_ip(String server_ip) {
        this.server_ip = server_ip;
    }
    @Column(name = "mp_system_type")
    public String getMp_system_type() {
        return mp_system_type;
    }
    public void setMp_system_type(String mp_system_type) {
        this.mp_system_type = mp_system_type;
    }
    @Column(name = "mp_system_total")
    public String getMp_system_total() {
        return mp_system_total;
    }
    public void setMp_system_total(String mp_system_total) {
        this.mp_system_total = mp_system_total;
    }
    @Column(name = "tran_link")
    public String getTran_link() {
        return tran_link;
    }
    public void setTran_link(String tran_link) {
        this.tran_link = tran_link;
    }
    @Column(name = "tran_link_band")
    public String getTran_link_band() {
        return tran_link_band;
    }
    public void setTran_link_band(String tran_link_band) {
        this.tran_link_band = tran_link_band;
    }
    @Column(name = "server_system_name")
    public String getServer_system_name() {
        return server_system_name;
    }
    public void setServer_system_name(String server_system_name) {
        this.server_system_name = server_system_name;
    }
    @Column(name = "server_system_ip")
    public String getServer_system_ip() {
        return server_system_ip;
    }
    public void setServer_system_ip(String server_system_ip) {
        this.server_system_ip = server_system_ip;
    }
    @Column(name = "tech_manual")
    public String getTech_manual() {
        return tech_manual;
    }
    public void setTech_manual(String tech_manual) {
        this.tech_manual = tech_manual;
    }
    @Column(name = "server_manual")
    public String getServer_manual() {
        return server_manual;
    }
    public void setServer_manual(String server_manual) {
        this.server_manual = server_manual;
    }
    @Column(name = "secu_level")
    public String getSecu_level() {
        return secu_level;
    }
    public void setSecu_level(String secu_level) {
        this.secu_level = secu_level;
    }
    @Column(name = "secu_level_cert")
    public String getSecu_level_cert() {
        return secu_level_cert;
    }
    public void setSecu_level_cert(String secu_level_cert) {
        this.secu_level_cert = secu_level_cert;
    }
    @Column(name = "emr_level")
    public String getEmr_level() {
        return emr_level;
    }
    public void setEmr_level(String emr_level) {
        this.emr_level = emr_level;
    }
    @Column(name = "emr_level_cert")
    public String getEmr_level_cert() {
        return emr_level_cert;
    }
    public void setEmr_level_cert(String emr_level_cert) {
        this.emr_level_cert = emr_level_cert;
    }
    @Column(name = "zone_record_share")
    public String getZone_record_share() {
        return zone_record_share;
    }
    public void setZone_record_share(String zone_record_share) {
        this.zone_record_share = zone_record_share;
    }
    @Column(name = "prov_monitor")
    public String getProv_monitor() {
        return prov_monitor;
    }
    public void setProv_monitor(String prov_monitor) {
        this.prov_monitor = prov_monitor;
    }
    @Column(name = "prov_service")
    public String getProv_service() {
        return prov_service;
    }
    public void setProv_service(String prov_service) {
        this.prov_service = prov_service;
    }
    @Column(name = "server_func")
    public String getServer_func() {
        return server_func;
    }
    public void setServer_func(String server_func) {
        this.server_func = server_func;
    }
    @Column(name = "third_compeny_name")
    public String getThird_compeny_name() {
        return third_compeny_name;
    }
    public void setThird_compeny_name(String third_compeny_name) {
        this.third_compeny_name = third_compeny_name;
    }
    @Column(name = "third_compeny_code")
    public String getThird_compeny_code() {
        return third_compeny_code;
    }
    public void setThird_compeny_code(String third_compeny_code) {
        this.third_compeny_code = third_compeny_code;
    }
    @Column(name = "third_compeny_cert")
    public String getThird_compeny_cert() {
        return third_compeny_cert;
    }
    public void setThird_compeny_cert(String third_compeny_cert) {
        this.third_compeny_cert = third_compeny_cert;
    }
    @Column(name = "third_compeny_corp")
    public String getThird_compeny_corp() {
        return third_compeny_corp;
    }
    public void setThird_compeny_corp(String third_compeny_corp) {
        this.third_compeny_corp = third_compeny_corp;
    }
    @Column(name = "third_compeny_corp_id")
    public String getThird_compeny_corp_id() {
        return third_compeny_corp_id;
    }
    public void setThird_compeny_corp_id(String third_compeny_corp_id) {
        this.third_compeny_corp_id = third_compeny_corp_id;
    }
    @Column(name = "third_compeny_prot")
    public String getThird_compeny_prot() {
        return third_compeny_prot;
    }
    public void setThird_compeny_prot(String third_compeny_prot) {
        this.third_compeny_prot = third_compeny_prot;
    }
    @Column(name = "green_road")
    public String getGreen_road() {
        return green_road;
    }
    public void setGreen_road(String green_road) {
        this.green_road = green_road;
    }
    @Column(name = "create_time")
    public Date getCreate_time() {
        return create_time;
    }
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
}

+ 268 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpnsDoctorRecordDO.java

@ -0,0 +1,268 @@
package com.yihu.jw.entity.thirdUpload;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "upns_doctor_record")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class UpnsDoctorRecordDO extends UuidIdentityEntity {
    private String organ_code;
    private String organ_name;
    private String doc_name;
    private String docimg;
    private String id_card;
    private String sex;
    private String birthday;
    private String subject;
    private String subject_name;
    private String belong_dept;
    private String belong_dept_name;
    private String doo_tel;
    private String title_rec_date;
    private String prac_type;
    private String title_code;
    private String first_compeny_code;
    private String first_compeny_name;
    private String secd_compeny_code;
    private String secd_compeny_name;
    private String net_service;
    private String cert_no;
    private String prac_no;
    private String doc_cert;
    private String cert_doc_prac;
    private String txt_introduction;
    private Date create_time;
    private Date update_time;
    private String is_del;
    @Column(name = "is_del")
    public String getIs_del() {
        return is_del;
    }
    public void setIs_del(String is_del) {
        this.is_del = is_del;
    }
    @Column(name = "update_time")
    public Date getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    @Column(name = "create_time")
    public Date getCreate_time() {
        return create_time;
    }
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
    @Column(name = "organ_code")
    public String getOrgan_code() {
        return organ_code;
    }
    public void setOrgan_code(String organ_code) {
        this.organ_code = organ_code;
    }
    @Column(name = "organ_name")
    public String getOrgan_name() {
        return organ_name;
    }
    public void setOrgan_name(String organ_name) {
        this.organ_name = organ_name;
    }
    @Column(name = "doc_name")
    public String getDoc_name() {
        return doc_name;
    }
    public void setDoc_name(String doc_name) {
        this.doc_name = doc_name;
    }
    @Column(name = "docimg")
    public String getDocimg() {
        return docimg;
    }
    public void setDocimg(String docimg) {
        this.docimg = docimg;
    }
    @Column(name = "id_card")
    public String getId_card() {
        return id_card;
    }
    public void setId_card(String id_card) {
        this.id_card = id_card;
    }
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    @Column(name = "birthday")
    public String getBirthday() {
        return birthday;
    }
    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
    @Column(name = "subject")
    public String getSubject() {
        return subject;
    }
    public void setSubject(String subject) {
        this.subject = subject;
    }
    @Column(name = "subject_name")
    public String getSubject_name() {
        return subject_name;
    }
    public void setSubject_name(String subject_name) {
        this.subject_name = subject_name;
    }
    @Column(name = "belong_dept")
    public String getBelong_dept() {
        return belong_dept;
    }
    public void setBelong_dept(String belong_dept) {
        this.belong_dept = belong_dept;
    }
    @Column(name = "belong_dept_name")
    public String getBelong_dept_name() {
        return belong_dept_name;
    }
    public void setBelong_dept_name(String belong_dept_name) {
        this.belong_dept_name = belong_dept_name;
    }
    @Column(name = "doo_tel")
    public String getDoo_tel() {
        return doo_tel;
    }
    public void setDoo_tel(String doo_tel) {
        this.doo_tel = doo_tel;
    }
    @Column(name = "title_rec_date")
    public String getTitle_rec_date() {
        return title_rec_date;
    }
    public void setTitle_rec_date(String title_rec_date) {
        this.title_rec_date = title_rec_date;
    }
    @Column(name = "prac_type")
    public String getPrac_type() {
        return prac_type;
    }
    public void setPrac_type(String prac_type) {
        this.prac_type = prac_type;
    }
    @Column(name = "title_code")
    public String getTitle_code() {
        return title_code;
    }
    public void setTitle_code(String title_code) {
        this.title_code = title_code;
    }
    @Column(name = "first_compeny_code")
    public String getFirst_compeny_code() {
        return first_compeny_code;
    }
    public void setFirst_compeny_code(String first_compeny_code) {
        this.first_compeny_code = first_compeny_code;
    }
    @Column(name = "first_compeny_name")
    public String getFirst_compeny_name() {
        return first_compeny_name;
    }
    public void setFirst_compeny_name(String first_compeny_name) {
        this.first_compeny_name = first_compeny_name;
    }
    @Column(name = "secd_compeny_code")
    public String getSecd_compeny_code() {
        return secd_compeny_code;
    }
    public void setSecd_compeny_code(String secd_compeny_code) {
        this.secd_compeny_code = secd_compeny_code;
    }
    @Column(name = "secd_compeny_name")
    public String getSecd_compeny_name() {
        return secd_compeny_name;
    }
    public void setSecd_compeny_name(String secd_compeny_name) {
        this.secd_compeny_name = secd_compeny_name;
    }
    @Column(name = "net_service")
    public String getNet_service() {
        return net_service;
    }
    public void setNet_service(String net_service) {
        this.net_service = net_service;
    }
    @Column(name = "cert_no")
    public String getCert_no() {
        return cert_no;
    }
    public void setCert_no(String cert_no) {
        this.cert_no = cert_no;
    }
    @Column(name = "prac_no")
    public String getPrac_no() {
        return prac_no;
    }
    public void setPrac_no(String prac_no) {
        this.prac_no = prac_no;
    }
    @Column(name = "doc_cert")
    public String getDoc_cert() {
        return doc_cert;
    }
    public void setDoc_cert(String doc_cert) {
        this.doc_cert = doc_cert;
    }
    @Column(name = "cert_doc_prac")
    public String getCert_doc_prac() {
        return cert_doc_prac;
    }
    public void setCert_doc_prac(String cert_doc_prac) {
        this.cert_doc_prac = cert_doc_prac;
    }
    @Column(name = "txt_introduction")
    public String getTxt_introduction() {
        return txt_introduction;
    }
    public void setTxt_introduction(String txt_introduction) {
        this.txt_introduction = txt_introduction;
    }
}

+ 144 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/thirdUpload/UpnsDoctorScoreDO.java

@ -0,0 +1,144 @@
package com.yihu.jw.entity.thirdUpload;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "upns_doctor_score")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class UpnsDoctorScoreDO extends UuidIdentityEntity {
    private String id_doctor;
    private String organ_code;
    private String organ_name;
    private String net_service;
    private String net_service_name;
    private String val_score;
    private String grader;
    private String dt_grade;
    private String crt_date;
    private String origin_id;
    private String grade_content;
    private Date create_time;
    private Date update_time;
    private String is_del;
    @Column(name = "grade_content")
    public String getGrade_content() {
        return grade_content;
    }
    public void setGrade_content(String grade_content) {
        this.grade_content = grade_content;
    }
    @Column(name = "update_time")
    public Date getUpdate_time() {
        return update_time;
    }
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    @Column(name = "is_del")
    public String getIs_del() {
        return is_del;
    }
    public void setIs_del(String is_del) {
        this.is_del = is_del;
    }
    @Column(name = "create_time")
    public Date getCreate_time() {
        return create_time;
    }
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
    @Column(name = "id_doctor")
    public String getId_doctor() {
        return id_doctor;
    }
    public void setId_doctor(String id_doctor) {
        this.id_doctor = id_doctor;
    }
    @Column(name = "organ_code")
    public String getOrgan_code() {
        return organ_code;
    }
    public void setOrgan_code(String organ_code) {
        this.organ_code = organ_code;
    }
    @Column(name = "organ_name")
    public String getOrgan_name() {
        return organ_name;
    }
    public void setOrgan_name(String organ_name) {
        this.organ_name = organ_name;
    }
    @Column(name = "net_service")
    public String getNet_service() {
        return net_service;
    }
    public void setNet_service(String net_service) {
        this.net_service = net_service;
    }
    @Column(name = "net_service_name")
    public String getNet_service_name() {
        return net_service_name;
    }
    public void setNet_service_name(String net_service_name) {
        this.net_service_name = net_service_name;
    }
    @Column(name = "val_score")
    public String getVal_score() {
        return val_score;
    }
    public void setVal_score(String val_score) {
        this.val_score = val_score;
    }
    @Column(name = "grader")
    public String getGrader() {
        return grader;
    }
    public void setGrader(String grader) {
        this.grader = grader;
    }
    @Column(name = "dt_grade")
    public String getDt_grade() {
        return dt_grade;
    }
    public void setDt_grade(String dt_grade) {
        this.dt_grade = dt_grade;
    }
    @Column(name = "crt_date")
    public String getCrt_date() {
        return crt_date;
    }
    public void setCrt_date(String crt_date) {
        this.crt_date = crt_date;
    }
    @Column(name = "origin_id")
    public String getOrigin_id() {
        return origin_id;
    }
    public void setOrigin_id(String origin_id) {
        this.origin_id = origin_id;
    }
}

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

@ -857,4 +857,18 @@ public class BaseRequestMapping {
        public static final String findDrugstoreById  = "/findDrugstoreById";
        public static final String findDrugstoreById  = "/findDrugstoreById";
    }
    }
    /*
    * 查新查重服务接口
    */
    public static class ClientSearch extends Basic {
        public static final String PREFIX = "/open/noLogin/clientSearch";
        public static final String DELETEBYID = "/deleteById";
        public static final String FINDBYSEARCHDATA = "/findbysearchdata";
        public static final String FINDALL = "/findAll";
        public static final String CHANGESTATUS = "/changestatus";
        public static final String REPLY = "/reply";
        public static final String FILEDOWNLOAD = "/fileDownLoad";
        public static final String FILEUPLOAD = "/fileUpLoad";
    }
}
}

+ 65 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/regulatory/BaseRegulatoryRequestMapping.java

@ -0,0 +1,65 @@
package com.yihu.jw.rm.regulatory;
/**
 * Created by wsy on 2021/9/1.
 */
public class BaseRegulatoryRequestMapping {
    /*
     *   监管平台请求地址
     */
    public static class UpWebTherapySupserviceInfo{
        /*请求前缀*/
        public static final String PREFIX = "/regulatory";
        //保存医师唯一标识
        public static final String SAVEACHNS = "/saveAchns";
        //删除医师唯一标识
        public static final String DELETEACHNS = "/deleteAchns";
        //查询医师唯一标识
        public static final String FINDACHNSBYCREATETIME = "/findAchnsByCreateTime";
        //待插入
        //保存网络咨询服务信息
        public static final String SAVENSOLINEASK = "/saveNsOlineAsk";
        //删除网络咨询服务信息
        public static final String DELETESOLINEASK = "/deleteNsOlineAsk";
        //查询网络咨询服务信息
        public static final String FINDNSOLINEASK = "/findNsOlineAsk";
        //保存网络诊疗服务信息
        public static final String SAVENSONLINEMED = "/saveNsonlinemed";
        //删除网络诊疗服务信息
        public static final String DELETENSONLINEMED = "/deleteNsonlinemed";
        //查询网络诊疗服务信息
        public static final String FINDSONLINEMED = "/findNsonlinemed";
        //保存电子处方单信息
        public static final String SAVEPRESCRIPTION = "/savePrescription";
        //删除电子处方单信息
        public static final String DELETEPRESCRIPTION = "/deletePrescription";
        //查询电子处方单信息
        public static final String FINDPRESCRIPTION = "/findPrescription";
        //保存电子处方药品明细信息
        public static final String SAVEPRESCRIPTIONDRUG = "savePrescriptionDrug";
        //删除电子处方单信息
        public static final String DELETEPRESCRIPTIONDRUG = "/deletePrescriptionDrug";
        //查询电子处方单信息
        public static final String FINDPRESCRIPTIONDRUG = "/findPrescriptionDrug";
    }
}

+ 19 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -9,7 +9,6 @@ import com.yihu.jw.restmodel.exception.dao.BaseExceptionDictDao;
import com.yihu.jw.restmodel.web.*;
import com.yihu.jw.restmodel.web.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.request.ServletRequestAttributes;
@ -19,7 +18,6 @@ import javax.servlet.http.HttpServletResponse;
import java.beans.PropertyDescriptor;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.Method;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.*;
@ -483,6 +481,25 @@ public abstract class EnvelopRestEndpoint extends Exception {
        }
        }
    }
    }
    /**
     * 获取代理人的code
     * 老人亲属
     * @return
     */
    public String getAgentUID() {
        try {
            HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
            String userAgent = request.getHeader("userAgent");
            if (StringUtils.isEmpty(userAgent)) {
                userAgent = request.getHeader("User-Agent");
            }
            JSONObject json = JSON.parseObject(userAgent);
            return json.getString("agent");
        } catch (Exception e) {
            return null;
        }
    }
    public String getUNAME(){
    public String getUNAME(){
        try {
        try {
            HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
            HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();

+ 23 - 1
common/common-util/src/main/java/com/yihu/jw/util/common/GpsUtil.java

@ -104,15 +104,37 @@ public class GpsUtil {
     * @param bd_lon
     * @param bd_lon
     * @return
     * @return
     */
     */
    public  JSONObject bd09_To_Gps84(double bd_lat, double bd_lon) {
    public JSONObject bd09_To_Gps84(double bd_lat, double bd_lon) {
        JSONObject gcj02 = bd09_To_Gcj02(bd_lat, bd_lon);
        JSONObject gcj02 = bd09_To_Gcj02(bd_lat, bd_lon);
        JSONObject map84 = gcj_To_Gps84(gcj02.getDouble("lat"),
        JSONObject map84 = gcj_To_Gps84(gcj02.getDouble("lat"),
                gcj02.getDouble("lon"));
                gcj02.getDouble("lon"));
        return map84;
        return map84;
    }
    public JSONObject Gps84_To_bd09(double bd_lat, double bd_lon) {
        JSONObject gcj02 = gps84_To_Gcj02(bd_lat, bd_lon);
        JSONObject map84 = gcj02_To_Bd09(gcj02.getDouble("lat"),
                gcj02.getDouble("lon"));
        return map84;
    }
    }
//    /**
//     * (BD-09)-->84
//     * @param bd_lat
//     * @param bd_lon
//     * @return
//     */
//    public  JSONObject bd09_To_Gps84(double bd_lat, double bd_lon) {
//
//        JSONObject gcj02 = bd09_To_Gcj02(bd_lat, bd_lon);
//        JSONObject map84 = gcj_To_Gps84(gcj02.getDouble("lat"),
//                gcj02.getDouble("lon"));
//        return map84;
//
//    }
    /**
    /**
     * is or not outOfChina
     * is or not outOfChina
     * @param lat
     * @param lat

+ 44 - 1
common/common-util/src/main/java/com/yihu/jw/util/common/LatitudeUtils.java

@ -1,13 +1,20 @@
package com.yihu.jw.util.common;
package com.yihu.jw.util.common;
import com.alibaba.fastjson.JSONObject;
import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
import org.apache.http.client.HttpClient;
import org.omg.CORBA.WStringSeqHelper;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import java.io.BufferedReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URL;
import java.net.URLEncoder;
import java.net.URLEncoder;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Map;
import java.util.UUID;
import java.util.UUID;
@ -39,7 +46,7 @@ public class LatitudeUtils {
        try {
        try {
            //将地址转换成utf-8的16进制
            //将地址转换成utf-8的16进制
            address = URLEncoder.encode(address, "UTF-8");
            address = URLEncoder.encode(address, "UTF-8");
            URL tirc = new URL("http://api.map.baidu.com/geocoder/v2/?address="+ address +"&output=json&key="+ UUID.randomUUID().toString().replace("-","")+"&ak="+ak);
            URL tirc = new URL("https://api.map.baidu.com/geocoder/v2/?address="+ address +"&output=json&key="+ UUID.randomUUID().toString().replace("-","")+"&ak="+ak);
            in = new BufferedReader(new InputStreamReader(tirc.openStream(),"UTF-8"));
            in = new BufferedReader(new InputStreamReader(tirc.openStream(),"UTF-8"));
@ -108,6 +115,42 @@ public class LatitudeUtils {
        return distanceStr;
        return distanceStr;
    }
    }
    public static String getLocationAddress(String lat, String lng)
    {
        BufferedReader in = null;
        try {
            String location = MessageFormat.format("{0},{1}", lat, lng);
            URL tirc = null;
            tirc = new URL("https://api.map.baidu.com/geocoder/v2/?location="+location+"&output=json&ak="+ak);
            in = new BufferedReader(new InputStreamReader(tirc.openStream(),"UTF-8"));
            String res;
            StringBuilder sb = new StringBuilder("");
            while((res = in.readLine())!=null){
                sb.append(res.trim());
            }
            String str = sb.toString();
            JSONObject obj = JSONObject.parseObject(str);
            if (0==obj.getInteger("status")){
                JSONObject tmp = obj.getJSONObject("result");
                if (null!=tmp){
                    return tmp.getString("formatted_address");
                }
            }
        }catch (Exception e) {
            e.printStackTrace();
        }finally{
            try {
                if(in!=null){
                    in.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
    public static void main(String args[]){
    public static void main(String args[]){
        try {
        try {
            Map<String, String> json = LatitudeUtils.getGeocoderLatitude("厦门海沧区新阳海新阳光公寓15梯304");
            Map<String, String> json = LatitudeUtils.getGeocoderLatitude("厦门海沧区新阳海新阳光公寓15梯304");

+ 46 - 0
common/common-util/src/main/java/com/yihu/jw/util/http/HttpClientUtil.java

@ -34,6 +34,7 @@ import org.springframework.web.client.RestTemplate;
import java.io.*;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import java.util.*;
@Component
@Component
@ -617,6 +618,51 @@ public class HttpClientUtil {
        return response;
        return response;
    }
    }
    /**
     * 向指定URL发送GET方法的请求
     *
     * @param url
     *            发送请求的URL
     * @return URL 所代表远程资源的响应结果
     */
    public String sendGet(String url,Map<String,String> headerMap) {
        String result = "";
        BufferedReader in = null;
        try {
            URL realUrl = new URL(url);
            // 打开和URL之间的连接
            URLConnection connection = realUrl.openConnection();
            // 设置通用的请求属性
            connection.setRequestProperty("accept", "*/*");
            connection.setRequestProperty("connection", "Keep-Alive");
            connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
            if(headerMap!=null){
                for (String key:headerMap.keySet()){
                    connection.setRequestProperty(key, headerMap.get(key));
                }
            }
            // 建立实际的连接
            connection.connect();
            // 定义 BufferedReader输入流来读取URL的响应
            in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String line;
            while ((line = in.readLine()) != null) {
                result += line;
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (in != null) {
                    in.close();
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
        return result;
    }
    public static void main(String[] args)  {
    public static void main(String[] args)  {
    }
    }
}
}

+ 2 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -105,7 +105,8 @@ public class BasicZuulFilter extends ZuulFilter {
            url.contains("/open/noLogin/sfroutepushservice")||
            url.contains("/open/noLogin/sfroutepushservice")||
            url.contains("/open/noLogin/ylzSettleRecord")||
            url.contains("/open/noLogin/ylzSettleRecord")||
                url.contains("/weixin")||
                url.contains("/weixin")||
                url.contains("/excelControl"))){
                url.contains("/excelControl")||
                url.contains("/open/gc"))){
            logger.info("入参"+ctx.getRequestQueryParams());
            logger.info("入参"+ctx.getRequestQueryParams());
            try {
            try {
                decrypt(ctx,request);
                decrypt(ctx,request);

+ 7 - 6
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java

@ -54,10 +54,10 @@ public class PostFilter extends ZuulFilter {
    @Override
    @Override
    public Object run() {
    public Object run() {
        RequestContext ctx = RequestContext.getCurrentContext();
        RequestContext ctx = RequestContext.getCurrentContext();
        BaseExceptionServerDictDao baseExceptionServiceDictDao = BeanUtil.getBean(BaseExceptionServerDictDao.class);
       /* BaseExceptionServerDictDao baseExceptionServiceDictDao = BeanUtil.getBean(BaseExceptionServerDictDao.class);
        BaseExceptionLogDao baseExceptionLogDao = BeanUtil.getBean(BaseExceptionLogDao.class);
        BaseExceptionLogDao baseExceptionLogDao = BeanUtil.getBean(BaseExceptionLogDao.class);
        BaseExceptionService baseExceptionService = BeanUtil.getBean(BaseExceptionService.class);
        BaseExceptionService baseExceptionService = BeanUtil.getBean(BaseExceptionService.class);
        logger.info("进入post过滤器");
       */ logger.info("进入post过滤器");
        HttpServletRequest request = ctx.getRequest();
        HttpServletRequest request = ctx.getRequest();
        String url = request.getRequestURI();
        String url = request.getRequestURI();
        if (url.contains("/excelControl")){
        if (url.contains("/excelControl")){
@ -74,7 +74,7 @@ public class PostFilter extends ZuulFilter {
            bytes = StreamUtils.copyToByteArray(stream);
            bytes = StreamUtils.copyToByteArray(stream);
        }
        }
        String body = new String(bytes,"UTF8");
        String body = new String(bytes,"UTF8");
        String serviceId="";
        /*String serviceId="";
        String responseCode="";
        String responseCode="";
        String exceptionType="";
        String exceptionType="";
        List<BaseExceptionServerDictDO> baseExceptionServerDictDOS =baseExceptionServiceDictDao.findServiceAll();
        List<BaseExceptionServerDictDO> baseExceptionServerDictDOS =baseExceptionServiceDictDao.findServiceAll();
@ -120,8 +120,8 @@ public class PostFilter extends ZuulFilter {
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            e.printStackTrace();
            e.printStackTrace();
        }
        }*/
        logger.info("body",body);
        JSONObject object = new JSONObject();
        JSONObject object = new JSONObject();
        object.put("status","200");
        object.put("status","200");
        object.put("data", AesEncryptUtils.encrypt(body));
        object.put("data", AesEncryptUtils.encrypt(body));
@ -131,7 +131,8 @@ public class PostFilter extends ZuulFilter {
            url.contains("/open/noLogin/getSFExpressInfoNew")||
            url.contains("/open/noLogin/getSFExpressInfoNew")||
            url.contains("/open/noLogin/sfroutepushservice")||
            url.contains("/open/noLogin/sfroutepushservice")||
            url.contains("/open/noLogin/ylzSettleRecord")||
            url.contains("/open/noLogin/ylzSettleRecord")||
                url.contains("/weixin")||url.contains("/oauth/getSsoPublicKey"))){
                url.contains("/weixin")||url.contains("/oauth/getSsoPublicKey")||
                url.contains("/open/gc"))){
            RequestContext.getCurrentContext().setResponseBody(object.toJSONString());
            RequestContext.getCurrentContext().setResponseBody(object.toJSONString());
        }else {
        }else {
            RequestContext.getCurrentContext().setResponseBody(body);
            RequestContext.getCurrentContext().setResponseBody(body);

+ 2 - 0
gateway/ag-basic/src/main/resources/application.yml

@ -2,6 +2,8 @@ server:
  port: ${server.ag-basic-port}
  port: ${server.ag-basic-port}
  tomcat:
  tomcat:
    basedir: /data/apps/temp
    basedir: /data/apps/temp
    max-http-form-post-size: -1
  max-http-header-size: 102400
spring:
spring:
  datasource:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    driver-class-name: com.mysql.jdbc.Driver

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -339,7 +339,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }
        }
        WlyyUserSimple wlyyUserSimple = userDetailsService.authSuccess(parameters.get("username"));
        WlyyUserSimple wlyyUserSimple = userDetailsService.authSuccess(parameters.get("username"));
        if ("pad".equals(parameters.get("clientType"))&&!("1".equals(wlyyUserSimple.getArchiveType())) ){//医养平板端登录限制
        if ("pad".equals(parameters.get("clientType"))&&("2".equals(wlyyUserSimple.getArchiveType())) ){//医养平板端登录限制
            throw new InvalidGrantException("不允许登录该平台");
            throw new InvalidGrantException("不允许登录该平台");
        }
        }
        wlyyUserSimple.setAccessToken(token.getValue());
        wlyyUserSimple.setAccessToken(token.getValue());

+ 37 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/aop/ClientSearchRequestAspect.java

@ -0,0 +1,37 @@
package com.yihu.jw.base.aop;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.lang.reflect.Method;
/**
 * Created by wsy on 2021/9/7.
 */
@Order(5)
@Aspect
@Component
public class ClientSearchRequestAspect {
    private static final String REQ_LIMIT = "req_limit";
    public static int RESPONSE_STATUS_CODE = 1000;
    @Around("execution(* com.yihu.jw.base.endpoint.searchClient.ClientSearchEndpoint.saveBaseSearchNoveltyRepeat(..))"
            +"&& @annotation(com.yihu.jw.base.aop.ClientSearchRequestLimit)")
    public Object method(ProceedingJoinPoint pjp) throws Throwable{
        MethodSignature signature = (MethodSignature) pjp.getSignature();
        Method method = signature.getMethod();//获取被拦截的方法
        ClientSearchRequestLimit limit = method.getAnnotation(ClientSearchRequestLimit.class);
        if ( limit == null ){
            return pjp.proceed();
        }
        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        return requestAttributes;
    }
}

+ 18 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/aop/ClientSearchRequestLimit.java

@ -0,0 +1,18 @@
package com.yihu.jw.base.aop;
import java.lang.annotation.*;
/**
 * Created by wsy on 2021/9/7.
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ClientSearchRequestLimit {
    int time() default 60;
    int count() default 2;
    int waits() default 300;
}

+ 4 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/dao/article/KnowledgeArticleDictDao.java

@ -31,10 +31,10 @@ public interface KnowledgeArticleDictDao extends PagingAndSortingRepository<Know
	@Query("select count(*) from KnowledgeArticleDictDO a where a.del=1 and a.categoryFirst = ?1 and a.releaseStatus=1 ")
	@Query("select count(*) from KnowledgeArticleDictDO a where a.del=1 and a.categoryFirst = ?1 and a.releaseStatus=1 ")
	Integer getCountByCategoryFirst(String category);
	Integer getCountByCategoryFirst(String category);
	@Query(" select count(*) from KnowledgeArticleDictDO a where a.del=1 and  a.categorySecond=?1 and a.releaseStatus=1")
	Integer getCountByCategorySecond(String category);
	@Query("select a from KnowledgeArticleDictDO a where a.del=1 and  a.categorySecond=?1 and a.releaseStatus=1 order by  a.releaseTime desc ")
	List<KnowledgeArticleDictDO> findByCategorySecondAndPage(String category,Pageable pageRequest);
	@Query(" select count(*) from KnowledgeArticleDictDO a where a.del=1 and  a.categorySecond IN (?1) and a.releaseStatus=1")
	Integer getCountByCategorySecond(List<String> category);
	@Query("select a from KnowledgeArticleDictDO a where a.del=1 and  a.categorySecond IN ( ?1 ) and a.releaseStatus=1 order by  a.releaseTime desc ")
	List<KnowledgeArticleDictDO> findByCategorySecondAndPage(List<String> category,Pageable pageRequest);
}
}

+ 17 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/doctor/DoctorServicePermissionsDao.java

@ -0,0 +1,17 @@
package com.yihu.jw.base.dao.doctor;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
public interface DoctorServicePermissionsDao extends PagingAndSortingRepository<DoctorServicePermissionsDO, String>, JpaSpecificationExecutor<DoctorServicePermissionsDO> {
}

+ 17 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/searchClient/BaseSearchNoveltyRepeatDao.java

@ -0,0 +1,17 @@
package com.yihu.jw.base.dao.searchClient;
import com.yihu.jw.entity.base.searchClient.BaseSearchNoveltyRepeatDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by wsy on 2021/9/4.
 */
public interface BaseSearchNoveltyRepeatDao extends PagingAndSortingRepository<BaseSearchNoveltyRepeatDO,String>{
    @Query(value = "select b from BaseSearchNoveltyRepeatDO b where name = ?1 or subject = ?1 or content = ?1")
    List<BaseSearchNoveltyRepeatDO> findBySearchData(String searchData);
}

+ 70 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java

@ -17,6 +17,7 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.ContentType;
import org.slf4j.Logger;
import org.slf4j.Logger;
@ -31,8 +32,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.io.*;
import java.net.URLDecoder;
import java.net.URLDecoder;
import java.util.Base64;
import java.util.Map;
import java.util.*;
/**
/**
 * 文件上传不在微服务中处理
 * 文件上传不在微服务中处理
@ -59,7 +59,8 @@ public class FileUploadController extends EnvelopRestEndpoint {
    @Autowired
    @Autowired
    private ObjectMapper objectMapper;
    private ObjectMapper objectMapper;
    @Autowired
    @Autowired
    private FileManageService filemanage;
    private FileManageService fileManageService;
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM_IMG)
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM_IMG)
    @ApiOperation(value = "文件流上传图片", notes = "文件流上传图片")
    @ApiOperation(value = "文件流上传图片", notes = "文件流上传图片")
@ -176,4 +177,70 @@ public class FileUploadController extends EnvelopRestEndpoint {
        return success("上传成功", uploadVO);
        return success("上传成功", uploadVO);
    }
    }
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM_video)
    @ApiOperation(value = "文件流上传文件", notes = "文件流上传文件")
    public ObjEnvelop<UploadVO> uploadStreamVideo(@ApiParam(value = "文件", required = true)
                                                  @RequestParam(value = "file", required = true) MultipartFile file,
                                                  @ApiParam(value = "文件", required = false)
                                                  @RequestParam(value = "filename", required = false) String filename,
                                                  @ApiParam(value = "taskId", required = false)
                                                  @RequestParam(value = "taskId", required = false) String taskId,
                                                  @ApiParam(value = "chunk", required = false)
                                                  @RequestParam(value = "chunk", required = false) Integer chunk,
                                                  @ApiParam(value = "文件", required = false)
                                                  @RequestParam(value = "sizesize", required = false) Long size,
                                                  @ApiParam(value = "chunkTotal", required = false)
                                                  @RequestParam(value = "chunkTotal", required = false) Integer chunkTotal,
                                                  @ApiParam(value = "objectType", required = false)
                                                  @RequestParam(value = "objectType", required = false) Integer objectType
    ) throws Exception{
        UploadVO uploadVO = new UploadVO();
        MutilFileInfo files = new MutilFileInfo();
        files.setChunk(chunk);
        files.setChunkTotal(chunkTotal);
        files.setFile(file);
        files.setObjectType(objectType);
        files.setSize(file.getSize());
        logger.info("file size"+file.getSize());
        files.setTaskId(taskId);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files);
        logger.info("taskid"+taskid);
        if ("unCompelete".equalsIgnoreCase(taskid)){
            System.out.println("第"+files.getChunk());
            return success("未传完",uploadVO);
        }else {
            File file1 = new File(taskid);
            logger.info("size:"+file1.getTotalSpace());
            FileInputStream input = new FileInputStream(file1);
            MultipartFile multipartFile = new MockMultipartFile("file", file1.getName(), "text/plain", IOUtils.toByteArray(input));
            if (isClose.equalsIgnoreCase("1")){
                Map<String, Object> map = fileUploadService.uploadImg(multipartFile);
                uploadVO.setFullUri(map.get("accessory").toString());
            }else if(isClose.equals("2")){
                //内网上传
                String rs = fileUploadService.request(remote_inner_url,multipartFile,null);
                logger.info(rs);
                JSONObject json = JSON.parseObject(rs);
                uploadVO = objectMapper.readValue(json.getJSONObject("obj").toJSONString(),UploadVO.class);
            }else {
                // 得到文件的完整名称  xxx.txt
                String originalFilename = multipartFile.getOriginalFilename();
                //判断文件名称是否有包含后缀,及前端是否有传后缀名称,有的话拼接图片后缀
                if(originalFilename.lastIndexOf(".") == 0 && StringUtils.isNotEmpty(filename)){
                    originalFilename = originalFilename +"."+filename;
                }
                InputStream inputStream = multipartFile.getInputStream();
                uploadVO = fileUploadService.uploadStream(inputStream,originalFilename,fastdfs_file_url);
                file1.delete();
            }
            return success("上传成功", uploadVO);
        }
    }
}
}

+ 110 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/DoctorServicePermissionsEndpoint.java

@ -0,0 +1,110 @@
package com.yihu.jw.base.endpoint.doctor;
import com.yihu.jw.base.service.doctor.DoctorServicePermissionsService;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.util.common.IdCardUtil;
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.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
@RestController
@RequestMapping(value = "doctorServicePermissions", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "医生服务权限管理", description = "医生服务权限管理", tags = {"wlyy基础服务 - 医生服务权限管理"})
public class DoctorServicePermissionsEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private DoctorServicePermissionsService permissionsService;
    @Autowired
    private BaseDoctorDao doctorDao;
    @PostMapping(value = "create")
    @ApiOperation(value = "创建")
    public ObjEnvelop<DoctorServicePermissionsDO> create (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        DoctorServicePermissionsDO permissionsDO = toEntity(jsonData, DoctorServicePermissionsDO.class);
        permissionsDO = permissionsService.save(permissionsDO);
        return success(permissionsDO);
    }
    @PostMapping(value = "delete")
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        permissionsService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = "update")
    @ApiOperation(value = "更新")
    public ObjEnvelop<DoctorServicePermissionsDO> update (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        DoctorServicePermissionsDO permissionsDO = toEntity(jsonData, DoctorServicePermissionsDO.class);
        if (null == permissionsDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        permissionsDO = permissionsService.save(permissionsDO);
        return success(permissionsDO);
    }
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<DoctorServicePermissionsDO> page (
            @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<DoctorServicePermissionsDO> permissionsDOs = permissionsService.search(fields, filters, sorts, page, size);
        for (DoctorServicePermissionsDO permissionsDO:permissionsDOs){
            BaseDoctorDO doctorDO = doctorDao.findById(permissionsDO.getDoctor());
            if(doctorDO!=null){
                permissionsDO.setIdcard(doctorDO.getIdcard());
                permissionsDO.setMobile(doctorDO.getMobile());
                permissionsDO.setSex(IdCardUtil.getSexForIdcard(doctorDO.getIdcard()));
            }
        }
        int count = (int)permissionsService.getCount(filters);
        return success(permissionsDOs, count, page, size, DoctorServicePermissionsDO.class);
    }
    @GetMapping(value = "list")
    @ApiOperation(value = "获取列表")
    public ListEnvelop<DoctorServicePermissionsDO> list (
            @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) throws Exception {
        List<DoctorServicePermissionsDO> permissionsDOs = permissionsService.search(fields, filters, sorts);
        return success(permissionsDOs, DoctorServicePermissionsDO.class);
    }
}

+ 4 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/menu/BaseMenuManageEndpoint.java

@ -110,9 +110,11 @@ public class BaseMenuManageEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "parentId", value = "parentId", required = false)
            @ApiParam(name = "parentId", value = "parentId", required = false)
            @RequestParam(value = "parentId",required = false) String parentId,
            @RequestParam(value = "parentId",required = false) String parentId,
            @ApiParam(name = "name", value = "name", required = false)
            @ApiParam(name = "name", value = "name", required = false)
            @RequestParam(value = "name",required = false) String name) {
            @RequestParam(value = "name",required = false) String name,
            @ApiParam(name = "status", value = "status", required = false)
            @RequestParam(value = "status",required = false) Integer status) {
        try {
        try {
            return success(menuService.findMenuDictByKey(parentId, name));
            return success(menuService.findMenuDictByKey(parentId, name,status));
        }catch (Exception e){
        }catch (Exception e){
            return failedException(e);
            return failedException(e);
        }
        }

+ 137 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/searchClient/ClientSearchEndpoint.java

@ -0,0 +1,137 @@
package com.yihu.jw.base.endpoint.searchClient;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.jw.base.aop.ClientSearchRequestLimit;
import com.yihu.jw.base.service.clientSearch.ClientSearchService;
import com.yihu.jw.entity.base.searchClient.BaseSearchNoveltyRepeatDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
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.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;
/**
 * Created by wsy on 2021/9/4.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.ClientSearch.PREFIX)
@Api(value = "查新查重服务",description = "查新查重服务",tags = {"查新查重服务"})
public class ClientSearchEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ClientSearchService clientSearchService;
    @PostMapping(value = BaseRequestMapping.ClientSearch.CREATE)
    @ApiOperation(value = "保存查新查重服务")
    public Envelop saveBaseSearchNoveltyRepeat(@ApiParam(name = "jsonData",value = "")
                                               @RequestParam(name = "jsonData", required = true) String jsonData) throws Exception{
        try{
            BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO = objectMapper.readValue(jsonData, BaseSearchNoveltyRepeatDO.class);
            clientSearchService.saveBaseSearchNoveltyRepeat(baseSearchNoveltyRepeatDO);
            return success("success");
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(BaseRequestMapping.ClientSearch.DELETEBYID)
    @ApiOperation(value = "删除查新查重")
    public Envelop deleteSearchNoveltyRepeatById(@ApiParam(name = "id",value = "")
                                                 @RequestParam(name = "id", required = true) String id) throws Exception{
        try{
            clientSearchService.deleteByid(id);
            return success("success");
        }catch(Exception e){
            return failedException(e);
        }
    }
    @GetMapping(BaseRequestMapping.ClientSearch.FINDBYSEARCHDATA)
    @ApiOperation(value = "根据搜索查询")
    public Envelop findSearchNoveltyRepeatById(@ApiParam(name = "SearchData", value = "查询字段")
                                               @RequestParam(name = "SearchData", required = true) String SearchData) throws Exception{
        try{
            if(SearchData == null || SearchData.trim().length() == 0){
                return failed("输入参数为空,请重新输入");
            }
            List list;
            list = clientSearchService.findBySearchData(SearchData);
            return success("success",list);
        }catch (Exception e){
            return failedException(e);
        }
    }
    @GetMapping(BaseRequestMapping.ClientSearch.FINDALL)
    @ApiOperation("查询所有")
    public Envelop findSearchNoveltyRepeatAll( @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 = "第几页,从1开始", required = true, defaultValue = "1")
                                               @RequestParam(value = "page", required = true,defaultValue = "1")Integer page,
                                               @ApiParam(name = "pageSize", value = "每页分页大小", required = true, defaultValue = "10")
                                               @RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize) throws Exception{
        try{
            List<BaseSearchNoveltyRepeatDO> list = clientSearchService.search(fields,filters,"-createTime",page,pageSize);
            int count = (int) clientSearchService.getCount(filters);
            return success("success",200,list,count,page,pageSize);
        }catch (Exception e){
            return failedException(e);
        }
    }
    @GetMapping(BaseRequestMapping.ClientSearch.CHANGESTATUS)
    @ApiOperation("变更状态")
    public Envelop changeStatus(@ApiParam(name = "id", value = "")
                                @RequestParam(value = "id",required = true) String id,
                                @ApiParam(name = "status",value = "1 待接收、2 办理中、3 已退回、4 已办结")
                                @RequestParam(name = "status",required = true) Integer status){
        try{
            clientSearchService.updateById(id,status);
            return success("success");
        }catch (Exception e){
            return failedException(e);
        }
    }
    @PostMapping(BaseRequestMapping.ClientSearch.REPLY)
    @ApiOperation("答复")
    public Envelop reply(@ApiParam(name = "id", value = "")
                         @RequestParam(value = "id",required = true) String id,
                         @ApiParam(name = "reply",value = "")
                         @RequestParam(name = "reply",required = true) String reply,
                         @ApiParam(name = "updateUser",value = "答复操作人")
                         @RequestParam(name = "updataUser",required = true) String updataUser){
        try{
            clientSearchService.updateReply(id,reply,updataUser);
            return success("success");
        }catch (Exception e){
            return failedException(e);
        }
    }
}

+ 109 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/clientSearch/ClientSearchService.java

@ -0,0 +1,109 @@
package com.yihu.jw.base.service.clientSearch;
import com.yihu.jw.base.dao.searchClient.BaseSearchNoveltyRepeatDao;
import com.yihu.jw.entity.base.searchClient.BaseSearchNoveltyRepeatDO;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
/**
 * Created by wsy on 2021/9/4.
 */
@Service
public class ClientSearchService extends BaseJpaService<BaseSearchNoveltyRepeatDO,BaseSearchNoveltyRepeatDao>{
    @Autowired
    private BaseSearchNoveltyRepeatDao baseSearchNoveltyRepeatDao;
    public BaseSearchNoveltyRepeatDO saveBaseSearchNoveltyRepeat(BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
        Date date = new Date();
        /*String str = sdf.format(date);
        str.replace("-","");
        str.replace("-","");
        str.replace(":","");
        str.replace(":","");
        str.replace(" ","");
        String num = str;*/
        Random r = new Random();
        //获取随机数
        int number = r.nextInt();
        baseSearchNoveltyRepeatDO.setNumber(Integer.toString(number).replace("-",""));
        baseSearchNoveltyRepeatDO.setStatus(1);
        baseSearchNoveltyRepeatDO.setStatusName("待接收");
        baseSearchNoveltyRepeatDO.setCreateTime(new Date());
        return baseSearchNoveltyRepeatDao.save(baseSearchNoveltyRepeatDO);
    }
    public void deleteByid(String id) {
        if (baseSearchNoveltyRepeatDao.findOne(id)!=null) {
            baseSearchNoveltyRepeatDao.delete(id);
        }
    }
    public List<BaseSearchNoveltyRepeatDO> findBySearchData(String searchData) {
        List list = new ArrayList();
        list = baseSearchNoveltyRepeatDao.findBySearchData(searchData);
        baseSearchNoveltyRepeatDao.findAll();
        return list;
    }
    public void updateById(String id, Integer status) {
        BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO = baseSearchNoveltyRepeatDao.findOne(id);
        if (baseSearchNoveltyRepeatDO != null){
            if(status == 1){
                baseSearchNoveltyRepeatDO.setStatusName("待接收");
            }
            if(status == 2){
                baseSearchNoveltyRepeatDO.setStatusName("办理中");
            }
            if(status == 3){
                baseSearchNoveltyRepeatDO.setStatusName("已退回");
            }
            if(status == 4){
                baseSearchNoveltyRepeatDO.setStatusName("已办结");
            }
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
            Date date = new Date();
           /* baseSearchNoveltyRepeatDO.setUpdate_time(sdf.format(date));*/
            baseSearchNoveltyRepeatDO.setUpdateTime(new Date());
            baseSearchNoveltyRepeatDO.setStatus(status);
            baseSearchNoveltyRepeatDao.save(baseSearchNoveltyRepeatDO);
        }
    }
    public void updateReply(String id, String reply,String updataUser) {
        BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO = baseSearchNoveltyRepeatDao.findOne(id);
        if (baseSearchNoveltyRepeatDO != null){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
            Date date = new Date();
           /* baseSearchNoveltyRepeatDO.setUpdate_time(sdf.format(date));*/
            baseSearchNoveltyRepeatDO.setUpdateTime(new Date());
            baseSearchNoveltyRepeatDO.setReversion(reply);
            baseSearchNoveltyRepeatDO.setUpdateUserName(updataUser);
            baseSearchNoveltyRepeatDao.save(baseSearchNoveltyRepeatDO);
        }
    }
    public BaseSearchNoveltyRepeatDO findFileById(String id){
        BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO = new BaseSearchNoveltyRepeatDO();
        baseSearchNoveltyRepeatDO = baseSearchNoveltyRepeatDao.findOne(id);
        return baseSearchNoveltyRepeatDO;
    }
}

+ 23 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/DoctorServicePermissionsService.java

@ -0,0 +1,23 @@
package com.yihu.jw.base.service.doctor;
import com.yihu.jw.base.dao.doctor.DoctorServicePermissionsDao;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
@Service
public class DoctorServicePermissionsService  extends BaseJpaService<DoctorServicePermissionsDO, DoctorServicePermissionsDao> {
    @Autowired
    private DoctorServicePermissionsDao doctorServicePermissionsDao;
}

+ 40 - 8
svr/svr-base/src/main/java/com/yihu/jw/base/service/menu/BaseMenuManageService.java

@ -71,7 +71,7 @@ public class BaseMenuManageService {
        }
        }
    }
    }
    //菜单词典查询
    //菜单词典查询
    public List<Map<String,Object>> findMenuDictByKey(String parentId, String name){
    public List<Map<String,Object>> findMenuDictByKey(String parentId, String name,Integer status){
        String sql = "select t.id as \"id\", " +
        String sql = "select t.id as \"id\", " +
                " t.parent_id as \"parentId\", " +
                " t.parent_id as \"parentId\", " +
                " t.name as \"name\", " +
                " t.name as \"name\", " +
@ -118,6 +118,11 @@ public class BaseMenuManageService {
            sql+=" and t.name like '%"+name+"%'";
            sql+=" and t.name like '%"+name+"%'";
            sqlParent+=" and t.name like '%"+name+"%'";
            sqlParent+=" and t.name like '%"+name+"%'";
        }
        }
        if (status!=null){
            sql += " and t.status = '"+status+"' ";
            sqlParent+=" and t.status = '"+status+"' " ;
        }
        sql+=" order by t.parent_id asc ,t.menu_sort asc ";
        sql+=" order by t.parent_id asc ,t.menu_sort asc ";
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        List<Map<String,Object>> listParent = hibenateUtils.createSQLQuery(sqlParent);
        List<Map<String,Object>> listParent = hibenateUtils.createSQLQuery(sqlParent);
@ -141,7 +146,9 @@ public class BaseMenuManageService {
            }
            }
            for (Map<String,Object> mapchild:list){
            for (Map<String,Object> mapchild:list){
                if (mapchild.get("parentId").toString().equalsIgnoreCase(map.get("id").toString())){
                if (mapchild.get("parentId").toString().equalsIgnoreCase(map.get("id").toString())){
                   Integer articleChildNum= knowledgeArticleDictDao.getCountByCategorySecond(mapchild.get("id").toString());
                    List<String> list1 = new ArrayList<>();
                    list1.add(mapchild.get("id").toString());
                   Integer articleChildNum= knowledgeArticleDictDao.getCountByCategorySecond(list1);
                    mapchild.put("articleNum",articleChildNum);
                    mapchild.put("articleNum",articleChildNum);
                    for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:effect){
                    for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:effect){
                        if (mapchild.get("status").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                        if (mapchild.get("status").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
@ -178,7 +185,11 @@ public class BaseMenuManageService {
                baseMenuDictDO.setFunctionName(menuFunction.getDictValue());
                baseMenuDictDO.setFunctionName(menuFunction.getDictValue());
            }else {
            }else {
                WlyyHospitalSysDictDO menuLocation = wlyyHospitalSysDictDao.findOneByDictNameAndDictCode("menuLocation",baseMenuDictDO.getMenuLocation());
                WlyyHospitalSysDictDO menuLocation = wlyyHospitalSysDictDao.findOneByDictNameAndDictCode("menuLocation",baseMenuDictDO.getMenuLocation());
                baseMenuDictDO.setLocaTionName(menuLocation.getDictValue());
                if (menuLocation.getDictValue() == null){
                    baseMenuDictDO.setLocaTionName("无");
                }else {
                    baseMenuDictDO.setLocaTionName(menuLocation.getDictValue());
                }
            }
            }
        }
        }
        return baseMenuDictDO;
        return baseMenuDictDO;
@ -481,11 +492,21 @@ public class BaseMenuManageService {
                " m.bg_img as \"bgImg\"," +
                " m.bg_img as \"bgImg\"," +
                " m.menu_title as \"menuTitle\"," +
                " m.menu_title as \"menuTitle\"," +
                " m.describtion as \"describtion\"," +
                " m.describtion as \"describtion\"," +
                " t.style_name as \"styleName\" " +
                " t.style_name as \"styleName\", " +
                " m.parent_id as \"parentId\" " +
                " from base_menu_show t left join " +
                " from base_menu_show t left join " +
                " base_menu_dict m on t.menu_id= m.id" +
                " base_menu_dict m on t.menu_id= m.id" +
                " where t.is_del ='1' order by t.model_id asc ,t.menu_sort asc ";
                " where t.is_del ='1' order by t.model_id asc ,t.menu_sort asc ";
        List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
        List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
        for (Map<String,Object> map:list){
            if (map.get("parentId")!=null){
                String parentId = map.get("parentId").toString();
                BaseMenuDictDO parentDo= baseMenuDictDao.findOne(parentId);
                if (parentDo!=null){
                    map.put("parentName",parentDo.getName());
                }
            }
        }
        String sqlLink =" select t.id as \"id\", " +
        String sqlLink =" select t.id as \"id\", " +
                " t.model_id as \"modelId\", " +
                " t.model_id as \"modelId\", " +
@ -517,6 +538,7 @@ public class BaseMenuManageService {
                map.put("childList",child);
                map.put("childList",child);
            }
            }
        }
        }
        return listModel;
        return listModel;
    }
    }
@ -635,20 +657,30 @@ public class BaseMenuManageService {
                " t.menu_img as \"menuImg\"  " +
                " t.menu_img as \"menuImg\"  " +
                "from base_menu_dict t  where 1=1 and t.is_del ='1' ";
                "from base_menu_dict t  where 1=1 and t.is_del ='1' ";
        if (StringUtils.isNoneBlank(parentId)){
        if (StringUtils.isNoneBlank(parentId)){
            sql+=" and t.parent_id='"+parentId+"'";
            sql+=" and t.parent_id='"+parentId+"' ";
        }
        }
        if (status!=null){
        if (status!=null){
            sql+=" and t.status="+status+"";
            sql+=" and t.status="+status+"";
        }
        }
        sql+="order by t.menu_sort asc";
        sql+=" order by t.menu_sort asc";
        System.out.print("sql"+sql);
        List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
        List<Map<String,Object>> list=hibenateUtils.createSQLQuery(sql);
        return list;
        return list;
    }
    }
    public MixEnvelop findArticleByMenuId(String menuId,Integer page,Integer pageSize){
    public MixEnvelop findArticleByMenuId(String menuId,Integer page,Integer pageSize){
        Pageable pageRequest = new PageRequest(page-1,pageSize);
        Pageable pageRequest = new PageRequest(page-1,pageSize);
        List<KnowledgeArticleDictDO> list=knowledgeArticleDictDao.findByCategorySecondAndPage(menuId,pageRequest);
        Integer count = knowledgeArticleDictDao.getCountByCategorySecond(menuId);
        List<String> menuIds = new ArrayList<>();
        if (StringUtils.isNoneBlank(menuId)){
            String str[]= menuId.split(",");
            for (int i=0;i<str.length;i++){
                menuIds.add(str[i]);
            }
        }
        System.out.print("menuId"+menuId);
        List<KnowledgeArticleDictDO> list=knowledgeArticleDictDao.findByCategorySecondAndPage(menuIds,pageRequest);
        Integer count = knowledgeArticleDictDao.getCountByCategorySecond(menuIds);
        MixEnvelop mixEnvelop = new MixEnvelop();
        MixEnvelop mixEnvelop = new MixEnvelop();
        mixEnvelop.setTotalCount(count);
        mixEnvelop.setTotalCount(count);
        mixEnvelop.setDetailModelList(list);
        mixEnvelop.setDetailModelList(list);

+ 1 - 1
svr/svr-base/src/main/resources/bootstrap.yml

@ -117,7 +117,7 @@ spring:
  cloud:
  cloud:
    config:
    config:
      uri: ${wlyy-spring.config.uri:http://127.0.0.1:1221}
      uri: ${wlyy-spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy-spring.config.label:jwdev}
      label: ${wlyy-spring.config.label:master}
---
---
spring:
spring:

+ 6 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/contacts/PatientSosContactsDao.java

@ -2,6 +2,8 @@ package com.yihu.jw.care.dao.contacts;
import com.yihu.jw.entity.care.contacts.PatientSosContactsDO;
import com.yihu.jw.entity.care.contacts.PatientSosContactsDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
import java.util.List;
@ -17,4 +19,8 @@ public interface PatientSosContactsDao extends PagingAndSortingRepository<Patien
    List<PatientSosContactsDO> findByPatientOrderByUpdateTimeDesc(String patient);
    List<PatientSosContactsDO> findByPatientOrderByUpdateTimeDesc(String patient);
    PatientSosContactsDO findByPatientAndSosPhone(String patient,String sosPhone);
    PatientSosContactsDO findByPatientAndSosPhone(String patient,String sosPhone);
    @Modifying
    @Query(" update PatientSosContactsDO a set a.successFlag = 0,a.updateInfo=null where a.patient=?1")
    void updateByPatient(String patient);
}
}

+ 20 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseYxDeviceIndexDao.java

@ -0,0 +1,20 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseYxDeviceIndex;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/26
 * @Description:
 */
public interface BaseYxDeviceIndexDao extends PagingAndSortingRepository<BaseYxDeviceIndex, String> {
    @Query(value = "SELECT a.* from base_yxdevice_index a where a.sn=?1 and a.lat!=0 and a.lon!=0 order by a.create_time desc limit 1",nativeQuery = true)
    List<BaseYxDeviceIndex> findBySn(String sn);
}

+ 2 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DevicePatientHealthIndexDao.java

@ -58,7 +58,7 @@ public interface DevicePatientHealthIndexDao
	@Query(value = "select DATE_FORMAT(a.record_date,'%Y-%m-%d') from wlyy_patient_health_index a where a.user = ?1 and a.type=?2 and a.record_date >= ?3 and a.record_date <= ?4 and a.del = '1' group by DATE_FORMAT(a.record_date,'%Y-%m-%d') order by DATE_FORMAT(a.record_date,'%Y-%m-%d') desc limit ?5 ,?6",nativeQuery = true)
	@Query(value = "select DATE_FORMAT(a.record_date,'%Y-%m-%d') from wlyy_patient_health_index a where a.user = ?1 and a.type=?2 and a.record_date >= ?3 and a.record_date <= ?4 and a.del = '1' group by DATE_FORMAT(a.record_date,'%Y-%m-%d') order by DATE_FORMAT(a.record_date,'%Y-%m-%d') desc limit ?5 ,?6",nativeQuery = true)
	List<String> findDateList(String patient, int type, Date start, Date end, int currentSize, int pageSize);
	List<String> findDateList(String patient, int type, Date start, Date end, int currentSize, int pageSize);
	
	@Query(value= " select * from wlyy_patient_health_index where type in (1,2) and record_date BETWEEN ?1 AND ?2  AND user in (select p.code from wlyy.wlyy_patient p INNER JOIN wlyy.wlyy_sign_family s on s.patient = p.code RIGHT JOIN wlyy_sign_patient_label_info sp on sp.patient = p.code where  s.status > 0 AND s.admin_team_code = ?3 and (s.doctor = ?4 or s.doctor_health =?4) and sp.status = 1 and sp.label_type = 3 and (sp.label = 1 or sp.label = 2))",nativeQuery = true)
	@Query(value= " select * from wlyy_patient_health_index where type in (1,2) and record_date BETWEEN ?1 AND ?2  AND user in (select p.code from wlyy.wlyy_patient p INNER JOIN wlyy.wlyy_sign_family s on s.patient = p.code RIGHT JOIN wlyy_sign_patient_label_info sp on sp.patient = p.code where  s.status > 0 AND s.admin_team_code = ?3 and (s.doctor = ?4 or s.doctor_health =?4) and sp.status = 1 and sp.label_type = 3 and (sp.label = 1 or sp.label = 2))",nativeQuery = true)
	List<DevicePatientHealthIndex> findByTeamcodeAndRecordDate(Date start, Date end, String teamcode, String doctorcode);
	List<DevicePatientHealthIndex> findByTeamcodeAndRecordDate(Date start, Date end, String teamcode, String doctorcode);
@ -77,4 +77,5 @@ public interface DevicePatientHealthIndexDao
	@Modifying
	@Modifying
	@Query("update DevicePatientHealthIndex a set a.manageResult=1 where a.id in (?1) ")
	@Query("update DevicePatientHealthIndex a set a.manageResult=1 where a.id in (?1) ")
	void handleHealthIndex(Long[] id);
	void handleHealthIndex(Long[] id);
}
}

+ 7 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientDeviceDao.java

@ -55,7 +55,10 @@ public interface PatientDeviceDao extends PagingAndSortingRepository<DevicePatie
    @Query("select a from DevicePatientDevice a")
    @Query("select a from DevicePatientDevice a")
    List<DevicePatientDevice> findAll();
    List<DevicePatientDevice> findAll();
    @Query("select a from DevicePatientDevice a where a.categoryCode = ?1")
    @Query("select a from DevicePatientDevice a group by a.user")
    List<DevicePatientDevice> findAllGroupUser();
    @Query("select a from DevicePatientDevice a where a.categoryCode = ?1 and a.del=0 group by a.user")
    List<DevicePatientDevice> findAllByCategoryCode(String categoryCode);
    List<DevicePatientDevice> findAllByCategoryCode(String categoryCode);
    @Modifying
    @Modifying
@ -65,6 +68,9 @@ public interface PatientDeviceDao extends PagingAndSortingRepository<DevicePatie
    @Query("select a from DevicePatientDevice a where a.user=?1 and a.del=0")
    @Query("select a from DevicePatientDevice a where a.user=?1 and a.del=0")
    List<DevicePatientDevice> findAllByUser(String user);
    List<DevicePatientDevice> findAllByUser(String user);
    @Query("select a from DevicePatientDevice a where a.user=?1 and a.categoryCode =?2 and a.del=0")
    List<DevicePatientDevice> findAllByUserAndCategoryCode(String user,String categoryCode);
    @Query("select a from DevicePatientDevice a where a.user=?1 and a.categoryCode =?2 and a.del=0")
    @Query("select a from DevicePatientDevice a where a.user=?1 and a.categoryCode =?2 and a.del=0")
    List<DevicePatientDevice> findByUserAndCategoryCode(String user,String categoryCode);
    List<DevicePatientDevice> findByUserAndCategoryCode(String user,String categoryCode);
}
}

+ 21 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientSafeAreaDao.java

@ -0,0 +1,21 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.PatientSafeAreaDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Bing on 2021/8/31.
 */
public interface PatientSafeAreaDao extends PagingAndSortingRepository<PatientSafeAreaDO,Long>,
        JpaSpecificationExecutor<PatientSafeAreaDO> {
    List<PatientSafeAreaDO> findByPatient(String patient);
    @Modifying
    void deleteByPatient(String patient);
}

+ 18 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doctor/DoctorServicePermissionsDao.java

@ -0,0 +1,18 @@
package com.yihu.jw.care.dao.doctor;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
public interface DoctorServicePermissionsDao extends PagingAndSortingRepository<DoctorServicePermissionsDO, String>, JpaSpecificationExecutor<DoctorServicePermissionsDO> {
    DoctorServicePermissionsDO findByDoctor(String doctor);
}

+ 15 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/BaseAdminServiceDynamicDao.java

@ -0,0 +1,15 @@
package com.yihu.jw.care.dao.lifeCare;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.entity.door.BaseAdminServiceDynamic;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/***
 * @ClassName: BaseAdminServiceDynamicDao
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/31 15:28
 */
public interface BaseAdminServiceDynamicDao extends PagingAndSortingRepository<BaseAdminServiceDynamic, Long>, JpaSpecificationExecutor<BaseAdminServiceDynamic> {
}

+ 18 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/BaseController.java

@ -4,7 +4,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.base.dict.BaseExceptionDictDO;
import com.yihu.jw.entity.base.dict.BaseExceptionDictDO;
import com.yihu.jw.entity.iot.gateway.IdEntity;
import com.yihu.jw.entity.iot.gateway.IdEntity;
import com.yihu.jw.restmodel.exception.dao.BaseExceptionDictDao;
import com.yihu.jw.restmodel.exception.dao.BaseExceptionDictDao;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponses;
@ -80,6 +79,24 @@ public class BaseController {
        }
        }
    }
    }
    /**
     * 获取代理人的code
     * 老人亲属
     * @return
     */
    public String getAgentUID() {
        try {
            String userAgent = request.getHeader("userAgent");
            if (StringUtils.isEmpty(userAgent)) {
                userAgent = request.getHeader("User-Agent");
            }
            JSONObject json = new JSONObject(userAgent);
            return json.getString("agent");
        } catch (Exception e) {
            return null;
        }
    }
    /**
    /**
     * 获取平台端
     * 获取平台端

+ 645 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/admin/AdminDoorCoachOrderController.java

@ -0,0 +1,645 @@
package com.yihu.jw.care.endpoint.admin;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.endpoint.BaseController;
import com.yihu.jw.care.service.admin.AdminDoorCoachOrderService;
import com.yihu.jw.care.service.consult.ConsultTeamService;
import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachConclusionDO;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/***
 * @ClassName: AdminDoorCoachOrderController
 * @Description: 管理员调度端终端
 * @Auther: shi kejing
 * @Date: 2021/8/31 14:38
 */
//@RequestMapping(value = "/admin/doorCoach/serviceOrder", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RestController
@RequestMapping(value = "/open/noLogin", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "管理员调度大屏")
public class AdminDoorCoachOrderController extends EnvelopRestEndpoint {
    @Autowired
    private DoctorDoorCoachOrderService doctorDoorCoachOrderService;
    @Autowired
    private ImService imService;
    @Autowired
    private ConsultTeamService consultTeamService;
    private BaseController baseController = new BaseController();
    @Autowired
    private AdminDoorCoachOrderService patientDoorCoachOrderService;
    @GetMapping(value = "getServiceDynamic")
    @ApiOperation(value = "管理员调度实时动态")
    public String getServiceDynamic(
            @ApiParam(name = "page", value = "分页大小", required = true) @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true) @RequestParam(value = "size") int size) {
        try{
            return baseController.write(200,"查询成功","data",patientDoorCoachOrderService.getServiceDynamic(page,size));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @PostMapping(value = "proxyCreate")
    @ApiOperation(value = "创建上门预约咨询--医生代预约")
    public String create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        try{
            JSONObject result = patientDoorCoachOrderService.proxyCreate(jsonData,getUID());
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error(-1, result.getString(ResponseContant.resultMsg));
            }
            return baseController.write(200, "提交成功!","orderId",result.getString("orderId"));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @GetMapping("/getDoorOrderNum")
    @ApiOperation(value = "获取医生待服务工单数量")
    public String getDoorOrderNum(
            @ApiParam(name = "doctor", value = "医生codedoctor")
            @RequestParam(value = "doctor", required = true) String doctor) {
        try {
            return  baseController.write(200, "获取成功", "data",doctorDoorCoachOrderService.getDoorOrderNum(doctor));
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @GetMapping(value = "queryDoctorListNotStopped")
    @ApiOperation(value = "服务人员列表(可接单状态的医生列表)")
    public String queryDoctorListWithNotStopped(
            @ApiParam(name = "hospital", value = "机构code", required = true) @RequestParam(value = "hospital") String hospital,
            @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) {
        try{
            doctorDoorCoachOrderService.initDoorStatus(hospital);
            JSONObject result = patientDoorCoachOrderService.queryDoctorListWithNotStopped(hospital,page, size);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error(-1,result.getString(ResponseContant.resultMsg));
            }
            int count = result.getIntValue(ResponseContant.count);
            JSONObject object = new JSONObject();
            object.put("total",count);
            object.put("detailModelList",result.get(ResponseContant.resultMsg));
            object.put("currPage",page);
            object.put("pageSize",size);
            return baseController.write(200,"查询成功","data",object);
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @PostMapping(value = "sendOrderToDoctor")
    @ApiOperation(value = "调度员给医生派单")
    public String sendOrderToDoctor(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "remark", value = "调度员备注") @RequestParam(value = "remark", required = false) String remark,
            @ApiParam(name = "dispatcher", value = "调度员code") @RequestParam(value = "dispatcher", required = true) String dispatcher,
            @ApiParam(name = "dispathcherName", value = "调度员姓名") @RequestParam(value = "dispathcherName", required = true) String dispathcherName,
            @ApiParam(name = "doctor", value = "医生code") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "doctorName", value = "医生姓名") @RequestParam(value = "doctorName", required = true) String doctorName,
            @ApiParam(name = "doctorJobName", value = "医生职称") @RequestParam(value = "doctorJobName", required = false) String doctorJobName) {
        try{
            JSONObject result = patientDoorCoachOrderService.sendOrderToDoctor(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error( -1,result.getString(ResponseContant.resultMsg));
            }
            return baseController.write(200,"派单成功","data",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @PostMapping(value = "transferOrder")
    @ApiOperation(value = "医生转派单")
    public String transferOrder(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "remark", value = "当前医生备注") @RequestParam(value = "remark", required = false) String remark,
            @ApiParam(name = "dispatcher", value = "当前医生code") @RequestParam(value = "dispatcher", required = true) String dispatcher,
            @ApiParam(name = "dispathcherName", value = "当前医生姓名") @RequestParam(value = "dispathcherName", required = true) String dispathcherName,
            @ApiParam(name = "doctor", value = "医生code") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "doctorName", value = "医生姓名") @RequestParam(value = "doctorName", required = true) String doctorName,
            @ApiParam(name = "doctorJobName", value = "医生职称") @RequestParam(value = "doctorJobName", required = false) String doctorJobName) {
        try{
            JSONObject result = patientDoorCoachOrderService.transferOrder(orderId, remark,dispatcher,dispathcherName, doctor, doctorName ,doctorJobName);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error( -1,result.getString(ResponseContant.resultMsg));
            }
            return baseController.write(200,"派单成功","data",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @PostMapping("acceptOrder")
    @ApiOperation(value = "接单")
    public String acceptOrder(
            @ApiParam(value = "工单id", name = "orderId", required = true) @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(value = "医生职称code", name = "jobCode", required = false) @RequestParam(value = "jobCode", required = false) String jobCode,
            @ApiParam(value = "医生职称", name = "jobCodeName", required = false) @RequestParam(value = "jobCodeName", required = false) String jobCodeName,
            @ApiParam(value = "医院级别", name = "hospitalLevel", required = false) @RequestParam(value = "hospitalLevel",defaultValue = "4",required = false) int hospitalLevel) {
        try {
            doctorDoorCoachOrderService.acceptOrder(orderId,jobCode,jobCodeName,hospitalLevel);
            return baseController.write(200, "操作成功");
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping("refuse")
    @ApiOperation(value = "拒单")
    public String refuseOrder(
            @ApiParam(value = "工单id", name = "orderId", required = true)
            @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(value = "拒绝原因", name = "reason", required = false)
            @RequestParam(value = "reason", required = false) String reason) {
        try {
            doctorDoorCoachOrderService.refuseOrder(getUID(),orderId, reason);
            return baseController.write(200, "操作成功");
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping(value = "cancelOrder")
    @ApiOperation(value = "取消工单")
    public String cancelOrder(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "type", value = "取消类型:1-调度员主动取消,2-居民取消, 3-医生取消") @RequestParam(value = "type", required = true) int type,
            @ApiParam(name = "reason", value = "取消理由") @RequestParam(value = "reason", required = false) String reason,
            @ApiParam(name = "dispatcher", value = "取消工单的调度员(只允许调度员来操作)") @RequestParam(value = "dispatcher", required = false) String dispatcher,
            @ApiParam(name = "dispathcherName", value = "调度员姓名") @RequestParam(value = "dispathcherName", required = false) String dispatcherName) {
        try{
            JSONObject result = patientDoorCoachOrderService.cancelOrder(orderId, type, reason,dispatcher,dispatcherName);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error(-1,result.getString(ResponseContant.resultMsg));
            }
            return baseController.write(200,"取消成功","data",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @PostMapping("signIn")
    @ApiOperation(value = "上门预约签到")
    public String signIn(
            @ApiParam(value = "工单id", name = "orderId")
            @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(value = "签到时间", name = "signTime")
            @RequestParam(value = "signTime", required = false) String signTime,
            @ApiParam(value = "签到方式:1-定位,2-扫码,3-拍照,4-二维码", name = "signWay")
            @RequestParam(value = "signWay", required = false) Integer signWay,
            @ApiParam(value = "签到地址", name = "signLocation")
            @RequestParam(value = "signLocation", required = false) String signLocation,
            @ApiParam(value = "签到照片", name = "signImg")
            @RequestParam(value = "signImg", required = false) String signImg,
            @ApiParam(value = "二维码内容", name = "twoDimensionalCode")
            @RequestParam(value = "twoDimensionalCode", required = false) String twoDimensionalCode) {
        try {
            BaseDoorCoachOrderDO baseDoorCoachOrderDO = doctorDoorCoachOrderService.signIn(orderId, signTime, signWay, signLocation, signImg,twoDimensionalCode,getUID());
            if (baseDoorCoachOrderDO != null){
                return baseController.write(200, "操作成功", "data", baseDoorCoachOrderDO);
            }else {
                return baseController.error(-1,"扫码签到失败");
            }
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping("updateDoorConclusion")
    @ApiOperation("编辑保存服务工单小结")
    public String updateDoorConclusion(
            @ApiParam(value = "工单id", name = "orderId",required = true)
            @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(value = "服务附件,至少一张,至多3张", name = "conclusionImg",required = false)
            @RequestParam(value = "conclusionImg", required = false) String conclusionImg,
            @ApiParam(value = "服务小结", name = "conclusion",required = false)
            @RequestParam(value = "conclusion", required = false) String conclusion,
            @ApiParam(value = "服务小结是否登记,1跳过登记;2-登记", name = "conclusionStatus")
            @RequestParam(value = "conclusionStatus", required = false,defaultValue = "2") Integer conclusionStatus) {
        try {
            BaseDoorCoachConclusionDO doorConclusion = doctorDoorCoachOrderService.updateDoorConclusion(orderId,conclusion,conclusionImg,conclusionStatus);
            return baseController.write(200, "保存成功", "data", doorConclusion);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @GetMapping("getDoorConclusion")
    @ApiOperation("获取服务工单小结")
    public String getDoorConclusion(
            @ApiParam(value = "医生code", name = "doctor")
            @RequestParam(value = "doctor", required = false) String doctor,
            @ApiParam(value = "工单id", name = "orderId")
            @RequestParam(value = "orderId", required = false) String orderId) {
        try {
            // 没有提供工单id的情况下,默认代入上一次服务信息记录
            if (StringUtils.isEmpty(orderId)) {
                orderId = doctorDoorCoachOrderService.getOrderIdByDoctor(doctor);
                if (StringUtils.isBlank(orderId)) {
                    return baseController.error(-1, "获取失败,该医生暂无工单" );
                }
            }
            // 根据orderId查询工单小结表
            BaseDoorCoachConclusionDO doorConclusion = doctorDoorCoachOrderService.getDoorConclusion(orderId);
            return baseController.write(200, "获取成功", "data", doorConclusion);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping("saveOrderFinishByDoctor")
    @ApiOperation(value = "确认完成工单")
    public String saveOrderFinishByDoctor(
            @ApiParam(value = "工单id", name = "orderId")
            @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(value = "确认结束服务方式 1-电子签名,2-手持身份证拍照", name = "finishWay")
            @RequestParam(value = "finishWay", required = false) Integer finishWay,
            @ApiParam(value = "确认结束服务照片", name = "finishImg")
            @RequestParam(value = "finishImg", required = false) String finishImg) {
        try {
            return baseController.write(200, "获取成功", "data", doctorDoorCoachOrderService.saveOrderFinishByDoctor(orderId, finishWay, finishImg));
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping("updateArrivingTime")
    @ApiOperation(value = "修改预计到达时间")
    public String updateArrivingTime(
            @ApiParam(value = "工单id", name = "orderId")
            @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(value = "医生预计到达时间", name = "arrivingTime")
            @RequestParam(value = "arrivingTime", required = true) String arrivingTime) {
        try {
            BaseDoorCoachOrderDO baseDoorCoachOrderDO = doctorDoorCoachOrderService.updateArrivingTime(orderId, arrivingTime);
            return baseController.write(200, "修改成功", "data", baseDoorCoachOrderDO);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @GetMapping("/topStatusBarNum")
    @ApiOperation(value = "顶部状态栏订单分类tab")
    public String topStatusBarNum(
            @ApiParam(name = "doctor", value = "医生code")
            @RequestParam(value = "doctor", required = true) String doctor) {
        try {
            Map<String, Integer> map = doctorDoorCoachOrderService.getNumGroupByStatus(doctor);
            return baseController.write(200, "获取成功", "data", map);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @RequestMapping(value = "message/getWaitingMessages",method = RequestMethod.GET)
    @ApiOperation("调度员获取服务工单待接单列表")
    public String getWaitingMessages(
            @ApiParam(name = "message",value = "消息对象")
            @RequestParam(value = "message")String message,
            @ApiParam(name="types",value="消息类型")
            @RequestParam(value="types",required = true) String types,
            @ApiParam(name="page",value="第几页",defaultValue = "1")
            @RequestParam(value="page",required = true) String page,
            @ApiParam(name="pageSize",value="",defaultValue = "10")
            @RequestParam(value="pageSize",required = true) String pageSize){
        if (org.apache.commons.lang3.StringUtils.isBlank(pageSize)) {
            pageSize = "10";
        }
        if (page.equals("0")) {
            page = "1";
        }
        String[] split = org.apache.commons.lang3.StringUtils.split(types, ",");
        List<Integer> typeList = new ArrayList<>();
        for (String s : split) {
            typeList.add(Integer.valueOf(s));
        }
        SystemMessageDO message1 = new SystemMessageDO();
        com.alibaba.fastjson.JSONObject object = JSON.parseObject(message);
        message1.setOver(object.getString("over"));
        message1.setIsRead(object.get("read")+"");
        message1.setReceiver(getUID());
        try {
            org.json.JSONObject waitingMessages = doctorDoorCoachOrderService.getWaitingMessages(message1, types, Integer.valueOf(page), Integer.valueOf(pageSize));
            return baseController.write(200, "查询成功","data",waitingMessages);
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @GetMapping("/getDoorOrderList")
    @ApiOperation(value = "服务工单列表")
    public String getDoorOrderList(
            @ApiParam(value = "工单服务编号", name = "orderId",required = false)
            @RequestParam(value = "orderId", required = false) String orderId,
            @ApiParam(value = "居民姓名", name = "patientName",required = false)
            @RequestParam(value = "patientName", required = false) String patientName,
            @ApiParam(value = "联系方式", name = "patientPhone",required = false)
            @RequestParam(value = "patientPhone", required = false) String patientPhone,
            @ApiParam(value = "服务机构", name = "hospitalCode",required = false)
            @RequestParam(value = "hospitalCode", required = false) String hospitalCode,
            @ApiParam(value = "工单状态", name = "status",required = false)
            @RequestParam(value = "status", required = false) Integer[] status,
            @ApiParam(value = "创建时间开始,格式(yyyy-MM-dd mm:dd:ss)", name = "createTimeStart",required = false)
            @RequestParam(value = "createTimeStart", required = false) String createTimeStart,
            @ApiParam(value = "创建时间结束,格式(yyyy-MM-dd mm:dd:ss)", name = "createTimeEnd",required = false)
            @RequestParam(value = "createTimeEnd", required = false) String createTimeEnd,
            @ApiParam(value = "服务医生的名称", name = "serverDoctorName",required = false)
            @RequestParam(value = "serverDoctorName", required = false) String serverDoctorName,
            @ApiParam(value = "医生的code", name = "doctorCode",required = false)
            @RequestParam(value = "doctorCode", required = false) String doctorCode,
            @ApiParam(value = "角色0、医生,1、管理员", name = "isManage",required = false)
            @RequestParam(value = "isManage", required = false) String isManage,
            @ApiParam(value = "发起类型(1本人发起 2家人待预约 3医生代预约)", name = "type")
            @RequestParam(value = "type", required = false) Integer type,
            @ApiParam(value = "页码", name = "page",defaultValue = "1",required = true)
            @RequestParam(value = "page", required = true) Integer page,
            @ApiParam(value = "每页数目", name = "pageSize",defaultValue = "10",required = true)
            @RequestParam(value = "pageSize", required = true) Integer pageSize) {
        try {
            StringBuffer ss = new StringBuffer();
            if (status != null && status.length > 0){
                int statusLength = status.length;
                for (int i =0 ; i < statusLength ; i++){
                    ss .append(status[i]);
                    if (i<statusLength-1){
                        ss.append(",");
                    }
                }
            }else {
                ss = null;
            }
            JSONObject result = doctorDoorCoachOrderService.getDoorOrderList(orderId,patientName,patientPhone,"350200",
                    ss,createTimeStart,createTimeEnd,serverDoctorName,null,page,pageSize, type);
            return baseController.write(200, "获取成功","data",result);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @GetMapping(value = "queryBriefList")
    @ApiOperation(value = "调度员查询工单列表")
    public String queryBriefList(
            @ApiParam(name = "dispatcher", value = "调度员code") @RequestParam(value = "dispatcher", required = true) String dispatcher,
            @ApiParam(name = "hospital", value = "调度员所在机构code") @RequestParam(value = "hospital", required = true) String hospital,
            @ApiParam(name = "orderNumber", value = "工单号") @RequestParam(value = "orderNumber", required = false) String orderNumber,
            @ApiParam(name = "patientName", value = "工单服务对象姓名") @RequestParam(value = "patientName", required = false) String patientName,
            @ApiParam(name = "phone", value = "发起工单的居民的联系方式") @RequestParam(value = "phone", required = false) String phone,
            @ApiParam(name = "status", value = "工单状态") @RequestParam(value = "status", required = false) Integer status,
            @ApiParam(name = "patientType", value = "居民类型") @RequestParam(value = "patientType", required = false) String patientType,
            @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) {
        try{
            JSONObject result = doctorDoorCoachOrderService.queryBriefList(dispatcher,hospital, orderNumber, patientName, phone, status,patientType, page, size);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error(-1,result.getString(ResponseContant.resultMsg));
            }
            int count = result.getIntValue(ResponseContant.count);
            JSONObject object = new JSONObject();
            object.put("total",count);
            object.put("detailModelList",result.get(ResponseContant.resultMsg));
            object.put("currPage",page);
            object.put("pageSize",size);
            return baseController.write(200,"查询成功","data",object);
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @GetMapping(value = "queryDoctorList")
    @ApiOperation(value = "服务人员列表(医生列表)")
    public String queryDoctorList(
            @ApiParam(name = "hospital", value = "调度员所在的机构code") @RequestParam(value = "hospital", required = false) String hospital,
            @ApiParam(name = "doctorName", value = "医生姓名") @RequestParam(value = "doctorName", required = false) String doctorName,
            @ApiParam(name = "status", value = "医生接单状态,状态为全部时不传") @RequestParam(value = "status", required = false) String status,
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = false) String patient,
            @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) {
        try{
            doctorDoorCoachOrderService.initDoorStatus(hospital);
            JSONObject result = doctorDoorCoachOrderService.queryDoctorList(patient,hospital, doctorName, status, page, size);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error(-1,result.getString(ResponseContant.resultMsg));
            }
            int count = result.getIntValue(ResponseContant.count);
            JSONObject object = new JSONObject();
            object.put("total",count);
            if (count > 0){
                object.put("detailModelList",result.get(ResponseContant.resultMsg));
            }else {
                List list = new ArrayList();
                object.put("detailModelList",list);
            }
            object.put("currPage",page);
            object.put("pageSize",size);
            return baseController.write(200,"查询成功","data",object);
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
    @GetMapping("getByOrderId")
    @ApiOperation(value = "根据工单id获取相应的工单,如果为空,则获取该医生当前最新一条的工单")
    public String getByOrderId(
            @ApiParam(value = "医生code", name = "doctor")
            @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(value = "工单id", name = "orderId")
            @RequestParam(value = "orderId", required = false) String orderId) {
        try {
            // 没有提供工单id的情况下,则获取该医生当前最新一条的工单
            if (StringUtils.isEmpty(orderId)) {
                // 根据接单医生code获取最近一次服务orderId
                orderId = doctorDoorCoachOrderService.getOrderIdByDoctor(doctor);
                if (StringUtils.isBlank(orderId)) {
                    return baseController.error(-1, "获取失败, 该医生暂无工单" );
                }
            }
            // 根据orderId获取工单信息
            BaseDoorCoachOrderDO baseDoorCoachOrderDO = doctorDoorCoachOrderService.getDoorServiceOrderById(orderId);
            return baseController.write(200, "获取成功", "data", baseDoorCoachOrderDO);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping(value = "payOrder")
    @ApiOperation(value = "医生确认付款")
    public ObjEnvelop payOrder(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "payWay", value = "支付方式:1-微信支付,2-线下支付") @RequestParam(value = "payWay", required = false,defaultValue = "2") int payWay) {
        try {
            return ObjEnvelop.getSuccess("操作成功",doctorDoorCoachOrderService.payOrder(orderId, payWay));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
    /**
     * 获取服务项目
     *
     * @param hospital
     * @return
     */
    @GetMapping("selectItemsByHospital")
    @ApiOperation(value = "获取服务项目")
    public String selectItemsByHospital(
            @ApiParam(value = "机构code", name = "hospital")
            @RequestParam(value = "hospital", required = false) String hospital,
            @ApiParam(value = "服务项目名称", name = "serverItemName")
            @RequestParam(value = "serverItemName", required = false) String serverItemName) {
        try {
            return baseController.write(200, "获取成功","dara",patientDoorCoachOrderService.selectItemsByHospital(hospital,serverItemName));
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping("/initDoorStatus")
    @ApiOperation(value = "初始化医生分派订单开关状态")
    public String initDoorStatus() {
        try {
            doctorDoorCoachOrderService.initDoorStatus(null);
            return baseController.success("成功");
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @GetMapping("/getDispatchOrderSwitch")
    @ApiOperation(value = "获取医生分派订单开关状态")
    public String getDispatchOrderSwitch(
            @ApiParam(name = "doctor", value = "医生id")
            @RequestParam(value = "doctor", required = true) String doctor) {
        try {
            String status = doctorDoorCoachOrderService.findDispatchStatusByDoctor(doctor);
            return baseController.write(200, "获取成功", "data", status);
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping("/dispatchOrderSwitch")
    @ApiOperation(value = "分派订单开关修改")
    public String dispatchOrderSwitch(
            @ApiParam(name = "doctor", value = "医生code")
            @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(value = "开关值,5关闭 1开启", name = "value")
            @RequestParam(value = "value", required = true) Integer value) {
        try {
            doctorDoorCoachOrderService.updateDispatchStatusByDoctor(doctor, value);
            return baseController.write(200, "修改成功");
        } catch (Exception e) {
            return baseController.errorResult(e);
        }
    }
    @PostMapping(value = "dispatcherIntoTopic")
    @ApiOperation(value = "调度员进入会话")
    public ObjEnvelop dispatcherIntoTopic(
            @ApiParam(name = "orderId", value = "工单id", required = true) @RequestParam String orderId,
            @ApiParam(name = "hospitalName", value = "机构名称", required = true) @RequestParam String hospitalName,
            @ApiParam(name = "dispatcher", value = "调度员code", required = true) @RequestParam String dispatcher,
            @ApiParam(name = "dispatcherName", value = "调度员姓名", required = true) @RequestParam  String dispatcherName
    ) {
        try{
            JSONObject result = patientDoorCoachOrderService.dispatcherIntoTopic(orderId,hospitalName,dispatcher,dispatcherName);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
            }
            return ObjEnvelop.getSuccess("转接成功",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
    @RequestMapping(value = "/urlAnalysis",produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
    @ApiOperation("门牌解析上门地址")
    @ResponseBody
    public String urlAnalysis(@ApiParam(name = "url", value = "地址解析", defaultValue = "")
                              @RequestParam(value = "url", required = true)String url)throws Exception {
        try {
            return baseController.write(200, "操作成功!","data",doctorDoorCoachOrderService.urlAnalysis(url));
        }catch (Exception e){
            //日志文件中记录异常信息
            //返回接口异常信息处理结果
            return baseController.errorResult(e);
        }
    }
    @GetMapping(value = "getConsultInfoAndPatientInfo")
    @ApiOperation(value = "获取咨询问题,图片,居民信息")
    public ObjEnvelop getConsultInfoAndPatientInfo(
            @ApiParam(name = "consult", value = "咨询CODE")
            @RequestParam(value = "consult",required = false) String consult,
            @ApiParam(name = "patientCode", value = "居民COEE")
            @RequestParam(value = "patientCode",required = false) String patientCode){
        try {
            return ObjEnvelop.getSuccess("请求成功", imService.getConsultInfoAndPatientInfo(consult, patientCode));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
    @RequestMapping(value = "queryByConsultCode",method = RequestMethod.GET)
    @ApiOperation("根据咨询code查询关联业务项详情")
    public ObjEnvelop queryByConsultCode(@ApiParam(name = "code", value = "咨询code") @RequestParam(value = "code", required = true) String code,
                                         @ApiParam(name = "type", value = "咨询类型") @RequestParam(value = "type", required = true) Integer type){
        try{
            JSONObject detail = consultTeamService.queryByConsultCode(code,type);
            return ObjEnvelop.getSuccess("查询成功", detail.get("data"));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
    @PostMapping(value = "updateOrderCardInfo")
    @ApiOperation(value = "更新预约简要信息")
    public String updateOrderCardInfo(
            @ApiParam(name = "jsonData", value = "json数据") @RequestParam(value = "jsonData", required = true) String jsonData) {
        try{
            JSONObject result = patientDoorCoachOrderService.updateOrderCardInfo(jsonData);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return baseController.error(-1,result.getString(ResponseContant.resultMsg));
            }
            return baseController.write(200,"保存成功","data",result.get(ResponseContant.resultMsg));
        }catch (Exception e){
            return baseController.errorResult(e);
        }
    }
}

+ 2 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/assistance/EmergencyAssistanceEndpoint.java

@ -4,9 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.aop.ServicesAuth;
import com.yihu.jw.care.aop.ServicesAuth;
import com.yihu.jw.care.service.assistance.EmergencyAssistanceService;
import com.yihu.jw.care.service.assistance.EmergencyAssistanceService;
import com.yihu.jw.entity.care.securitymonitoring.BaseEmergencyWarnLogDO;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
@ -39,7 +37,7 @@ public class EmergencyAssistanceEndpoint extends EnvelopRestEndpoint {
                               @RequestParam(value = "orderSource",defaultValue = "1") Integer orderSource
                               @RequestParam(value = "orderSource",defaultValue = "1") Integer orderSource
                               ){
                               ){
        try {
        try {
            JSONObject result = assistanceService.newOrder(patientId,jsonData,getUID(),orderSource);
            JSONObject result = assistanceService.newOrder(patientId,jsonData,getUID(),orderSource,getAgentUID());
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
            }
            }
@ -271,7 +269,7 @@ public class EmergencyAssistanceEndpoint extends EnvelopRestEndpoint {
                                       @ApiParam(name="content",value = "content")
                                       @ApiParam(name="content",value = "content")
                                       @RequestParam(value = "content") String content){
                                       @RequestParam(value = "content") String content){
        try {
        try {
            JSONObject result =assistanceService.sendQuickMessage(orderId,patient,content);
            JSONObject result =assistanceService.sendQuickMessage(orderId,patient,content,getAgentUID());
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
            }
            }

+ 6 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/consult/PatientConsultEndpoint.java

@ -168,6 +168,8 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			if (type == null) {
			if (type == null) {
				type = 23;
				type = 23;
			}
			}
			String agent = getAgentUID();
			ConsultTeamDo consult = new ConsultTeamDo();
			ConsultTeamDo consult = new ConsultTeamDo();
			// 设置咨询类型:23 在线咨询 24老人在线咨询
			// 设置咨询类型:23 在线咨询 24老人在线咨询
			consult.setType(type);
			consult.setType(type);
@ -182,7 +184,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			// 保存到数据库
			// 保存到数据库
			synchronized (patient.intern()){//新增同步方法
			synchronized (patient.intern()){//新增同步方法
				JSONObject re = null;
				JSONObject re = null;
				re = consultService.addTeamConsult(consult, patient,doctor,source);
				re = consultService.addTeamConsult(consult, patient,doctor,source,agent);
				//发送系统消息
				//发送系统消息
				SystemMessageDO systemMessageDO = new SystemMessageDO();
				SystemMessageDO systemMessageDO = new SystemMessageDO();
				systemMessageDO.setTitle("新增在线咨询");
				systemMessageDO.setTitle("新增在线咨询");
@ -206,7 +208,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
				consultService.saveMessage(systemMessageDO);
				consultService.saveMessage(systemMessageDO);
				serviceNewsService.addServiceNews(re.getString("patientName"),patient,"2",null);
				serviceNewsService.addServiceNews(re.getString("patientName"),patient,"2",null,consult.getConsult(),1);
			}
			}
			return success("操作成功", consult);
			return success("操作成功", consult);
@ -342,8 +344,8 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
					content = fileUploadService.uploadWxImage(imagepath);
					content = fileUploadService.uploadWxImage(imagepath);
				}
				}
			}else{}
			}else{}
			failed = imService.append(consult,content,type,times,patientCode,wechat_appid);
			String agent = getAgentUID();
			failed = imService.append(consult,content,type,times,patientCode,wechat_appid,agent);
			return success(failed);
			return success(failed);
		}catch (Exception e){
		}catch (Exception e){
			return failedListEnvelopException2(e);
			return failedListEnvelopException2(e);

+ 1 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/DoctorDeviceController.java

@ -151,4 +151,5 @@ public class DoctorDeviceController extends BaseController {
		}
		}
	}
	}
}
}

+ 40 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/PadDeviceController.java

@ -75,12 +75,14 @@ public class PadDeviceController extends BaseController {
    @RequestMapping(value = "PatientDeviceList", method = RequestMethod.GET)
    @RequestMapping(value = "PatientDeviceList", method = RequestMethod.GET)
    public String getDeviceByPatient(@ApiParam(name = "patientName", value = "居民姓名", defaultValue = "张")
    public String getDeviceByPatient(@ApiParam(name = "patientName", value = "居民姓名", defaultValue = "张")
                                     @RequestParam(value = "patientName", required = false) String patientName,
                                     @RequestParam(value = "patientName", required = false) String patientName,
                                     @ApiParam(name = "doctor", value = "doctor")
                                     @RequestParam(value = "doctor", required = false) String doctor,
                                     @ApiParam(name = "page", value = "分页起始id", defaultValue = "1")
                                     @ApiParam(name = "page", value = "分页起始id", defaultValue = "1")
                                     @RequestParam(value = "page", required = true) int page,
                                     @RequestParam(value = "page", required = true) int page,
                                     @ApiParam(name = "pagesize", value = "每页条数", defaultValue = "10")
                                     @ApiParam(name = "pagesize", value = "每页条数", defaultValue = "10")
                                     @RequestParam(value = "pagesize", required = true) int pagesize) {
                                     @RequestParam(value = "pagesize", required = true) int pagesize) {
        try {
        try {
            List<Map<String , Object>> list = patientDeviceService.findDeviceFromAdmin(patientName, page, pagesize);
            List<Map<String , Object>> list = patientDeviceService.findDeviceFromAdmin(doctor,patientName, page, pagesize);
            return write(200, "查询成功", "data", list);
            return write(200, "查询成功", "data", list);
        } catch (Exception ex) {
        } catch (Exception ex) {
@ -155,6 +157,8 @@ public class PadDeviceController extends BaseController {
                    return write(-1,"sn码已被使用");
                    return write(-1,"sn码已被使用");
                } else if (flagDevice == -4) {
                } else if (flagDevice == -4) {
                    return write(-1,"不存在该条记录");
                    return write(-1,"不存在该条记录");
                } else if (flagDevice == -5) {
                    return write(-1,"请勿重复绑定设备");
                }
                }
                //注册设备地址
                //注册设备地址
                deviceDetailService.registerToWlyy(device);
                deviceDetailService.registerToWlyy(device);
@ -306,4 +310,39 @@ public class PadDeviceController extends BaseController {
        }
        }
    }
    }
    @RequestMapping(value ="addPatientSosContacts",method = RequestMethod.POST)
    @ApiOperation(value = "设备绑定添加联系人")
    public String addPatientSosContacts(@ApiParam(name = "patient", value = "patient", defaultValue = "patient")
                                           @RequestParam(value = "patient", required = true) String patient,
                                        @ApiParam(name = "jsonStr", value = "patient", defaultValue = "patient")
                                        @RequestParam(value = "jsonStr", required = true) String jsonStr,
                                        @ApiParam(name = "isUpdate", value = "是否有更新联系人 1是 0否", defaultValue = "isUpdate")
                                        @RequestParam(value = "isUpdate", defaultValue = "1") Integer isUpdate){
        try {
            JSONObject result = contactsService.addPatientSosContacts(patient,jsonStr,isUpdate);
            if (ResponseContant.success == result.getInteger(ResponseContant.resultFlag)){
                return success("添加成功");
            }
            else {
                return error(-1,result.getString(ResponseContant.resultMsg));
            }
        }catch (Exception e){
            return errorResult(e);
        }
    }
    @RequestMapping(value ="getPatientSafeArea",method = RequestMethod.GET)
    @ApiOperation(value = "获取患者安全区域")
    public String getPatientSafeArea(@ApiParam(name = "patient", value = "patient", defaultValue = "patient")
                                        @RequestParam(value = "patient", required = true) String patient){
        try {
            return write(200,"获取成功","data",contactsService.getPatientSafeArea(patient));
        }catch (Exception e){
            return errorResult(e);
        }
    }
}
}

+ 17 - 13
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/PatientDeviceController.java

@ -77,7 +77,7 @@ public class PatientDeviceController extends BaseController {
                                   @ApiParam(name = "date", value = "日期", defaultValue = "2021-08-24")
                                   @ApiParam(name = "date", value = "日期", defaultValue = "2021-08-24")
                                   @RequestParam(value = "date", required = true) String date){
                                   @RequestParam(value = "date", required = true) String date){
        try {
        try {
            return write(200,"获取成功","data",patientDeviceService.gasConcentration(patientId,date));
            return write(200,"获取成功","data",patientDeviceService.gasConcentration(patientId,date,null));
        } catch (Exception ex) {
        } catch (Exception ex) {
            return errorResult(ex);
            return errorResult(ex);
        }
        }
@ -142,6 +142,8 @@ public class PatientDeviceController extends BaseController {
                    return write(-1,"sn码已被使用");
                    return write(-1,"sn码已被使用");
                } else if (flagDevice == -4) {
                } else if (flagDevice == -4) {
                    return write(-1,"不存在该条记录");
                    return write(-1,"不存在该条记录");
                } else if (flagDevice == -5) {
                    return write(-1,"请勿重复绑定设备");
                }
                }
                //注册设备地址
                //注册设备地址
                deviceDetailService.registerToWlyy(device);
                deviceDetailService.registerToWlyy(device);
@ -322,29 +324,31 @@ public class PatientDeviceController extends BaseController {
    @ApiOperation("更新智能手环设备安全区域")
    @ApiOperation("更新智能手环设备安全区域")
    @RequestMapping(value = "updateDeviceFenceArea",method = RequestMethod.GET)
    @RequestMapping(value = "updateDeviceFenceArea",method = RequestMethod.GET)
    public String updateDeviceFenceArea(@ApiParam(name = "deviceSn",value = "设备sn码")
    public String updateDeviceFenceArea(@ApiParam(name = "patient",value = "患者")
                                        @RequestParam(value = "patient",required = false)String patient,
                                        @ApiParam(name = "deviceSn",value = "设备sn码")
                                        @RequestParam(value = "deviceSn",required = true)String deviceSn,
                                        @RequestParam(value = "deviceSn",required = true)String deviceSn,
                                        @ApiParam(name = "fenceNO",value = "安全区编号")
                                        @ApiParam(name = "fenceNO",value = "安全区编号")
                                        @RequestParam(value = "fenceNO",required = false)Integer fenceNO,
                                        @RequestParam(value = "fenceNO",defaultValue = "1",required = false)Integer fenceNO,
                                        @ApiParam(name = "enable",value = "0,1 是否启用")
                                        @ApiParam(name = "enable",value = "0,1 是否启用")
                                        @RequestParam(value = "enable",required = false)String enable,
                                        @RequestParam(value = "enable",defaultValue = "1",required = false)String enable,
                                        @ApiParam(name = "name",value = "安全区名称")
                                        @ApiParam(name = "name",value = "安全区名称")
                                        @RequestParam(value = "name",required = false)String name,
                                        @RequestParam(value = "name",defaultValue = "安全区域1",required = false)String name,
                                        @ApiParam(name = "freq",value = "0,触发一天;1,每日触发 ")
                                        @ApiParam(name = "freq",value = "0,触发一天;1,每日触发 ")
                                        @RequestParam(value = "freq",required = false)String freq,
                                        @ApiParam(name = "time_begin",value = "目标时间与当日0点之间相差的秒数 ")
                                        @RequestParam(value = "freq",defaultValue = "1",required = false)String freq,
                                        @ApiParam(name = "time_begin",defaultValue = "0",value = "目标时间与当日0点之间相差的秒数 ")
                                        @RequestParam(value = "time_begin",defaultValue = "0",required = false)String time_begin,
                                        @RequestParam(value = "time_begin",defaultValue = "0",required = false)String time_begin,
                                        @ApiParam(name = "time_end",value = "同上 ")
                                        @ApiParam(name = "time_end",defaultValue = "86400",value = "同上 ")
                                        @RequestParam(value = "time_end",defaultValue = "86400",required = false)String time_end,
                                        @RequestParam(value = "time_end",defaultValue = "86400",required = false)String time_end,
                                        @ApiParam(name = "safe_area",value = "lon1,lat1;lon2,lat2; 5个坐标 形成一个封闭区域  A;B;C;D;A ")
                                        @ApiParam(name = "safe_area",value = "lon1,lat1;lon2,lat2; 5个坐标 形成一个封闭区域  A;B;C;D;A ")
                                        @RequestParam(value = "safe_area",required = false)String safe_area,
                                        @RequestParam(value = "safe_area",required = false)String safe_area,
                                        @ApiParam(name = "clear",value = "删除标志,删除传1")
                                        @ApiParam(name = "clear",value = "删除标志,删除传1")
                                        @RequestParam(value = "clear",required = false)String clear
                                        @RequestParam(value = "clear",required = false)String clear
                                        ){
                                        ){
        try {
        try {
            return write(200,"获取成功","data",patientDeviceService.updateDeviceFenceArea(deviceSn, fenceNO, enable, name, freq, time_begin, time_end, safe_area, clear));
            return write(200,"设置成功","data",patientDeviceService.updateDeviceFenceArea(patient,deviceSn, fenceNO, enable, name, freq, time_begin, time_end, safe_area, clear));
        }catch (Exception e){
        }catch (Exception e){
            return errorResult(e);
            return error(-1,"安全区域设置失败");
        }
        }
    }
    }
@ -427,7 +431,7 @@ public class PatientDeviceController extends BaseController {
        }
        }
    }
    }
    @ApiOperation("获取设备详情信息")
    @ApiOperation("获取设备详情数据 --设备可多人绑定查询数据时与patient无关")
    @RequestMapping(value = "getPatientDeviceData",method = RequestMethod.GET)
    @RequestMapping(value = "getPatientDeviceData",method = RequestMethod.GET)
    public String getPatientDeviceData(@ApiParam(name="patient")
    public String getPatientDeviceData(@ApiParam(name="patient")
                                       @RequestParam(value = "patient")String patient,
                                       @RequestParam(value = "patient")String patient,
@ -439,7 +443,7 @@ public class PatientDeviceController extends BaseController {
                                       @RequestParam(value = "pageSize")Integer pageSize){
                                       @RequestParam(value = "pageSize")Integer pageSize){
        try {
        try {
            return write(200,"获取成功","data",patientDeviceService.getPatientDeviceData(patient,deviceSn,page,pageSize));
            return write(200,"获取成功","data",patientDeviceService.getPatientDeviceData(patient,null,deviceSn,page,pageSize));
        }catch (Exception e){
        }catch (Exception e){
            return errorResult(e);
            return errorResult(e);
        }
        }

+ 29 - 12
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorEndpoint.java

@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.consult.ConsultTeamService;
import com.yihu.jw.care.service.consult.ConsultTeamService;
import com.yihu.jw.care.service.doctor.CareDoctorService;
import com.yihu.jw.care.service.doctor.CareDoctorService;
import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
import com.yihu.jw.care.service.doctor.DoctorServicePermissionsService;
import com.yihu.jw.care.service.sign.CapacityAssessmentRecordService;
import com.yihu.jw.care.service.sign.CapacityAssessmentRecordService;
import com.yihu.jw.care.util.EntranceUtil;
import com.yihu.jw.care.util.EntranceUtil;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
@ -13,11 +13,9 @@ import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.netty.handler.codec.serialization.ObjectEncoder;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
@ -42,6 +40,8 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
    private ConsultTeamService consultTeamService;
    private ConsultTeamService consultTeamService;
    @Autowired
    @Autowired
    private EntranceUtil entranceUtil;
    private EntranceUtil entranceUtil;
    @Autowired
    private DoctorServicePermissionsService doctorServicePermissionsService;
    @GetMapping(value = "doctorPage")
    @GetMapping(value = "doctorPage")
    @ApiOperation(value = "获取医生记录分页")
    @ApiOperation(value = "获取医生记录分页")
@ -53,7 +53,7 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
            @RequestParam(value = "size") int size){
        try{
        try{
            return doctorService.doctorPage(name, orgCode, page, size);
            return doctorService.doctorPage(name, orgCode, page, size);
        }catch (Exception e){
        }catch (Exception e){
@ -67,7 +67,7 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "doctorId", value = "医生id", required = true)
            @ApiParam(name = "doctorId", value = "医生id", required = true)
            @RequestParam(value = "doctorId",required = true) String doctorId,
            @RequestParam(value = "doctorId",required = true) String doctorId,
            @ApiParam(name = "isRole", value = "是否返回角色(1是 0否)", required = false)
            @ApiParam(name = "isRole", value = "是否返回角色(1是 0否)", required = false)
            @RequestParam(value = "isRole",required = false) String isRole) throws Exception {
            @RequestParam(value = "isRole",required = false) String isRole){
        try{
        try{
            return ObjEnvelop.getSuccess("查询成功",doctorService.doctorInfo(doctorId,isRole));
            return ObjEnvelop.getSuccess("查询成功",doctorService.doctorInfo(doctorId,isRole));
        }catch (Exception e){
        }catch (Exception e){
@ -75,11 +75,23 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
        }
        }
    }
    }
    @GetMapping(value = "servicePermissions")
    @ApiOperation(value = "获取医生服务权限")
    public ObjEnvelop servicePermissions (
            @ApiParam(name = "doctorId", value = "医生id", required = true)
            @RequestParam(value = "doctorId",required = true) String doctorId) {
        try{
            return ObjEnvelop.getSuccess("查询成功",doctorServicePermissionsService.findByDoctor(doctorId));
        }catch (Exception e){
            return failedObjEnvelopException2(e);
        }
    }
    @GetMapping(value = "patientCount")
    @GetMapping(value = "patientCount")
    @ApiOperation(value = "获取我的居民统计数量")
    @ApiOperation(value = "获取我的居民统计数量")
    public ObjEnvelop patientCount (
    public ObjEnvelop patientCount (
            @ApiParam(name = "doctorId", value = "医生id", required = true)
            @ApiParam(name = "doctorId", value = "医生id", required = true)
            @RequestParam(value = "doctorId",required = true) String doctorId) throws Exception {
            @RequestParam(value = "doctorId",required = true) String doctorId){
        try{
        try{
            return ObjEnvelop.getSuccess("查询成功",capacityAssessmentRecordService.getPatientNum(doctorId));
            return ObjEnvelop.getSuccess("查询成功",capacityAssessmentRecordService.getPatientNum(doctorId));
        }catch (Exception e){
        }catch (Exception e){
@ -92,13 +104,18 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
    @ObserverRequired
    @ObserverRequired
    public Envelop update(
    public Envelop update(
            @ApiParam(name = "baseDoctorVo", value = "JSON数据", required = true)
            @ApiParam(name = "baseDoctorVo", value = "JSON数据", required = true)
            @RequestParam(value = "baseDoctorVo") String baseDoctorVo)throws Exception{
        JSONObject jsonObject = JSONObject.parseObject(baseDoctorVo);
        Boolean update = doctorService.update(jsonObject);
        if (!update){
            return failed("保存失败,参数不可为空");
            @RequestParam(value = "baseDoctorVo") String baseDoctorVo){
        try {
            JSONObject jsonObject = JSONObject.parseObject(baseDoctorVo);
            Boolean update = doctorService.update(jsonObject);
            if (!update){
                return failed("保存失败,参数不可为空");
            }
            return success("保存成功");
        }catch (Exception e){
            e.printStackTrace();
            return failedException2(e);
        }
        }
        return success("保存成功");
    }
    }

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/family/FamilyMemberEndpoint.java

@ -383,6 +383,8 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
                return failed( "验证码已过期,请重新获取验证码",-1);
                return failed( "验证码已过期,请重新获取验证码",-1);
            }else if (result == -7) {
            }else if (result == -7) {
                return failed( "您或家人性别信息未填写无法添加成员",-1);
                return failed( "您或家人性别信息未填写无法添加成员",-1);
            }else if (result == -8) {
                return failed( "不能添加非老人亲属类型的成员",-1);
            } else {
            } else {
                return success( "添加成功");
                return success( "添加成功");
            }
            }

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/DoctorLifeCareEndpoint.java

@ -148,7 +148,7 @@ public class DoctorLifeCareEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "doctor", value = "医生id") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "doctor", value = "医生id") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
            @ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        try{
        try{
            JSONObject result = lifeCareOrderService.create(jsonData,doctor);
            JSONObject result = lifeCareOrderService.create(jsonData,doctor,null);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return Envelop.getError(result.getString(ResponseContant.resultMsg),-1);
                return Envelop.getError(result.getString(ResponseContant.resultMsg),-1);
            }
            }

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PadLifeCareEndpoint.java

@ -36,7 +36,7 @@ public class PadLifeCareEndpoint extends EnvelopRestEndpoint {
    public Envelop create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
    public Envelop create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
        try{
        try{
            result = lifeCareOrderService.create(jsonData,getUID());
            result = lifeCareOrderService.create(jsonData,getUID(),getAgentUID());
        }catch (Exception e){
        }catch (Exception e){
            return failedException2(e);
            return failedException2(e);
        }
        }

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PatientLifeCareEndpoint.java

@ -33,7 +33,7 @@ public class PatientLifeCareEndpoint  extends EnvelopRestEndpoint {
    public Envelop create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
    public Envelop create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
        try{
        try{
            result = lifeCareOrderService.create(jsonData,getUID());
            result = lifeCareOrderService.create(jsonData,getUID(),getAgentUID());
        }catch (Exception e){
        }catch (Exception e){
            return failedException2(e);
            return failedException2(e);
        }
        }

+ 5 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/PatientMessageEndpoint.java

@ -62,7 +62,7 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
    public ListEnvelop getSystemMessage(@ApiParam(name = "patient",required = true)
    public ListEnvelop getSystemMessage(@ApiParam(name = "patient",required = true)
                                        @RequestParam(value = "patient")String patient){
                                        @RequestParam(value = "patient")String patient){
        try {
        try {
            return ListEnvelop.getSuccess("查询成功",patientMessageService.getSystemMessage(patient));
            return ListEnvelop.getSuccess("查询成功",patientMessageService.getSystemMessage(patient,getAgentUID()));
        }catch (Exception e){
        }catch (Exception e){
            return failedListEnvelopException2(e);
            return failedListEnvelopException2(e);
        }
        }
@ -76,7 +76,9 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
                                            @RequestParam(value = "type")String type
                                            @RequestParam(value = "type")String type
                                            ){
                                            ){
        try {
        try {
            return ListEnvelop.getSuccess("查询成功",patientMessageService.getSystemMessageList(patient,type,null));
            return ListEnvelop.getSuccess("查询成功",patientMessageService.getSystemMessageList(patient,type,null,getAgentUID()));
        }catch (Exception e){
        }catch (Exception e){
            return failedListEnvelopException2(e);
            return failedListEnvelopException2(e);
        }
        }
@ -92,7 +94,7 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
                                            @RequestParam(value = "isRead",required = false)String isRead
                                            @RequestParam(value = "isRead",required = false)String isRead
    ){
    ){
        try {
        try {
            return ListEnvelop.getSuccess("查询成功",patientMessageService.getSystemMessageList(patient,type,isRead));
            return ListEnvelop.getSuccess("查询成功",patientMessageService.getSystemMessageList(patient,type,isRead,getAgentUID()));
        }catch (Exception e){
        }catch (Exception e){
            return failedListEnvelopException2(e);
            return failedListEnvelopException2(e);
        }
        }

+ 19 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java

@ -8,6 +8,7 @@ import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
import com.yihu.jw.care.service.patient.CarePatientService;
import com.yihu.jw.care.service.patient.CarePatientService;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -18,6 +19,7 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
@ -36,6 +38,8 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    private CarePatientService patientService;
    private CarePatientService patientService;
    @Autowired
    @Autowired
    private WlyyPatientLabelDao patientLabelDao;
    private WlyyPatientLabelDao patientLabelDao;
    @Autowired
    private BasePatientDao patientDao;
    public int num = 20;
    public int num = 20;
    @GetMapping(value = "testException")
    @GetMapping(value = "testException")
@ -120,7 +124,21 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "isCapacity", value = "是否返回能力评估,1返回其他值不返回,默认不返回", required = false)
            @ApiParam(name = "isCapacity", value = "是否返回能力评估,1返回其他值不返回,默认不返回", required = false)
            @RequestParam(value = "isCapacity", required = false) String isCapacity) {
            @RequestParam(value = "isCapacity", required = false) String isCapacity) {
        try{
        try{
            return success("获取成功",patientService.findPatientById(id,isCapacity));
            String agent = getAgentUID();
            return success("获取成功",patientService.findPatientById(id,agent,isCapacity));
        }catch (Exception e){
            return failedException2(e);
        }
    }
    @GetMapping(value = "findByPateintId")
    @ApiOperation(value = "获取居民信息")
    public Envelop findByPateintId(
            @ApiParam(name = "id", value = "居民id")
            @RequestParam(value = "id", required = true) String id) {
        try{
            BasePatientDO patientDO = patientDao.findById(id);
            return success("获取成功",patientDO);
        }catch (Exception e){
        }catch (Exception e){
            return failedException2(e);
            return failedException2(e);
        }
        }

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java

@ -340,7 +340,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
                                            @ApiParam(name = "topicItem", value = "专题code,关联security_topic_dict字典", required = false)
                                            @ApiParam(name = "topicItem", value = "专题code,关联security_topic_dict字典", required = false)
                                            @RequestParam(value = "topicItem") String topicItem) {
                                            @RequestParam(value = "topicItem") String topicItem) {
        try {
        try {
            return ObjEnvelop.getSuccess( "查询成功", securityMonitoringOrderService.patientSignTopicInfo(null,patient,topicItem));
            return ObjEnvelop.getSuccess( "查询成功", securityMonitoringOrderService.patientSignTopicInfo(null,patient,topicItem,null));
        } catch (Exception e) {
        } catch (Exception e) {
            return failedObjEnvelopException2(e);
            return failedObjEnvelopException2(e);
        }
        }

+ 108 - 5
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/statistics/DetectionPlatformEndpoint.java

@ -1,8 +1,13 @@
package com.yihu.jw.care.endpoint.statistics;
package com.yihu.jw.care.endpoint.statistics;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.endpoint.BaseController;
import com.yihu.jw.care.service.device.PatientDeviceService;
import com.yihu.jw.care.service.statistics.DetectionPlatformService;
import com.yihu.jw.care.service.statistics.DetectionPlatformService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
@ -11,10 +16,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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 org.springframework.web.bind.annotation.*;
/***
/***
 * @ClassName: DetectionPlatformEndpoint
 * @ClassName: DetectionPlatformEndpoint
@ -30,13 +32,16 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint {
    @Autowired
    @Autowired
    private DetectionPlatformService platformService;
    private DetectionPlatformService platformService;
    @Autowired
    private PatientDeviceService patientDeviceService;
    /**************************v1.1.0新增 设备异常动态************************************/
    @GetMapping(value = "getHealthMonitoringListNew")
    @GetMapping(value = "getHealthMonitoringListNew")
    @ApiOperation(value = "体征监测/安防监护")
    @ApiOperation(value = "体征监测/安防监护")
    public PageEnvelop getHealthMonitoringListNew(
    public PageEnvelop getHealthMonitoringListNew(
            @ApiParam(name="page",value = "page") @RequestParam(required = true) int page,
            @ApiParam(name="page",value = "page") @RequestParam(required = true) int page,
            @ApiParam(name="size",value = "size") @RequestParam(required = true) int size,
            @ApiParam(name="size",value = "size") @RequestParam(required = true) int size,
            @ApiParam(name="type",value = "type=1(健康监测)   type=2(安防检测)") @RequestParam(required = true) int type) {
            @ApiParam(name="type",value = "type=1(健康监测)   type=2(安防检测)   type=3(设备异常)") @RequestParam(required = true) int type) {
        try {
        try {
            return platformService.getHealthMonitoringListNew(page,size,type);
            return platformService.getHealthMonitoringListNew(page,size,type);
        } catch (Exception e) {
        } catch (Exception e) {
@ -55,6 +60,17 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint {
        }
        }
    }
    }
    @GetMapping(value = "getRealTimeData")
    @ApiOperation(value = "实时数据")
    public ObjEnvelop getRealTimeData(){
        try {
            JSONObject o = platformService.getRealTimeData();
            return success(o);
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "getDeviceType")
    @GetMapping(value = "getDeviceType")
    @ApiOperation(value = "设备类型")
    @ApiOperation(value = "设备类型")
    public ListEnvelop getDeviceType(){
    public ListEnvelop getDeviceType(){
@ -88,5 +104,92 @@ public class DetectionPlatformEndpoint extends EnvelopRestEndpoint {
        }
        }
    }
    }
    @GetMapping(value = "nightRecordList")
    @ApiOperation(value = "根据设备sn码查询起夜记录")
    public ListEnvelop nightRecordList(            @ApiParam(name="deviceSn",value = "deviceSn") @RequestParam(required = true) String deviceSn){
        try {
            return success("查询成功",200, platformService.nightRecordList(deviceSn));
        }catch (Exception e){
            return failedListEnvelopException(e);
        }
    }
    @ApiOperation("获取设备详情信息")
    @RequestMapping(value = "getPatientDeviceDetail",method = RequestMethod.GET)
    public Envelop getPatientDeviceDetail(@ApiParam(name="patient")
                                         @RequestParam(value = "patient")String patient,
                                          @ApiParam(name="deviceSN")
                                         @RequestParam(value = "deviceSN")String deviceSn,
                                          @ApiParam(name="day",value = "yyyy-mm-dd")
                                         @RequestParam(value = "day",required = false)String day){
        try {
            org.json.JSONObject result = patientDeviceService.getPatientDeviceDetail(patient,deviceSn,day);
            if (result.getInt(ResponseContant.resultFlag)==ResponseContant.success){
                return success(JSON.parseObject(result.getString(ResponseContant.resultMsg)));
            }else {
                return success(result.getString(ResponseContant.resultMsg), -1);
            }
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
    @ApiOperation("获取设备详情数据 --设备可多人绑定查询数据时与patient无关")
    @GetMapping(value = "getPatientDeviceData")
    public Envelop getPatientDeviceData(@ApiParam(name="patient")
                                       @RequestParam(value = "patient")String patient,
                                       @ApiParam(name="deviceSN")
                                       @RequestParam(value = "deviceSN")String deviceSn,
                                       @ApiParam(name="type",value = "0全部 1日常监护 2预警记录")
                                       @RequestParam(value = "type",required = false)String type,
                                       @ApiParam(name="page")
                                       @RequestParam(value = "page")Integer page,
                                       @ApiParam(name="pageSize")
                                       @RequestParam(value = "pageSize")Integer pageSize){
        try {
            org.json.JSONObject result = patientDeviceService.getPatientDeviceData(patient,type,deviceSn,page,pageSize);
            if (result.getInt(ResponseContant.resultFlag)==ResponseContant.success){
                return success(JSON.parseObject(result.getString(ResponseContant.resultMsg)));
            }else {
                return success(result.getString(ResponseContant.resultMsg), -1);
            }
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
    /********************v1.1.0**************************/
    @GetMapping(value = "getGiveEarlyWarning")
    @ApiOperation(value = "物联网检测大屏,预警部分")
    public ObjEnvelop getGiveEarlyWarning(){
        try {
            return success("查询成功",200, platformService.getDistributionOfWarningTypes());
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "getServiceSituation")
    @ApiOperation(value = "物联网检测大屏,服务情况")
    public ObjEnvelop getServiceSituation(){
        try {
            return success("查询成功",200, platformService.getServiceSituation());
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "deviceAndService")
        @ApiOperation(value = "物联网检测大屏,设备种类     安防服务")
    public ObjEnvelop deviceAndService(){
        try {
            return success("查询成功",200, platformService.deviceAndService());
        }catch (Exception e){
            return failedObjEnvelopException(e);
        }
    }
}
}

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/assistance/EmeAsEndpoint.java

@ -34,7 +34,7 @@ public class EmeAsEndpoint extends EnvelopRestEndpoint {
                               @RequestParam(value = "orderSource",defaultValue = "1") Integer orderSource
                               @RequestParam(value = "orderSource",defaultValue = "1") Integer orderSource
    ){
    ){
        try {
        try {
            JSONObject result = assistanceService.newOrder(patientId,jsonData,getUID(),orderSource);
            JSONObject result = assistanceService.newOrder(patientId,jsonData,getUID(),orderSource,null);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
                return ObjEnvelop.getError(result.getString(ResponseContant.resultMsg));
            }
            }

+ 11 - 9
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/device/PDeviceController.java

@ -105,29 +105,31 @@ public class PDeviceController extends BaseController {
    @ApiOperation("更新智能手环设备安全区域")
    @ApiOperation("更新智能手环设备安全区域")
    @RequestMapping(value = "updateDeviceFenceArea",method = RequestMethod.GET)
    @RequestMapping(value = "updateDeviceFenceArea",method = RequestMethod.GET)
    public String updateDeviceFenceArea(@ApiParam(name = "deviceSn",value = "设备sn码")
    public String updateDeviceFenceArea(@ApiParam(name = "patient",value = "患者")
                                        @RequestParam(value = "patient",required = false)String patient,
                                        @ApiParam(name = "deviceSn",value = "设备sn码")
                                        @RequestParam(value = "deviceSn",required = true)String deviceSn,
                                        @RequestParam(value = "deviceSn",required = true)String deviceSn,
                                        @ApiParam(name = "fenceNO",value = "安全区编号")
                                        @ApiParam(name = "fenceNO",value = "安全区编号")
                                        @RequestParam(value = "fenceNO",required = false)Integer fenceNO,
                                        @RequestParam(value = "fenceNO",defaultValue = "1",required = false)Integer fenceNO,
                                        @ApiParam(name = "enable",value = "0,1 是否启用")
                                        @ApiParam(name = "enable",value = "0,1 是否启用")
                                        @RequestParam(value = "enable",required = false)String enable,
                                        @RequestParam(value = "enable",defaultValue = "1",required = false)String enable,
                                        @ApiParam(name = "name",value = "安全区名称")
                                        @ApiParam(name = "name",value = "安全区名称")
                                        @RequestParam(value = "name",required = false)String name,
                                        @RequestParam(value = "name",defaultValue = "安全区域1",required = false)String name,
                                        @ApiParam(name = "freq",value = "0,触发一天;1,每日触发 ")
                                        @ApiParam(name = "freq",value = "0,触发一天;1,每日触发 ")
                                        @RequestParam(value = "freq",required = false)String freq,
                                        @RequestParam(value = "freq",defaultValue = "1",required = false)String freq,
                                        @ApiParam(name = "time_begin",defaultValue = "0",value = "目标时间与当日0点之间相差的秒数 ")
                                        @ApiParam(name = "time_begin",defaultValue = "0",value = "目标时间与当日0点之间相差的秒数 ")
                                        @RequestParam(value = "time_begin",required = false)String time_begin,
                                        @RequestParam(value = "time_begin",defaultValue = "0",required = false)String time_begin,
                                        @ApiParam(name = "time_end",defaultValue = "86400",value = "同上 ")
                                        @ApiParam(name = "time_end",defaultValue = "86400",value = "同上 ")
                                        @RequestParam(value = "time_end",required = false)String time_end,
                                        @RequestParam(value = "time_end",defaultValue = "86400",required = false)String time_end,
                                        @ApiParam(name = "safe_area",value = "lon1,lat1;lon2,lat2; 5个坐标 形成一个封闭区域  A;B;C;D;A ")
                                        @ApiParam(name = "safe_area",value = "lon1,lat1;lon2,lat2; 5个坐标 形成一个封闭区域  A;B;C;D;A ")
                                        @RequestParam(value = "safe_area",required = false)String safe_area,
                                        @RequestParam(value = "safe_area",required = false)String safe_area,
                                        @ApiParam(name = "clear",value = "删除标志,删除传1")
                                        @ApiParam(name = "clear",value = "删除标志,删除传1")
                                        @RequestParam(value = "clear",required = false)String clear
                                        @RequestParam(value = "clear",required = false)String clear
                                        ){
                                        ){
        try {
        try {
            return write(200,"获取成功","data",patientDeviceService.updateDeviceFenceArea(deviceSn, fenceNO, enable, name, freq, time_begin, time_end, safe_area, clear));
            return write(200,"设置成功","data",patientDeviceService.updateDeviceFenceArea(patient,deviceSn, fenceNO, enable, name, freq, time_begin, time_end, safe_area, clear));
        }catch (Exception e){
        }catch (Exception e){
            return errorResult(e);
            return error(-1,"安全区域设置失败");
        }
        }
    }
    }
}
}

+ 0 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/platForm/PatientInfoPlatFormEndpoint.java


部分文件因文件數量過多而無法顯示