Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

yeshijie 7 years ago
parent
commit
8087764d75

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

@ -65,6 +65,6 @@ public interface PatientDao extends PagingAndSortingRepository<Patient, Long> {
    @Query("select distinct p.openid from Patient p where p.openid is not null and p.openid <> '' ")
    List<String> findOpenids();
    @Query(value=" select distinct p.* from wlyy_patient p INNER JOIN wlyy_sign_family s on s.patient = p.code WHERE s.status > 0  and p.disease >0 and p.status>0 and s.admin_team_code = ?1",nativeQuery = true)
    @Query(value=" select p.* from wlyy_patient p LEFT JOIN wlyy_sign_family s on s.patient = p.code WHERE s.status > 0  and p.disease >0 and p.status>0 and s.admin_team_code = ?1",nativeQuery = true)
    List<Patient> findAllSignPatientTeamcode(String teamcode);
}

+ 2 - 16
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -833,10 +833,6 @@ public class PatientService extends TokenService {
                ") c ON d. CODE = c.serverType " +
                "WHERE " +
                " d.`year` = '" + DateUtil.getSignYear() + "' " ;
        if(isSlowDisease){
            //获取预警分组数量
//            totalGSql = totalGSql +"  AND d. CODE in (4,5)  ";
        }
        totalGSql = totalGSql +
                "ORDER BY " +
@ -862,13 +858,8 @@ public class PatientService extends TokenService {
                "    wlyy_sign_family f ,wlyy_patient p " +
                "   WHERE " +
                "   f.patient = p.code ";
        if(isSlowDisease){
            //获取预警分组数量
            fousGSql = fousGSql +"   AND p.standard_status = 1  ";
        }else{
            //获取微信关注量分组数量
            fousGSql = fousGSql +"   AND p.openid IS NOT NULL AND p.openid <>'' " ;
        }
        //获取微信关注量分组数量
        fousGSql = fousGSql +"   AND p.openid IS NOT NULL AND p.openid <>'' " ;
        if(StringUtils.isNotBlank(diseaseCondition)){
            fousGSql = fousGSql +"   AND p.disease_condition = "+diseaseCondition;
@ -889,11 +880,6 @@ public class PatientService extends TokenService {
                "WHERE " +
                " d.`year` = '" + DateUtil.getSignYear() + "' " ;
        if(isSlowDisease){
            //获取预警分组数量
//            fousGSql = fousGSql +"  AND d. CODE in (4,5)  ";
        }
        fousGSql = fousGSql +
                "ORDER BY " +
                " d.sort ASC";