chenweida 8 rokov pred
rodič
commit
a8314d0e91

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

@ -154,13 +154,13 @@ public class CurrentDayAllQuotaJob implements Job {
                "  a.type =2 and " +
                " status in (1,2) and  " +
                " a.expenses_time< '" + tomorrow + "' and " +
                " a.expenses_time >'"+Constant.getStartTimeByDate(tomorrow)+Constant.quota_date_last+"' " +
                " a.sign_year ='"+Constant.getNowYearByDateYeaterday(tomorrow)+"' and " +
                " 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.sign_year ='"+Constant.getNowYearByDateYeaterday(tomorrow)+"' and " +
                " a.expenses_status=1 ";
        //抽取數據
@ -748,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);
            //清洗數據