trick9191 7 rokov pred
rodič
commit
000e61761a
59 zmenil súbory, kde vykonal 401 pridanie a 901 odobranie
  1. 0 1
      common-lib/pom.xml
  2. 0 445
      patient-co/patient-co-pc/pom.xml
  3. 0 17
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/Application.java
  4. 0 37
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/MvcConfig.java
  5. 0 48
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/SwaggerConfig.java
  6. 0 54
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/async/AsyncConfig.java
  7. 0 27
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/jpa/HibernateProperties.java
  8. 0 67
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/jpa/WlyyJpa.java
  9. 0 44
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/security/WebSecurityConfig.java
  10. 0 15
      patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/war/ServletInitializer.java
  11. 0 73
      patient-co/patient-co-pc/src/main/resources/application.yml
  12. 0 1
      patient-co/patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/message/HealthMessageJob.java
  13. BIN
      patient-co/patient-co-wlyy-job/images/booking.png
  14. BIN
      patient-co/patient-co-wlyy-job/images/device.png
  15. BIN
      patient-co/patient-co-wlyy-job/images/examination.png
  16. BIN
      patient-co/patient-co-wlyy-job/images/familycontract.png
  17. BIN
      patient-co/patient-co-wlyy-job/images/inspect.png
  18. BIN
      patient-co/patient-co-wlyy-job/images/myfamily.png
  19. BIN
      patient-co/patient-co-wlyy-job/images/operatinginstructions.png
  20. BIN
      patient-co/patient-co-wlyy-job/images/operatinginstructions1.png
  21. BIN
      patient-co/patient-co-wlyy-job/images/prescriptionRecords.png
  22. BIN
      patient-co/patient-co-wlyy-job/images/renew.png
  23. BIN
      patient-co/patient-co-wlyy-job/images/visit.png
  24. 2 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java
  25. BIN
      patient-co/patient-co-wlyy/images/booking.png
  26. BIN
      patient-co/patient-co-wlyy/images/device.png
  27. BIN
      patient-co/patient-co-wlyy/images/examination.png
  28. BIN
      patient-co/patient-co-wlyy/images/familycontract.png
  29. BIN
      patient-co/patient-co-wlyy/images/inspect.png
  30. BIN
      patient-co/patient-co-wlyy/images/myfamily.png
  31. BIN
      patient-co/patient-co-wlyy/images/operatinginstructions.png
  32. BIN
      patient-co/patient-co-wlyy/images/operatinginstructions1.png
  33. BIN
      patient-co/patient-co-wlyy/images/prescriptionRecords.png
  34. BIN
      patient-co/patient-co-wlyy/images/renew.png
  35. BIN
      patient-co/patient-co-wlyy/images/visit.png
  36. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java
  37. 56 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/Prescription.java
  38. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionAdjust.java
  39. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDiagnosis.java
  40. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDispensaryCode.java
  41. 69 12
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java
  42. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressageLog.java
  43. 16 10
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java
  44. 6 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionPay.java
  45. 6 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java
  46. 3 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/DoctorAdminTeamMemberDao.java
  47. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionExpressageDao.java
  48. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java
  49. 14 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultService.java
  50. 19 15
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java
  51. 4 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  52. 35 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  53. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java
  54. 4 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SFUtils.java
  55. 52 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java
  56. 46 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java
  57. 14 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/team/AdminTeamController.java
  58. 17 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/express/SFExpressController.java
  59. 25 1
      patient-co/patient-co-wlyy/src/main/resources/application.yml

+ 0 - 1
common-lib/pom.xml

@ -23,7 +23,6 @@
        <module>../patient-co/patient-co-wlyy-job</module> <!--i健康 job工程-->
        <module>../patient-co/patient-co-statistics</module> <!--i健康 mysql 版本统计-->
        <module>../patient-co/patient-co-statistics-es</module> <!--i健康 es 版本统计-->
        <module>../patient-co/patient-co-pc</module><!--im pc 版本-->
        <!--<module>../patient-co-figure</module>-->
    </modules>

+ 0 - 445
patient-co/patient-co-pc/pom.xml

@ -1,445 +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">
    <parent>
        <artifactId>common-lib</artifactId>
        <groupId>com.yihu</groupId>
        <version>1.0.0</version>
        <relativePath>../../common-lib/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>patient-co-pc</artifactId>
    <name>patient-co-pc</name>
    <version>1.0.0</version>
    <packaging>war</packaging>
    <!-- 设定插件仓库, 如有Nexus私服, 取消注释并指向正确的服务器地址. -->
    <pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <name>Team Nexus Repository</name>
            <url>http://172.19.103.47:8081/nexus/content/groups/public</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    <dependencies>
        <!--Spring boot family-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator-docs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <!--<dependency>-->
        <!--<groupId>org.springframework.boot</groupId>-->
        <!--<artifactId>spring-boot-devtools</artifactId>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <!-- end -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <!-- spring start -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-keyvalue</artifactId>
        </dependency>
        <!-- spring end -->
        <!--Swagger start -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
        </dependency>
        <!--Swagger end -->
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>jave-ffmpegjave</artifactId>
        </dependency>
        <!-- poi start-->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
        </dependency>
        <!-- poi end-->
        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis-jaxrpc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>sehrCrypto</groupId>
            <artifactId>sehrCrypto</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom</artifactId>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk16</artifactId>
        </dependency>
        <!-- Apache Commons fileupload -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <!-- SPRINGSIDE -->
        <dependency>
            <groupId>org.springside</groupId>
            <artifactId>springside-core</artifactId>
        </dependency>
        <!-- PERSISTENCE begin -->
        <!-- hibernate -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.kaptcha</groupId>
            <artifactId>kaptcha</artifactId>
        </dependency>
        <!-- spring data access -->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
        </dependency>
        <!-- aspectjrt start -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>
        <!-- aspectjrt end -->
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
        </dependency>
        <!-- jdbc driver -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- PERSISTENCE end -->
        <!-- WEB begin -->
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>sitemesh</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
        </dependency>
        <!-- WEB end -->
        <!-- JSR303 BeanValidator -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <!-- JSON begin -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jaxb-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <!-- JSON end -->
        <dependency>
            <groupId>org.htmlparser</groupId>
            <artifactId>htmlparser</artifactId>
        </dependency>
        <dependency>
            <groupId>xom</groupId>
            <artifactId>xom</artifactId>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
        </dependency>
        <!-- LOGGING begin -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>
        <!-- 代码直接调用log4j会被桥接到slf4j -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
        </dependency>
        <!-- 代码直接调用common-logging会被桥接到slf4j -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <!-- 代码直接调用java.util.logging会被桥接到slf4j -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>
        <!-- LOGGING end -->
        <!-- GENERAL UTILS begin -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <!-- GENERAL UTILS end -->
        <!-- selenium 2.0 -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-htmlunit-driver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-android-driver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-iphone-driver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-safari-driver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-driver</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>cglib</groupId>
                    <artifactId>cglib-nodep</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--二维码生成 start-->
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>javase</artifactId>
        </dependency>
        <!--二维码生成 end-->
        <!-- quartz start  -->
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
        </dependency>
        <!-- quartz end  -->
        <!-- redis start  -->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>
        <!-- redis end  -->
        <!--fastdfs start-->
        <dependency>
            <groupId>org.csource</groupId>
            <artifactId>fastdfs_lib</artifactId>
        </dependency>
        <!--fastdfs end-->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
    </dependencies>
    <build>
        <finalName>wlyy</finalName>
        <plugins>
            <!--打成war包需要的配置-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArguments>
                        <verbose/>
                        <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
                <version>3.1</version>
            </plugin>
        </plugins>
    </build>
</project>

+ 0 - 17
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/Application.java

@ -1,17 +0,0 @@
package com.yihu.wlyy.pc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
/**
 * Created by chenweida on 2017/8/2.
 */
@SpringBootApplication
public class Application {
    public static ApplicationContext ctx = null;
    public static void main(String[] args) {
        ctx = SpringApplication.run(Application.class, args);
    }
}

+ 0 - 37
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/MvcConfig.java

@ -1,37 +0,0 @@
package com.yihu.wlyy.pc.config;
import org.springframework.beans.factory.annotation.Autowired;
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 {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 多个拦截器组成一个拦截器链
        // addPathPatterns 用于添加拦截规则
        // excludePathPatterns 用户排除拦截
//        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**","/statistics/province/**","/statistics/**");
//        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**");
//        registry.addInterceptor(userInterceptor).addPathPatterns("/user/**");
        super.addInterceptors(registry);
    }
//    /**
//     * 为null的数据不返回
//     * @param converters
//     */
//    @Override
//    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//        MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
//        ObjectMapper objectMapper=new ObjectMapper();
//        objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
//        mappingJackson2HttpMessageConverter.setObjectMapper(objectMapper);
//        converters.add(mappingJackson2HttpMessageConverter);
//    }
}

+ 0 - 48
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/SwaggerConfig.java

@ -1,48 +0,0 @@
package com.yihu.wlyy.pc.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.async.DeferredResult;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import static com.google.common.base.Predicates.or;
import static springfox.documentation.builders.PathSelectors.regex;
@EnableSwagger2
@Configuration
public class SwaggerConfig {
    private static final String PUBLIC_API = "other";
    @Bean
    public Docket publicAPI() {
        return new Docket(DocumentationType.SWAGGER_2)
                .groupName(PUBLIC_API)
                .genericModelSubstitutes(DeferredResult.class)
                .useDefaultResponseMessages(false)
                .forCodeGeneration(true)
                .pathMapping("/")
                .select()
                .paths(PathSelectors.regex("/.*"))
                .build()
                .apiInfo(publicApiInfo());
    }
    private ApiInfo publicApiInfo() {
        ApiInfo apiInfo = new ApiInfo("三师平台API",
                "向PC端,微信、App等应用提供功能与数据接口。",
                "1.0",
                "No terms of service",
                "admin@jkzl.com",
                "The Apache License, Version 2.0",
                "http://www.apache.org/licenses/LICENSE-2.0.html"
        );
        return apiInfo;
    }
}

+ 0 - 54
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/async/AsyncConfig.java

@ -1,54 +0,0 @@
package com.yihu.wlyy.pc.config.async;
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 chenweida on 2016.10.18.
 * 启用多綫程
 */
@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
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/jpa/HibernateProperties.java

@ -1,27 +0,0 @@
package com.yihu.wlyy.pc.config.jpa;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.Properties;
/**
 * Created by chenweida on 2017/4/6.
 */
@Component
public class HibernateProperties {
    @Value("${hibernate.dialect}")
    private String dialect;
    @Value("${hibernate.show_sql}")
    private String show_sql;
    @Value("${hibernate.ejb.naming_strategy}")
    private String naming_strategy;
    public  Properties hibProperties() {
        Properties properties = new Properties();
        properties.put("hibernate.dialect",dialect);
        properties.put("hibernate.show_sql", show_sql);
        properties.put("hibernate.ejb.naming_strategy", naming_strategy);
        return properties;
    }
}

+ 0 - 67
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/jpa/WlyyJpa.java

@ -1,67 +0,0 @@
package com.yihu.wlyy.pc.config.jpa;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
/**
 * Created by chenweida on 2017/4/6.
 */
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(
        entityManagerFactoryRef = "entityManagerFactory",
        transactionManagerRef = "wlyyTransactionManager",
        basePackages = {"com.yihu.wlyy.dao"})   //设置Repository所在位置
public class WlyyJpa {
    @Autowired
    private HibernateProperties hibernateProperties;
    @Bean(name = "wlyyDataSource")
    @Primary
    @ConfigurationProperties(prefix = "spring.datasource")
    public DataSource wlyyDataSource() {
        return DataSourceBuilder.create().build();
    }
    @Bean(name = "entityManagerFactory")
    @Primary
    public LocalContainerEntityManagerFactoryBean entityManagerFactoryPrimary(
            @Qualifier("wlyyDataSource") DataSource dataSource) {
        LocalContainerEntityManagerFactoryBean emfb = new LocalContainerEntityManagerFactoryBean();
        emfb.setDataSource(dataSource);
        emfb.setPackagesToScan("com.yihu.wlyy.entity");
        emfb.setPersistenceUnitName("wlyy");
        JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
        emfb.setJpaVendorAdapter(vendorAdapter);
        emfb.setJpaProperties(hibernateProperties.hibProperties());
        return emfb;
    }
    @Bean(name = "wlyyTransactionManager")
    @Primary
    JpaTransactionManager transactionManagerSecondary(
            @Qualifier("entityManagerFactory") EntityManagerFactory builder) {
        return new JpaTransactionManager(builder);
    }
}

+ 0 - 44
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/security/WebSecurityConfig.java

@ -1,44 +0,0 @@
package com.yihu.wlyy.pc.config.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
/**
 * Created by Administrator on 2016.10.17.
 */
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Value("${security.basic.username}")
    String username;
    @Value("${security.basic.password}")
    String password;
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/swagger-ui.html").authenticated()
                .antMatchers("/swagger-ui.html").authenticated()
                .antMatchers("/configuration/security").authenticated()
                .anyRequest().permitAll()
                .and()
                .csrf().disable()
                .formLogin().defaultSuccessUrl("/swagger-ui.html").failureUrl("/login") //登录成功之后的跳转
                .permitAll()
                .and()
                .logout().logoutSuccessUrl("/login")
                .permitAll();
    }
    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication()
                .withUser(username).password(password).roles("USER");
    }
}

+ 0 - 15
patient-co/patient-co-pc/src/main/java/com/yihu/wlyy/pc/config/war/ServletInitializer.java

@ -1,15 +0,0 @@
package com.yihu.wlyy.pc.config.war;//package com.yihu.wlyy.config.war;
import com.yihu.wlyy.pc.Application;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
/**
 * Created by Administrator on 2016.10.14.
 */
public class ServletInitializer extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(Application.class);
    }
}

+ 0 - 73
patient-co/patient-co-pc/src/main/resources/application.yml

@ -1,73 +0,0 @@
server:
  port: 8080
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 50
    max-idle: 50 #最大空闲连接
    min-idle: 10 #最小空闲连接
    validation-query-timeout: 20
    log-validation-errors: true
    validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
    validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
    test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
    test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
    idle-timeout: 30000
    connection-test-query: SELECT 1
    num-tests-per-eviction-run: 50 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    # REDIS
  redis:
    database: 0 # Database index used by the connection factory.
    password: # Login password of the redis server.
    timeout: 0 # Connection timeout in milliseconds.
      #sentinel:
      #  master: # Name of Redis server.
      #  nodes: # Comma-separated list of host:port pairs.
logging:
  level:
    root: INFO
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
  show_sql: true
  ejb:
    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy
multipart:
  enabled: true
  max-file-size: 50mb
  max-request-size: 50mb
security:
  basic:
    username: jkzl
    password: jkzlehr
---
spring:
  profiles: test
---
spring:
  profiles: dev
  datasource:
    url: jdbc:mysql://172.19.103.85/wlyy?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: linzhou
    password: linzhou
---
spring:
  profiles: prod

+ 0 - 1
patient-co/patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/message/HealthMessageJob.java

@ -22,7 +22,6 @@ import org.springframework.util.StringUtils;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * Created by Administrator on 2016.10.25.

BIN
patient-co/patient-co-wlyy-job/images/booking.png


BIN
patient-co/patient-co-wlyy-job/images/device.png


BIN
patient-co/patient-co-wlyy-job/images/examination.png


BIN
patient-co/patient-co-wlyy-job/images/familycontract.png


BIN
patient-co/patient-co-wlyy-job/images/inspect.png


BIN
patient-co/patient-co-wlyy-job/images/myfamily.png


BIN
patient-co/patient-co-wlyy-job/images/operatinginstructions.png


BIN
patient-co/patient-co-wlyy-job/images/operatinginstructions1.png


BIN
patient-co/patient-co-wlyy-job/images/prescriptionRecords.png


BIN
patient-co/patient-co-wlyy-job/images/renew.png


BIN
patient-co/patient-co-wlyy-job/images/visit.png


+ 2 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -581,6 +581,8 @@ public class DoctorController extends BaseController {
                json.put("provinceName", temp.getProvinceName());
                // 设置城市名称
                json.put("cityName", temp.getCityName());
                // 设置医院code
                json.put("hospital", temp.getHospital());
                // 设置医院名称
                json.put("hospitalName", temp.getHospitalName());
                // 设置部门名称

BIN
patient-co/patient-co-wlyy/images/booking.png


BIN
patient-co/patient-co-wlyy/images/device.png


BIN
patient-co/patient-co-wlyy/images/examination.png


BIN
patient-co/patient-co-wlyy/images/familycontract.png


BIN
patient-co/patient-co-wlyy/images/inspect.png


BIN
patient-co/patient-co-wlyy/images/myfamily.png


BIN
patient-co/patient-co-wlyy/images/operatinginstructions.png


BIN
patient-co/patient-co-wlyy/images/operatinginstructions1.png


BIN
patient-co/patient-co-wlyy/images/prescriptionRecords.png


BIN
patient-co/patient-co-wlyy/images/renew.png


BIN
patient-co/patient-co-wlyy/images/visit.png


+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

@ -31,9 +31,9 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
        // 多个拦截器组成一个拦截器链
        // addPathPatterns 用于添加拦截规则
        // excludePathPatterns 用户排除拦截
        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**","/statistics/province/**","/statistics/**");
        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**");
        registry.addInterceptor(userInterceptor).addPathPatterns("/user/**");
//        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**","/statistics/province/**","/statistics/**");
//        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**");
//        registry.addInterceptor(userInterceptor).addPathPatterns("/user/**");
        super.addInterceptors(registry);
    }

+ 56 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/Prescription.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
/**
@ -28,7 +29,7 @@ public class Prescription extends IdEntity {
    private String patient;                  //关联 wlyy_patient code
    private String patientName;             //患者名称
    private Integer type;                    //1 处方 2 续方
    private Integer status;                  //状态 (-1 审核不通过 , 0 审核中, 10 审核通过/待支付 ,21支付失败  20 配药中/支付成功, 21 等待领药 ,30 配送中 ,100配送成功/已完成)
    private Integer status;                  //状态 (-1 审核不通过 , 0 待审核, 2调整中 10 审核通过/开方中  , 20开方完成/待支付, 21 支付失败 , 30 支付成功/待配药 , 40配药成功/待配送  41配送失败  42配送中   43配送到服务站  100配送到患者手中/已完成)
    private String doctor;                   //开处方的医生code 关联 wlyy_doctor
    private String doctorName;               //医生名称
    private Long adminTeamId;             //患者签约的行政团队
@ -49,8 +50,9 @@ public class Prescription extends IdEntity {
    private String remark;                     //处方备注
    private String reason;                      //续方原因
    private String reviewedReason; //审核不通过的原因
//    private Double ybCost;                      //医保费用
    //    private Double ybCost;                      //医保费用
//    private Double myCost;                      //自己付费
    private Integer prescriptionType;          //处方类型:1、门诊处方,2、住院处方
    @Column(name = "code", unique = true, nullable = false)
    public String getCode() {
@ -316,4 +318,56 @@ public class Prescription extends IdEntity {
    public void setReviewedReason(String reviewedReason) {
        this.reviewedReason = reviewedReason;
    }
    public Integer getPrescriptionType() {
        return prescriptionType;
    }
    public void setPrescriptionType(Integer prescriptionType) {
        this.prescriptionType = prescriptionType;
    }
    @Transient
    public String getTypeName() {
        switch (type) {
            case 1: {
                return "自取";
            }
            case 2: {
                return "快递配送";
            }
            case 3: {
                return "健管师配送";
            }
        }
        return "";
    }
    @Transient
    public String getStatusName() {
        //-1 审核不通过 , 0 审核中, 10 审核通过/待支付 ,21支付失败  20 配药中/支付成功, 21 等待领药 ,30 配送中 ,100配送成功/已完成
        switch (status) {
            case -1: {
                return "审核不通过";
            }
            case 0: {
                return "审核中";
            }
            case 10: {
                return "待支付";
            }
            case 20: {
                return "订单已支付";
            }
            case 21: {
                return "配药完成";
            }
            case 30: {
                return "配送中";
            }
            case 100: {
                return "续方完成";
            }
        }
        return "";
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionAdjust.java

@ -10,7 +10,7 @@ import java.util.Date;
/**
 * Created by Administrator on 2017/7/21.
 * 处方
 * 处方调整记录表
 */
@Entity
@Table(name = "wlyy_prescription_adjust")

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDiagnosis.java

@ -9,6 +9,7 @@ import java.util.Date;
/**
 * Created by Trick on 2017/7/28.
 * 处方诊断表
 */
@Entity
@Table(name = "wlyy_prescription_diagnosis")

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDispensaryCode.java

@ -10,7 +10,7 @@ import java.util.Date;
/**
 * Created by Administrator on 2017/7/21.
 * 处方取码
 * 处方编码表
 */
@Entity
@Table(name = "wlyy_prescription_dispensary_code")

+ 69 - 12
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
/**
@ -23,18 +24,26 @@ public class PrescriptionExpressage extends IdEntity{
    private String mobile;                  //收货人手机号码
    private String phone;                   //收货人座机号
    private String address;                 //收货人详细地址
    private String provinceCode;           //省代码
    private String provinceName;           //省名称
    private String cityCode;                //市代码
    private String cityName;                //市名称
    private String townCode;                //区代码
    private String townName;                //区名称
    private String streetCode;              //街道代码
    private String streetName;              //街道名称
    private String hospitalName;            //如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
    private Double price;                    //快递的配送费用
    private String provinceCode;           //收货人省代码
    private String provinceName;           //收货人省名称
    private String cityCode;                //收货人市代码
    private String cityName;                //收货人市名称
    private String townCode;                //收货人区代码
    private String townName;                //收货人区名称
    private String streetCode;              //收货人街道代码
    private String streetName;              //收货人街道名称
    private Integer price;                    //快递的配送费用 单位是分
    private Integer weight;                  //快递重量  单位是g
    private String expressageName;          //配送人名称
    private String expressageCode;          //配送人code
    private String expressageMobile;        //配送人电话
    private String hospitalName;            // 如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
    private String hospitalAddress;            // 机构地址
    private Date createTime;                //创建的时间
    private Integer oneselfPickupFlg;//是否自取 1是 0否
    private Integer del;    //1可用 0删除
    @Column(name = "code", unique = true , nullable=false)
    public String getCode() {
@ -157,11 +166,11 @@ public class PrescriptionExpressage extends IdEntity{
        this.hospitalName = hospitalName;
    }
    public Double getPrice() {
    public Integer getPrice() {
        return price;
    }
    public void setPrice(Double price) {
    public void setPrice(Integer price) {
        this.price = price;
    }
@ -185,4 +194,52 @@ public class PrescriptionExpressage extends IdEntity{
    public String getMailno() { return mailno; }
    public void setMailno(String mailno) { this.mailno = mailno; }
    public String getExpressageName() {
        return expressageName;
    }
    public void setExpressageName(String expressageName) {
        this.expressageName = expressageName;
    }
    public String getExpressageCode() {
        return expressageCode;
    }
    public void setExpressageCode(String expressageCode) {
        this.expressageCode = expressageCode;
    }
    public String getExpressageMobile() {
        return expressageMobile;
    }
    public void setExpressageMobile(String expressageMobile) {
        this.expressageMobile = expressageMobile;
    }
    public Integer getWeight() {
        return weight;
    }
    public void setWeight(Integer weight) {
        this.weight = weight;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    public String getHospitalAddress() {
        return hospitalAddress;
    }
    public void setHospitalAddress(String hospitalAddress) {
        this.hospitalAddress = hospitalAddress;
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressageLog.java

@ -10,7 +10,7 @@ import java.util.Date;
/**
 * Created by Administrator on 2017/7/21.
 * 处方配送
 * 处方配送流程表
 */
@Entity
@Table(name = "wlyy_prescription_expressage_log")

+ 16 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java

@ -47,18 +47,24 @@ public class PrescriptionLog extends IdEntity {
            this.value = value;
        }
    }
    //状态枚举
    public enum PrescriptionLogStatus {
        no_reviewed("审核不通过", -1),
        revieweding("审核中", 0),
        reviewed_success("审核通过/待支付", 10),
        pay_error("支付成功/配药中", 20),
        pay_success("支付失败", 21),
        wait_expressage("配药成功/等待领药", 30),
        expressageing("配送中", 31),
        expressageing_error("配送失败", 32),
        finish("结束", 100);
        revieweding("待审核", 0),
        changeing("调整中",2),
        reviewed_success("审核通过/开方中", 10),
        wait_pay("开方完成/待支付", 20),
        pay_error("支付失败", 21),
        pay_success("支付成功/待配药", 30),
        wait_expressage("配药成功/待配送", 40),
        expressageing_error("配送失败", 41),
        expressageJGS("分配健管师", 42),
        expressageing("配送中", 45),
        expressage2hospital("配送到服务站", 49),
        finish("配送到患者手中/已完成", 100);
        private String name;
        private int value;
@ -88,7 +94,7 @@ public class PrescriptionLog extends IdEntity {
    private String code;                    //业务流程
    private String prescriptionCode;      //处方code 关联表wlyy_prescription code
    private Date createTime;               //处方创建时间
    private Integer status;                  //状态 (-1 审核不通过 , 0 审核中, 10 审核通过/待支付 ,20 配药中/支付成功  , 21支付失败  , 30 配药成功/等待领药 ,31 配送中 32 配送失败,100配送成功/已完成)
    private Integer status;                 //状态 (-1 审核不通过 , 0 待审核, 2调整中 10 审核通过/开方中  , 20开方完成/待支付, 21 支付失败 , 30 支付成功/待配药 , 40配药成功/待配送  41配送失败 42分配健管师 45配送中   49配送到服务站  100配送到患者手中/已完成)
    private Integer type;                   //类型: 1智业对接 2易联众对接  3创建处方 4 审核  5付款 6 配送 7完成
    private String userCode;                  //医生或者患者code
    private String userName;                  //医生或者患者name

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionPay.java

@ -21,8 +21,8 @@ public class PrescriptionPay extends IdEntity {
    private String ybCard;//医保卡号
    private Integer type;// 1 医保支付
    private Integer status;//状态  成功1 失败0
    private Double ybCost;//医保费用
    private Double myCost;//自己付费
    private Integer ybCost;//统筹金额  单位分
    private Integer myCost;//自费金额  单位分
    public String getCode() {
        return code;
@ -81,19 +81,19 @@ public class PrescriptionPay extends IdEntity {
        this.status = status;
    }
    public Double getYbCost() {
    public Integer getYbCost() {
        return ybCost;
    }
    public void setYbCost(Double ybCost) {
    public void setYbCost(Integer ybCost) {
        this.ybCost = ybCost;
    }
    public Double getMyCost() {
    public Integer getMyCost() {
        return myCost;
    }
    public void setMyCost(Double myCost) {
    public void setMyCost(Integer myCost) {
        this.myCost = myCost;
    }
}

+ 6 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java

@ -45,4 +45,10 @@ public interface ConsultDao extends PagingAndSortingRepository<Consult, Long>, J
    // 按类型查询患者咨询记录
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.doctor,b.evaluate,a.relationCode  from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1 and a.del = '1' and a.type=?2 order by a.czrq desc")
    Page<Object> findByPatientAndType(String patient,Integer type, Pageable pageRequest);
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.doctor,b.evaluate,a.relationCode from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1 and a.id < ?3 and a.del = '1' and a.type=?4 and a.symptoms like ?2 order by a.czrq desc")
    Page<Object> findByPatientAndType(String patient, String title, long id,Integer type, Pageable pageRequest);
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.doctor,b.evaluate,a.relationCode from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1 and a.del = '1' and a.type=?3 and a.symptoms like ?2 order by a.czrq desc")
    Page<Object> findByPatientAndType(String patient, String title,Integer type, Pageable pageRequest);
}

+ 3 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/DoctorAdminTeamMemberDao.java

@ -58,5 +58,7 @@ public interface DoctorAdminTeamMemberDao extends
    @Query("select m from AdminTeamMember m,SignFamily s where m.teamId = s.adminTeamId and s.status >0 and s.patient=?1 and m.doctorCode =?2")
    List<AdminTeamMember> findByAdminTeam(String patient,String doctorCode);
    @Query("SELECT d FROM AdminTeamMember m, AdminTeam t, Doctor d WHERE t.id = ?1 AND t.id = m.teamId " +
            "AND m.doctorCode = d.code AND t.available = true AND m.available = true AND d.level=3 ORDER BY d.level")
    List<Doctor> findJGSMembers(long teamId);
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionExpressageDao.java

@ -10,6 +10,6 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionExpressageDao extends PagingAndSortingRepository<PrescriptionExpressage, Long>, JpaSpecificationExecutor<PrescriptionExpressage> {
    @Query("from PrescriptionExpressage p where p.prescriptionCode=?1")
    @Query("from PrescriptionExpressage p where p.prescriptionCode=?1 and p.del=1")
    PrescriptionExpressage findByPrescriptionPay(String prescriptionCode);
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionPayDao.java

@ -12,6 +12,6 @@ import java.util.List;
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionPayDao extends PagingAndSortingRepository<PrescriptionPay, Long>, JpaSpecificationExecutor<PrescriptionPay> {
    @Query("from PrescriptionPay p where p.prescriptionCode=?1 ")
    @Query("from PrescriptionPay p where p.prescriptionCode=?1 and p.status=1")
    PrescriptionPay findByPrescriptionPay(String prescriptionCode);
}

+ 14 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultService.java

@ -128,11 +128,21 @@ public class ConsultService extends BaseService {
		Sort sort = new Sort(Direction.DESC, "id");
		// 分页信息
		PageRequest pageRequest = new PageRequest(0, pagesize, sort);
		if (id > 0) {
			return consultDao.findByPatientAndType(patient, id,type, pageRequest);
		} else {
			return consultDao.findByPatientAndType(patient,type, pageRequest);
		if(!StringUtils.isEmpty(title)){
			title="%"+title+"%";
			if (id > 0) {
				return consultDao.findByPatientAndType(patient,title, id,type, pageRequest);
			} else {
				return consultDao.findByPatientAndType(patient,title,type, pageRequest);
			}
		}else{
			if (id > 0) {
				return consultDao.findByPatientAndType(patient, id,type, pageRequest);
			} else {
				return consultDao.findByPatientAndType(patient,type, pageRequest);
			}
		}
	}
	public Consult findOneConsult(String consult) {

+ 19 - 15
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -879,14 +879,14 @@ public class ConsultTeamService extends ConsultService {
            // 查询患者信息
            Patient p = patientDao.findByCode(patient);
            //获取基位处方详情
            //1、获取基位处方详情(保存续方表、药品续方信息表、续方疾病类型表)
            Prescription prescription = new Prescription();
            savePrescription(prescription,jwCode,doctor,p,ct,reason);
            String symptoms = savePrescription(prescription,jwCode,doctor,p,ct,reason);
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("title",p.getName()+"申请续方");
            //获取体征记录
            //2、获取体征记录
            Iterable<PatientDevice> devices = patientDeviceDao.findByUser(patient);
            if(devices!=null||devices.iterator().hasNext()){
                int count = messageDao.findTzMessage(patient);
@ -894,11 +894,11 @@ public class ConsultTeamService extends ConsultService {
            }else{
                jsonObject.put("tzMsg","居民未绑定体征设备");
            }
            //获取上次续方时间:与平安的“智慧医保的审方系统”对接,判断居民上次续方时间,点击跳转上次续方记录。(此功能需与第三方系统对接,如果本次版本无法实现,则消息中不显示此条信息)
            //3、获取上次续方时间:与平安的“智慧医保的审方系统”对接,判断居民上次续方时间,点击跳转上次续方记录。(此功能需与第三方系统对接,如果本次版本无法实现,则消息中不显示此条信息)
            jsonObject.put("lastTime","");
            String symptoms = jsonObject.toString();
            String content = jsonObject.toString();
            //创建咨询
            //4、创建咨询
            JSONObject users = new JSONObject();//咨询参与者
            users.put(patient, 0);
            users.put(doctorCode, 0);
@ -925,10 +925,11 @@ public class ConsultTeamService extends ConsultService {
            ct.setCzrq(new Date());
            ct.setDel("1");
            ct.setStatus(0);
            ct.setEvaluate(0);
            // 医生未读数量为1
            ct.setDoctorRead(1);
            // 添加咨询记录
            Consult consult = addConsult(ct.getPatient(), null, ct.getSymptoms(), ct.getImages(), ct.getType());
            Consult consult = addConsult(ct.getPatient(), "申请续方", ct.getSymptoms(), ct.getImages(), ct.getType());
            // 设置关联指导
            consult.setGuidance(ct.getGuidance());
            //关联业务code
@ -937,9 +938,9 @@ public class ConsultTeamService extends ConsultService {
            ct.setConsult(consult.getCode());
            //推送给IM去创建议题,取得成员消息
            JSONObject messages = ImUtill.getCreateTopicMessage(patient, p.getName(), consult.getTitle(), consult.getSymptoms(), consult.getImages(),agent);
            JSONObject messages = ImUtill.getCreateTopicMessage(patient, p.getName(), consult.getTitle(), content, consult.getImages(),agent);
            //续方咨询的sessionid为居民code+续方code+咨询类型
            //5、(im创建咨询) 续方咨询的sessionid为居民code+续方code+咨询类型
            JSONObject obj = ImUtill.createTopics(patient + "_" + prescription.getCode() + "_" + ct.getType(), consult.getCode(), p.getName(), users, messages, ImUtill.SESSION_TYPE_PRESCRIPTION);
            if (obj == null) {
                throw new RuntimeException("IM消息发送异常!");
@ -951,7 +952,7 @@ public class ConsultTeamService extends ConsultService {
            consultTeamDao.save(ct);
            consultDao.save(consult);
            //记录咨询的医生详情
            //6、记录咨询的医生详情
            ConsultTeamDoctor cd = new ConsultTeamDoctor();
            cd.setConsult(consult.getCode());
            cd.setDel("1");
@ -959,13 +960,13 @@ public class ConsultTeamService extends ConsultService {
            cd.setTo(doctorCode);
            consultTeamDoctorDao.save(cd);
            //发送系统消息提示团队长有未审核的消息
            //7、发送系统消息提示团队长有未审核的消息
            addCheckMessage(prescription,p);
            // 保存医生咨询信息
            //8、 保存医生咨询信息
            // 添加咨询转发记录
            // 添加医生咨询日志
            String content = addLogs(ct);
            addLogs(ct);
            return 1;
        }
@ -1007,7 +1008,8 @@ public class ConsultTeamService extends ConsultService {
     * @param reason
     * @return
     */
    public Prescription savePrescription(Prescription prescription,String jwCode,Doctor doctor,Patient p,ConsultTeam ct,String reason){
    public String savePrescription(Prescription prescription,String jwCode,Doctor doctor,Patient p,ConsultTeam ct,String reason){
        String re = "";
        prescription.setCode(getCode());
        prescription.setParentCode(jwCode);
        prescription.setHospitalName(doctor.getHospitalName());
@ -1049,9 +1051,11 @@ public class ConsultTeamService extends ConsultService {
        diagnosis.setUpdateTime(new Date());
        prescriptionDiagnosisDao.save(diagnosis);
        re +=diagnosis.getName();
        prescriptionLogService.addLog(prescription,3,1,1);
        return prescription;
        return re;
    }
    /**

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -157,10 +157,10 @@ public class MessageService extends BaseService {
        if (prescriptionMessage != null && prescriptionMessage.size() > 0) {
            prescriptionJson.put("amount", prescriptionMessage.size());
            JSONObject msgJson = new JSONObject();
            msgJson.put("title", systemMessage.get(0).getTitle());
            msgJson.put("type", systemMessage.get(0).getType());
            msgJson.put("msg", systemMessage.get(0).getContent());
            msgJson.put("msgTime", DateUtil.dateToStrLong(systemMessage.get(0).getCreateTime()));
            msgJson.put("title", prescriptionMessage.get(0).getTitle());
            msgJson.put("type", prescriptionMessage.get(0).getType());
            msgJson.put("msg", prescriptionMessage.get(0).getContent());
            msgJson.put("msgTime", DateUtil.dateToStrLong(prescriptionMessage.get(0).getCreateTime()));
            prescriptionJson.put("lastMessage", msgJson);
        } else {
            prescriptionJson.put("amount", 0);

+ 35 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -64,7 +64,7 @@ public class PrescriptionExpressageService {
            return -1;
        }
        //判断是否是取药码
        if (prescriptionDispensaryCode.getType() != 1||prescriptionDispensaryCode.getType() !=2) {
        if (prescriptionDispensaryCode.getType() != 1 || prescriptionDispensaryCode.getType() != 2) {
            //保存取药失败的日志
            PrescriptionLog prescriptionLog = new PrescriptionLog();
            prescriptionLog.setCode(UUID.randomUUID().toString());
@ -101,12 +101,13 @@ public class PrescriptionExpressageService {
    }
    /**
     * 保存处方物流记录
     * 保存快递单号和增加处方物流记录为配送
     *
     * @param prescriptionExpressage
     * @param uid
     * @throws Exception
     */
    public void addPrescriptionExpressage(PrescriptionExpressage prescriptionExpressage, String uid)throws Exception{
    public void updatePrescriptionExpressage(PrescriptionExpressage prescriptionExpressage, String uid) throws Exception {
        //保存处方物流记录
        prescriptionExpressageDao.save(prescriptionExpressage);
@ -122,4 +123,35 @@ public class PrescriptionExpressageService {
        prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing.getValue());
        prescriptionLogDao.save(prescriptionLog);
    }
    /**
     * 全科医生分配健管师
     *
     * @param code             健管师code
     * @param name             健管师名称
     * @param mobile           健管师联系电话
     * @param prescriptionCode 处方code
     * @param doctorQK         分配的全科
     */
    @Transactional
    public void updateExpressageJGS(String code, String name, String mobile, String prescriptionCode, String doctorQK) {
        //更新配送表 新增配送人员记录
        PrescriptionExpressage prescriptionExpressage = prescriptionExpressageDao.findByPrescriptionPay(prescriptionCode);
        prescriptionExpressage.setExpressageCode(code);
        prescriptionExpressage.setExpressageMobile(mobile);
        prescriptionExpressage.setExpressageName(name);
        //新增日志
        PrescriptionLog prescriptionLog = new PrescriptionLog();
        prescriptionLog.setCode(UUID.randomUUID().toString());
        prescriptionLog.setCreateTime(new Date());
        prescriptionLog.setFlag(1);
        prescriptionLog.setPrescriptionCode(prescriptionCode);
        prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
        prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageJGS.getValue());
        prescriptionLog.setUserCode(doctorQK);
        prescriptionLog.setUserType(2);
        prescriptionLog.setRemark("团队长分配健管师配送");
        prescriptionLogDao.save(prescriptionLog);
    }
}

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -494,4 +494,8 @@ public class AdminTeamService extends BaseService {
        result.put("members",doctors);
        return result;
    }
    public List<Doctor> getJGSMembers(long teamId) {
        return memberDao.findJGSMembers(teamId);
    }
}

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SFUtils.java

@ -7,12 +7,15 @@ import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import sun.misc.BASE64Encoder;
import java.util.List;
/**
 * 顺丰速递接口相关的一些公用方法
 * @author huangwenjie 2017.8.2
 */
@Component
public class SFUtils {

+ 52 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java

@ -0,0 +1,52 @@
package com.yihu.wlyy.web.doctor.prescription;
import com.yihu.wlyy.service.app.prescription.PatientPrescriptionPayService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Created by Reece on 2017/7/28.
 */
@RestController
@RequestMapping(value = "/doctor/prescription/expressage", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-长处配送相关接口")
public class PrescriptionExpressageController extends WeixinBaseController {
    @Autowired
    private PrescriptionExpressageService expressageService;
    /**
     * 健管师配送的时候分配健管师
     *
     * @return
     */
    @RequestMapping(value = "/expressageJGS", method = RequestMethod.POST)
    @ApiOperation(value = "健管师配送的时候分配健管师")
    public String expressageJGS(
            @ApiParam(required = true, name = "code", value = "健管师code") @RequestParam(value = "code", required = true) String code,
            @ApiParam(required = true, name = "name", value = "健管师name") @RequestParam(value = "name", required = true) String name,
            @ApiParam(required = true, name = "mobile", value = "健管师code") @RequestParam(value = "mobile", required = true) String mobile,
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) throws Exception {
        try {
            expressageService.updateExpressageJGS(code,name,mobile,prescriptionCode,getUID());
            return success("修改成功");
        } catch (Exception e) {
            return error(-1, "获取失败");
        }
    }
}

+ 46 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -1,8 +1,14 @@
package com.yihu.wlyy.web.doctor.prescription;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import com.yihu.wlyy.service.app.prescription.PrescriptionPayService;
import com.yihu.wlyy.service.app.prescription.PrescriptionService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -11,6 +17,8 @@ import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created by Trick on 2017/7/25.
 */
@ -23,6 +31,10 @@ public class PrescriptionInfoController extends BaseController{
    private PrescriptionInfoService prescriptionInfoService;
    @Autowired
    private PrescriptionExpressageService prescriptionExpressageService;
    @Autowired
    private PrescriptionService prescriptionService;
    @Autowired
    private PrescriptionPayService prescriptionPayService;
    /**
     * 确认配送 二维码方式
@ -72,7 +84,7 @@ public class PrescriptionInfoController extends BaseController{
                                        @RequestParam(required = false)@ApiParam(name="page",value="起始页")Integer page,
                                        @RequestParam(required = false)@ApiParam(name="size",value="每页条数")Integer size){
        try {
            return write(200, "查询成功!", "data",prescriptionInfoService.getDoctorPrescription(teamCode,state,diseases,startDate,endDate,nameKeyword,page,size));
            return write(200, "查询成功!", "data",prescriptionInfoService.getDoctorPrescription(teamCode,state,diseases,startDate,endDate,nameKeyword));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
@ -145,5 +157,38 @@ public class PrescriptionInfoController extends BaseController{
        }
    }
    /**
     * 订单跟踪 包含处方药品信息 订单记录  支付记录
     * 根据处方code获取处方流程
     *
     * @param prescriptionCode
     * @return
     */
    @RequestMapping(value = "/prescriptionFollow", method = RequestMethod.GET)
    @ApiOperation(value = "获取处方订单详情")
    public String prescriptionFollow(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
            JSONObject jo = new JSONObject();
            //获取处方信息
            Prescription prescription = prescriptionService.findByCode(prescriptionCode);
            //获取处方药品信息
            List<PrescriptionInfo> prescriptionInfos = prescriptionInfoService.getPrescriptionInfo(prescriptionCode);
            //获取付款信息
            PrescriptionPay prescriptionPay = prescriptionPayService.findByPrescriptionCode(prescriptionCode);
            //获取配送信息
            PrescriptionExpressage prescriptionExpressage = prescriptionExpressageService.findByPrescriptionCode(prescriptionCode);
            jo.put("prescriptionExpressage", prescriptionExpressage);
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("dispensaryDispensaryType", prescription.getType());//处方配送方式
            jo.put("dispensaryDispensaryTypeName", prescription.getTypeName());//处方配送方式
            jo.put("prescriptionStatus", prescription.getStatus());//处方状态
            jo.put("prescriptionStatusName", prescription.getStatus());//处方状态
            return write(200, "查询成功", "data", jo);
        } catch (Exception e) {
            return error(-1, "获取失败");
        }
    }
}

+ 14 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/team/AdminTeamController.java

@ -182,6 +182,20 @@ public class AdminTeamController extends BaseController {
        }
    }
    @RequestMapping(value = "/{team_id}/jgsmembers", method = RequestMethod.GET)
    @ApiOperation(value = "获取团队健管师")
    public String jgsmembers(@PathVariable("team_id") long teamId) {
        try {
            List<Doctor> members = memberService.getJGSMembers(teamId);
            return write(200, "OK", "data", new JSONArray(copyBeans(members, "id", "code", "name", "hospital",
                    "jobName", "level", "sex", "photo")));
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    //目前没用到,之后可能会用到
//  @RequestMapping(value = "/{team_id}/members/excludedThisAndLevel3", method = RequestMethod.GET)
//  @ApiOperation(value = "获取团队成员,排除自己和专科医生")

+ 17 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/express/SFExpressController.java

@ -62,7 +62,7 @@ public class SFExpressController extends BaseController {
    @ResponseBody
    @ApiOperation("向顺丰快递下订单")
    public String SFOrderService(
            @ApiParam(name="prescriptionCode", value="订单编号(处方编号)") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode
            @ApiParam(name="prescriptionCode", value="处方编号") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode
//            @ApiParam(name="j_company", value="寄件方公司名称") @RequestParam(value = "j_company") String j_company,
//            @ApiParam(name="j_contact", value="寄件方联系人") @RequestParam(value = "j_contact") String j_contact,
//            @ApiParam(name="j_tel", value="寄件方联系电话") @RequestParam(value = "j_tel") String j_tel,
@ -88,9 +88,9 @@ public class SFExpressController extends BaseController {
                return write(-1, "顺丰快递下单失败,未找到该处方的派送地址!");
            }
            //先判断地址是否可派送
            boolean delivery = sfexpressService.getSFOrderFilterService(sfexpress_obj.getProvinceName()+sfexpress_obj.getCityName()+sfexpress_obj.getTownName()+sfexpress_obj.getAddress());
            //先判断地址是否可派送
            if(delivery){
//                sfexpress_obj.setCode("SF"+UUID.randomUUID().toString().replace("-",""));
//                sfexpress_obj.setPrescriptionCode(prescriptionCode);
@ -108,8 +108,8 @@ public class SFExpressController extends BaseController {
                //请求顺丰接口下单,成功下单后,返回快递单号
                sfexpress_obj = sfexpressService.postSFOrderService(sfexpress_obj);
                //保存处方物流记录
                prescriptionExpressageService.addPrescriptionExpressage(sfexpress_obj,getUID());
                //保存快递单号和增加处方物流记录为配送
                prescriptionExpressageService.updatePrescriptionExpressage(sfexpress_obj,getUID());
                return write(200, "顺丰快递下单成功!");
            }else{
@ -123,5 +123,18 @@ public class SFExpressController extends BaseController {
        }
    }
    @RequestMapping(value="/SFOrderService",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("通过快递单号或者业务订单号查询包裹路由信息")
    public String SFRouteService(
            @ApiParam(name="tracking_number", value="快递单号或者订单编号") @RequestParam(value = "tracking_number",required = true) String tracking_number,
            @ApiParam(name="tracking_type", value="查询号类别:1为快递单号,2为订单编号") @RequestParam(value = "tracking_type",required = true) Integer tracking_type){
            //1.先从本地获取
        return "";
    }
}

+ 25 - 1
patient-co/patient-co-wlyy/src/main/resources/application.yml

@ -161,6 +161,12 @@ ylzpay:
  onepayAppId: 1BGKM1UHM03P7B2CA8C000005626EB0E
  onepayAppSecret: 1BGKM1UHM03I7B2CA8C00000AB682E9A
express:
  sf_url: http://bsp-ois.sit.sf-express.com:9080/bsp-ois/sfexpressService
#  sf_url: https://bsp-ois.sit.sf-express.com:9443/bsp-ois/sfexpressServic
  sf_code: BSPdevelop
  sf_check_word: j8DzkIFgmlomPt0aLuwU
---
##正式的配置
@ -252,6 +258,12 @@ ylzpay:
  onepayAppId: 1BLF5SEGN00087165F0A000027362BE5
  onepayAppSecret: 1BLF5SCBO01V3E78A8C00000F3A0FFE7
express:
  sf_url: http://bsp-ois.sit.sf-express.com:9080/bsp-ois/sfexpressService
#  sf_url: https://bsp-ois.sit.sf-express.com:9443/bsp-ois/sfexpressServic
  sf_code: BSPdevelop
  sf_check_word: j8DzkIFgmlomPt0aLuwU
---
##开发的配置
spring:
@ -342,6 +354,12 @@ ylzpay:
  onepayAppId: 1BGKM1UHM03P7B2CA8C000005626EB0E
  onepayAppSecret: 1BGKM1UHM03I7B2CA8C00000AB682E9A
express:
  sf_url: http://bsp-ois.sit.sf-express.com:9080/bsp-ois/sfexpressService
#  sf_url: https://bsp-ois.sit.sf-express.com:9443/bsp-ois/sfexpressServic
  sf_code: BSPdevelop
  sf_check_word: j8DzkIFgmlomPt0aLuwU
---
##开发连测试用这个版本的配置
spring:
@ -421,4 +439,10 @@ sign:
quartz:
  name: schedulerFactoryBean_test_dev
  name: schedulerFactoryBean_test_dev
express:
  sf_url: http://bsp-ois.sit.sf-express.com:9080/bsp-ois/sfexpressService
#  sf_url: https://bsp-ois.sit.sf-express.com:9443/bsp-ois/sfexpressServic
  sf_code: BSPdevelop
  sf_check_word: j8DzkIFgmlomPt0aLuwU