Browse Source

专科医生

trick9191 6 years ago
parent
commit
2efc482c58

+ 8 - 7
app/app-iot-server/pom.xml

@ -1,18 +1,21 @@
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.yihu.ehr.iot</groupId>
    <artifactId>app-iot-server</artifactId>
    <packaging>war</packaging>
    <version>1.0.0</version>
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.ehr.iot</groupId>
    <artifactId>app-iot-server</artifactId>
    <packaging>war</packaging>
    <version>${parent.version}</version>
    <!-- 依赖包 -->
    <dependencies>
        <dependency>
@ -230,12 +233,10 @@
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.base</groupId>

+ 2 - 2
app/public-health-server/pom.xml

@ -4,12 +4,12 @@
    <groupId>com.yihu.ehr.iot</groupId>
    <artifactId>public-health-server</artifactId>
    <packaging>war</packaging>
    <version>1.0.0</version>
    <version>${parent.version}</version>
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>

+ 1 - 1
common-lib-parent-pom/pom.xml

@ -6,7 +6,7 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>

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

@ -61,7 +61,7 @@ public class EnvelopRestController {
    }
    //Json转实体类
    public <T> T toEntity(String json, Class<T> entityCls) throws Exception{
    public <T> T toEntity(String json, Class<T> entityCls) {
//        try {
            ObjectMapper objectMapper = new ObjectMapper();
            objectMapper.setDateFormat(new SimpleDateFormat(DateUtil.yyyy_MM_dd_HH_mm_ss));

+ 8 - 13
svr-lib-parent-pom/pom.xml

@ -11,7 +11,7 @@
    <groupId>com.yihu.jw</groupId>
    <artifactId>svr-lib-parent-pom</artifactId>
    <version>1.0.0</version>
    <version>1.0.2</version>
    <packaging>pom</packaging>
    <developers>
        <developer>
@ -54,7 +54,7 @@
    <properties>
        <version.mysql>5.1.38</version.mysql>
        <version.jackson>2.8.1</version.jackson>
        <version.myCommon>1.0.0</version.myCommon>
        <version.myCommon>1.0.2</version.myCommon>
        <version.spring-data-hadoop>2.3.0.RELEASE</version.spring-data-hadoop>
        <version.springside>4.2.3-GA</version.springside>
        <version.zipkin>1.24.0</version.zipkin>
@ -140,7 +140,7 @@
            <dependency>
                <groupId>com.yihu.base</groupId>
                <artifactId>common-async</artifactId>
                <version>${version.myCommon}</version>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.base</groupId>
@ -167,11 +167,6 @@
                <artifactId>common-rest-model</artifactId>
                <version>${version.myCommon}</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.jw</groupId>
                <artifactId>svr-base</artifactId>
                <version>${version.myCommon}</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.jw</groupId>
                <artifactId>common-util</artifactId>
@ -180,22 +175,22 @@
            <dependency>
                <groupId>com.yihu.base</groupId>
                <artifactId>common-swagger</artifactId>
                <version>${version.myCommon}</version>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.base</groupId>
                <artifactId>common-data-mysql</artifactId>
                <version>${version.myCommon}</version>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.base</groupId>
                <artifactId>common-log</artifactId>
                <version>${version.myCommon}</version>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.base</groupId>
                <artifactId>common-quartz</artifactId>
                <version>${version.myCommon}</version>
                <version>1.0.0</version>
            </dependency>
            <!--数据库驱动 start-->
            <dependency>
@ -269,7 +264,7 @@
            <dependency>
                <groupId>com.yihu.base</groupId>
                <artifactId>common-data-fastdfs</artifactId>
                <version>${version.myCommon}</version>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.csource</groupId>

+ 1 - 1
svr/svr-base/pom.xml

@ -6,7 +6,7 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.jw</groupId>

+ 2 - 2
svr/svr-demo/pom.xml

@ -6,12 +6,12 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <artifactId>svr-demo</artifactId>
    <version>1.0.0</version>
    <version>${parent.version}</version>
    <dependencies>
        <dependency>

+ 1 - 1
svr/svr-iot/pom.xml

@ -6,7 +6,7 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>

+ 2 - 2
svr/svr-manage/pom.xml

@ -6,13 +6,13 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <artifactId>svr-manage</artifactId>
    <packaging>war</packaging>
    <version>1.0.0</version>
    <version>${parent.version}</version>
    <dependencies>

+ 2 - 2
svr/svr-rehabilitation/pom.xml

@ -5,13 +5,13 @@
	<parent>
		<groupId>com.yihu.jw</groupId>
		<artifactId>svr-lib-parent-pom</artifactId>
		<version>${version.wlyy2.0}</version>
		<version>1.0.2</version>
		<relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
	</parent>
	<groupId>com.yihu.rehabilitation</groupId>
	<artifactId>svr-rehabilitation</artifactId>
	<version>1.0.0</version>
	<version>${parent.version}</version>
	<packaging>jar</packaging>
	<dependencies>

+ 2 - 2
svr/svr-wlyy-archives/pom.xml

@ -6,13 +6,13 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.archives</groupId>
    <artifactId>svr-wlyy-archives</artifactId>
    <version>1.0.0</version>
    <version>${parent.version}</version>
    <dependencies>
        <dependency>

+ 2 - 2
svr/svr-wlyy-health-bank/pom.xml

@ -6,13 +6,13 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.health.bank</groupId>
    <artifactId>svr-wlyy-health-bank</artifactId>
    <version>1.0.0</version>
    <version>${parent.version}</version>
    <packaging>war</packaging>
    <dependencies>

+ 2 - 2
svr/svr-wlyy-specialist/pom.xml

@ -6,13 +6,13 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.specialist</groupId>
    <artifactId>svr-wlyy-specialist</artifactId>
    <version>1.0.0</version>
    <version>${parent.version}</version>
    <dependencies>
        <dependency>

+ 1 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistPatientRelationDao.java

@ -11,5 +11,5 @@ import java.util.List;
 */
public interface SpecialistPatientRelationDao extends PagingAndSortingRepository<SpecialistPatientRelationDO, String>,
        JpaSpecificationExecutor<SpecialistPatientRelationDO> {
    public List<SpecialistPatientRelationDO> findByDoctor(String doctor);
    public List<SpecialistPatientRelationDO> findByDoctorAndStatus(String doctor,String status);
}

+ 28 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistService.java

@ -1,15 +1,15 @@
package com.yihu.jw.service;
import com.yihu.base.mysql.query.BaseJpaService;
import com.yihu.jw.dao.*;
import com.yihu.jw.entity.specialist.SpecialistArticleDO;
import com.yihu.jw.entity.specialist.SpecialistConsultDO;
import com.yihu.jw.entity.specialist.SpecialistDO;
import com.yihu.jw.entity.specialist.SpecialistPatientRelationDO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.specialist.SpecialistPatientRelationVO;
import com.yihu.jw.restmodel.specialist.*;
import com.yihu.jw.rm.specialist.SpecialistMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
import java.util.function.BooleanSupplier;
/**
 * Created by Trick on 2018/4/25.
@ -39,6 +38,8 @@ public class SpecialistService{
    private PatientHospitalRecordDao patientHospitalRecordDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${basedb.name}")
    private String basedb;
    public Envelop<Boolean> createSpecialists(List<SpecialistDO> info){
        specialistDao.save(info);
@ -95,5 +96,29 @@ public class SpecialistService{
        return Envelop.getSuccessListWithPage(SpecialistMapping.api_success,specialistPatientRelationVOs,page,size,count);
    }
    public Envelop<Long> findSpecialistPatientRelationCout(String doctor){
        String sql = "SELECT " +
                " count(1) AS total " +
                " FROM " +
                " wlyy_specialist_patient_relation r " +
                " WHERE " +
                " r.patient " +
                " NOT IN ( " +
                " SELECT " +
                " patient " +
                " FROM " +
                " "+basedb+".wlyy_sign_patient_label_info i " +
                " WHERE " +
                " i.label_type = '5' " +
                " )";
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
        Long count = 0L;
        if(rstotal!=null&&rstotal.size()>0){
            count = (Long) rstotal.get(0).get("total");
        }
        return Envelop.getSuccess(SpecialistMapping.api_success,count);
    }
//    public Envelop<PatientRelationVO>
}

+ 2 - 0
svr/svr-wlyy-specialist/src/main/resources/application.yml

@ -64,6 +64,8 @@ fast-dfs:
    max-size: 20
    wait-time: 500
basedb: #base数据基础数据数据源,用于跨库查询
  name: wlyy
---
spring:
  profiles: jwdev

+ 1 - 1
svr/svr-wlyy/pom.xml

@ -6,7 +6,7 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>

+ 1 - 1
web-gateway/pom.xml

@ -6,7 +6,7 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.0</version>
        <version>1.0.2</version>
        <relativePath>../svr-lib-parent-pom/pom.xml</relativePath>
    </parent>