chenweida пре 8 година
родитељ
комит
58d5aa5007

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

@ -87,7 +87,7 @@ public class ConsultJob implements Job {
            quartzJobLog.setJobStartTime(new Date());
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            String sql=" select admin_team_code,id from wlyy_consult_team a where a.type=2 and a.czrq>='"+daybefore+ Constant.quota_date_last+"' and a.czrq< '"+yesterday+ Constant.quota_date_last+"'";
            String sql=" select admin_team_code,id from wlyy_consult_team a where  a.czrq>='"+daybefore+ Constant.quota_date_last+"' and a.czrq< '"+yesterday+ Constant.quota_date_last+"'";
            //抽取數據
            List<ConsultTeam> consultTeams= dbExtract.extract(ConsultTeam.class,sql);
            //過濾數據

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

@ -375,7 +375,7 @@ public class CurrentDayAllQuotaJob implements Job {
        String quotaId="3";
        try{
            //找出今天的咨询信息
            String sql=" select * from wlyy_consult_team a where a.type=2  and a.czrq>= '"+now+"'and a.czrq< '"+tomorrow+"'";
            String sql=" select * from wlyy_consult_team a where  a.czrq>= '"+now+"'and a.czrq< '"+tomorrow+"'";
            //抽取數據
            List<ConsultTeam> consultTeams= SpringUtil.getBean(DBExtract.class).extract(ConsultTeam.class,sql);
            //過濾數據

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

@ -28,7 +28,7 @@ import java.util.*;
@Scope("prototype")
public class HealthMessageJob implements Job {
    public static String jobKey="Health_Message_JOB";
    public static String cron="0 0 17 * * ?";
    public static String cron="0 0 8 * * ?";
    @Autowired
@ -57,15 +57,15 @@ public class HealthMessageJob implements Job {
                now=getYesterday(0,new Date());
            }
            //删除原来的数据
            String deleteSql="delete from wlyy_message where type=3 and czrq >= '"+yesterday+" 17:00:00'and czrq <= '"+now+" 17:00:00'";
            String deleteSql="delete from wlyy_message where type=3 and czrq >= '"+yesterday+" 'and czrq <= '"+now+" '";
            jdbcTemplate.execute(deleteSql);
            //生成新的数据
            String sql="select doctor,doctor_name from wlyy_sign_family " +
                    " where  status >0 and type='2' and expenses_status='1'  " +
                    " and expenses_time >='"+yesterday+" 17:00:00' and expenses_time<'"+now+" 17:00:00' and  (doctor_health is null or doctor_health = '')" ;
                    " and expenses_time >='"+yesterday+" ' and expenses_time<'"+now+" ' and  (doctor_health is null or doctor_health = '')" ;
            String countSql="select count(id) from wlyy_sign_family " +
                    " where  status >0 and type='2' and expenses_status='1'  " +
                    " and expenses_time >='"+yesterday+" 17:00:00' and expenses_time<'"+now+" 17:00:00' and  (doctor_health is null or doctor_health = '')" ;
                    " and expenses_time >='"+yesterday+" ' and expenses_time<'"+now+" ' and  (doctor_health is null or doctor_health = '')" ;
            List<SignFamily> signFamilyList=dbExtract.extractByPage(SignFamily.class,sql,countSql,true);
            Map<String,List<SignFamily>> signFamilyMap=new HashMap<String,List<SignFamily>>();
            for(int i=0;i<signFamilyList.size();i++){
@ -81,7 +81,7 @@ public class HealthMessageJob implements Job {
            for(Map.Entry<String,List<SignFamily>> entry:signFamilyMap.entrySet()){
                 countSql="select count(id) from wlyy_sign_family " +
                        " where  status >0 and type='2' and expenses_status='1'  " +
                        "  and expenses_time<'"+now+" 17:00:00' and  (doctor_health is null or doctor_health = '') and doctor='"+entry.getKey()+"'" ;
                        "  and expenses_time<'"+now+" ' and  (doctor_health is null or doctor_health = '') and doctor='"+entry.getKey()+"'" ;
                Integer allCount=jdbcTemplate.queryForObject(countSql,Integer.class);
                Message message=new Message();
@ -90,7 +90,7 @@ public class HealthMessageJob implements Job {
                message.setOver("0");
                message.setDel("1");
                message.setSender("system");
                message.setCzrq(new SimpleDateFormat("yyyy-MM-dd").parse(now));
                message.setCzrq(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(yesterday+" 12:00:00"));
                message.setState(1);
                message.setTitle("新增系统消息");
                SimpleDateFormat dateFormat=new SimpleDateFormat("MM月dd日");