trick9191 8 vuotta sitten
vanhempi
commit
ff0f0ec49e

+ 12 - 2
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/etl/mycache/CachePool.java

@ -51,9 +51,19 @@ public class CachePool {
        if(model==null){
            model=new CacheModel();
            String sql=" select id,code,idcard,hospital,admin_team_code,expenses_status,patient,server_type from wlyy_sign_family a " +
                    " where status in(1,2) and a.type =2  and expenses_status=1 and a.expenses_time< '"+date+ Constant.quota_date_last+"' and a.expenses_time >'"+Constant.getStartTimeByDate(date)+ Constant.quota_date_last+" '" ;
                    " where " +
                    " status in(1,2) " +
                    " and a.type =2  " +
                    " and expenses_status=1 " +
                    " and a.expenses_time< '"+date+ Constant.quota_date_last+"' " +
                    " and a.sign_year ='"+Constant.getNowYearByDateYeaterday(date)+"'  " ;
            String sqlCount="select count(id) from wlyy_sign_family a " +
                    " where  status in(1,2) and a.type =2 and expenses_status=1 and a.expenses_time< '"+date+ Constant.quota_date_last+"'  and a.expenses_time >'"+Constant.getStartTimeByDate(date)+ Constant.quota_date_last+"'" ;
                    " where  " +
                    " status in(1,2) " +
                    " and a.type =2 " +
                    " and expenses_status=1 " +
                    " and a.expenses_time< '"+date+ Constant.quota_date_last+"'  " +
                    " and a.sign_year ='"+Constant.getNowYearByDateYeaterday(date)+"'  " ;
            //抽取數據 分页抽取
            List<SignFamily> signFamiliesTemp= SpringUtil.getBean(DBExtract.class).extractByPage(SignFamily.class,sql,sqlCount,true);
            model.setSql(sql);

+ 12 - 2
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/AllSignExpenseStatusJob.java

@ -92,8 +92,18 @@ public class AllSignExpenseStatusJob implements Job{
            CacheModel cacheModel=cachePool.getSignFamilysWithExpenseStatus1ByDate(date);
            List<SignFamily> signFamilies_1=cacheModel.getSignFamilies();
            //抽取第二种条件的语句
            String sql=" select code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where  a.type =2 and status in (1,2) and  a.apply_date< '"+date+ Constant.quota_date_last+"' and (expenses_status !=1 or expenses_status is null) and a.apply_date>'"+Constant.getStartTimeByDate(date)+"'";
            String sqlCount=" select count(id) from wlyy_sign_family a where  a.type =2  and status in (1,2) and  a.apply_date< '"+date+ Constant.quota_date_last+"'and (expenses_status !=1 or expenses_status is null)  and a.apply_date>'"+Constant.getStartTimeByDate(date)+"' ";
            String sql=" select code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where  " +
                    " a.type =2 and " +
                    " status in (1,2) and  " +
                    " a.apply_date< '"+date+ Constant.quota_date_last+"' and" +
                    "  (expenses_status !=1 or expenses_status is null) and "+
                    "  a.sign_year ='"+Constant.getNowYearByDateYeaterday(date)+"'  " ;
            String sqlCount=" select count(id) from wlyy_sign_family a where " +
                    " a.type =2  and " +
                    " status in (1,2) and  " +
                    " a.apply_date< '"+date+ Constant.quota_date_last+"'and " +
                    " (expenses_status !=1 or expenses_status is null)  and " +
                    " a.sign_year ='"+Constant.getNowYearByDateYeaterday(date)+"'  " ;
            List<SignFamily> signFamilies_2= dbExtract.extractByPage(SignFamily.class,sql,sqlCount,true);
            //抽取的语句
            sql="select code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where  a.type =2 and status in (1,2) and  a.apply_date< '"+date+ Constant.quota_date_last+"'";

+ 6 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/ChangeSignJob.java

@ -88,7 +88,12 @@ public class ChangeSignJob implements Job {
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            //找出今天的已改簽信息
            String sql=" select code,idcard,hospital,admin_team_code from wlyy_sign_family a where  a.type =2 and a.status =100 and  a.patient_apply_date< '"+yesterday+ Constant.quota_date_last+"' and a.expenses_status=1 and  a.patient_apply_date>'"+Constant.getStartTimeByDate(yesterday)+"'";
            String sql=" select code,idcard,hospital,admin_team_code from wlyy_sign_family a where  " +
                    " a.type =2 and " +
                    " a.status =100 and  " +
                    " a.patient_apply_date< '"+yesterday+ Constant.quota_date_last+"' and " +
                    " a.expenses_status=1 and  " +
                    " a.sign_year ='"+Constant.getNowYearByDate(yesterday)+"' " ;
            //抽取數據
            List<SignFamily> signFamilies= dbExtract.extract(SignFamily.class,sql);
            //清洗數據

+ 36 - 8
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/CurrentDayAllQuotaJob.java

@ -150,8 +150,18 @@ public class CurrentDayAllQuotaJob implements Job {
        quartzJobLog.setJobStartTime(new Date());
        allContent = new StringBuffer();
        //找出今天的签约信息 yesterday,now
        String sql = " select id,code,idcard,hospital,admin_team_code,expenses_status,patient,server_type from wlyy_sign_family a where  a.type =2 and status in (1,2) and  a.expenses_time< '" + tomorrow + "' and a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' and a.expenses_status=1 ";
        String sqlCount = " select count(id) from wlyy_sign_family a where  a.type =2 and status in (1,2) and  a.expenses_time< '" + tomorrow + "' and a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' and a.expenses_status=1 ";
        String sql = " select id,code,idcard,hospital,admin_team_code,expenses_status,patient,server_type from wlyy_sign_family a where " +
                "  a.type =2 and " +
                " status in (1,2) and  " +
                " a.expenses_time< '" + tomorrow + "' and " +
                " a.sign_year ='"+Constant.getNowYearByDateYeaterday(tomorrow)+"' and " +
                " a.expenses_status=1 ";
        String sqlCount = " select count(id) from wlyy_sign_family a where  " +
                " a.type =2 and " +
                " status in (1,2) and  " +
                " a.expenses_time< '" + tomorrow + "' and " +
                " a.sign_year ='"+Constant.getNowYearByDateYeaterday(tomorrow)+"' and " +
                " a.expenses_status=1 ";
        //抽取數據
        List<SignFamily> signFamilies = SpringUtil.getBean(DBExtract.class).extractByPage(SignFamily.class, sql, sqlCount, true);
@ -181,7 +191,6 @@ public class CurrentDayAllQuotaJob implements Job {
        computequota_26();//统计未缴费签约总数
        computequota_27();//统计代预约量
        computequota_28();//统计平均值
//        computequota_29(); //统计续签 没用
        computequota_31(); //统计续签夸团队
        computequota_32(); //统计续签夸社区
        computequota_33(); //统计续签夸区
@ -196,6 +205,7 @@ public class CurrentDayAllQuotaJob implements Job {
        computequota_42(); //统计团队续签
        computequota_43(); //统计社区续签
        computequota_44(); //统计区续签
        computequota_29(); //统计市级续签
        //computequota_45(); //统计社区转签 没用指标
        //computequota_46(); //统计区转签  没用指标
        computequota_30(); //统计团队续签原因
@ -738,8 +748,18 @@ public class CurrentDayAllQuotaJob implements Job {
    private void computequota_16_1(String sql, List<SignFamily> signFamilies_1, List<SignFamily> deleteSignFamilies) {
        String quotaId = "16";
        try {
            sql = " select id,code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where  a.type =2 and (expenses_status !=1 or expenses_status is null) and status in (1,2) and    a.apply_date< '" + tomorrow + "' ";
            String sqlCount = " select count(id) from wlyy_sign_family a where  a.type =2 and (expenses_status !=1 or expenses_status is null) and status in (1,2) and  a.apply_date< '" + tomorrow + "' ";
            sql = " select id,code,idcard,hospital,admin_team_code,expenses_status from wlyy_sign_family a where  " +
                    "a.type =2 and " +
                    " (expenses_status !=1 or expenses_status is null) and " +
                    " status in (1,2) and    " +
                    " a.sign_year ='"+Constant.getNowYearByDateYeaterday(tomorrow)+"' and  " +
                    " a.apply_date< '" + tomorrow + "' ";
            String sqlCount = " select count(id) from wlyy_sign_family a where " +
                    "  a.type =2 and " +
                    "  (expenses_status !=1 or expenses_status is null) and " +
                    " status in (1,2) and  " +
                    " a.sign_year ='"+Constant.getNowYearByDateYeaterday(tomorrow)+"' and  " +
                    " a.apply_date< '" + tomorrow + "' ";
            List<SignFamily> signFamilies_2 = SpringUtil.getBean(DBExtract.class).extractByPage(SignFamily.class, sql, sqlCount, true);
            signFamilies_2.addAll(signFamilies_1);
            //清洗數據
@ -1218,8 +1238,11 @@ public class CurrentDayAllQuotaJob implements Job {
    private void computequota_29() {
        String quotaId = "29";
        try {
            String sql="select fr.sign_code code,fr.hospital,fr.admin_team_id from wlyy_sign_family_renew_log fr where fr.apply_date<'"+tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "'";
            //抽取數據
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where  " +
                    " fr.apply_date<'"+ tomorrow+"' and " +
                    " fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and " +
                    " LENGTH(fr.hospital)=10 and " +
                    " LENGTH(fr.old_hospital)=10 "; //抽取數據
            List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
            //清洗數據
            FilterModel etlModels = SpringUtil.getBean(RenewSignDataFilter.class).filter(signFamilies, sql, "now");
@ -1549,7 +1572,12 @@ public class CurrentDayAllQuotaJob implements Job {
    private void computequota_44() {
        String quotaId = "44";
        try {
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where   fr.apply_date<'"+ tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and  LEFT(fr.hospital,6)=LEFT(fr.old_hospital,6)  and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id from wlyy_sign_family_renew_log fr where  " +
                    " fr.apply_date<'"+ tomorrow+"' and " +
                    " fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and " +
                    " LEFT(fr.hospital,6)=LEFT(fr.old_hospital,6)  and " +
                    " LENGTH(fr.hospital)=10 and " +
                    " LENGTH(fr.old_hospital)=10 ";
            //抽取數據
            List<SignFamilyRenew> signFamilies = SpringUtil.getBean(DBExtract.class).extract(SignFamilyRenew.class, sql);
            //清洗數據

+ 6 - 6
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/RenewSignJob.java

@ -30,7 +30,7 @@ import java.util.List;
import java.util.Map;
/**
 * 续签的指标执行类
 * 续签的市级指标执行类
 */
@Component
@Scope("prototype")
@ -87,11 +87,11 @@ public class RenewSignJob implements Job {
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            String sql="select fr.sign_code code,fr.hospital,fr.admin_team_id from wlyy_sign_family_renew_log fr where " +
                    " fr.apply_date<'"+yesterday+Constant.quota_date_last+"' " +
                    " and fr.sign_year ='"+Constant.getNowYearByDate(yesterday)+"' " +
                    " and LENGTH(fr.hospital)=10 " +
                    " and LENGTH(fr.old_hospital)=10";
            String sql=" select fr.sign_code code,fr.hospital ,fr.admin_team_id  from wlyy_sign_family_renew_log fr where " +
                    "   fr.apply_date<'"+ yesterday + Constant.quota_date_last+"' " +
                    "   and fr.sign_year ='"+Constant.getNowYearByDate(yesterday)+"' " +
                    "   and LENGTH(fr.hospital)=10 " +
                    "   and LENGTH(fr.old_hospital)=10 ";
            //抽取數據
            List<SignFamilyRenew> signFamilies= dbExtract.extract(SignFamilyRenew.class,sql);
            //清洗數據

+ 6 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/UnPaySignJob.java

@ -85,7 +85,12 @@ public class UnPaySignJob implements Job {
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            //找出今天未缴费签约信息
            String sql="select code,idcard,hospital,admin_team_code from wlyy_sign_family a where  a.type =2 and  a.status>0  and a.apply_date< '"+yesterday+ Constant.quota_date_last+"' and a.apply_date >'"+Constant.getStartTimeByDate(yesterday)+"' and a.expenses_status=0 ";
            String sql="select code,idcard,hospital,admin_team_code from wlyy_sign_family a where " +
                    "  a.type =2 and  " +
                    " a.status>0  and " +
                    " a.apply_date< '"+yesterday+ Constant.quota_date_last+"' and " +
                    " a.sign_year ='"+Constant.getNowYearByDate(yesterday)+"' and " +
                    " a.expenses_status=0 ";
            //抽取數據
            List<SignFamily> signFamilies= dbExtract.extract(SignFamily.class,sql);
            //清洗數據

+ 5 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/UnSignJob.java

@ -88,7 +88,11 @@ public class UnSignJob implements Job {
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            //找出今天的解约信息
            String sql=" select code,idcard,hospital,admin_team_code from wlyy_sign_family a where  a.type =2 and a.status in(-3,-4) and a.apply_unsign_date< '"+yesterday+ Constant.quota_date_last+"' and a.apply_unsign_date >'"+Constant.getStartTimeByDate(yesterday)+"'";
            String sql=" select code,idcard,hospital,admin_team_code from wlyy_sign_family a where " +
                    " a.type =2 and" +
                    " a.status in(-3,-4) and " +
                    " a.apply_unsign_date< '"+yesterday+ Constant.quota_date_last+"' and "+
                    "  a.sign_year ='"+Constant.getNowYearByDate(yesterday)+"' " ;
            //抽取數據
            List<SignFamily> signFamilies= dbExtract.extract(SignFamily.class,sql);
            //清洗數據

+ 5 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/WaitSignJob.java

@ -88,7 +88,11 @@ public class WaitSignJob implements Job {
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            //找出今天的待签约信息
            String sql=" select code,idcard,hospital,admin_team_code,doctor,doctor_health from wlyy_sign_family a where  a.type =2  and a.status=0 and  a.patient_apply_date< '"+yesterday+ Constant.quota_date_last+"'  and a.patient_apply_date >'"+Constant.getStartTimeByDate(yesterday)+"'  ";
            String sql=" select code,idcard,hospital,admin_team_code,doctor,doctor_health from wlyy_sign_family a where  " +
                    " a.type =2  and " +
                    " a.status=0 and  " +
                    " a.patient_apply_date< '"+yesterday+ Constant.quota_date_last+"'  and " +
                    " a.sign_year ='"+Constant.getNowYearByDate(yesterday)+"' " ;
            //抽取數據
            List<SignFamily> signFamilies= dbExtract.extract(SignFamily.class,sql);
            //清洗數據

+ 272 - 243
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -409,10 +409,10 @@ public class StatisticsService extends BaseService {
                        redisNum = "";
                    }
                    if (StringUtils.isEmpty(redisNum)) {
                        if(org.springframework.util.StringUtils.isEmpty(year)){
                            year= Constant.getNowYear();
                        if (org.springframework.util.StringUtils.isEmpty(year)) {
                            year = Constant.getNowYear();
                        }
                        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(map.get("code").toString(),Integer.valueOf(year));
                        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(map.get("code").toString(), Integer.valueOf(year));
                        if (peopleNum != null) {
                            map.put("rate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getNum() * 100));
                            map.put("rateString", map.get("amount") + "/" + peopleNum.getNum());
@ -1778,9 +1778,9 @@ public class StatisticsService extends BaseService {
                " wlyy_consult_team c,wlyy_evaluate_score s  " +
                " WHERE " +
                " c.consult = s.consult  " +
                " AND c.czrq >= '"+startDate+"' " +
                " AND c.czrq <= '"+endDate+"' " +
                " AND c.admin_team_code ="+id;
                " AND c.czrq >= '" + startDate + "' " +
                " AND c.czrq <= '" + endDate + "' " +
                " AND c.admin_team_code =" + id;
        //计算签约表记录
        Map<String, Object> signCount = jdbcTemplate.queryForMap(sign_sql);
@ -1849,7 +1849,7 @@ public class StatisticsService extends BaseService {
                    " GROUP BY left(f.apply_date,10)";
            //按月
        } else {
            sql = "SELECT (DATE_FORMAT(f.apply_date,'%v')-DATE_FORMAT('" +startDate + "','%v')+1) as weekOfMonth,count(1) as signCount " +
            sql = "SELECT (DATE_FORMAT(f.apply_date,'%v')-DATE_FORMAT('" + DateUtil.getFristDayOfMonth() + "','%v')+1) as weekOfMonth,count(1) as signCount " +
                    " FROM wlyy_sign_family f " +
                    " where f.apply_date >='" + startDate + " 00:00:00' " +
                    " AND f.apply_date<='" + endDate + " 23:59:59' " +
@ -1889,24 +1889,22 @@ public class StatisticsService extends BaseService {
                    " FROM " +
                    " wlyy_sign_family_renew_log f " +
                    " WHERE " +
                    " f.apply_date >= '"+startDate+"' " +
                    " AND f.apply_date <= '"+endDate+"' " +
                    " AND f.admin_team_id = " +id+
                    " AND f.old_admin_team_id = f.admin_team_id"+
                    " f.apply_date >= '" + startDate + "' " +
                    " AND f.apply_date <= '" + endDate + "' " +
                    " AND f.admin_team_id = " + id +
                    " GROUP BY " +
                    " LEFT (f.apply_date, 10)";
            //按月
        } else {
            sql = "SELECT " +
                    " (DATE_FORMAT(f.apply_date,'%v')-DATE_FORMAT('"+startDate+"','%v')+1) AS weekOfMonth, " +
                    " (DATE_FORMAT(f.apply_date,'%v')-DATE_FORMAT('" + startDate + "','%v')+1) AS weekOfMonth, " +
                    " count(1) AS signCount " +
                    " FROM " +
                    " wlyy_sign_family_renew_log f " +
                    " WHERE " +
                    " f.apply_date >= '"+startDate+"' " +
                    " AND f.apply_date <= '"+endDate+"' " +
                    " AND f.admin_team_id = " +id+
                    " AND f.old_admin_team_id = f.admin_team_id"+
                    " f.apply_date >= '" + startDate + "' " +
                    " AND f.apply_date <= '" + endDate + "' " +
                    " AND f.admin_team_id = " + id +
                    " GROUP BY " +
                    " DATE_FORMAT(f.apply_date, '%m %v')";
        }
@ -1915,7 +1913,8 @@ public class StatisticsService extends BaseService {
        JSONArray rsJs = new JSONArray(rs);
        return rsJs;
    }
    public JSONObject getReyStatbyTeamNow(String doctor, String startDate, String endDate, String isNow){
    public JSONObject getReyStatbyTeamNow(String doctor, String startDate, String endDate, String isNow) {
        AdminTeam admin = adminTeamDao.findByLeaderCode(doctor);
        if (admin == null) {
            throw new RuntimeException("未找到团队信息");
@ -1927,52 +1926,52 @@ public class StatisticsService extends BaseService {
        String totalSql = "SELECT " +
                "  COUNT(1) total " +
                "  FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                "  WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code =" +id +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
        List<Map<String,Object>> totalList = jdbcTemplate.queryForList(totalSql);
                " AND c.admin_team_code =" + id +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "'";
        List<Map<String, Object>> totalList = jdbcTemplate.queryForList(totalSql);
        Long totalCount = 0L;
        if(totalList!=null&&totalList.size()>0){
            Map<String,Object> total = totalList.get(0);
            totalCount = (Long)total.get("total");
        if (totalList != null && totalList.size() > 0) {
            Map<String, Object> total = totalList.get(0);
            totalCount = (Long) total.get("total");
        }
        String noReySql = "SELECT " +
                "  COUNT(1) noRey " +
                "  FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                "  WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND t. STATUS <> 10 " +
                " AND t.`reply` = 0 "+
                " AND t.`reply` = 0 " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code =" +id +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
        List<Map<String,Object>> noReyList = jdbcTemplate.queryForList(noReySql);
                " AND c.admin_team_code =" + id +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "'";
        List<Map<String, Object>> noReyList = jdbcTemplate.queryForList(noReySql);
        Long noReyCount = 0L;
        if(noReyList!=null&&noReyList.size()>0){
            Map<String,Object> noRey = noReyList.get(0);
            noReyCount = (Long)noRey.get("noRey");
        if (noReyList != null && noReyList.size() > 0) {
            Map<String, Object> noRey = noReyList.get(0);
            noReyCount = (Long) noRey.get("noRey");
        }
        JSONObject rs = new JSONObject();
        rs.put("onReyCount", noReyCount);
        rs.put("totalCount",totalCount);
        rs.put("totalCount", totalCount);
        return rs;
    }
@ -2206,26 +2205,26 @@ public class StatisticsService extends BaseService {
     * @return
     */
    public Map<String, Object> getConsultByteam(Long id, String startDate, String endDate) {
         String imDataBaseName = SystemConf.getInstance().getImDataBaseName();
        String imDataBaseName = SystemConf.getInstance().getImDataBaseName();
//        startDate = startDate + " 00:00:00";
//        endDate = endDate + " 23:59:59";
        //咨询量
        String consult_sql = "SELECT " +
                "  COUNT(1) consultCount " +
                "  FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                "  WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code =" +id+
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
                " AND c.admin_team_code =" + id +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "'";
        //获取咨詢數
        Map<String, Object> consultCout = jdbcTemplate.queryForMap(consult_sql);
        if (consultCout.get("consultCount") == null) {
@ -2316,22 +2315,22 @@ public class StatisticsService extends BaseService {
                    " WHERE  " +
                    "  s.consult = t.consult " +
                    " AND  " +
                    " t.czrq <= '"+endDate+"' " +
                    " AND t.czrq >= '"+startDate+"' " +
                    " AND t.admin_team_code = " +id+
                    " t.czrq <= '" + endDate + "' " +
                    " AND t.czrq >= '" + startDate + "' " +
                    " AND t.admin_team_code = " + id +
                    " GROUP BY dateNo";
        } else {
            sql = "SELECT " +
                    " (DATE_FORMAT(t.czrq,'%v')-DATE_FORMAT('"+startDate+"','%v')+1) AS weekNo, " +
                    " (DATE_FORMAT(t.czrq,'%v')-DATE_FORMAT('" + startDate + "','%v')+1) AS weekNo, " +
                    " ifnull(ROUND(AVG(s.score), 1), 0) AS avgCount " +
                    " FROM " +
                    " wlyy_evaluate_score s,wlyy_consult_team t " +
                    " WHERE  " +
                    "  s.consult = t.consult " +
                    " AND  " +
                    " t.czrq <= '"+endDate+"' " +
                    " AND t.czrq >= '"+startDate+"' " +
                    " AND t.admin_team_code = " +id +
                    " t.czrq <= '" + endDate + "' " +
                    " AND t.czrq >= '" + startDate + "' " +
                    " AND t.admin_team_code = " + id +
                    " GROUP BY weekNo";
        }
@ -2368,11 +2367,11 @@ public class StatisticsService extends BaseService {
            sql = "SELECT " +
                    "  left(t.create_time,10) AS dateNo, COUNT(1) AS noRely  " +
                    " FROM " +
                    "  "+ imDataBaseName +".Topics t, " +
                    "  "+ imDataBaseName +".Participants p, " +
                    "  "+ imDataBaseName +".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+ imDataBaseName +".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    " WHERE " +
                    "  d.id = p.participant_id " +
                    " AND c.consult = t.id " +
@ -2380,67 +2379,67 @@ public class StatisticsService extends BaseService {
                    " AND t. STATUS <> 10 " +
                    " AND t.`reply` = 0 " +
                    " AND p.session_id = t.session_id " +
                    " AND c.admin_team_code = " +teamCode+
                    " AND t.create_time >= '"+startDate+"' " +
                    " AND t.create_time <= '"+endDate+"' " +
                    " AND c.admin_team_code = " + teamCode +
                    " AND t.create_time >= '" + startDate + "' " +
                    " AND t.create_time <= '" + endDate + "' " +
                    " GROUP BY dateNo";
            totalSql = "SELECT " +
                    "  left(t.create_time,10) AS dateNo, COUNT(1) total " +
                    " FROM " +
                    "  "+ imDataBaseName +".Topics t, " +
                    "  "+ imDataBaseName +".Participants p, " +
                    "  "+ imDataBaseName +".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+ imDataBaseName +".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    " WHERE " +
                    "  d.id = p.participant_id " +
                    " AND c.consult = t.id " +
                    " AND c.patient = s.id " +
                    " AND p.session_id = t.session_id " +
                    " AND c.admin_team_code = " +teamCode+
                    " AND t.create_time >= '"+startDate+"' " +
                    " AND t.create_time <= '"+endDate+"' " +
                    " AND c.admin_team_code = " + teamCode +
                    " AND t.create_time >= '" + startDate + "' " +
                    " AND t.create_time <= '" + endDate + "' " +
                    " GROUP BY dateNo";
        } else {
            //按月统计
            sql ="SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('"+startDate+"', '%v') + 1) AS weekOfMonth, " +
            sql = "SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1) AS weekOfMonth, " +
                    "  COUNT(1) AS noRely " +
                    "  FROM " +
                    "  "+imDataBaseName+".Topics t, " +
                    "  "+imDataBaseName+".Participants p, " +
                    "  "+imDataBaseName+".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+imDataBaseName+".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    "  WHERE " +
                    "  d.id = p.participant_id " +
                    "  AND c.consult = t.id " +
                    "  AND c.patient = s.id " +
                    "  AND p.session_id = t.session_id " +
                    "  AND c.admin_team_code = " +teamCode+
                    "  AND c.admin_team_code = " + teamCode +
                    "  AND t. STATUS <> 10  " +
                    "  AND t.`reply` = 0  " +
                    "  AND t.create_time >= '"+startDate+"' " +
                    "  AND t.create_time <= '"+endDate+"' " +
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  GROUP BY weekOfMonth";
            totalSql ="SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('"+startDate+"', '%v') + 1) AS weekOfMonth, " +
            totalSql = "SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1) AS weekOfMonth, " +
                    "  COUNT(1) AS total " +
                    "  FROM " +
                    "  "+imDataBaseName+".Topics t, " +
                    "  "+imDataBaseName+".Participants p, " +
                    "  "+imDataBaseName+".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+imDataBaseName+".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    "  WHERE " +
                    "  d.id = p.participant_id " +
                    "  AND c.consult = t.id " +
                    "  AND c.patient = s.id " +
                    "  AND p.session_id = t.session_id " +
                    "  AND c.admin_team_code = " +teamCode+
                    "  AND t.create_time >= '"+startDate+"' " +
                    "  AND t.create_time <= '"+endDate+"' " +
                    "  AND c.admin_team_code = " + teamCode +
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  GROUP BY weekOfMonth";
        }
@ -2473,11 +2472,11 @@ public class StatisticsService extends BaseService {
            sql = "SELECT " +
                    "  left(t.create_time,10) AS dateNo, COUNT(1) AS noRely " +
                    " FROM " +
                    "  "+ imDataBaseName +".Topics t, " +
                    "  "+ imDataBaseName +".Participants p, " +
                    "  "+ imDataBaseName +".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+ imDataBaseName +".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    " WHERE " +
                    "  d.id = p.participant_id " +
                    " AND c.consult = t.id " +
@ -2485,71 +2484,71 @@ public class StatisticsService extends BaseService {
                    " AND t. STATUS <> 10 " +
                    " AND t.`reply` = 0 " +
                    " AND p.session_id = t.session_id " +
                    " AND d.id ='"+doctor +"'"+
                    " AND c.admin_team_code = " +teamCode+
                    " AND t.create_time >= '"+startDate+"' " +
                    " AND t.create_time <= '"+endDate+"' " +
                    " AND d.id ='" + doctor + "'" +
                    " AND c.admin_team_code = " + teamCode +
                    " AND t.create_time >= '" + startDate + "' " +
                    " AND t.create_time <= '" + endDate + "' " +
                    " GROUP BY dateNo";
            totalSql = "SELECT " +
                    "  left(t.create_time,10) AS dateNo, COUNT(1) total " +
                    " FROM " +
                    "  "+ imDataBaseName +".Topics t, " +
                    "  "+ imDataBaseName +".Participants p, " +
                    "  "+ imDataBaseName +".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+ imDataBaseName +".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    " WHERE " +
                    "  d.id = p.participant_id " +
                    " AND c.consult = t.id " +
                    " AND c.patient = s.id " +
                    " AND p.session_id = t.session_id " +
                    " AND d.id ='"+doctor +"'"+
                    " AND c.admin_team_code = " +teamCode+
                    " AND t.create_time >= '"+startDate+"' " +
                    " AND t.create_time <= '"+endDate+"' " +
                    " AND d.id ='" + doctor + "'" +
                    " AND c.admin_team_code = " + teamCode +
                    " AND t.create_time >= '" + startDate + "' " +
                    " AND t.create_time <= '" + endDate + "' " +
                    " GROUP BY dateNo";
        } else {
            //按月统计
            sql ="SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('"+startDate+"', '%v') + 1) AS weekOfMonth, " +
            sql = "SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1) AS weekOfMonth, " +
                    "  COUNT(1) AS noRely " +
                    "  FROM " +
                    "  "+imDataBaseName+".Topics t, " +
                    "  "+imDataBaseName+".Participants p, " +
                    "  "+imDataBaseName+".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+imDataBaseName+".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    "  WHERE " +
                    "  d.id = p.participant_id " +
                    "  AND c.consult = t.id " +
                    "  AND c.patient = s.id " +
                    "  AND p.session_id = t.session_id " +
                    "  AND c.admin_team_code = " +teamCode+
                    "  AND d.id ='"+doctor +"'"+
                    "  AND c.admin_team_code = " + teamCode +
                    "  AND d.id ='" + doctor + "'" +
                    "  AND t. STATUS <> 10  " +
                    "  AND t.`reply` = 0  " +
                    "  AND t.create_time >= '"+startDate+"' " +
                    "  AND t.create_time <= '"+endDate+"' " +
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  GROUP BY weekOfMonth";
            totalSql ="SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('"+startDate+"', '%v') + 1) AS weekOfMonth, " +
            totalSql = "SELECT " +
                    "  (DATE_FORMAT(t.create_time, '%v') - DATE_FORMAT('" + startDate + "', '%v') + 1) AS weekOfMonth, " +
                    "  COUNT(1) AS total " +
                    "  FROM " +
                    "  "+imDataBaseName+".Topics t, " +
                    "  "+imDataBaseName+".Participants p, " +
                    "  "+imDataBaseName+".Doctors d, " +
                    "  " + imDataBaseName + ".Topics t, " +
                    "  " + imDataBaseName + ".Participants p, " +
                    "  " + imDataBaseName + ".Doctors d, " +
                    "  Wlyy_Consult_Team c, " +
                    "  "+imDataBaseName+".Patients s " +
                    "  " + imDataBaseName + ".Patients s " +
                    "  WHERE " +
                    "  d.id = p.participant_id " +
                    "  AND c.consult = t.id " +
                    "  AND c.patient = s.id " +
                    "  AND p.session_id = t.session_id " +
                    "  AND d.id ='"+doctor +"'"+
                    "  AND c.admin_team_code = " +teamCode+
                    "  AND t.create_time >= '"+startDate+"' " +
                    "  AND t.create_time <= '"+endDate+"' " +
                    "  AND d.id ='" + doctor + "'" +
                    "  AND c.admin_team_code = " + teamCode +
                    "  AND t.create_time >= '" + startDate + "' " +
                    "  AND t.create_time <= '" + endDate + "' " +
                    "  GROUP BY weekOfMonth";
        }
@ -2589,27 +2588,27 @@ public class StatisticsService extends BaseService {
                "  d.`name`, " +
                "  d.id " +
                " FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code = " +teamCode+
                " AND c.admin_team_code = " + teamCode +
                " AND t. STATUS <> 10 " +
                " AND t.`reply` = 0 " +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"' " +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "' " +
                " GROUP BY " +
                "  id " +
                " ) c ON c.id = m.doctor_code " +
                " WHERE " +
                " m.doctor_code = d.`code` " +
                " AND m.team_id = "+teamCode;
                " AND m.team_id = " + teamCode;
        if ("0".equals(sort)) {
            onReySQL = onReySQL + " ORDER BY noRely DESC";
        } else {
@ -2631,25 +2630,25 @@ public class StatisticsService extends BaseService {
                "  d.`name`, " +
                "  d.id " +
                " FROM " +
                "  "+ imDataBaseName +".Topics t, " +
                "  "+ imDataBaseName +".Participants p, " +
                "  "+ imDataBaseName +".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+ imDataBaseName +".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code = " +teamCode+
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"' " +
                " AND c.admin_team_code = " + teamCode +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "' " +
                " GROUP BY " +
                "  id " +
                " ) c ON c.id = m.doctor_code " +
                " WHERE " +
                " m.doctor_code = d.`code` " +
                " AND m.team_id = "+teamCode;
                " AND m.team_id = " + teamCode;
        if ("0".equals(sort)) {
            totalSql = totalSql + " ORDER BY total DESC";
        } else {
@ -2671,26 +2670,26 @@ public class StatisticsService extends BaseService {
                "  d.`name`, " +
                "  d.id " +
                " FROM " +
                "  "+ imDataBaseName +".Topics t, " +
                "  "+ imDataBaseName +".Participants p, " +
                "  "+ imDataBaseName +".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+ imDataBaseName +".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code = " +teamCode+
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"' " +
                " AND c.admin_team_code = " + teamCode +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "' " +
                " AND t. STATUS = 10 " +
                " GROUP BY " +
                "  id " +
                " ) c ON c.id = m.doctor_code " +
                " WHERE " +
                " m.doctor_code = d.`code` " +
                " AND m.team_id = "+teamCode;
                " AND m.team_id = " + teamCode;
        if ("0".equals(sort)) {
            endConsultSql = endConsultSql + " ORDER BY endRey DESC";
        } else {
@ -2789,65 +2788,65 @@ public class StatisticsService extends BaseService {
        String couTotalSQL = "SELECT " +
                "  COUNT(1) total " +
                " FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code ="+teamCode+
                " AND d.id='"+doctor+"'" +
                " AND t.create_time <= '"+endDate+"'";
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND t.create_time <= '" + endDate + "'";
        //及时回复数
        String reyTotalSql = "SELECT " +
                "  COUNT(1) total " +
                " FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND t.`reply`=1 " +
                " AND c.admin_team_code ="+teamCode+
                " AND d.id='"+doctor+"'" +
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND TIMESTAMPDIFF(SECOND ,t.create_time ,t.reply_time) <86400 AND TIMESTAMPDIFF(SECOND ,t.create_time,t.reply_time) >0 " +
                " AND t.create_time <= '"+endDate+"'";
                " AND t.create_time <= '" + endDate + "'";
        //本周或月增量
        String addTotalSql = "SELECT " +
                " COUNT(1) total " +
                " FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code ="+teamCode+
                " AND d.id='"+doctor+"'" +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "'";
        //当前未回复咨询数
        String noRelySql = "SELECT " +
                " COUNT(1) total " +
                " FROM " +
                "  "+imDataBaseName+".Topics t, " +
                "  "+imDataBaseName+".Participants p, " +
                "  "+imDataBaseName+".Doctors d, " +
                "  " + imDataBaseName + ".Topics t, " +
                "  " + imDataBaseName + ".Participants p, " +
                "  " + imDataBaseName + ".Doctors d, " +
                "  Wlyy_Consult_Team c, " +
                "  "+imDataBaseName+".Patients s " +
                "  " + imDataBaseName + ".Patients s " +
                " WHERE " +
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
@ -2855,10 +2854,10 @@ public class StatisticsService extends BaseService {
                " AND p.session_id = t.session_id " +
                " AND t. STATUS <> 10  " +
                " AND t.`reply` = 0  " +
                " AND c.admin_team_code ="+teamCode+
                " AND d.id='"+doctor+"'" +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
                " AND c.admin_team_code =" + teamCode +
                " AND d.id='" + doctor + "'" +
                " AND t.create_time >= '" + startDate + "' " +
                " AND t.create_time <= '" + endDate + "'";
        JSONObject rs = new JSONObject();
        Long total = 0L;
@ -3527,8 +3526,8 @@ public class StatisticsService extends BaseService {
                    " wlyy_patient_health_guidance w " +
                    " WHERE " +
                    " w.admin_team_code = " + teamCode +
                    " AND w.czrq <= '" +endDate+ "' " +
                    " AND w.czrq >= '" +startDate  + "' " +
                    " AND w.czrq <= '" + endDate + "' " +
                    " AND w.czrq >= '" + startDate + "' " +
                    " GROUP BY dateNo";
        } else {
            //按月统计
@ -3565,7 +3564,7 @@ public class StatisticsService extends BaseService {
                    " w.admin_team_code = " + teamCode +
                    " AND w.doctor ='" + doctor + "'" +
                    " AND w.czrq <= '" + endDate + "' " +
                    " AND w.czrq >= '" +startDate  + "' " +
                    " AND w.czrq >= '" + startDate + "' " +
                    " GROUP BY dateNo";
        } else {
            //按月统计
@ -3716,8 +3715,8 @@ public class StatisticsService extends BaseService {
                " WHERE " +
                " w.admin_team_code =  " + teamCode +
                " AND w.doctor ='" + doctor + "'" +
                " AND w.czrq <= '" +endDate  + "' " +
                " AND w.czrq >= '" +startDate+ "'";
                " AND w.czrq <= '" + endDate + "' " +
                " AND w.czrq >= '" + startDate + "'";
        JSONObject rs = new JSONObject();
        Long guidanceCount = 0L;
        Long addCount = 0L;
@ -4013,6 +4012,7 @@ public class StatisticsService extends BaseService {
        }
        return null;
    }
    public List<WlyyQuotaResult> findQuotaResults(String date, int level, String index, String area) {
        String sql = " select * from wlyy_quota_result w where w.quota_date ='" + date + "' and w.quato_code='" + index + "' and w.level1_type= " + level;
        if (level == 4) {
@ -4032,24 +4032,17 @@ public class StatisticsService extends BaseService {
        return results;
    }
    public JSONObject getRenewPercentAndChangePercent(String level, String code, String year) {
        String renewIndex="";
        String switchIndex="";
        if("2".equals(level)){
            //团队的续签量
            renewIndex="42";
    public JSONObject getRenewPercentAndChangePercent(String renewIndex, String level, String code, String year) {
        String switchIndex = "";
        if ("2".equals(level)) {
            //团队的转签
            switchIndex="35";
        }else if("2".equals(level)){
            //社区的续签量
            renewIndex="43";
            switchIndex = "35";
        } else if ("3".equals(level)) {
            //社区的转签
            switchIndex="35";
        }else{
            //区和市的续签量
            renewIndex="44";
            switchIndex = "35";
        } else {
            //区和市的转签
            switchIndex="35";
            switchIndex = "35";
        }
        JSONObject jo = new JSONObject();
@ -4077,7 +4070,7 @@ public class StatisticsService extends BaseService {
    }
    public JSONObject getRenewAnalysis(String switchIndex,String switchIndexReson,String signIn,String signOut,String level, String code) {
    public JSONObject getRenewAnalysis(String switchIndex, String switchIndexReson, String signIn, String signOut, String level, String code) {
        JSONObject jo = new JSONObject();
        String timeKey = redisTemplate.opsForValue().get("quota:timeKey");
@ -4094,25 +4087,25 @@ public class StatisticsService extends BaseService {
        int changeTeam = getLevel1NumForRedis("31", level, code, timeKey);//夸团队的数目
        int changeHospital = getLevel1NumForRedis("32", level, code, timeKey);//夸社区的数目
        int changeTown = getLevel1NumForRedis("33", level, code, timeKey);//夸社区的数目
        int allChangeCount=changeTeam+changeHospital+changeTown; //跨团队,跨社区 跨区的分母
        int allChangeCount = changeTeam + changeHospital + changeTown; //跨团队,跨社区 跨区的分母
        jo.put("inNum", inNum);//今年的签入量
        jo.put("outNum", outNum);//今年的签出量
        jo.put("thisYearSwithch", switchNum);//今年的转签量
        jo.put("switchHealth", switchJO);//今年的服务分布
        String changeTeamNum=getRangeNoLast(changeTeam, allChangeCount, 2);//跨团队转签率
        String changeHospNum=getRangeNoLast(changeHospital, allChangeCount, 2);//跨社区转签率
        String changeTownNum="";
        String changeTeamNum = getRangeNoLast(changeTeam, allChangeCount, 2);//跨团队转签率
        String changeHospNum = getRangeNoLast(changeHospital, allChangeCount, 2);//跨社区转签率
        String changeTownNum = "";
        if(changeTown==0){
            changeTownNum="0";
        }else{
            changeTownNum=(100-Double.valueOf(changeTeamNum)-Double.valueOf(changeHospNum))+"";//跨区转签率,解决算出来可能不是100%的问题 用扣的
        if (changeTown == 0) {
            changeTownNum = "0";
        } else {
            changeTownNum = (100 - Double.valueOf(changeTeamNum) - Double.valueOf(changeHospNum)) + "";//跨区转签率,解决算出来可能不是100%的问题 用扣的
        }
        jo.put("switchTeam", changeTeamNum+"%");//今年的转签量
        jo.put("switchHospital", changeHospNum+"%");//今年的转签量
        jo.put("switchTown", changeTownNum+"%");//今年的转签量
        jo.put("switchTeam", changeTeamNum + "%");//今年的转签量
        jo.put("switchHospital", changeHospNum + "%");//今年的转签量
        jo.put("switchTown", changeTownNum + "%");//今年的转签量
        return jo;
    }
@ -4158,9 +4151,9 @@ public class StatisticsService extends BaseService {
     * @return
     */
    public String getRange(int first, int second, int i) {
        if(second==0&&first>0){
        if (second == 0 && first > 0) {
            return "100%";
        }else if(second==0&&first==0){
        } else if (second == 0 && first == 0) {
            return "0%";
        }
        float size = (float) (first * 100) / second;
@ -4170,15 +4163,15 @@ public class StatisticsService extends BaseService {
    }
    public String getRangeNoLast(int first, int second, int i) {
        if(second==0&&first>0){
        if (second == 0 && first > 0) {
            return "100";
        }else if(second==0&&first==0){
        } else if (second == 0 && first == 0) {
            return "0";
        }
        float size = (float) (first * 100) / second;
        DecimalFormat df = new DecimalFormat("0.00");//格式化小数,不足的补0
        String filesize = df.format(size);
        return filesize ;
        return filesize;
    }
    public JSONObject getConsultingTitleAll(Integer level, String area, String year) {
@ -4282,9 +4275,9 @@ public class StatisticsService extends BaseService {
    public JSONObject getCoutListByTimeYear(String level, String area, String year) {
        JSONObject result = new JSONObject();
        List<WlyyQuotaResult> wlyyQuotaResult = findQuotaResults((Integer.valueOf(year) + 1) + "-06-30", Integer.valueOf(level), "24", area);
        JSONArray jo=new JSONArray();
        if (wlyyQuotaResult != null&&wlyyQuotaResult.size()>0) {
            wlyyQuotaResult.stream().forEach(one->{
        JSONArray jo = new JSONArray();
        if (wlyyQuotaResult != null && wlyyQuotaResult.size() > 0) {
            wlyyQuotaResult.stream().forEach(one -> {
                JSONObject temp1 = new JSONObject();
                temp1.put("name", one.getLevel2TypeName());
                temp1.put("code", getCodeByLevel(one, Integer.valueOf(level)));
@ -4430,21 +4423,21 @@ public class StatisticsService extends BaseService {
    public JSONObject getConsultingStatisticsListYear(Integer level, String area, String lowlevel, String year) {
        JSONObject result = new JSONObject();
        Integer coutYear = Integer.parseInt(year)+1;
        Integer coutYear = Integer.parseInt(year) + 1;
        //及时回复数
         JSONArray rely = getQuotaList(level,lowlevel,area,coutYear,23);
        if(rely==null){
        JSONArray rely = getQuotaList(level, lowlevel, area, coutYear, 23);
        if (rely == null) {
            return null;
        }
        //咨询总数
        JSONArray total = getQuotaList(level,lowlevel,area,coutYear,25);
        if(total==null){
        JSONArray total = getQuotaList(level, lowlevel, area, coutYear, 25);
        if (total == null) {
            return null;
        }
        //未回复数
        JSONArray onRely =getQuotaList(level,lowlevel,area,coutYear,22);
        if(total==null){
        JSONArray onRely = getQuotaList(level, lowlevel, area, coutYear, 22);
        if (total == null) {
            return null;
        }
        result.put("resultList", getCoutList(rely, total, onRely));
@ -4471,7 +4464,7 @@ public class StatisticsService extends BaseService {
                    " GROUP BY dateNo ";
        } else {
            inSql = "SELECT ( " +
                    "  DATE_FORMAT(r.apply_date, '%v') - DATE_FORMAT('"+startDate+"', '%v') + 1 " +
                    "  DATE_FORMAT(r.apply_date, '%v') - DATE_FORMAT('2017-06-01', '%v') + 1 " +
                    " ) AS weekOfMonth,COUNT(1) AS inCount FROM wlyy_sign_family_renew_log r  " +
                    " WHERE r.admin_team_id ='" + teamCode + "'  " +
                    " AND r.apply_date >= '" + startDate + "'  " +
@ -4479,7 +4472,7 @@ public class StatisticsService extends BaseService {
                    " AND r.old_admin_team_id <> r.admin_team_id " +
                    " GROUP BY weekOfMonth ";
            outSql = "SELECT ( " +
                    "  DATE_FORMAT(r.apply_date, '%v') - DATE_FORMAT('"+startDate+"', '%v') + 1 " +
                    "  DATE_FORMAT(r.apply_date, '%v') - DATE_FORMAT('2017-06-01', '%v') + 1 " +
                    " ) AS weekOfMonth,COUNT(1) AS outCount FROM wlyy_sign_family_renew_log r  " +
                    " WHERE r.old_admin_team_id ='" + teamCode + "'  " +
                    " AND r.apply_date >= '" + startDate + "'  " +
@ -4576,6 +4569,7 @@ public class StatisticsService extends BaseService {
     * 2.市级-机构
     * 3.区级-机构
     * 4.机构-团队
     *
     * @param level
     * @param lovlevel
     * @param area
@ -4583,39 +4577,74 @@ public class StatisticsService extends BaseService {
     * @param index
     * @return
     */
    public JSONArray getQuotaList(Integer level, String lovlevel, String area, Integer year, Integer index){
        String sql ;
        if(level==4){
            if(StringUtils.isBlank(lovlevel)){
    public JSONArray getQuotaList(Integer level, String lovlevel, String area, Integer year, Integer index) {
        String sql;
        if (level == 4) {
            if (StringUtils.isBlank(lovlevel)) {
                //市 区
                sql =" SELECT t.result As num,t.town_name AS name,t.town AS code,t.create_time AS date" +
                sql = " SELECT t.result As num,t.town_name AS name,t.town AS code,t.create_time AS date" +
                        " FROM wlyy_quota_result t " +
                        " WHERE t.city ='"+area+"' AND t.quato_code ='"+index+"' AND t.level1_type ='3'AND t.quota_date='"+year+"-06-30'";
            }else{
                        " WHERE t.city ='" + area + "' AND t.quato_code ='" + index + "' AND t.level1_type ='3'AND t.quota_date='" + year + "-06-30'";
            } else {
                //市 机构
                sql = "SELECT t.result As num,t.org_name AS name,t.org_code AS code,t.create_time AS date" +
                        " FROM wlyy_quota_result t " +
                        " WHERE t.city ='"+area+"' AND t.quato_code ='"+index+"' AND t.level1_type ='2' AND t.quota_date='"+year+"-06-30'";
                        " WHERE t.city ='" + area + "' AND t.quato_code ='" + index + "' AND t.level1_type ='2' AND t.quota_date='" + year + "-06-30'";
            }
        }else if (level ==3){
        } else if (level == 3) {
            //区 机构
            sql = "SELECT t.result As num,t.org_name AS name,t.org_code AS code,t.create_time AS date " +
                    "FROM wlyy_quota_result t " +
                    "WHERE t.town ='"+area+"' AND t.quato_code ='"+index+"' AND t.level1_type ='2' AND t.quota_date='"+year+"-06-30'";
        }else{
                    "WHERE t.town ='" + area + "' AND t.quato_code ='" + index + "' AND t.level1_type ='2' AND t.quota_date='" + year + "-06-30'";
        } else {
            //机构 团队
            sql ="SELECT t.result As num,t.qkdoctor_name AS name,t.qkdoctor_code AS code,t.create_time AS date " +
            sql = "SELECT t.result As num,t.qkdoctor_name AS name,t.qkdoctor_code AS code,t.create_time AS date " +
                    " FROM wlyy_quota_result t " +
                    " WHERE t.org_code ='"+area+"' AND t.quato_code ='"+index+"' AND t.level1_type ='1' AND t.quota_date='"+year+"-06-30'";
                    " WHERE t.org_code ='" + area + "' AND t.quato_code ='" + index + "' AND t.level1_type ='1' AND t.quota_date='" + year + "-06-30'";
        }
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0){
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        if (list != null && list.size() > 0) {
            return new JSONArray(list);
        }else{
        } else {
            return null;
        }
    }
    public JSONObject getRenewPercent(String level, String area, String year) {
        String renewIndex = "";
        if ("1".equals(level)) {
            //团队的续签量
            renewIndex = "42";
        } else if ("2".equals(level)) {
            //社区的续签量
            renewIndex = "43";
        } else if ("3".equals(level)) {
            //区的续签量
            renewIndex = "44";
        } else {
            //市的续签量
            renewIndex = "29";
        }
        JSONObject jo = new JSONObject();
        //获取时间戳
        String timeKey = redisTemplate.opsForValue().get("quota:timeKey");
        int renewNum = getLevel1NumForRedis(renewIndex, level, area, timeKey);
        //根据年度获取去年的签约数 签约指标是1
        String date = year + "-06-30";
        String index = "1";
        WlyyQuotaResult wlyyQuotaResult = findOneQuotaResult(date, Integer.valueOf(level), index, area);
        int signNum = 0;
        if (wlyyQuotaResult != null) {
            signNum = Integer.valueOf(wlyyQuotaResult.getResult());
        }
        jo.put("yesterYearSign", signNum);//去年的签约量
        jo.put("thisYearRenew", renewNum);//今年的续签量
        jo.put("renewRange", getRange(renewNum, signNum, 2));//续签率  50.00%
        return jo;
    }
}

+ 10 - 8
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/WlyySerivceController.java

@ -44,7 +44,7 @@ public class WlyySerivceController extends BaseController{
    @ApiOperation("检查是否签约")
    public String checkSignFamily(@RequestParam("idcard") String idcard){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/CheckSignFamily?idcard=" + idcard, "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -66,7 +66,7 @@ public class WlyySerivceController extends BaseController{
    @ApiOperation("上传签约数据")
    public String uploadSignFamily(@RequestParam("code")String code){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/UploadSignFamily?code=" + code, "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -89,7 +89,7 @@ public class WlyySerivceController extends BaseController{
    @ApiOperation("初次采集签约接口")
    public String loadAllSignFamily(@RequestParam("start_time")String start_time){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/LoadAllSignFamily?start_time=" + start_time, "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -111,7 +111,7 @@ public class WlyySerivceController extends BaseController{
    @ApiOperation("单条采集签约接口")
    public String loadSingleSignFamily(@RequestParam("idcard")String idcard){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/LoadSignFamily?idcard=" + idcard, "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -135,7 +135,7 @@ public class WlyySerivceController extends BaseController{
    @ApiOperation("时间范围采集签约接口")
    public String loadSignFamilyBatch(@RequestParam("start_time")String start_time,@RequestParam("end_time")String end_time){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/LoadSignFamilyBatch?start_time=" + start_time + "&end_time=" + end_time, "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -155,7 +155,7 @@ public class WlyySerivceController extends BaseController{
    @RequestMapping(value = "/third/sign/ReUploadSignFamily",method = RequestMethod.POST)
    public String reuploadSignFamily(){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/ReUploadSignFamily", "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -176,7 +176,7 @@ public class WlyySerivceController extends BaseController{
    @RequestMapping(value = "/third/sign/ReUpdateSignFamily",method = RequestMethod.POST)
    public String reupdateSignFamily(){
        try{
            String checkUrl = SystemConf.getInstance().getJwUrl();;
            String checkUrl = SystemConf.getInstance().getJwUrl();
            String jsonString = HttpUtil.sendPost(checkUrl + "/third/sign/ReUpdateSignFamily", "");
            if(StringUtils.isEmpty(jsonString)){
                return write(-1,"调用失败");
@ -198,7 +198,9 @@ public class WlyySerivceController extends BaseController{
     */
    @RequestMapping(value = "/third/smjk/RegDeptSpeDoctorSectionList",method = RequestMethod.POST)
    @ApiOperation("转诊预约获取特殊号源接口")
    public String getSpeDoctorSectionList(@RequestParam("OrgCode") String OrgCode,@RequestParam("DeptCode") String DeptCode,@RequestParam("DocCode") String DocCode){
    public String getSpeDoctorSectionList(@RequestParam("OrgCode") String OrgCode,
                                          @RequestParam("DeptCode") String DeptCode,
                                          @RequestParam("DocCode") String DocCode){
        try{
            List<Map<String,Object>> list = guahaoXM.GetDoctorArrangeTenDay(OrgCode,DeptCode,DocCode);
            return write(200, "获取医生排班成功!", "data", list);

+ 4 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -371,7 +371,7 @@ public class StatisticsController extends BaseController {
            if (StringUtils.isEmpty(lowCode)) {
                long sign = statisticsAllService.getIndexTotal(endDate, area, level, "13");
                long weiJf = statisticsAllService.getWeiJiaoFei(endDate, area, level);
               JSONObject jo = statisticsService.getRenewPercentAndChangePercent(level + "", area, Constant.getNowYear());
                JSONObject jo = statisticsService.getRenewPercent(level + "", area, Constant.getNowYear());
                JSONObject signRate = statisticsAllService.getSignRate(endDate, area, level);
                JSONObject signTaskRate = statisticsAllService.getSignTaskRate(endDate, area, level);
@ -1392,6 +1392,7 @@ public class StatisticsController extends BaseController {
     * 获取转签率和续签率
     * 前端:续签进展
     *
     * @param index 42,43,44
     * @param level 等级  4 市  3区  2社区 1团队
     * @param code  市 默认是厦门市 350200  区 就是区的code  社区就是社区的code 团队就是团队的code
     * @param year  年份 非比传
@ -1400,12 +1401,13 @@ public class StatisticsController extends BaseController {
    @RequestMapping(value = "/getRenewPercentAndChangePercent", method = RequestMethod.GET)
    @ResponseBody
    public String getRenewPercentAndChangePercent(
            @RequestParam(required = true) String index,//续签index
            @RequestParam(required = true) String level,
            @RequestParam(required = true) String code,
            @RequestParam(required = false) String year) {
        try {
            return write(200, "查询成功", "data", statisticsService.getRenewPercentAndChangePercent(level, code, year));
            return write(200, "查询成功", "data", statisticsService.getRenewPercentAndChangePercent(index,level, code, year));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");

+ 40 - 40
patient-co-wlyy/src/main/resources/application.properties

@ -1,24 +1,24 @@
####--------------IMPORTANT!!! PRODUCTION ENVIRONMENT------------------#####
#mysql database setting
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://59.61.92.94:3306/wlyy?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
jdbc.username=wlyy
jdbc.password=jkzlehr@123
fv.jdbc.driver=com.mysql.jdbc.Driver
fv.jdbc.url=jdbc:mysql://59.61.92.94:3306/fv?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
fv.jdbc.username=wlyy
fv.jdbc.password=jkzlehr@123
health.jdbc.driver=com.mysql.jdbc.Driver
health.jdbc.url=jdbc:mysql://59.61.92.94:3306/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
health.jdbc.username=wlyy
health.jdbc.password=jkzlehr@123
redis.host=120.41.253.95
redis.port=6380
redis.password=jkzl_ehr
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://59.61.92.94:3306/wlyy?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
#jdbc.username=wlyy
#jdbc.password=jkzlehr@123
#
#fv.jdbc.driver=com.mysql.jdbc.Driver
#fv.jdbc.url=jdbc:mysql://59.61.92.94:3306/fv?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#fv.jdbc.username=wlyy
#fv.jdbc.password=jkzlehr@123
#
#health.jdbc.driver=com.mysql.jdbc.Driver
#health.jdbc.url=jdbc:mysql://59.61.92.94:3306/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#health.jdbc.username=wlyy
#health.jdbc.password=jkzlehr@123
#
#
#redis.host=120.41.253.95
#redis.port=6380
#redis.password=jkzl_ehr
####--------------IMPORTANT!!! DEMO ENVIRONMENT------------------#####
#mysql database setting
@ -75,28 +75,28 @@ redis.password=jkzl_ehr
#redis.port=6379
#redis.password=
#---------------------------------���Ի������ݿ�����---------------------------------------#
#### mysql database setting
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://172.19.103.85/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#jdbc.username=linzhou
#jdbc.password=linzhou
#
###### health index
#health.jdbc.driver=com.mysql.jdbc.Driver
#health.jdbc.url=jdbc:mysql://172.19.103.85/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#health.jdbc.username=linzhou
#health.jdbc.password=linzhou
### mysql database setting
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://172.19.103.85/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
jdbc.username=linzhou
jdbc.password=linzhou
##### health index
health.jdbc.driver=com.mysql.jdbc.Driver
health.jdbc.url=jdbc:mysql://172.19.103.85/device?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
health.jdbc.username=linzhou
health.jdbc.password=linzhou
##### suifang
fv.jdbc.driver=com.mysql.jdbc.Driver
fv.jdbc.url=jdbc:mysql://172.19.103.85/fv?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
fv.jdbc.username=linzhou
fv.jdbc.password=linzhou
#
###### suifang
#fv.jdbc.driver=com.mysql.jdbc.Driver
#fv.jdbc.url=jdbc:mysql://172.19.103.85/fv?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
#fv.jdbc.username=linzhou
#fv.jdbc.password=linzhou
##
###### redis
#redis.host=172.19.103.88
#redis.port=6379
#redis.password=
##### redis
redis.host=172.19.103.88
redis.port=6379
redis.password=
#-----------------------------------ͨ������--------------------------------------------#
##### redis

+ 14 - 14
patient-co-wlyy/src/main/webapp/WEB-INF/spring-mvc.xml

@ -77,19 +77,19 @@
		</property>
	</bean>
	<mvc:interceptors>
		<mvc:interceptor>
	        <mvc:mapping path="/patient/**"/>
	        <bean class="com.yihu.wlyy.interceptors.PatientInterceptor"/>
	    </mvc:interceptor>
	    <mvc:interceptor>
	        <mvc:mapping path="/doctor/**"/>
	        <bean class="com.yihu.wlyy.interceptors.DoctorInterceptor"/>
	    </mvc:interceptor>
	    <mvc:interceptor>
	        <mvc:mapping path="/user/**"/>
	        <bean class="com.yihu.wlyy.interceptors.UserInterceptor"/>
	    </mvc:interceptor>
	</mvc:interceptors>
	<!--<mvc:interceptors>-->
		<!--<mvc:interceptor>-->
	        <!--<mvc:mapping path="/patient/**"/>-->
	        <!--<bean class="com.yihu.wlyy.interceptors.PatientInterceptor"/>-->
	    <!--</mvc:interceptor>-->
	    <!--<mvc:interceptor>-->
	        <!--<mvc:mapping path="/doctor/**"/>-->
	        <!--<bean class="com.yihu.wlyy.interceptors.DoctorInterceptor"/>-->
	    <!--</mvc:interceptor>-->
	    <!--<mvc:interceptor>-->
	        <!--<mvc:mapping path="/user/**"/>-->
	        <!--<bean class="com.yihu.wlyy.interceptors.UserInterceptor"/>-->
	    <!--</mvc:interceptor>-->
	<!--</mvc:interceptors>-->
</beans>