LAPTOP-KB9HII50\70708 2 år sedan
förälder
incheckning
55ec8e0067
100 ändrade filer med 0 tillägg och 3195 borttagningar
  1. 0 365
      svr/svr-cloud-care/pom.xml
  2. 0 6
      svr/svr-cloud-care/readme.MD
  3. 0 17
      svr/svr-cloud-care/sql/init.sql
  4. 0 125
      svr/svr-cloud-care/sql/sql
  5. 0 26
      svr/svr-cloud-care/src/main/java/com/yihu/SvrCloudCareApplication.java
  6. 0 47
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/BaseAop.java
  7. 0 14
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ObserverRequired.java
  8. 0 55
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ObserverRequiredAOP.java
  9. 0 45
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/RedisLock.java
  10. 0 178
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/RedisLockAOP.java
  11. 0 22
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ServicesAuth.java
  12. 0 71
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ServicesAuthAOP.java
  13. 0 72
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/AqgConfig.java
  14. 0 54
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/AsyncConfig.java
  15. 0 27
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/BeanConfig.java
  16. 0 47
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/MvcConfig.java
  17. 0 40
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/NetworkCardConfig.java
  18. 0 125
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/RedisConfig.java
  19. 0 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/SpringSecurityAuditorAware.java
  20. 0 13
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/WebSocketConfig.java
  21. 0 106
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/YsConfig.java
  22. 0 23
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/constant/CommonConstant.java
  23. 0 25
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/activity/ChildActivityRegistrationDao.java
  24. 0 27
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/apply/PatientBedApplyDao.java
  25. 0 22
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/assistance/EmergencyAssistanceDao.java
  26. 0 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/birthday/BirthDayWishesToPatientDao.java
  27. 0 29
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/birthday/BirthdayWishesTemplateDao.java
  28. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/booking/BaseBookingServiceDao.java
  29. 0 19
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/child/BaseChildManageDao.java
  30. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/common/BaseLoginLogDao.java
  31. 0 17
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/consult/BaseYunxingChannelDao.java
  32. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/contacts/BasePatientContactsOrgDao.java
  33. 0 26
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/contacts/PatientSosContactsDao.java
  34. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/CourseCatalogueDao.java
  35. 0 16
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/CourseDao.java
  36. 0 20
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/CourseSalesOrderRecordDao.java
  37. 0 20
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/CustomerServiceDao.java
  38. 0 30
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/DoctorPatientTmpDao.java
  39. 0 16
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/NurseryLogDao.java
  40. 0 20
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/PatientCourseRecordDao.java
  41. 0 19
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/PatientDietRecordDao.java
  42. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/PatientOrderRefundDao.java
  43. 0 24
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/RecruitStudentsDao.java
  44. 0 24
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/RecruitStudentsRecordDao.java
  45. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseDeviceElectricRecordDao.java
  46. 0 13
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseDeviceFaceRecordDao.java
  47. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseDevicePatientFaceDao.java
  48. 0 15
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseDeviceRepairDao.java
  49. 0 17
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseHzInterfaceDictDao.java
  50. 0 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BasePatientMonitorDataDao.java
  51. 0 14
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BasePatientOutBedDao.java
  52. 0 11
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseSleepDeviceReportDao.java
  53. 0 25
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseSleepNightRecordDao.java
  54. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseSleepPlanDao.java
  55. 0 24
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseSleepPlanDetailDao.java
  56. 0 20
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseYxDeviceIndexDao.java
  57. 0 24
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DeviceDao.java
  58. 0 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DeviceDataPushLogDao.java
  59. 0 25
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DeviceDetailDao.java
  60. 0 9
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DeviceInfoDao.java
  61. 0 81
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/DevicePatientHealthIndexDao.java
  62. 0 76
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientDeviceDao.java
  63. 0 20
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientSafeAreaConfirmDao.java
  64. 0 30
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientSafeAreaDao.java
  65. 0 18
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/YsConfigDao.java
  66. 0 18
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doctor/DoctorServicePermissionsDao.java
  67. 0 18
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachCancelLogDao.java
  68. 0 17
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachConclusionDao.java
  69. 0 33
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachDoctorStatusDao.java
  70. 0 42
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachFeeDetailDao.java
  71. 0 55
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachOrderDao.java
  72. 0 14
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachPatientConfirmLogDao.java
  73. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachProcessLogDao.java
  74. 0 11
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/exam/ChildrenExaminationRecordDao.java
  75. 0 61
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/family/PatientFamilyMemberDao.java
  76. 0 23
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/handover/BaseDayHandoverDao.java
  77. 0 19
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/label/BaseCapacityLabelDao.java
  78. 0 25
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/label/WlyyPatientLabelDao.java
  79. 0 15
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/BaseAdminServiceDynamicDao.java
  80. 0 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/LifeCareCancelLogDao.java
  81. 0 15
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/LifeCareFeeDetailDao.java
  82. 0 21
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/LifeCareItemDictDao.java
  83. 0 13
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/lifeCare/LifeCareOrderDao.java
  84. 0 19
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePatientPadPushOnOffDao.java
  85. 0 17
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePushRecordLogDao.java
  86. 0 12
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePushrecordLogInfoDao.java
  87. 0 26
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/message/BaseServiceNewsDao.java
  88. 0 11
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/message/OrgNoticeDao.java
  89. 0 14
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/message/UserNoticeDao.java
  90. 0 16
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/prescription/BaseCarePrescriptionDao.java
  91. 0 19
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/role/DoctorRoleDao.java
  92. 0 17
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/role/DoctorRoleRealmDao.java
  93. 0 15
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/role/UserRoleDao.java
  94. 0 30
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/BaseEmergencyWarnLogDao.java
  95. 0 15
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/EmergencyWarnCancelLogDao.java
  96. 0 18
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/EmergencyWarnConclusionDao.java
  97. 0 15
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/EmergencyWarnDoctorResponseDao.java
  98. 0 16
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/SecurityMonitoringDoctorStatusDao.java
  99. 0 32
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/SecurityMonitoringOrderDao.java
  100. 0 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/sign/ArchiveDao.java

+ 0 - 365
svr/svr-cloud-care/pom.xml

@ -1,365 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>wlyy-parent-pom</artifactId>
        <version>2.4.0</version>
        <relativePath>../../wlyy-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-cloud-care</artifactId>
    <packaging>jar</packaging>
    <version>${project.parent.version}</version>
    <dependencies>
        <!-- 支持Tomcat启动 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
<!--            <scope>provided</scope>-->
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
        </dependency>
        <!-- 支持Tomcat启动 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <!--注释掉就不会读取git的配置,只会读取yml中的配置-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-activemq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-entity</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-web</artifactId>
        </dependency>
        <!-- SPRINGSIDE -->
        <dependency>
            <groupId>org.springside</groupId>
            <artifactId>springside-core</artifactId>
            <version>4.2.3-GA</version>
        </dependency>
        <!-- 文件服务器 -->
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>fastdfs-starter</artifactId>
        </dependency>
        <!-- Swagger-ui library -->
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>swagger-starter</artifactId>
            <version>2.4.0</version>
        </dependency>
        <!-- Jzkl Starter -->
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>mysql-starter</artifactId>
            <version>${version.wlyy-common}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.tomcat</groupId>
                    <artifactId>tomcat-jdbc</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <!-- <scope>runtime</scope> -->
        </dependency>
        <!--<dependency>-->
            <!--<groupId>com.yihu</groupId>-->
            <!--<artifactId>elasticsearch-starter</artifactId>-->
            <!--<version>2.0.0</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>io.github.swagger2markup</groupId>
            <artifactId>swagger2markup</artifactId>
            <version>1.3.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>mailapi</artifactId>
                    <groupId>javax.mail</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- 发送邮件 -->
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.4.7</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <!--   poi xml导入导出工具 start-->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.yihu.ehr</groupId>
                    <artifactId>commons-util</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-collections4</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch.plugin</groupId>
            <artifactId>shield</artifactId>
            <version>2.4.6</version>
        </dependency>
        <!-- xlsx  依赖这个包 -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml-schemas</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <!--   poi xml导入导出工具 end -->
        <!--基础业务组件-->
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>base-service</artifactId>
            <version>2.4.0</version>
            <exclusions>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.his.hesb</groupId>
                    <artifactId>mqSdk</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!--缩略图-->
        <dependency>
            <groupId>net.coobird</groupId>
            <artifactId>thumbnailator</artifactId>
            <version>0.4.8</version>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>push-service</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>im-service</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>sms-service</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>es-service</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.hikvision.ga</groupId>
            <artifactId>artemis-http-client</artifactId>
            <version>1.1.3</version>
        </dependency>
        <!--钉钉sdk-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>zwdd-sdk-java</artifactId>
            <version>1.2.0</version>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>com.tencentcloudapi</groupId>
            <artifactId>tencentcloud-speech-sdk-java</artifactId>
            <version>1.0.12</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>svr-cloud-care-test</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <!-- 是否要把第三方jar加入到类构建路径 -->
                            <addClasspath>true</addClasspath>
                            <!-- 外部依赖jar包的最终位置 -->
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.yihu.SvrCloudCareApplication</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!--拷贝依赖到jar外面的lib目录-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-lib</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- 依赖包输出目录,将来不打进jar包里 -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <excludeTransitive>false</excludeTransitive>
                            <stripVersion>false</stripVersion>
                            <includeScope>runtime</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--指定配置文件,将resources打成外部resource-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
                        <manifestEntries>
                            <Class-Path>resources/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
                    <excludes>
                        <exclude>**/*.yml</exclude>
                        <exclude>**/*.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- 拷贝资源文件 外面的resource目录-->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <!-- 资源文件输出目录 -->
                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

+ 0 - 6
svr/svr-cloud-care/readme.MD

@ -1,6 +0,0 @@
基础微服务
    每个模块有自己独立的文件夹,这样做的好处是以后如果哪个模块需要独立成微服务,代码直接剪切到新的微服务即可。
    每个模块下面有独立的Endpoint,service,model和dao
@ObserverRequired
医生端观察者模式。医生端请求的post的接口必须加这个注解

+ 0 - 17
svr/svr-cloud-care/sql/init.sql

@ -1,19 +0,0 @@
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('hz_yxyzh_wx_sms_SecretId', NULL, 'hz_yxyzh_wx_sms', 'SecretId', 'AKIDwhBPN5WgYAVaO2QXNwEF0UieJhpgGZbN', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('hz_yxyzh_wx_sms_SecretKey', NULL, 'hz_yxyzh_wx_sms', 'SecretKey', 'WliPpdBSXMuBBuNZU8VbQyFG0TfaEbhX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('hz_yxyzh_wx_sms_signName', NULL, 'hz_yxyzh_wx_sms', 'signName', '朝晖云照护', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('hz_yxyzh_wx_sms_smsSdkAppId', NULL, 'hz_yxyzh_wx_sms', 'smsSdkAppId', '1400526119', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('hz_yxyzh_wx_sms_VerificationCode', NULL, 'hz_yxyzh_wx_sms', 'VerificationCode', '969545', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb791c71820179644adf58003e', NULL, 'orderPayStatus', '1', '待审核', '', '1', NULL, '2021-05-13 13:54:59.032', '123', NULL, '2021-05-13 13:54:59.032', '123', NULL, '', '订单支付状态');
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb791c71820179644b2373003f', NULL, 'orderPayStatus', '2', '待支付', '', '2', NULL, '2021-05-13 13:55:16.467', '123', NULL, '2021-05-13 13:55:16.467', '123', NULL, '', '订单支付状态');
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb791c71820179644b50730040', NULL, 'orderPayStatus', '3', '已支付', '', '3', NULL, '2021-05-13 13:55:27.987', '123', NULL, '2021-05-13 13:55:27.987', '123', NULL, '', '订单支付状态');
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb791c71820179644bbddc0041', NULL, 'orderPayStatus', '4', '审核未通过', '', '4', NULL, '2021-05-13 13:55:55.996', '123', NULL, '2021-05-13 13:55:55.996', '123', NULL, '', '订单支付状态');
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb791c71820179644c4e7a0043', NULL, 'orderPayStatus', '5', '已退款', '', '5', NULL, '2021-05-13 13:56:33.018', '123', NULL, '2021-05-13 16:02:53.057', '123', NULL, '', '订单支付状态');
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb797db4ce01797e3f387a0003', NULL, 'orderPayStatus', '6', '退款中', '', '6', NULL, '2021-05-18 14:52:23.034', '123', NULL, '2021-05-18 14:52:23.034', '123', NULL, '', '订单支付状态');
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('808080eb797db4ce01797e4111060004', NULL, 'orderPayStatus', '7', '已取消', '', '7', NULL, '2021-05-18 14:54:24.006', '123', NULL, '2021-05-18 14:54:24.006', '123', NULL, '', '订单支付状态');
ALTER TABLE base.base_service_package add COLUMN `org_code` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '机构编码';
ALTER TABLE base.base_service_package add COLUMN `org_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '机构名称';

+ 0 - 125
svr/svr-cloud-care/sql/sql

@ -1,125 +0,0 @@
CREATE TABLE base.base_capacity_assessment_baseinfo (
  `id` varchar(50) NOT NULL,
  `assessment_year` varchar(4) DEFAULT NULL COMMENT '评估年份',
  `status` tinyint(5) DEFAULT '1' COMMENT '状态 0失效 1有效 ',
  `patient` varchar(50) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `sex` tinyint(2) DEFAULT NULL,
  `age` varchar(5) DEFAULT NULL,
  `nation` varchar(20) DEFAULT NULL COMMENT '名族',
  `nation_name` varchar(50) DEFAULT NULL COMMENT '名族名称',
  `religion` varchar(20) DEFAULT NULL COMMENT '宗教信仰 0无;1有',
  `idcard` varchar(20) DEFAULT NULL,
  `domicile` varchar(20) DEFAULT NULL COMMENT '户籍 0本地户口;1外地户口',
  `marriage` varchar(20) DEFAULT NULL COMMENT '婚姻状况 10.未婚 20.已婚 30.丧偶 40.离婚 90.未说明的婚姻状况',
  `marriage_remark` varchar(255) DEFAULT NULL COMMENT '婚姻状况 备注',
  `education` varchar(20) DEFAULT NULL COMMENT '文化程度 0文盲及半文盲;1小学;2初中;3高中/技校/中专;4大学专科及以上;5不详',
  `income_type` varchar(20) DEFAULT NULL COMMENT '主要经济来源 0退休金/养老金;1子女补贴;2亲友资助;3其他补贴',
  `pension_flag` varchar(20) DEFAULT NULL COMMENT '是否有养老金收入 0无 1有',
  `pension_count` varchar(20) DEFAULT NULL COMMENT '养老金收入 元/月',
  `family_type` varchar(20) DEFAULT NULL COMMENT '是否为经济困难家庭 0否 1特困 2低保 3低保边缘 ',
  `disability_certificate` varchar(20) DEFAULT NULL COMMENT '是否为持证残疾人 0否 1是 ',
  `medical_insurance_type` varchar(20) DEFAULT NULL COMMENT '医保类别 1职工基本医疗保险 2城乡居民基本医疗保险 3其他医疗保障 4无任何保障',
  `medical_insurance` varchar(20) DEFAULT NULL COMMENT '是否购买了商业健康(医疗)保险 0否 1是 ',
  `living_type` varchar(20) DEFAULT NULL COMMENT '现住场所:1自有产权房、私房等;2各类租赁房等;3养老院或类似机构;4护理院或类似机构;5医院或类似机构',
  `living_together` varchar(20) DEFAULT NULL COMMENT '同居者类型 0独居;1与配偶/伴侣居住;2与子女居住;3与孙辈居住;4与父母居住;5与兄弟姐妹居住;6与其他亲友居住;7其他',
  `living_together_remark` varchar(255) DEFAULT NULL COMMENT '同居者备注',
  `dementia_flag` varchar(20) DEFAULT NULL COMMENT '痴呆症 0无 1有',
  `mental_illness` varchar(20) DEFAULT NULL COMMENT '精神疾病(可多选)0无;1精神分裂症;2双相情感障碍;3偏执性精神障碍;4分裂情感性障碍;5癫痫所致精神障碍;6精神发育迟滞伴发精神障碍',
  `disease_type` varchar(20) DEFAULT NULL COMMENT '患病类型可多选;0无 1肿瘤(晚期)2严重心律失常3压疮4慢性心力衰竭(心功能III-IV级)5慢性肾功能衰竭(尿毒症期)6多器官功能衰竭7蛋白质能量营养不足(重度)8慢性阻塞性肺疾病(肺心病心功能III-IV级)9呼吸衰竭10脑血管意外合并吞咽障碍11其他',
  `disease_remark` varchar(255) DEFAULT NULL COMMENT '其他疾病',
  `fall_lately` varchar(20) DEFAULT NULL COMMENT '近30天跌倒 0无;1一次;2两次;3三次及以上',
  `lost_lately` varchar(20) DEFAULT NULL COMMENT '近30天走失 0无;1一次;2两次;3三次及以上',
  `choking_lately` varchar(20) DEFAULT NULL COMMENT '近30天噎食 0无;1一次;2两次;3三次及以上',
  `suicide_lately` varchar(20) DEFAULT NULL COMMENT '近30天自杀 0无;1一次;2两次;3三次及以上',
  `remark_lately` varchar(255) DEFAULT NULL COMMENT '近30天意外 其他 0无;1一次;2两次;3三次及以上',
  `medical_services` varchar(255) DEFAULT NULL COMMENT '近7天是否接受过医疗护理服务 0无1有',
  `domicile_county` varchar(255) DEFAULT NULL COMMENT '户籍  区(县、市)',
  `domicile_county_name` varchar(255) DEFAULT NULL COMMENT '户籍  区(县、市)',
  `domicile_street` varchar(255) DEFAULT NULL COMMENT '户籍  街(镇)',
  `domicile_street_name` varchar(255) DEFAULT NULL COMMENT '户籍  街(镇)',
  `domicile_org` varchar(255) DEFAULT NULL COMMENT '户籍 社(村)',
  `domicile_org_name` varchar(255) DEFAULT NULL COMMENT '户籍 社(村)',
  `domicile_building` varchar(255) DEFAULT NULL COMMENT '户籍 xx幢',
  `domicile_room` varchar(255) DEFAULT NULL COMMENT '户籍 xx室',
  `live_county` varchar(255) DEFAULT NULL COMMENT '居住地  区(县、市)',
  `live_county_name` varchar(255) DEFAULT NULL COMMENT '居住地名称  区(县、市)',
  `live_street` varchar(255) DEFAULT NULL COMMENT '居住地  街(镇)',
  `live_street_name` varchar(255) DEFAULT NULL COMMENT '居住地名称  街(镇)',
  `live_org` varchar(255) DEFAULT NULL COMMENT '居住地 社(村)',
  `live_org_name` varchar(255) DEFAULT NULL COMMENT '居住地名称 社(村)',
  `live_building` varchar(255) DEFAULT NULL COMMENT '居住地 xx幢',
  `live_room` varchar(255) DEFAULT NULL COMMENT '居住地 xx室',
  `postcode` varchar(50) DEFAULT NULL COMMENT '邮编',
  `residence_phone` varchar(50) DEFAULT NULL COMMENT '住宅电话',
  `patient_phone` varchar(50) DEFAULT NULL COMMENT '手机',
  `proxy_name` varchar(50) DEFAULT NULL COMMENT '代理人姓名',
  `applicant_relation` varchar(50) DEFAULT NULL COMMENT '与申请人关系',
  `proxy_address` varchar(255) DEFAULT NULL COMMENT '代理人地址',
  `proxy_telephone` varchar(50) DEFAULT NULL COMMENT '代理人电话',
  `proxy_phone` varchar(50) DEFAULT NULL COMMENT '代理人手机',
  `applicant_sign` varchar(255) DEFAULT NULL COMMENT '申请人(代理人) 签字结果图片url',
  `applicant_date` varchar(50) DEFAULT NULL COMMENT '申请日期',
  `service_type` varchar(50) DEFAULT NULL COMMENT '养老服务形式 0居家养老 1机构养老',
  `acceptable_services_life1` varchar(50) DEFAULT NULL COMMENT '直接生活照顾  1穿衣;2修饰;3口腔清洁;4皮肤清洁;5喂食服务;6排泄照料 ',
  `acceptable_services_life2` varchar(50) DEFAULT NULL COMMENT '间接生活照顾  1居室清洁;2更换洗涤;3上门维修;4定期探访;5膳食服务;6文化教育;7娱乐休闲;8室外休闲(户外);9紧急呼援;10法律援助;11转介服务;12咨询服务',
  `acceptable_services_mental` varchar(50) DEFAULT NULL COMMENT '精神心理照顾 1危机干预;2沟通;3精神支持;4心理疏导;5心理咨询',
  `acceptable_services_rehabilitation` varchar(255) DEFAULT NULL COMMENT '康复护理照顾 1定期翻身;2压疮预;3防活动肢体;4肢体保健;5康复活动;6预防保健;7健康咨询;8健康管理;9健康教育;10临终关怀 ',
  `acceptable_services_other` varchar(255) DEFAULT NULL COMMENT '其他',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='能力评估-基本信息表';
CREATE TABLE base.base_capacity_assessment_living_ability (
  `id` varchar(50) NOT NULL,
  `assessment_year` varchar(4) DEFAULT NULL COMMENT '评估年份',
  `status` tinyint(5) DEFAULT '1' COMMENT '状态 0失效 1有效 ',
  `patient` varchar(50) DEFAULT NULL,
  `eating_ability_score` varchar(50) DEFAULT NULL COMMENT '进食能力得分 10可独立进食;5需部分帮助;0需要极大帮助或完全依赖他人',
  `shower_ability_score` varchar(50) DEFAULT NULL COMMENT '洗澡能力得分 5可独立完成;0需要帮助',
  `washing_ability_score` varchar(50) DEFAULT NULL COMMENT '洗漱能力得分 5可独立完成;0需要帮助',
  `dressing_ability_score` varchar(50) DEFAULT NULL COMMENT '穿衣能力得分 10可独立完成;5需要部分帮助;0需要极大帮助或完全依赖他人',
  `excretion_ability_score` varchar(50) DEFAULT NULL COMMENT '排便控制能力得分 10可自主控制;5偶尔失控(每周小于一次,或需要他人提示);0完全失控',
  `urination_ability_score` varchar(50) DEFAULT NULL COMMENT '排尿控制能力得分 10可自主控制;5偶尔失控(每周小于一次,或需要他人提示);0完全失控或留置导尿管',
  `toilet_ability_score` varchar(50) DEFAULT NULL COMMENT '如厕能力得分 10可独立完成;5需部分帮助;0需要极大帮助或完全依赖他人',
  `transfer_bed_ability_score` varchar(50) DEFAULT NULL COMMENT '床椅转移能力得分 15可独立完成10需要部分帮忙5需要极大帮忙0完全依赖他人',
  `walking_ability_score` varchar(50) DEFAULT NULL COMMENT '平地行走能力得分 15可独立行走45m;10需要部分帮助;5需要极大帮助;0完全依赖他人',
  `down_stairs_ability_score` varchar(50) DEFAULT NULL COMMENT '上下楼梯能力得分10可独立上下楼梯(连续10~15个台阶);5需要部分帮忙0需要极大帮助或完全依赖他人',
  `total_score` varchar(50) DEFAULT NULL COMMENT '日常生活能力总分 上述得分和 总分100 ',
  `ability_grade` varchar(50) DEFAULT NULL COMMENT '能力等级:0能力完好(100);1轻度受损(65-95);2中度受损(45-60);3重度受损(≤40)',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='能力评估-日常生活能力评估表';
CREATE TABLE base.base_capacity_assessment_cognitive_ability (
  `id` varchar(50) NOT NULL,
  `assessment_year` varchar(4) DEFAULT NULL COMMENT '评估年份',
  `status` tinyint(5) DEFAULT '1' COMMENT '状态 0失效 1有效 ',
  `patient` varchar(50) DEFAULT NULL,
  `question1` varchar(4) DEFAULT NULL COMMENT '问题一得分 总分3分',
  `question2` varchar(4) DEFAULT NULL COMMENT '问题二得分 总分5分',
  `question3` varchar(4) DEFAULT NULL COMMENT '问题三得分 总分5分',
  `question4` varchar(4) DEFAULT NULL COMMENT '问题四得分 总分3分',
  `total_score` varchar(50) DEFAULT NULL COMMENT '认知能力 上述得分和  ',
  `ability_grade` varchar(50) DEFAULT NULL COMMENT '能力等级:0能力完好(16);1轻度受损(13-15);2中度受损(9-12);3重度受损(≤8)',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='能力评估-认知能力表';
CREATE TABLE base.base_capacity_assessment_social_ability (
  `id` varchar(50) NOT NULL,
  `assessment_year` varchar(4) DEFAULT NULL COMMENT '评估年份',
  `status` tinyint(5) DEFAULT '1' COMMENT '状态 0失效 1有效 ',
  `patient` varchar(50) DEFAULT NULL,
  `aggress_score` varchar(4) DEFAULT NULL COMMENT '攻击行为得分 总分3分',
  `depressed_score` varchar(4) DEFAULT NULL COMMENT '抑郁状态得分 总分5分',
  `consciousness_score` varchar(4) DEFAULT NULL COMMENT '意识水平得分 总分5分',
  `communicate_score` varchar(4) DEFAULT NULL COMMENT '沟通交流得分 总分3分',
  `social_skills_score` varchar(50) DEFAULT NULL COMMENT '社交能力得分   ',
  `vision_score` varchar(50) DEFAULT NULL COMMENT '视力功能得分   ',
  `hearing_score` varchar(50) DEFAULT NULL COMMENT '听力能力得分   ',
  `total_score` varchar(50) DEFAULT NULL COMMENT ' 精神状态与社会交流能力总分 上述得分和 总分22',
  `ability_grade` varchar(50) DEFAULT NULL COMMENT '能力等级:0能力完好(22);1轻度受损(15-21);2中度受损(7-14);3重度受损(≤6)',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='能力评估-精神状态与社会交流能力表';

+ 0 - 26
svr/svr-cloud-care/src/main/java/com/yihu/SvrCloudCareApplication.java

@ -1,26 +0,0 @@
package com.yihu;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
/**
 * Created by Trick on 2019/5/13.
 */
@SpringBootApplication
@EnableJpaAuditing
@ComponentScan("com.yihu")
public class SvrCloudCareApplication extends SpringBootServletInitializer {
    public static void main(String[] args)  {
        SpringApplication.run(SvrCloudCareApplication.class, args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SvrCloudCareApplication.class);
    }
}

+ 0 - 47
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/BaseAop.java

@ -1,47 +0,0 @@
package com.yihu.jw.care.aop;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import javax.servlet.http.HttpServletRequest;
/**
 * Created by yeshijie on 2021/4/23.
 */
public class BaseAop {
    public String write(int code, String msg) {
        try {
            JSONObject json = new JSONObject();
            json.put("status", code);
            json.put("msg", msg);
            return json.toString();
        } catch (Exception e) {
            return null;
        }
    }
    public String error(int code, String msg) {
        try {
            JSONObject json = new JSONObject();
            json.put("status", code);
            json.put("msg", msg);
            return json.toString();
        } catch (Exception e) {
            return null;
        }
    }
    public JSONObject getAgent(HttpServletRequest request) {
        try {
            String userAgent = request.getHeader("userAgent");
            if (StringUtils.isEmpty(userAgent)) {
                userAgent = request.getHeader("User-Agent");
            }
            System.out.println("userAgent:" + userAgent);
            return new JSONObject(userAgent);
        } catch (Exception e) {
            return null;
        }
    }
}

+ 0 - 14
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ObserverRequired.java

@ -1,14 +0,0 @@
package com.yihu.jw.care.aop;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
 * Created by Trick on 2017/6/24.
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ObserverRequired {
}

+ 0 - 55
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ObserverRequiredAOP.java

@ -1,55 +0,0 @@
package com.yihu.jw.care.aop;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.json.JSONObject;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
/**
 * Created by Trick on 2017/6/24..
 */
@Aspect
@Component
public class ObserverRequiredAOP extends BaseAop{
    //Controller层切点路径
    @Pointcut("execution(* com.yihu.jw.care.endpoint..*.*(..))")
    public void controllerAspect() {
    }
    public ObserverRequiredAOP() {
        //System.out.println("Observer---------------------------------------");
    }
    @Around("controllerAspect() && @annotation(com.yihu.jw.care.aop.ObserverRequired)")
    public Object checkToken(ProceedingJoinPoint point) throws Throwable {
        Object o = null;
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
        String error = "";
        try {
            response.setCharacterEncoding("UTF-8");
            JSONObject json = getAgent(request);
            String observer = json.has("observer") ? json.getString("observer") : "";
            if(StringUtils.isNotBlank(observer)&&"1".equals(observer)){
                PrintWriter writer=response.getWriter();
                writer.write(error(403, "该操作没有权限"));
                writer.flush();
                return o;
            }
        }catch (Exception e){
            //return o;
        }
         o = point.proceed();
        return o;
    }
}

+ 0 - 45
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/RedisLock.java

@ -1,45 +0,0 @@
package com.yihu.jw.care.aop;
import com.yihu.jw.care.util.RedisConstant;
import java.lang.annotation.*;
/**
 * redis分布式锁注解
 *
 * Created by yeshijie on 2021/4/23.
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RedisLock {
    /**
     * 锁值
     *
     * @return {@link String}
     */
    String value() default "";
    /**
     * spel参数(#开头)
     *
     * @return {@link String}
     */
    String key() default "";
    /**
     * 上锁超时时间,单位秒
     *
     * @return long
     */
    long time() default RedisConstant.REDIS_LOCK_EXPIRE;
    /**
     * 提示
     *
     * @return {@link String}
     */
    String msg() default "请求频繁,请稍后再试";
}

+ 0 - 178
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/RedisLockAOP.java

@ -1,178 +0,0 @@
package com.yihu.jw.care.aop;
import com.google.common.base.Joiner;
import com.yihu.jw.care.exception.BusinessException;
import com.yihu.jw.care.service.common.RedisService;
import com.yihu.jw.care.util.RedisConstant;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.core.annotation.Order;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.SpelEvaluationException;
import org.springframework.expression.spel.SpelParseException;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
 * redis分布式锁AOP
 *
 * @author yeshijie
 * @version 1.0.0
 * @date 2021/4/23
 */
@Aspect
@Order(-1)
@Component
public class RedisLockAOP {
    private static final Logger LOGGER = LoggerFactory.getLogger(RedisLockAOP.class);
    @Autowired
    private RedisService redisService;
    private static final ExpressionParser PARSER = new SpelExpressionParser();
    private static final ParameterNameDiscoverer DISCOVERER = new LocalVariableTableParameterNameDiscoverer();
    private static final String UNDERLINE = "_";
    private static final String REDIS_LOCK = "REDIS_LOCK";
    /**
     * aop切入点
     *
     * @param redisLock
     */
    @Pointcut("@annotation(redisLock)")
    public void pointCut(RedisLock redisLock) {
    }
    /**
     * aop环绕
     *
     * @param joinPoint
     * @param redisLock
     * @return {@link Object}
     */
    @Around(value = "pointCut(redisLock)", argNames = "joinPoint,redisLock")
    public Object around(ProceedingJoinPoint joinPoint, RedisLock redisLock) throws Throwable {
        return aroundRedisLock(joinPoint, redisLock);
    }
    /**
     * 分布式锁
     *
     * @param joinPoint
     * @param redisLock
     * @return {@link Object}
     */
    public Object aroundRedisLock(ProceedingJoinPoint joinPoint, RedisLock redisLock) throws Throwable {
        String lockKey = null;
        Object result;
        boolean lock = false;
        try {
            lockKey = getLockKey(joinPoint, redisLock);
            lock = redisService.tryLock(lockKey, REDIS_LOCK, redisLock.time());
            if (!lock) {
                LOGGER.error("【LOCK】{}", redisLock.msg());
                throw new BusinessException(redisLock.msg());
            }
            result = joinPoint.proceed();
        } catch (SpelParseException e) {
            LOGGER.error("【LOCK】表达式解析异常", e);
            throw new BusinessException("【LOCK】请求异常,请稍后再试");
        } catch (SpelEvaluationException e) {
            LOGGER.error("【LOCK】表达式异常:{}", e.getMessage());
            throw new BusinessException("【LOCK】请求异常,请稍后再试");
        } catch (BusinessException e) {
            LOGGER.error("【LOCK】请求异常", e);
            throw new BusinessException(e.getMessage());
        } catch (Exception e) {
            LOGGER.error("【LOCK】请求异常", e);
            throw new BusinessException("请求异常,请稍后再试");
        } finally {
            if (lock) {
                redisService.releaseLock(lockKey);
            }
        }
        return result;
    }
    /**
     * 获取分布式锁key
     *
     * @param joinPoint
     * @param redisLock
     * @return {@link String}
     */
    public String getLockKey(ProceedingJoinPoint joinPoint, RedisLock redisLock) {
        MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
        List<String> keyList = new ArrayList<>();
        keyList.add(RedisConstant.REDIS_LOCK_PREFIX);
        keyList.add(joinPoint.getTarget().getClass().getSimpleName().toUpperCase());
        // 如果配置key前缀则使用配置的,否则用方法名
        if (StringUtils.isNotBlank(redisLock.value())) {
            keyList.add(redisLock.value());
        } else {
            keyList.add(methodSignature.getName().toUpperCase());
        }
        // 解析spel表达式
        String key = getParseKey(redisLock.key(), methodSignature.getMethod(), joinPoint.getArgs());
        if (StringUtils.isNotBlank(key)) {
            keyList.add(key);
        }
        return Joiner.on(UNDERLINE).join(keyList);
    }
    /**
     * 获取缓存的key
     * key 定义在注解上,支持SPEL表达式
     *
     * @param key
     * @param method
     * @param args
     * @return {@link String}
     */
    public String getParseKey(String key, Method method, Object[] args) {
        if (StringUtils.isBlank(key)) {
            return getHexKey(args);
        }
        // 获取请求参数名
        String[] paramNames = DISCOVERER.getParameterNames(method);
        if (paramNames != null && paramNames.length > 0) {
            StandardEvaluationContext context = new StandardEvaluationContext();
            for (int i = 0; i < args.length; i++) {
                context.setVariable(paramNames[i], args[i]);
            }
            // 解析表达式
            return PARSER.parseExpression(key).getValue(context, String.class);
        } else {
            return getHexKey(args);
        }
    }
    /**
     * hex加密key
     *
     * @param args
     * @return {@link String}
     */
    public static String getHexKey(Object[] args) {
        if (args != null && args.length > 0) {
            return DigestUtils.md5Hex(Arrays.toString(args));
        } else {
            return null;
        }
    }
}

+ 0 - 22
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ServicesAuth.java

@ -1,22 +0,0 @@
package com.yihu.jw.care.aop;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
 * 使用该注解必须带item。注解的方法参数必须有patientId
 * 服务项权限控制
 * Created by yeshijie on 2021/3/5.
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ServicesAuth {
    /**
     * 服务项code
     * @return
     */
    String item();
}

+ 0 - 71
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/aop/ServicesAuthAOP.java

@ -1,71 +0,0 @@
package com.yihu.jw.care.aop;
import com.yihu.jw.care.service.sign.ServicePackageService;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.util.List;
/**
 * Created by yeshijie on 2021/3/5.
 */
@Aspect
@Component
public class ServicesAuthAOP extends BaseAop{
    @Autowired
    private ServicePackageService servicePackageService;
    //Controller层切点路径
    @Pointcut("execution(* com.yihu.jw.care.endpoint..*.*(..))")
    public void controllerAspect() {
    }
    public ServicesAuthAOP() {
        //System.out.println("Observer---------------------------------------");
    }
    @Around("controllerAspect() && @annotation(com.yihu.jw.care.aop.ServicesAuth)")
    public Object checkToken(ProceedingJoinPoint point) throws Throwable {
        Object o = null;
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
        try {
            response.setCharacterEncoding("UTF-8");
            MethodSignature signature = (MethodSignature)point.getSignature();
            ServicesAuth annotation = signature.getMethod().getAnnotation(ServicesAuth.class);
            String item = annotation.item();
            String patientId = request.getParameter("patientId");
            if(StringUtils.isBlank(item)||StringUtils.isBlank(patientId)){
                PrintWriter writer=response.getWriter();
                writer.write(error(401, "该操作没有权限"));
                writer.flush();
                return o;
            }
            List<String> items =servicePackageService.fingServiceItemsCodeByPatientId(patientId);
            if(!items.contains(item)){
                PrintWriter writer=response.getWriter();
                writer.write(error(401, "未签约相关服务,该操作没有权限"));
                writer.flush();
                return o;
            }
        }catch (Exception e){
            //return o;
        }
         o = point.proceed();
        return o;
    }
}

+ 0 - 72
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/AqgConfig.java

@ -1,72 +0,0 @@
package com.yihu.jw.care.config;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/4/29
 * @Description: 爱牵挂配置
 */
public class AqgConfig {
    /**
     * 基础url
     */
//    public static final String baseUrl = "http://120.24.56.48:8889";//测试环境
    public static final String baseUrl = "http://api.aiqiangua.com:8888";// 正式环境
    /**
     * 登录
     */
    public static final String login = baseUrl +"/api/auth/login";
    /**
     * 获取设备信息
     */
    public static final String deviceInfo = baseUrl +"/api/device/{0}";
    /**
     * 修改亲情号码
     */
    public static final String sos_numbers = baseUrl +"/api/device/{0}/sos_numbers/{1}";
    public static final String X1sos_numbers = baseUrl +"/api/device/{0}/4g/sos_numbers/{1}";
    /**
     * 获取设备最新位置数据
     */
    public static final String device_last_locationData = baseUrl +"/api/device/{0}/data/locationdata/";
    /**
     * 设置智能手环安全区域
     */
    public static final String S3fence_area = baseUrl +"/api/device/{0}/fences/{1}";
    public static final String X1fence_area = baseUrl +"/api/device/{0}/4g/fences/{1}";
    /**
     * X1定位数据  即轨迹
     */
    public static final String X1_locations = baseUrl+"/api/locationdata/";
    /**
     * X1设备修改
     * 计步1小时 心率30分钟 定位15分钟
     * 计步数据开关、 睡眠开关、轨迹开关、 心率、血氧、血压定时测量开关
     */
    public static final String X1_deviceModify = baseUrl+"/api/device/{0}/4g/edit?frequency_location=15&frequency_step=60" +
            "&frequency_heartrate=30&pedometer_enable=1&sleep_enable=1&track_enable=1&heartrate_enable=1";
    /**
     * 睡眠带 修改心率呼吸率报警阈值
     */
    public static final String  sleepDevice_edit=baseUrl+ "/api/sleepdevice/{0}/edit/";
    /**
     * 睡眠带 查询睡眠带信息
     */
    public static final String  sleepDevice_info=baseUrl+"/api/sleepdevice/";
    public static final String username = "13559485270";
    public static final String password = "zjxl@2021";
    public static final String redisKey = "aqgCooker";
    /**
     * cookie时效24小时,吧过期时间设置为23 小时
     */
    public static final Long overTime = 23L;
}

+ 0 - 54
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/AsyncConfig.java

@ -1,54 +0,0 @@
package com.yihu.jw.care.config;
import org.apache.tomcat.util.threads.ThreadPoolExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
/**
 * Created by yeshijie
 * 启用多綫程
 */
@Configuration
@EnableAsync
public class AsyncConfig {
    /**
     * 如果池中的实际线程数小于corePoolSize,无论是否其中有空闲的线程,都会给新的任务产生新的线程
     */
    private int corePoolSize = 5;
    /**
     * 如果池中的线程数=maximumPoolSize,则有空闲线程使用空闲线程,否则新任务放入queueCapacity.
     * 设定 比 系统native thread个数要大的话,会优先抛出Java.lang.OutOfMemoryError: unable to create new native thread
     */
    private int maxPoolSize = 10;
    /**
     * 缓冲队列大小
     */
    private int queueCapacity = 100;
    /**
     * 线程池维护线程所允许的空闲时间  秒
     */
    private int keepAliveSeconds = 300;
    @Bean
    public Executor wlyyExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(corePoolSize);
        executor.setMaxPoolSize(maxPoolSize);
        executor.setQueueCapacity(queueCapacity);
        executor.setKeepAliveSeconds(keepAliveSeconds);
        /** Reject策略预定义有四种:
         (1)ThreadPoolExecutor.AbortPolicy策略,是默认的策略,处理程序遭到拒绝将抛出运行时 RejectedExecutionException。
         (2)ThreadPoolExecutor.CallerRunsPolicy策略 ,调用者的线程会执行该任务,如果执行器已关闭,则丢弃.
         (3)ThreadPoolExecutor.DiscardPolicy策略,不能执行的任务将被丢弃.
         (4)ThreadPoolExecutor.DiscardOldestPolicy策略,如果执行程序尚未关闭,则位于工作队列头部的任务将被删除,然后重试执行程序(如果再次失败,则重复此过程).
         */
        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        executor.initialize();
        return executor;
    }
}

+ 0 - 27
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/BeanConfig.java

@ -1,27 +0,0 @@
package com.yihu.jw.care.config;
import com.yihu.jw.hospital.prescription.service.PrescriptionExpressageService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class BeanConfig {
    //顺丰快递接口请求地址
    @Value("${express.sf_url}")
    private String sf_url;
    //顺丰快递接口接入编码
    @Value("${express.sf_code}")
    private String sf_code;
    //顺丰快递接口checkword
    @Value("${express.sf_check_word}")
    private String sf_check_word;
    @Bean(name = "prescriptionExpressageService")
    PrescriptionExpressageService prescriptionExpressageService(){
        return new PrescriptionExpressageService(sf_url,sf_code,sf_check_word);
    }
}

+ 0 - 47
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/MvcConfig.java

@ -1,47 +0,0 @@
package com.yihu.jw.care.config;
import com.yihu.jw.care.interceptors.CrosXssFilter;
import com.yihu.jw.care.interceptors.GateWayInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
 * Created by chenweida on 2017/4/6.
 */
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {
    private Logger logger = LoggerFactory.getLogger(MvcConfig.class);
    @Autowired
    private GateWayInterceptor gateWayInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 多个拦截器组成一个拦截器链
        // addPathPatterns 用于添加拦截规则
//         excludePathPatterns 用户排除拦截 ,/third/juye/kit/**
        registry.addInterceptor(gateWayInterceptor).addPathPatterns("/open/gc/**").excludePathPatterns(
                "/open/gc/accesstoken");
        super.addInterceptors(registry);
        logger.info("init gateWayInterceptor");
    }
    @Bean
    public FilterRegistrationBean testFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new CrosXssFilter());
        registration.addUrlPatterns("/*");
        registration.setName("CrosXssFilter");
        registration.setOrder(1);
        return registration;
    }
}

+ 0 - 40
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/NetworkCardConfig.java

@ -1,40 +0,0 @@
package com.yihu.jw.care.config;
import com.yihu.jw.util.date.DateUtil;
/**
 * Created by Bing on 2021/8/6.
 * 电信物联网卡
 */
public class NetworkCardConfig {
    //平台地址 https://ct.cmonelink.com/zh/#/infoPanel/index
    //user:BE5714630405 password:Zjxl2008@
    //文档地址https://ec.iot.10086.cn/ecology/supportService/documents
    public static final String appid="571AIOT2021072910102922281";
    public static final String password="OnXE@QFlwt9R";
    public static final String redisKey="dianXinAssesToken";
    public static final String flowGroupId= "9911000019265335";//流量池群组
    //APPID+YYYYMMDDHHMISS+8位数字序列
    public static String getTransid() {
        return appid+ DateUtil.getNo(8);
    }
    public static final String getToken="https://api.iot.10086.cn/v5/ec/get/token";
    //获取语音白名单
    public static final String getPatientContacts="https://api.iot.10086.cn/v5/ec/query/member-voice-whitelist";
    //设置语音白名单 //同一卡号一分钟只能调用该接口一次 一个月仅能删除一次(一次最多删除2个号码)
    public static final String setPatientContacts="https://api.iot.10086.cn/v5/ec/config/member-voice-whitelist";
    //查询语音卡 群组Id
    public static final String getGroupId="https://api.iot.10086.cn/v5/ec/query/group-by-member";
    //获取流量池使用量
    public static final String getGroupFlowUsage="https://api.iot.10086.cn/v5/ec/query/group-data-usage";
}

+ 0 - 125
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/RedisConfig.java

@ -1,125 +0,0 @@
package com.yihu.jw.care.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.care.util.RedisConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.serializer.*;
/**
 * 缓存配置
 *
 * @author baichuan.wu
 * @version 1.0
 * @date 2019/4/8 15:17
 */
@Configuration
@EnableCaching
public class RedisConfig extends CachingConfigurerSupport {
    @Autowired
    private RedisConnectionFactory factory;
    @Bean
    public CacheManager cacheManager(RedisTemplate redisTemplate) {
        RedisCacheManager rcm = new RedisCacheManager(redisTemplate);
        rcm.setDefaultExpiration(RedisConstant.REDIS_LOCK_EXPIRE_30);
        return rcm;
    }
    @Bean
    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<String, Object>();
        redisTemplate.setConnectionFactory(factory);
        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
        ObjectMapper om = new ObjectMapper();
        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
        jackson2JsonRedisSerializer.setObjectMapper(om);
        redisTemplate.setKeySerializer(stringRedisSerializer);
        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
        /**hash也同样存对象数组*/
        redisTemplate.setHashKeySerializer(stringRedisSerializer);
        redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
        redisTemplate.afterPropertiesSet();
        return redisTemplate;
    }
    /**
     * 对hash类型的数据操作
     *
     * @param redisTemplate
     * @return {@link HashOperations <String,String,Object>}
     */
    @Bean
    public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
        return redisTemplate.opsForHash();
    }
    /**
     * 对redis字符串类型数据操作
     *
     * @param redisTemplate
     * @return {@link ValueOperations <String, Object>}
     */
    @Bean
    public ValueOperations<String, Object> valueOperations(RedisTemplate<String, Object> redisTemplate) {
        return redisTemplate.opsForValue();
    }
    /**
     * 对链表类型的数据操作
     *
     * @param redisTemplate
     * @return {@link ListOperations <String, Object>}
     */
    @Bean
    public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
        return redisTemplate.opsForList();
    }
    /**
     * 对无序集合类型的数据操作
     *
     * @param redisTemplate
     * @return {@link SetOperations <String, Object>}
     */
    @Bean
    public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
        return redisTemplate.opsForSet();
    }
    /**
     * 对有序集合类型的数据操作
     *
     * @param redisTemplate
     * @return {@link ZSetOperations <String, Object>}
     */
    @Bean
    public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
        return redisTemplate.opsForZSet();
    }
    /**
     * string序列化
     *
     * @return {@link RedisSerializer <String>}
     */
    private RedisSerializer<String> keySerializer() {
        return new StringRedisSerializer();
    }
}

+ 0 - 12
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/SpringSecurityAuditorAware.java

@ -1,12 +0,0 @@
package com.yihu.jw.care.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
@Configuration
public class SpringSecurityAuditorAware implements AuditorAware {
    @Override
    public Object getCurrentAuditor() {
        return "123";
    }
}

+ 0 - 13
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/WebSocketConfig.java

@ -1,13 +0,0 @@
package com.yihu.jw.care.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
@Configuration
public class WebSocketConfig {
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}

+ 0 - 106
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/config/YsConfig.java

@ -1,106 +0,0 @@
package com.yihu.jw.care.config;
import com.yihu.jw.care.dao.device.YsConfigDao;
import com.yihu.jw.entity.care.device.YsConfigDo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
 * Created by Bing on 2021/6/1.
 * 萤石摄像头配置
 */
@Component
public class YsConfig {
    @Autowired
    private YsConfigDao ysConfigDao;
    //文档地址 https://www.yuque.com/u1400669/kb/lmfp6u
    public static final String baseUrl = "https://esopen.ys7.com";
    public static final String iotBaseUrl = "https://open.ys7.com";
   //saas平台 https://www.yuque.com/u1400669/kb/wdvi3b#9ZP70
    public static final String saasAssesToken =baseUrl+ "/api/user/open-app/auth/gettoken";
    //开放平台  https://open.ys7.com/doc/zh/book/index/user.html
    public static final String iotAssesToken =baseUrl+ "/api/user/component-open/sso/oauth2/getEZAccessToken";
    //获取通道列表
    public static final String surveillanceWayList =baseUrl+ "/api/resource/open-app/surveillance/camera/list/page";
    //获取通道信息(通道默认为1,如果视频加密需要调用视频解密接口进行解密)
    public static final String surveillanceWay =baseUrl+ "/api/resource/open-app/surveillance/camera/info";
    //设备抓拍
    public static final String deviceCapture =baseUrl +"/api/resource/device/capture";
    //获取设备有效直播地址
    public static final String getDeviceLiveAddress = iotBaseUrl+ "/api/lapp/live/address/limited";
    //获取设备有效直播地址(对讲)
    public static final String getDeviceLiveAddress2 = iotBaseUrl+ "/api/lapp/v2/live/address/get";
    //设备视频加解密开关
    public static final String deviceEncrypt = baseUrl+ "/api/resource/device/encrypt/switch";
    //跌倒检测功能查询、设置(立即检测!判断是否有跌倒通过推送消息)
    public static final String deviceFailConfig = iotBaseUrl + "/api/route/device/devconfig/keyValue/{0}/{1}/op";
    //云台控制
    public static final String ptzStart = iotBaseUrl +"/api/lapp/device/ptz/start";
    //云台停止
    public static final String ptzStop = iotBaseUrl +"/api/lapp/device/ptz/stop";
    public static final String openChannelNo = iotBaseUrl +"/api/lapp/live/video/open";
    /**
     * 录像相关
     */
    //录像循环覆盖开关(开启后,当内存卡存储满时会覆盖原有录像,不会导致停止录像)
    public static final String coverVideoSwitch = baseUrl + "/seastart/auth/set-vod";
    //获取设备录像存储信息
    public static final String deviceVideoTimeList = iotBaseUrl + "/api/lapp/video/by/time";
    //根据时间获取录像地址//仅rtmp格式
    public static final String deviceVideoUrlByTime = iotBaseUrl + "/api/lapp/v2/live/address/get";
    //录像地址 多格式
    public static final String videoList2 = iotBaseUrl +"/api/lapp/v2/live/address/get";
    //全天录像
    public static final String fullDayVideo = iotBaseUrl +"/api/lapp/device/fullday/record/switch/set";
//    //获取录像accessKey、上传录像地址
//    public static final String videoKey = baseUrl +"/seastart/vod/token";
//
//    //上传录像上传地址通过videoKey接口获取
//    public static final String videoUpload = "https://seastart.ss.bscstorage.com";
//
//    //录像列表
//    public static final String videoList = baseUrl +"/seastart/vod/list";
//
//    //批量获取录像详情
//    public static final String videoDetailList = baseUrl +"/seastart/vod";
//
//    //录像详情
//    public static final String videoDetail = baseUrl +"/seastart/vod/get";
//
    public YsConfigDo getConfig(String deviceSn){
        YsConfigDo configDo = ysConfigDao.getYsConfigByDeviceSn(deviceSn);
        if (null==configDo){
            configDo = ysConfigDao.getDefaultConfig(1);
        }
        return configDo;
    }
}

+ 0 - 23
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/constant/CommonConstant.java

@ -1,23 +0,0 @@
package com.yihu.jw.care.constant;
/**
 * Created by yeshijie on 2022/7/8.
 */
public class CommonConstant {
    /**
     * 网站域名
     */
    public static final String BASEURL = "https://zhyzh.gongshu.gov.cn/";
    /**
     * 腾讯语音合成域名
     */
    public static final String TXVOICEBASEURL = "tts.tencentcloudapi.com";
    /**
     * 腾讯语音合成文件路径
     */
    public static final String TXVOICEPATH = "/usr/local/nginx/hz/voice/";
}

+ 0 - 25
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/activity/ChildActivityRegistrationDao.java

@ -1,25 +0,0 @@
package com.yihu.jw.care.dao.activity;
import com.yihu.jw.entity.care.activity.ChildActivityRegistrationDO;
import com.yihu.jw.entity.care.consult.BaseYunxingChannelDO;
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 yeshijie on 2021/10/16.
 */
public interface ChildActivityRegistrationDao extends PagingAndSortingRepository<ChildActivityRegistrationDO,String>,
        JpaSpecificationExecutor<ChildActivityRegistrationDO> {
    @Query("select a from ChildActivityRegistrationDO a where a.patient = ?1 and a.activityType = ?2 ")
    ChildActivityRegistrationDO findByPatientAndActivityType(String patient,String activityType);
    @Query("select a from ChildActivityRegistrationDO a where a.patient = ?1 ")
    ChildActivityRegistrationDO findByPatient(String patient);
    @Query("select a from ChildActivityRegistrationDO a where a.patient = ?1 ")
    List<ChildActivityRegistrationDO> findListByPatient(String patient);
}

+ 0 - 27
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/apply/PatientBedApplyDao.java

@ -1,27 +0,0 @@
package com.yihu.jw.care.dao.apply;
import com.yihu.jw.entity.care.apply.PatientBedApplyDo;
import org.springframework.data.domain.Sort;
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 Bing on 2021/4/8.
 */
public interface PatientBedApplyDao extends PagingAndSortingRepository<PatientBedApplyDo,String>,
        JpaSpecificationExecutor<PatientBedApplyDo> {
    PatientBedApplyDo findByIdcardAndOrgCodeAndStatus(String idcard,String orgCode,Integer status);
    PatientBedApplyDo findByIdcardAndStatus(String idcard,Integer status);
    List<PatientBedApplyDo> findByOrgCodeAndStatusIn(String orgCode,Integer[] status ,Sort sort);
    List<PatientBedApplyDo> queryByIdcardAndOrgCodeAndStatusIn(String idcard, String orgCode, Integer[] status);
    @Query("select count(1) from PatientBedApplyDo p where p.orgCode=?1 and p.status<>-1 and p.status<>0")
    Integer findUnCompleteByOrgCode(String orgCode);
}

+ 0 - 22
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/assistance/EmergencyAssistanceDao.java

@ -1,22 +0,0 @@
package com.yihu.jw.care.dao.assistance;
import com.yihu.jw.entity.care.assistance.EmergencyAssistanceDO;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Bing on 2021/4/12.
 */
public interface EmergencyAssistanceDao extends PagingAndSortingRepository<EmergencyAssistanceDO,String>,
        JpaSpecificationExecutor<EmergencyAssistanceDO> {
    List<EmergencyAssistanceDO> queryByPatientAndStatusIn(String patient, Integer[] status, Sort sort);
    List<EmergencyAssistanceDO> findByPatientAndStatus(String patient,Integer status);
    List<EmergencyAssistanceDO> findByProxyPatientAndStatus(String proxyPatient,Integer status);
    List<EmergencyAssistanceDO> findBySessionId(String sessionId);
}

+ 0 - 12
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/birthday/BirthDayWishesToPatientDao.java

@ -1,12 +0,0 @@
package com.yihu.jw.care.dao.birthday;
import com.yihu.jw.entity.care.birthday.BirthDayWishesToPatient;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/7/16.
 */
public interface BirthDayWishesToPatientDao extends PagingAndSortingRepository<BirthDayWishesToPatient,Long>,
        JpaSpecificationExecutor<BirthDayWishesToPatient> {
}

+ 0 - 29
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/birthday/BirthdayWishesTemplateDao.java

@ -1,29 +0,0 @@
package com.yihu.jw.care.dao.birthday;
import com.yihu.jw.entity.care.birthday.BirthdayWishesTemplate;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by humingfen on 2018/10/26.
 */
public interface BirthdayWishesTemplateDao extends PagingAndSortingRepository<BirthdayWishesTemplate, Long> {
    @Query("SELECT t from BirthdayWishesTemplate t where t.applicableRange = ?2 and (t.createUser = ?1 or t.createUser is null ) and t.del = 1 ORDER BY t.isDefault desc,t.type, t.createTime desc ")
    List<BirthdayWishesTemplate> getTemplateByDoctorAndApplicableRange(String doctor, Integer applicableRange);
    @Query("SELECT t from BirthdayWishesTemplate t where (t.createUser = ?1 or t.createUser is null ) and t.del = 1 ORDER BY t.isDefault desc,t.type, t.createTime desc ")
    List<BirthdayWishesTemplate> getTemplateByDoctor(String doctor);
    @Query("select t from BirthdayWishesTemplate t where t.applicableRange = ?1 and t.type = 1 and t.del = 1")
    BirthdayWishesTemplate getTemplateByApplicableRange(Integer applicableRange);
    @Query("update BirthdayWishesTemplate t set t.isDefault = ?2 where t.id = ?1")
    @Modifying
    void setDefalutTemplateById(Long id, Integer isDefault);
    BirthdayWishesTemplate findByCreateUserAndApplicableRangeAndIsDefault(String doctor,Integer applicableRange, int isDefault);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.booking;
import com.yihu.jw.entity.care.booking.BaseBookingServiceDo;
import com.yihu.jw.entity.care.contacts.PatientSosContactsDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/***
 * @ClassName: BaseBookingServiceDao
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/12 10:23
 */
public interface BaseBookingServiceDao extends PagingAndSortingRepository<BaseBookingServiceDo,String>,
        JpaSpecificationExecutor<BaseBookingServiceDo> {
    @Query("select a from BaseBookingServiceDo a where a.patient = ?1 and a.status = '1'")
    BaseBookingServiceDo findByPatient(String patient);
}

+ 0 - 19
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/child/BaseChildManageDao.java

@ -1,19 +0,0 @@
package com.yihu.jw.care.dao.child;
import com.yihu.jw.entity.child.BaseChildManage;
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;
/**
 * Created by wsl on 2022/7/20
 */
public interface BaseChildManageDao extends PagingAndSortingRepository<BaseChildManage,String>, JpaSpecificationExecutor<BaseChildManage> {
    @Modifying
    @Query("update BaseChildManage m set m.click = m.click+1 where m.id = ?1")
    void updateClick(String id);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.common;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface BaseLoginLogDao extends PagingAndSortingRepository<BaseLoginLogDO, String>, JpaSpecificationExecutor<BaseLoginLogDO> {
    @Query("from BaseLoginLogDO l where l.openid=?1 order by l.createTime desc")
    List<BaseLoginLogDO> findByOpenId(String openid);
    @Query("from BaseLoginLogDO l where l.userId=?1 order by l.createTime desc")
    List<BaseLoginLogDO> findByUserId(String openid);
    @Query(value = "SELECT a.* from base_login_log a WHERE a.token=?1 ORDER BY a.create_time desc LIMIT 1",nativeQuery = true)
    BaseLoginLogDO findByToken(String token);
}

+ 0 - 17
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/consult/BaseYunxingChannelDao.java

@ -1,17 +0,0 @@
package com.yihu.jw.care.dao.consult;
import com.yihu.jw.entity.care.booking.BaseBookingServiceDo;
import com.yihu.jw.entity.care.consult.BaseYunxingChannelDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2021/10/11.
 */
public interface BaseYunxingChannelDao extends PagingAndSortingRepository<BaseYunxingChannelDO,String>,
        JpaSpecificationExecutor<BaseYunxingChannelDO> {
    @Query("select a from BaseYunxingChannelDO a where a.sessionId = ?1 ")
    BaseYunxingChannelDO findBySessionId(String sessionId);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.contacts;
import com.yihu.jw.entity.care.contacts.BasePatientContactsOrgDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/7
 * @Description:
 */
public interface BasePatientContactsOrgDao extends PagingAndSortingRepository<BasePatientContactsOrgDO,String>,
        JpaSpecificationExecutor<BasePatientContactsOrgDO> {
    BasePatientContactsOrgDO findByPatient(String patient);
}

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

@ -1,26 +0,0 @@
package com.yihu.jw.care.dao.contacts;
import com.yihu.jw.entity.care.contacts.PatientSosContactsDO;
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.List;
/**
 * Created by Bing on 2021/8/10.
 */
public interface PatientSosContactsDao extends PagingAndSortingRepository<PatientSosContactsDO,Long>,
        JpaSpecificationExecutor<PatientSosContactsDO> {
    List<PatientSosContactsDO> findByPatientAndDel(String patient,Integer del);
    List<PatientSosContactsDO> findByPatientOrderByUpdateTimeDesc(String patient);
    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);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.CourseCatalogueDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface CourseCatalogueDao extends PagingAndSortingRepository<CourseCatalogueDO, String>, JpaSpecificationExecutor<CourseCatalogueDO> {
    List<CourseCatalogueDO> findByCourserId(String courserId);
}

+ 0 - 16
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/CourseDao.java

@ -1,16 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.CourseDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface CourseDao extends PagingAndSortingRepository<CourseDO, String>, JpaSpecificationExecutor<CourseDO> {
}

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

@ -1,20 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.CourseSalesOrderRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface CourseSalesOrderRecordDao extends PagingAndSortingRepository<CourseSalesOrderRecordDO, String>
        , JpaSpecificationExecutor<CourseSalesOrderRecordDO> {
    List<CourseSalesOrderRecordDO> findByStatus(String status);
}

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

@ -1,20 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.CustomerServiceDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface CustomerServiceDao extends PagingAndSortingRepository<CustomerServiceDO, String>, JpaSpecificationExecutor<CustomerServiceDO> {
    List<CustomerServiceDO> findByOrgCode(String orgCode);
}

+ 0 - 30
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/DoctorPatientTmpDao.java

@ -1,30 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.DoctorPatientTmpDO;
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.List;
/**
 * Created by Bing on 2021/6/7.
 */
public interface DoctorPatientTmpDao extends PagingAndSortingRepository<DoctorPatientTmpDO,String>,
        JpaSpecificationExecutor<DoctorPatientTmpDO> {
    DoctorPatientTmpDO findByRelationCode(String relationCode);
    @Query(value = "select count(1) from DoctorPatientTmpDO t where t.patient=?1 and t.doctorCode = ?2 and t.type=?3")
    Integer findByPatientAndDoctorCodeAndType(String patient,String doctorCode,Integer type);
    @Query(value = "select count(1) from DoctorPatientTmpDO t where t.patient=?1 and t.orgCode = ?2 and t.type=?3 and t.status=?4 and t.del=1")
    Integer findByPatientAndOrgCodeAndTypeAndStatus(String patient,String orgCode,Integer type,Integer status);
    List<DoctorPatientTmpDO> queryByPatientAndTypeIn(String patient,Integer[] type);
    @Modifying
    @Query(value = "update DoctorPatientTmpDO t set t.del=0 where 1=1")
    void deleteAll();
}

+ 0 - 16
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/NurseryLogDao.java

@ -1,16 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.NurseryLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/20
 * @Description:
 */
public interface NurseryLogDao extends PagingAndSortingRepository<NurseryLogDO, String>, JpaSpecificationExecutor<NurseryLogDO> {
}

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

@ -1,20 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.PatientCourseRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/20
 * @Description:
 */
public interface PatientCourseRecordDao extends PagingAndSortingRepository<PatientCourseRecordDO, String>,
        JpaSpecificationExecutor<PatientCourseRecordDO> {
    List<PatientCourseRecordDO> findByNurseryLogId(String nurseryLogId);
}

+ 0 - 19
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/PatientDietRecordDao.java

@ -1,19 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.PatientDietRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/20
 * @Description:
 */
public interface PatientDietRecordDao extends PagingAndSortingRepository<PatientDietRecordDO, String>, JpaSpecificationExecutor<PatientDietRecordDO> {
    List<PatientDietRecordDO> findByNurseryLogId(String nurseryLogId);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.PatientOrderRefundDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface PatientOrderRefundDao extends PagingAndSortingRepository<PatientOrderRefundDO, String>
        , JpaSpecificationExecutor<PatientOrderRefundDO> {
    PatientOrderRefundDO findByTypeAndOrderId(String type, String orderId);
}

+ 0 - 24
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/RecruitStudentsDao.java

@ -1,24 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.RecruitStudentsDO;
import com.yihu.jw.entity.followup.Followup;
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;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface RecruitStudentsDao extends PagingAndSortingRepository<RecruitStudentsDO, String>, JpaSpecificationExecutor<RecruitStudentsDO> {
    @Query("select a from RecruitStudentsDO a where a.orgCode = ?1 and a.startTime < ?2 and a.endTime >?2 and a.del = 1")
    List<RecruitStudentsDO> findByOrgCode(String orgCode, Date nowDate);
}

+ 0 - 24
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/RecruitStudentsRecordDao.java

@ -1,24 +0,0 @@
package com.yihu.jw.care.dao.course;
import com.yihu.jw.entity.care.course.RecruitStudentsRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/18
 * @Description:
 */
public interface RecruitStudentsRecordDao extends PagingAndSortingRepository<RecruitStudentsRecordDO, String>,
        JpaSpecificationExecutor<RecruitStudentsRecordDO> {
    List<RecruitStudentsRecordDO> findByRecruitStudentsIdAndStatus(String recruitStudentsId, String status);
    List<RecruitStudentsRecordDO> findByOrgCodeAndStatus(String orgCode, String status);
    List<RecruitStudentsRecordDO> findByDelAndStatus(Integer del,String status);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseDeviceElectricRecordDO;
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 yeshijie on 2022/6/30.
 */
public interface BaseDeviceElectricRecordDao extends PagingAndSortingRepository<BaseDeviceElectricRecordDO,String>,
        JpaSpecificationExecutor<BaseDeviceElectricRecordDO> {
    @Query("select a from BaseDeviceElectricRecordDO a where a.statDate = ?1 ")
    List<BaseDeviceElectricRecordDO> findByStatDate(String statDate);
    @Query("select a from BaseDeviceElectricRecordDO a where a.patient = ?1 and a.statDate = ?2")
    List<BaseDeviceElectricRecordDO> findByPatientAndStatDate(String patient,String statDate);
}

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

@ -1,13 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseDeviceFaceRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2022/6/2.
 */
public interface BaseDeviceFaceRecordDao extends PagingAndSortingRepository<BaseDeviceFaceRecordDO,String>,
        JpaSpecificationExecutor<BaseDeviceFaceRecordDO> {
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseDevicePatientFaceDO;
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 yeshijie on 2022/6/1.
 */
public interface BaseDevicePatientFaceDao  extends PagingAndSortingRepository<BaseDevicePatientFaceDO,String>,
        JpaSpecificationExecutor<BaseDevicePatientFaceDO> {
    @Query("select a from BaseDevicePatientFaceDO a where a.idcard = ?1")
    BaseDevicePatientFaceDO findByIdcard(String idcard);
    @Query("select a from BaseDevicePatientFaceDO a where a.type = ?1")
    List<BaseDevicePatientFaceDO> findListByType(Integer type);
}

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

@ -1,15 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.patient.BaseDeviceRepairEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface BaseDeviceRepairDao extends PagingAndSortingRepository<BaseDeviceRepairEntity,Long>,
        JpaSpecificationExecutor<BaseDeviceRepairEntity> {
    @Query(value = "select r from BaseDeviceRepairEntity r where r.deviceSn = ?1")
    List<BaseDeviceRepairEntity> findbydeviceSn(String deviceSn);
}

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

@ -1,17 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.util.BaseHzInterfaceDictEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by wsl on 2022/6/29
 */
public interface BaseHzInterfaceDictDao extends PagingAndSortingRepository<BaseHzInterfaceDictEntity,Long>,
        JpaSpecificationExecutor<BaseHzInterfaceDictEntity> {
    @Query("select a from BaseHzInterfaceDictEntity a where a.status = ?1 and a.code = ?2")
    BaseHzInterfaceDictEntity findByStatusAndCode(Integer status,String code);
}

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

@ -1,12 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BasePatientMonitorDataDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2022/4/25.
 */
public interface BasePatientMonitorDataDao extends PagingAndSortingRepository<BasePatientMonitorDataDO,Long>,
        JpaSpecificationExecutor<BasePatientMonitorDataDO> {
}

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

@ -1,14 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BasePatientOutBed;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/8/18.
 */
public interface BasePatientOutBedDao extends PagingAndSortingRepository<BasePatientOutBed,Long>,
        JpaSpecificationExecutor<BasePatientOutBed> {
    BasePatientOutBed findByPatientAndDeviceSnAndStatus(String patient,String deviceSn,Integer status);
}

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

@ -1,11 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseSleepDeviceReport;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/8/12.
 */
public interface BaseSleepDeviceReportDao extends PagingAndSortingRepository<BaseSleepDeviceReport,Long> ,
        JpaSpecificationExecutor<BaseSleepDeviceReport> {}

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

@ -1,25 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseSleepNightRecord;
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;
/**
 * Created by Bing on 2021/8/17.
 */
public interface BaseSleepNightRecordDao extends PagingAndSortingRepository<BaseSleepNightRecord,Long>,
        JpaSpecificationExecutor<BaseSleepNightRecord> {
    @Query(value = "select r from BaseSleepNightRecord r where r.deviceSn=?1 and r.patient=?2 order by r.createTime desc")
    List<BaseSleepNightRecord> findByDeviceSnAndPatient(String deviceSn, String patient);
    @Query(value = "select r from BaseSleepNightRecord r where r.deviceSn=?1 and r.patient=?2 and r.status=?3 and r.createTime>?4 order by r.createTime desc")
    List<BaseSleepNightRecord> findBySnStaPaTime(String deviceSn,String patient,Integer status, Date benIn);
    List<BaseSleepNightRecord> findByPatientAndDayOrderByCreateTimeDesc(String patient,String day);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseSleepDeviceReport;
import com.yihu.jw.entity.care.device.BaseSleepPlan;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.awt.print.Pageable;
import java.util.List;
/***
 * @ClassName: BaseSleepPlanDao
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/23 17:20
 */
public interface BaseSleepPlanDao extends PagingAndSortingRepository<BaseSleepPlan,Long>,
        JpaSpecificationExecutor<BaseSleepPlan> {
    List<BaseSleepPlan> findByPatient(String patient);
}

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

@ -1,24 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.BaseSleepPlanDetail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;
/**
 * Created by Bing on 2021/8/23.
 */
public interface BaseSleepPlanDetailDao extends PagingAndSortingRepository<BaseSleepPlanDetail,Long>,
        JpaSpecificationExecutor<BaseSleepPlanDetail> {
    List<BaseSleepPlanDetail> findByPatientAndDay(String patient, String day);
    @Query("SELECT a FROM BaseSleepPlanDetail a WHERE a.patient = ?1 AND a.day>=?2 and a.day<=?3 ORDER BY a.day desc")
    Page<BaseSleepPlanDetail> findByListByPage(String patient, String begin, String end, Pageable pageRequest);
}

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

@ -1,20 +0,0 @@
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);
}

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

@ -1,24 +0,0 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.Device;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface DeviceDao extends PagingAndSortingRepository<Device, Long> {
	@Query("select a from Device a where a.categoryCode = ?1 and a.del = '1'")
	List<Device> findByCategoryCode(String categoryCode);
	@Query("select a from Device a where a.del = '1'")
	List<Device> findAll();
	@Query("select a from Device a where a.del = '1' and a.model=?1")
	Device findByModel(String model);
}

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

@ -1,12 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.DeviceDataPushLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/9/2.
 */
public interface DeviceDataPushLogDao extends PagingAndSortingRepository<DeviceDataPushLog,Long>,
        JpaSpecificationExecutor<DeviceDataPushLog> {
}

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

@ -1,25 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.DeviceDetail;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * @author yeshijie on 2018/1/10.
 */
public interface DeviceDetailDao extends PagingAndSortingRepository<DeviceDetail, Long>, JpaSpecificationExecutor<DeviceDetail> {
    @Query(value = "select a.* from wlyy_devices a where a.device_code=?1 limit 0,1",nativeQuery = true)
    DeviceDetail findBySn(String sn);
    List<DeviceDetail> findByDeviceCode(String deviceCode);
    List<DeviceDetail> findBySim(String sim);
    @Query("select a from DeviceDetail a where a.deviceCode = ?1 and a.manufacturerCode = ?2")
    DeviceDetail findByDeviceCodeAndManufacturerCode(String deviceCode,String manufacturerCode);
}

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

@ -1,9 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.DeviceInfo;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;
@Transactional
public interface DeviceInfoDao extends CrudRepository<DeviceInfo, Long> {
}

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

@ -1,81 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.DevicePatientHealthIndex;
import org.springframework.data.domain.Pageable;
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;
public interface DevicePatientHealthIndexDao
		extends PagingAndSortingRepository<DevicePatientHealthIndex, Long>, JpaSpecificationExecutor<DevicePatientHealthIndex> {
	List<DevicePatientHealthIndex> findByIdcardAndType(String idcard, Integer type);
	/**
	 * 按录入时间和患者标识查询健康记录
	 *
	 * @param patientCode
	 * @param date
	 * @return
	 */
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and type = ?2 and a.recordDate = ?3 and a.del = '1'")
	Iterable<DevicePatientHealthIndex> findByPatienDate(String patientCode, int type, Date date);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.type = ?2 and a.recordDate between ?3 and ?4 and a.del = '1' group by recordDate order by recordDate asc")
	Iterable<DevicePatientHealthIndex> findByPatient(String user, int type, Date begin, Date end);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.type = ?2 and a.del = '1'")
	List<DevicePatientHealthIndex> findIndexByPatient(String patient, int type, Pageable pageRequest);
	@Query("SELECT a FROM DevicePatientHealthIndex a where a.user = ?1 and a.del = '1' order by a.recordDate desc ")
	List<DevicePatientHealthIndex> findRecentByPatient(String patient);
	@Query(value = "select a.* from wlyy_patient_health_index a where a.user=?1 and a.type=?2 and a.del='1' order by a.record_date desc limit 0,1",nativeQuery = true)
	DevicePatientHealthIndex findLastData(String patient, Integer type);
	/**
	 * 获取患者一天的具体某个类型的数据
	 */
	@Query("select a from DevicePatientHealthIndex a where a.type=?1 and a.user = ?2 and DATE_FORMAT(a.recordDate,'%Y-%m-%d') = ?3 and a.deviceSn = ?4 and a.del = '1' order by a.recordDate,a.id")
	List<DevicePatientHealthIndex> findByDateAndType(int type, String patient, String date, String devicesn);
	
	/**
	 * 获取患者单月的具体某个类型的数据
	 */
	@Query(value = "SELECT a.* FROM wlyy_patient_health_index a WHERE a.type=?1 AND a.USER=?2 AND DATE_FORMAT(a.record_date,'%Y-%m')=?3 AND a.device_sn=?4 AND a.del='1' ORDER BY a.record_date,a.id",nativeQuery = true)
	List<DevicePatientHealthIndex> findByDateMonthAndType(int type, String patient, String date, String devicesn);
	@Query(value = "select a.* 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' order by a.sort_date desc ,record_date desc limit ?5 ,?6",nativeQuery = true)
	List<DevicePatientHealthIndex> findIndexByPatientNative(String patient, int type, Date start, Date end, int currentSize, int pageSize);
	@Query(value = "select DATE_FORMAT(a.record_date,'%Y-%m-%d') from wlyy_patient_health_index a where a.user = ?1 and a.record_date >= ?2 and a.record_date <= ?3 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 ?4 ,?5",nativeQuery = true)
	List<String> findDateList(String patient, Date start, Date end, int currentSize, int pageSize);
	@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);
	@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);
	@Query(value="select * from wlyy_patient_health_index where user = ?1 and type = ?2 ORDER BY record_date desc limit 0 ,5",nativeQuery = true)
	List<DevicePatientHealthIndex> findByPatientAndTypeByPage(String patientCode, int type);
	@Query("select count(a) from DevicePatientHealthIndex a where a.recordDate >= ?1 and a.recordDate <= ?2 and a.type in (1,2) and a.status = ?3 and a.del = '1' and user = ?4")
	int getCountByTimeAndStatus(Date start, Date end, int status, String patientCode);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.deviceSn = ?2 and a.value1 = ?3 and a.type = ?4 and a.recordDate >= ?5 and a.recordDate<=?6 and a.del = '1' ")
	List<DevicePatientHealthIndex> findByTypeInHalfMinute(String patient, String deviceSn, String value1, Integer type, Date minDate,Date maxDate);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.deviceSn = ?2 and a.value1 = ?3 and a.value2=?7 and a.value3=?8 and a.type = ?4 and a.recordDate >= ?5 and a.recordDate<=?6 and a.del = '1' ")
	List<DevicePatientHealthIndex> findByTypeInHalfMinuteAllValue(String patient, String deviceSn, String value1, Integer type, Date minDate,Date maxDate,String value2,String value3);
	@Modifying
	@Query("update DevicePatientHealthIndex a set a.manageResult=1 where a.id in (?1) ")
	void handleHealthIndex(Long[] id);
}

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

@ -1,76 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.care.device.DevicePatientDevice;
import org.springframework.data.domain.Pageable;
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.List;
public interface PatientDeviceDao extends PagingAndSortingRepository<DevicePatientDevice, Long>, JpaSpecificationExecutor<DevicePatientDevice> {
    @Query("select a from DevicePatientDevice a where a.user = ?1 ")
    Iterable<DevicePatientDevice> findByUser(String user);
    @Query("select a from DevicePatientDevice a where a.del = 0 ")
    List<DevicePatientDevice> findByAll();
    @Query("select a from DevicePatientDevice a where a.user = ?1 ")
    List<DevicePatientDevice> findByPatient(String user);
    @Query("select a from DevicePatientDevice a where a.user = ?1 and a.del=0 and a.deviceName like '%药盒%'")
    List<DevicePatientDevice> findByPatientAndDel(String user);
    @Query("select a from DevicePatientDevice a where a.user = ?1 and a.deviceSn=?2 ")
    List<DevicePatientDevice> findByPatientAndDeviceSn(String user, String deviceSn);
    List<DevicePatientDevice> findByUser(String user, Pageable pageRequest);
    List<DevicePatientDevice> findByUserAndDoctor(String user, String doctor, Pageable pageRequest);
    List<DevicePatientDevice> findByDeviceSnAndCategoryCode(String deviceSn, String categoryCode);
    DevicePatientDevice findByDeviceSnAndCategoryCodeAndUserType(String deviceSn, String categoryCode, String userType);
    DevicePatientDevice findByDeviceIdAndDeviceSnAndUserType(Long deviceId, String deviceSn, String userType);
    DevicePatientDevice findByDeviceSnAndUserType(String deviceSn, String userType);
    @Query("select pd from DevicePatientDevice pd where pd.deviceSn = ?1 and pd.del=0")
    List<DevicePatientDevice> findByDeviceSn(String deviceSn);
    //更换患者绑定的血糖仪
    @Modifying
    @Query("update DevicePatientDevice t set t.deviceSn = ?3 , t.userType = ?4,t.sim=?5,t.hospital=?6,t.hospitalName=?7,t.checkDoctorName=?8 where t.user = ?1 and t.deviceSn = ?2 ")
    int updatePatientDevice(String user, String deviceSN, String newDeviceSN, String userType, String sim, String hospital, String hospitalName, String checkDoctorName);
    //管理员解绑居民设备
    @Modifying
    @Query("update DevicePatientDevice t set t.del = 1  where t.deviceSn = ?1 and t.del =0  ")
    int updatePatientDevice(String deviceSN);
    @Query("select a from DevicePatientDevice a")
    List<DevicePatientDevice> findAll();
    @Query("select a from DevicePatientDevice a where a.del=0  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);
    @Modifying
    @Query("delete DevicePatientDevice a where a.deviceSn = ?1")
    int deleteByDeviceSn(String deviceSN);
    @Query("select a from DevicePatientDevice a where a.user=?1 and a.del=0")
    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")
    List<DevicePatientDevice> findByUserAndCategoryCode(String user,String categoryCode);
}

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

@ -1,20 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.PatientSafeAreaConfirm;
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.List;
public interface PatientSafeAreaConfirmDao extends PagingAndSortingRepository<PatientSafeAreaConfirm,Long>,
        JpaSpecificationExecutor<PatientSafeAreaConfirm> {
    List<PatientSafeAreaConfirm> findByDoctorCodeAndPatient(String doctorCode,String patient);
    @Modifying
    @Query(value = "update  PatientSafeAreaConfirm p set p.manageStatus=1 where p.patient=?1")
    void manageByPatient(String patient);
}

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

@ -1,30 +0,0 @@
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.jpa.repository.Query;
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> {
    @Query(value = " select p from PatientSafeAreaDO p where p.patient=?1 and p.del='1' and p.manageStatus=1 ")
    List<PatientSafeAreaDO> findByPatient(String patient);
    @Query(value = " select p from PatientSafeAreaDO p where p.patient=?1 and p.del='1'")
    List<PatientSafeAreaDO> findByPatient2(String patient);
    @Modifying
    @Query(value = "update PatientSafeAreaDO p set p.del='0' where p.patient=?1 ")
    void deleteByPatient(String patient);
    @Modifying
    @Query(value = " update PatientSafeAreaDO p set p.manageStatus=1 where p.patient=?1")
    void manageByPatient(String patient);
}

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

@ -1,18 +0,0 @@
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.device.YsConfigDo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/10/20.
 */
public interface YsConfigDao extends PagingAndSortingRepository<YsConfigDo,Long>, JpaSpecificationExecutor<YsConfigDo> {
    @Query("select c from YsConfigDo c,YsDeviceDo de where c.configId = de.configId and de.deviceSn = ?1")
    YsConfigDo getYsConfigByDeviceSn(String deviceSn);
    @Query("select c from YsConfigDo c where c.configId=?1")
    YsConfigDo getDefaultConfig(Integer configId);
}

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

@ -1,18 +0,0 @@
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);
}

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

@ -1,18 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachCancelLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 
 * 工单取消记录 数据库访问层
 *
 */
public interface BaseDoorCoachCancelLogDao extends PagingAndSortingRepository<BaseDoorCoachCancelLogDO, String>, JpaSpecificationExecutor<BaseDoorCoachCancelLogDO>  {
    @Query(value = "select count(cl.id) from base_door_coach_cancel_log cl where cl.patient = ?1 and cl.cancel_type = 2 and DATE(cl.time) BETWEEN DATE_SUB(DATE(NOW()),INTERVAL DAYOFMONTH(NOW())-1 DAY) and LAST_DAY(NOW())",nativeQuery = true)
    int countCancelTimes(String patient);
}

+ 0 - 17
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachConclusionDao.java

@ -1,17 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachConclusionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/4/7.
 */
public interface BaseDoorCoachConclusionDao extends PagingAndSortingRepository<BaseDoorCoachConclusionDO,String>,
        JpaSpecificationExecutor<BaseDoorCoachConclusionDO> {
    @Query("select c from BaseDoorCoachConclusionDO c where c.orderId = ?1")
    BaseDoorCoachConclusionDO findByOrderId(String orderId);
}

+ 0 - 33
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachDoctorStatusDao.java

@ -1,33 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachDoctorStatusDO;;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * 
 * 上门辅导服务工单 数据库访问层
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * Administrator 	1.0  		2019年03月20日 	Created
 *
 * </pre>
 * @since 1.
 */
public interface BaseDoorCoachDoctorStatusDao extends PagingAndSortingRepository<BaseDoorCoachDoctorStatusDO, String>, JpaSpecificationExecutor<BaseDoorCoachDoctorStatusDO>  {
    BaseDoorCoachDoctorStatusDO findByDoctor(String doctor);
    BaseDoorCoachDoctorStatusDO queryByDoctorAndStatusIn(String doctor, Integer[] status);
    List<BaseDoorCoachDoctorStatusDO> queryByStatusIn(Integer[] status, Pageable pageable);
    Integer countByStatusIn(Integer[] status);
    boolean existsByDoctorAndStatusIn(String doctor, Integer[] status);
}

+ 0 - 42
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachFeeDetailDao.java

@ -1,42 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachFeeDetailDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareFeeDetailDO;
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.query.Param;
import java.util.List;
import java.util.Map;
/**
 * 
 * 服务工单价格明细(服务项价格,医生出诊费用) 数据库访问层
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * Administrator 	1.0  		2019年03月20日 	Created
 *
 * </pre>
 * @since 1.
 */
public interface BaseDoorCoachFeeDetailDao extends PagingAndSortingRepository<BaseDoorCoachFeeDetailDO, String>, JpaSpecificationExecutor<BaseDoorCoachFeeDetailDO>  {
    List<BaseDoorCoachFeeDetailDO> findByOrderId(String orderId);
    @Query("select d from BaseDoorCoachFeeDetailDO d where d.orderId = ?1 and d.type=?2 and d.status <> 3")
    List<BaseDoorCoachFeeDetailDO> findByOrderIdAndType(String orderId, Integer type);
    @Query("select d from BaseDoorCoachFeeDetailDO d where d.orderId = ?1 and d.payStatus=?2 and d.status <> 3")
    List<BaseDoorCoachFeeDetailDO> findByOrderIdAndPayStatus(String orderId, Integer payStatus);
    @Query("select d.id as id,d.fee as fee,d.orderId as orderId from BaseDoorCoachFeeDetailDO d where d.code in(:codes) and d.type = :type")
    List<Map<String,Object>> findIdByCodeAndType(@Param("codes") List<String> codes, @Param("type") Integer type);
    @Modifying
    @Query("update BaseDoorCoachFeeDetailDO  set payStatus = 1 where id in (?1) ")
    int updatePayStatusById(String[] ids);
}

+ 0 - 55
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachOrderDao.java

@ -1,55 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
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.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
 * 
 * 上门辅导服务工单 数据库访问层
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * Administrator 	1.0  		2019年03月20日 	Created
 *
 * </pre>
 * @since 1.
 */
public interface BaseDoorCoachOrderDao extends PagingAndSortingRepository<BaseDoorCoachOrderDO, String>, JpaSpecificationExecutor<BaseDoorCoachOrderDO>  {
    boolean existsByPatientAndStatusNot(String patient, int status);
    boolean existsByPatientAndStatusIn(String patient, Integer[] status);
    @Modifying
    @Transactional
    @Query("update BaseDoorCoachOrderDO o set o.conclusionStatus = 1 where o.id = ?1")
    void updateConclusionStatus(String orderId);
    @Query("select o from BaseDoorCoachOrderDO o where o.doctor = ?1 and o.status in (2,3)")
    List<BaseDoorCoachOrderDO> getNotFinishOrderByDoctor(String doctor);
    @Modifying
    @Transactional
    @Query("update BaseDoorCoachOrderDO o set o.prescriptionStatus = 1,o.status = 4, o.prescriptionCode = ?2, o.prescriptionTime = ?3 where o.id = ?1")
    void updatePrescriptionById(String orderId, String prescriptionCode, Date prescriptionTime);
    @Query("select o from BaseDoorCoachOrderDO o where o.prescriptionCode like ?1 and o.status <> -1 ")
    List<BaseDoorCoachOrderDO> findByPrescriptionCode(String prescriptionCode);
    @Query("select o from BaseDoorCoachOrderDO o where o.relationCode = ?1 order by o.createTime desc")
    List<BaseDoorCoachOrderDO> findByRelationCode(String relationCode);
    @Query("select o from BaseDoorCoachOrderDO o where o.doctor = ?1 and o.status in (1,2,3,4,5)")
    List<BaseDoorCoachOrderDO> getUnFinishOrderByDoctor(String doctor);
    List<BaseDoorCoachOrderDO> queryByStatusIn(Integer[] status);
}

+ 0 - 14
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/doorCoach/BaseDoorCoachPatientConfirmLogDao.java

@ -1,14 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachPatientConfirmLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 
 * 上门辅导服务工单居民确认操作日志记录
 *
 */
public interface BaseDoorCoachPatientConfirmLogDao extends PagingAndSortingRepository<BaseDoorCoachPatientConfirmLogDO, String>, JpaSpecificationExecutor<BaseDoorCoachPatientConfirmLogDO>  {
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.doorCoach;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachDoctorStatusDO;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachProcessLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 
 * 工单状态变更记录(调度员操作记录) 数据库访问层
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * Administrator 	1.0  		2019年04月09日 	Created
 *
 * </pre>
 * @since 1.
 */
public interface BaseDoorCoachProcessLogDao extends PagingAndSortingRepository<BaseDoorCoachProcessLogDO, String>, JpaSpecificationExecutor<BaseDoorCoachProcessLogDO>  {
}

+ 0 - 11
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/exam/ChildrenExaminationRecordDao.java

@ -1,11 +0,0 @@
package com.yihu.jw.care.dao.exam;
import com.yihu.jw.entity.care.exam.ChildrenExaminationRecordDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/5/18.
 */
public interface ChildrenExaminationRecordDao extends PagingAndSortingRepository<ChildrenExaminationRecordDO,String>,JpaSpecificationExecutor<ChildrenExaminationRecordDO> {
}

+ 0 - 61
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/family/PatientFamilyMemberDao.java

@ -1,61 +0,0 @@
package com.yihu.jw.care.dao.family;
import com.yihu.jw.entity.base.patient.BasePatientFamilyMemberDO;
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.List;
/**
 * @author liuwenbin on 2018/11/27.
 */
public interface PatientFamilyMemberDao extends PagingAndSortingRepository<BasePatientFamilyMemberDO, String>, JpaSpecificationExecutor<BasePatientFamilyMemberDO> {
    @Query("select m from BasePatientFamilyMemberDO m where m.del=1 and m.patient=?1")
    List<BasePatientFamilyMemberDO> getByPatient(String patient);
    @Query("select m from BasePatientFamilyMemberDO m where m.del=1 and m.patient=?1 and m.familyRelation=?2")
    List<BasePatientFamilyMemberDO> getByPatientAndFamilyRelation(String patient, Integer familyRelation);
    @Query("select m from BasePatientFamilyMemberDO m where m.del=1 and m.familyMember=?1")
    List<BasePatientFamilyMemberDO> getByFamilyMember(String familyMember);
    @Query("select m from BasePatientFamilyMemberDO m where m.del=1 and m.familyMember=?1 and m.familyRelation=?2")
    List<BasePatientFamilyMemberDO> getByFamilyMemberAndFamilyRelation(String familyMember, Integer familyRelation);
    @Query("select m from BasePatientFamilyMemberDO m where m.del=1 and m.familyMember=?1 and m.familyRelation in (?2,?3)")
    List<BasePatientFamilyMemberDO> getByFamilyMemberAndFamilyRelation(String familyMember, Integer familyRelation1, Integer familyRelation2);
    @Query("select m from BasePatientFamilyMemberDO m where m.del=1 and m.patient=?1")
    List<BasePatientFamilyMemberDO> getByPatientAndFamilyMember(String patient);
    @Modifying
    @Query("update BasePatientFamilyMemberDO m set m.isAuthorize = ?1 where m.id=?2 ")
    int updateAuthorizeById(Integer isAuthorize, String id);
    @Modifying
    @Query("update BasePatientFamilyMemberDO m set m.del = ?1 where m.id=?2 ")
    int updateDelById(Integer del, String id);
    @Modifying
    @Query("update BasePatientFamilyMemberDO m set m.del = ?1 where m.patient=?2 and m.familyMember=?3 ")
    int updateDelByPatientAndFamilyMember(Integer del, String patient, String familyPatientId);
    BasePatientFamilyMemberDO findByPatientAndFamilyMemberAndDel(String patient, String familyMember, Integer del);
    List<BasePatientFamilyMemberDO> findByPatientAndFamilyRelation(String patient,Integer familyRelation);
    BasePatientFamilyMemberDO findByPatientAndFamilyMember(String patient,String member);
    List<BasePatientFamilyMemberDO> findByFamilyMemberAndIsAuthorize(String familyMember,Integer isAuthorize);
    @Modifying
    @Query("update BasePatientFamilyMemberDO m set m.isContacts = 0 where m.patient=?1 ")
    int updateContactsByPatient(String patient);
    @Modifying
    @Query("update BasePatientFamilyMemberDO m set m.isContacts = 1 where m.id=?1 ")
    int updateContactsById(String id);
}

+ 0 - 23
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/handover/BaseDayHandoverDao.java

@ -1,23 +0,0 @@
package com.yihu.jw.care.dao.handover;
import com.yihu.jw.entity.care.handover.BaseDayHandover;
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 wsl on 2022/03/22
 */
public interface BaseDayHandoverDao extends PagingAndSortingRepository<BaseDayHandover, String>, JpaSpecificationExecutor<BaseDayHandover> {
    @Query("select h from BaseDayHandover h where h.createUser = ?1 and h.createTime >= ?2 and h.createTime <= ?3 order by h.createTime DESC")
    List<BaseDayHandover> findByCreateUser(String code,String staterDate,String endDate);
    @Query("select h from BaseDayHandover h where h.id = ?1")
    BaseDayHandover findById(String id);
    // Map<String,Object> findById(String id);
}

+ 0 - 19
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/label/BaseCapacityLabelDao.java

@ -1,19 +0,0 @@
package com.yihu.jw.care.dao.label;
import com.yihu.jw.entity.care.label.BaseCapacityLabelDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
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;
/**
 * Created by yeshijie on 2021/9/26.
 */
public interface BaseCapacityLabelDao  extends PagingAndSortingRepository<BaseCapacityLabelDO, String>,
        JpaSpecificationExecutor<BaseCapacityLabelDO> {
    @Query("select a from BaseCapacityLabelDO a where a.patient=?1")
    BaseCapacityLabelDO findByPatient(String patient);
}

+ 0 - 25
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/label/WlyyPatientLabelDao.java

@ -1,25 +0,0 @@
package com.yihu.jw.care.dao.label;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
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.List;
/**
 * Created by yeshijie on 2021/4/7.
 */
public interface WlyyPatientLabelDao extends PagingAndSortingRepository<WlyyPatientLabelDO, String>, JpaSpecificationExecutor<WlyyPatientLabelDO> {
    @Modifying
    @Query("delete WlyyPatientLabelDO a where a.patient=?1 and a.labelType=?2")
    int deleteByPatientAndLabelType(String patient,String labelType) throws Exception;
    @Query("from WlyyPatientLabelDO w where  w.patient=?1 group by w.labelType,w.labelCode order by w.czrq desc")
    List<WlyyPatientLabelDO> findByPatient(String patient);
    @Query("from WlyyPatientLabelDO w where  w.patient=?1 and w.labelType=?2 group by w.labelType,w.labelCode order by w.czrq desc")
    List<WlyyPatientLabelDO> findByPatientAndLabelType(String patient,String labelType);
}

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

@ -1,15 +0,0 @@
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> {
}

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

@ -1,12 +0,0 @@
package com.yihu.jw.care.dao.lifeCare;
import com.yihu.jw.entity.care.lifeCare.LifeCareCancelLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2021/3/29.
 */
public interface LifeCareCancelLogDao extends PagingAndSortingRepository<LifeCareCancelLogDO, String>, JpaSpecificationExecutor<LifeCareCancelLogDO> {
}

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

@ -1,15 +0,0 @@
package com.yihu.jw.care.dao.lifeCare;
import com.yihu.jw.entity.care.lifeCare.LifeCareFeeDetailDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by yeshijie on 2021/3/26.
 */
public interface LifeCareFeeDetailDao extends PagingAndSortingRepository<LifeCareFeeDetailDO, String>, JpaSpecificationExecutor<LifeCareFeeDetailDO> {
    List<LifeCareFeeDetailDO> findByOrderId(String orderId);
}

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

@ -1,21 +0,0 @@
package com.yihu.jw.care.dao.lifeCare;
import com.yihu.jw.entity.care.lifeCare.LifeCareItemDictDO;
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 yeshijie on 2021/3/26.
 */
public interface LifeCareItemDictDao  extends PagingAndSortingRepository<LifeCareItemDictDO, String>, JpaSpecificationExecutor<LifeCareItemDictDO> {
    @Query("from LifeCareItemDictDO w where  w.del=1 order by w.sort asc")
    List<LifeCareItemDictDO> findByAll();
    @Query("from LifeCareItemDictDO w where  w.del=1 and w.orgCode=?1 order by w.sort asc")
    List<LifeCareItemDictDO> findByOrgCode(String orgCode);
}

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

@ -1,13 +0,0 @@
package com.yihu.jw.care.dao.lifeCare;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2021/3/26.
 */
public interface LifeCareOrderDao extends PagingAndSortingRepository<LifeCareOrderDO, String>, JpaSpecificationExecutor<LifeCareOrderDO> {
    boolean existsByPatientAndStatusIn(String patient, Integer[] status);
}

+ 0 - 19
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePatientPadPushOnOffDao.java

@ -1,19 +0,0 @@
package com.yihu.jw.care.dao.log;
import com.yihu.jw.entity.log.BasePatientPadPushOnOffEntity;
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;
/**
 * Created by wsl on 2022/7/28
 */
public interface BasePatientPadPushOnOffDao extends PagingAndSortingRepository<BasePatientPadPushOnOffEntity, String>, JpaSpecificationExecutor<BasePatientPadPushOnOffEntity> {
    @Modifying
    @Query("update BasePatientPadPushOnOffEntity a set a.onOff =?3 where a.patient=?1 and a.type = ?2")
    void updPushOnOff(String patient,Integer type,Integer onOff);
}

+ 0 - 17
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePushRecordLogDao.java

@ -1,17 +0,0 @@
package com.yihu.jw.care.dao.log;
import com.yihu.jw.entity.log.BasePushRecordLogEntity;
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 wsl on 2022/7/4
 */
public interface BasePushRecordLogDao extends PagingAndSortingRepository<BasePushRecordLogEntity, String>, JpaSpecificationExecutor<BasePushRecordLogEntity> {
    @Query("from BasePushRecordLogEntity")
    List<BasePushRecordLogEntity> findAll();
}

+ 0 - 12
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/log/BasePushrecordLogInfoDao.java

@ -1,12 +0,0 @@
package com.yihu.jw.care.dao.log;
import com.yihu.jw.entity.log.BasePushrecordLogInfoEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by wsl on 2022/7/5
 */
public interface BasePushrecordLogInfoDao extends PagingAndSortingRepository<BasePushrecordLogInfoEntity, String>, JpaSpecificationExecutor<BasePushrecordLogInfoEntity> {
}

+ 0 - 26
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/message/BaseServiceNewsDao.java

@ -1,26 +0,0 @@
package com.yihu.jw.care.dao.message;
import com.yihu.jw.entity.care.message.BaseServiceNews;
import org.springframework.data.domain.Pageable;
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;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/6/18
 * @Description:
 */
public interface BaseServiceNewsDao extends PagingAndSortingRepository<BaseServiceNews,String>, JpaSpecificationExecutor<BaseServiceNews> {
    @Query("select a from BaseServiceNews a ")
    List<BaseServiceNews> findNews(Pageable pageRequest);
    @Query("select a from BaseServiceNews a where a.createTime >= ?1 and a.createTime <= ?2 ")
    List<BaseServiceNews> findNewsByTime(Date beginTime, Date endTime, Pageable pageRequest);
}

+ 0 - 11
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/message/OrgNoticeDao.java

@ -1,11 +0,0 @@
package com.yihu.jw.care.dao.message;
import com.yihu.jw.entity.care.message.OrgNoticeDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/5/18.
 */
public interface OrgNoticeDao extends PagingAndSortingRepository<OrgNoticeDO,String>, JpaSpecificationExecutor<OrgNoticeDO> {
}

+ 0 - 14
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/message/UserNoticeDao.java

@ -1,14 +0,0 @@
package com.yihu.jw.care.dao.message;
import com.yihu.jw.entity.base.notice.UserNoticeDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 用户公告通知
 * @author yeshijie on 2018/9/30.
 */
public interface UserNoticeDao extends PagingAndSortingRepository<UserNoticeDO, String>, JpaSpecificationExecutor<UserNoticeDO> {
    UserNoticeDO findByNoticeIdAndUserIdAndDel(String noticeId,String userId,Integer del);
}

+ 0 - 16
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/prescription/BaseCarePrescriptionDao.java

@ -1,16 +0,0 @@
package com.yihu.jw.care.dao.prescription;
import com.yihu.jw.entity.care.message.OrgNoticeDO;
import com.yihu.jw.entity.care.prescription.BaseCarePrescriptionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by yeshijie on 2021/10/11.
 */
public interface BaseCarePrescriptionDao  extends PagingAndSortingRepository<BaseCarePrescriptionDO,String>, JpaSpecificationExecutor<BaseCarePrescriptionDO> {
    @Query(value = " select * from base_care_prescription a where a.patient =?1 order by a.create_time desc limit 1",nativeQuery = true)
    BaseCarePrescriptionDO selectOneByPatient(String patient);
}

+ 0 - 19
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/role/DoctorRoleDao.java

@ -1,19 +0,0 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.care.dao.role;
import com.yihu.jw.entity.care.role.DoctorRole;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface DoctorRoleDao extends PagingAndSortingRepository<DoctorRole, Long> {
    @Query(value = "select b.* from wlyy_user_role a,wlyy_role b where a.role = b.code and a.user = ?1",nativeQuery = true)
    List<DoctorRole> findUserRole(String user);
}

+ 0 - 17
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/role/DoctorRoleRealmDao.java

@ -1,17 +0,0 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.care.dao.role;
import com.yihu.jw.entity.care.role.DoctorRoleRealm;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface DoctorRoleRealmDao extends PagingAndSortingRepository<DoctorRoleRealm, Long> {
    List<DoctorRoleRealm> findByRoleCode(String roleCode);
}

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

@ -1,15 +0,0 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.care.dao.role;
import com.yihu.jw.entity.care.role.WlyyUserRole;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface UserRoleDao extends PagingAndSortingRepository<WlyyUserRole, Long> {
}

+ 0 - 30
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/BaseEmergencyWarnLogDao.java

@ -1,30 +0,0 @@
package com.yihu.jw.care.dao.security;
import com.yihu.jw.entity.care.securitymonitoring.BaseEmergencyWarnLogDO;
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 Bing on 2021/8/9.
 */
public interface BaseEmergencyWarnLogDao extends PagingAndSortingRepository<BaseEmergencyWarnLogDO, Long>,
        JpaSpecificationExecutor<BaseEmergencyWarnLogDO> {
    @Query("select w from BaseEmergencyWarnLogDO w where w.orderId = ?1 and w.type is null ")
    List<BaseEmergencyWarnLogDO> findByOrderIdOrderByCreateTimeDesc(String oderId);//工单操作日志,有type的为工单流程关键步骤
    @Query("select w from BaseEmergencyWarnLogDO w where w.orderId = ?1 and w.type is not null ")
    List<BaseEmergencyWarnLogDO> findByOrderId(String oderId);
    @Query("select w from BaseEmergencyWarnLogDO w where w.orderId = ?1 and w.type = 1")
    List<BaseEmergencyWarnLogDO> findByOrderIdByType(String orderId);
    @Query("select w from BaseEmergencyWarnLogDO w where w.orderId = ?1 and w.type = ?2")
    List<BaseEmergencyWarnLogDO> findByOrderIdAndType(String orderId,Integer type);
    @Query("select w from BaseEmergencyWarnLogDO w where w.orderId = ?1 and w.ext1 = ?2")
    List<BaseEmergencyWarnLogDO> findByOrderIdAndExt1(String orderId,String ext1);
}

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

@ -1,15 +0,0 @@
package com.yihu.jw.care.dao.security;
import com.yihu.jw.entity.care.securitymonitoring.EmergencyWarnCancelLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/4/7.
 */
public interface EmergencyWarnCancelLogDao extends PagingAndSortingRepository<EmergencyWarnCancelLogDO,String>,
        JpaSpecificationExecutor<EmergencyWarnCancelLogDO> {
}

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

@ -1,18 +0,0 @@
package com.yihu.jw.care.dao.security;
import com.yihu.jw.entity.care.securitymonitoring.EmergencyWarnConclusionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/4/7.
 */
public interface EmergencyWarnConclusionDao extends PagingAndSortingRepository<EmergencyWarnConclusionDO,String>,
        JpaSpecificationExecutor<EmergencyWarnConclusionDO> {
    @Query("select c from EmergencyWarnConclusionDO c where c.orderId = ?1")
    EmergencyWarnConclusionDO findByOrderId(String orderId);
}

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

@ -1,15 +0,0 @@
package com.yihu.jw.care.dao.security;
import com.yihu.jw.entity.care.securitymonitoring.EmergencyWarnDoctorResponseDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/5/21.
 */
public interface EmergencyWarnDoctorResponseDao extends PagingAndSortingRepository<EmergencyWarnDoctorResponseDO,String>,
        JpaSpecificationExecutor<EmergencyWarnDoctorResponseDO> {
    EmergencyWarnDoctorResponseDO findByDoctorAndOrderId(String doctor,String orderId);
}

+ 0 - 16
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/SecurityMonitoringDoctorStatusDao.java

@ -1,16 +0,0 @@
package com.yihu.jw.care.dao.security;
import com.yihu.jw.entity.care.securitymonitoring.SecurityMonitoringDoctorStatusDo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/4/7.
 */
public interface SecurityMonitoringDoctorStatusDao extends PagingAndSortingRepository<SecurityMonitoringDoctorStatusDo,String>,
        JpaSpecificationExecutor<SecurityMonitoringDoctorStatusDo> {
    SecurityMonitoringDoctorStatusDo findByDoctor(String doctor);
    SecurityMonitoringDoctorStatusDo queryByDoctorAndStatusIn(String doctor, Integer[] status);
}

+ 0 - 32
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/security/SecurityMonitoringOrderDao.java

@ -1,32 +0,0 @@
package com.yihu.jw.care.dao.security;
import com.yihu.jw.entity.care.securitymonitoring.SecurityMonitoringOrderDO;
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.transaction.annotation.Transactional;
import java.util.List;
/**
 * Created by Bing on 2021/4/6.
 */
public interface SecurityMonitoringOrderDao extends PagingAndSortingRepository<SecurityMonitoringOrderDO,String>,
        JpaSpecificationExecutor<SecurityMonitoringOrderDO> {
    boolean existsByPatientAndStatusIn(String patient,Integer[] status);
    @Modifying
    @Transactional
    @Query("update SecurityMonitoringOrderDO o set o.conclusionStatus = 1,o.status='0' where o.id=?1")
    void updateConclusionStatus(String orderId);
    @Modifying
    @Transactional
    @Query("update SecurityMonitoringOrderDO o set o.conclusionStatus = 1 where o.id=?1")
    void updateConclusionStatus2(String orderId);
    List<SecurityMonitoringOrderDO> findByPatientAndStatus(String patient,Integer status);
}

+ 0 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/sign/ArchiveDao.java


Vissa filer visades inte eftersom för många filer har ändrats