Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 years ago
parent
commit
37924392b3

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

@ -335,9 +335,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql=" select fr.sign_code code,fr.hospital ,fr.admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.hospital ,fr.admin_team_id ,fr.patient " +
                    "   from wlyy_sign_family_renew_log fr " +
                    "   join wlyy_patient p ON p.idcard = fr.idcard" +
                    "   where " +
                    "   fr.apply_date<'"+ date + Constant.quota_date_last+"' " +
                    "   and fr.sign_year ='"+Constant.getNowYearByDate(date)+"' " +
@ -367,9 +366,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    "  from wlyy_sign_family_renew_log fr " +
                    "  join wlyy_patient p ON p.idcard = fr.idcard" +
                    "  where " +
                    "  fr.apply_date<'"+ date + Constant.quota_date_last+"' " +
                    "  and fr.sign_year ='"+Constant.getNowYearByDate(date)+"'   " +
@ -399,9 +397,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql="select fr.sign_code code,fr.hospital,fr.admin_team_id ,p.`code` patient " +
            String sql="select fr.sign_code code,fr.hospital,fr.admin_team_id ,fr.patient " +
                    "  from wlyy_sign_family_renew_log fr " +
                    "  join wlyy_patient p ON p.idcard = fr.idcard" +
                    "  where " +
                    "  fr.apply_date<'"+date+ Constant.quota_date_last+"' " +
                    "  and fr.sign_year ='"+Constant.getNowYearByDate(date)+"'  " +
@ -431,9 +428,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql=" select fr.sign_code code,fr.hospital ,fr.admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.hospital ,fr.admin_team_id ,fr.patient " +
                    "   from wlyy_sign_family_renew_log fr " +
                    "   join wlyy_patient p ON p.idcard = fr.idcard" +
                    "   where " +
                    "   fr.apply_date<'"+ date + Constant.quota_date_last+"' " +
                    "   and fr.sign_year ='"+Constant.getNowYearByDate(date)+"' " +
@ -464,9 +460,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    "  from wlyy_sign_family_renew_log fr " +
                    "  join wlyy_patient p ON p.idcard = fr.idcard" +
                    "  where " +
                    "  fr.apply_date<'"+ date + Constant.quota_date_last+"'" +
                    "   and fr.sign_year ='"+Constant.getNowYearByDate(date)+"'" +
@ -497,9 +492,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql="select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql="select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    "  from wlyy_sign_family_renew_log fr " +
                    "  join wlyy_patient p ON p.idcard = fr.idcard" +
                    "  where " +
                    "  fr.apply_date<'"+date+ Constant.quota_date_last+"' " +
                    "  and fr.sign_year ='"+Constant.getNowYearByDate(date)+"'" +
@ -530,9 +524,8 @@ public class CachePool {
        if (model == null) {
            model = new RenewCacheModel();
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient  " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient  " +
                    "  from wlyy_sign_family_renew_log fr " +
                    "  join wlyy_patient p ON p.idcard = fr.idcard" +
                    "  where " +
                    "  fr.apply_date<'"+ date + Constant.quota_date_last+"' " +
                    "  and fr.sign_year ='"+Constant.getNowYearByDate(date)+"'" +

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

@ -147,9 +147,8 @@ public class CurrentDayAllQuotaJob implements Job {
     */
    public Map<String,Object> getCityRenewTotals(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard" +
                    " where  " +
                    " fr.apply_date<'"+ tomorrow+"' and " +
                    " fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and " +
@ -174,9 +173,8 @@ public class CurrentDayAllQuotaJob implements Job {
     */
    public Map<String,Object> getTowmRenewTotals(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard" +
                    " where  " +
                    " fr.apply_date<'"+ tomorrow+"' and " +
                    " fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and " +
@ -201,9 +199,8 @@ public class CurrentDayAllQuotaJob implements Job {
     */
    public Map<String,Object> getOrgRenewTotals(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard" +
                    " where " +
                    " fr.apply_date<'"+ tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "'and  fr.hospital=fr.old_hospital  and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
            //抽取數據
@ -224,9 +221,8 @@ public class CurrentDayAllQuotaJob implements Job {
     */
    public Map<String,Object> getTeamRenewTotals(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard" +
                    " where   " +
                    " fr.apply_date<'"+ tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id=fr.old_admin_team_id  and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
            //抽取數據
@ -243,9 +239,8 @@ public class CurrentDayAllQuotaJob implements Job {
    public Map<String,Object> getTeamRenewOut(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard " +
                    " where    " +
                    " fr.apply_date<'"+ tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id  and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
            //抽取數據
@ -262,9 +257,8 @@ public class CurrentDayAllQuotaJob implements Job {
    public Map<String,Object> getOrgRenewOut(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient" +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard" +
                    " where   " +
                    " fr.apply_date<'"+ tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
            //抽取數據
@ -281,9 +275,8 @@ public class CurrentDayAllQuotaJob implements Job {
    public Map<String,Object> getTownRenewOut(){
        try{
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,p.`code` patient " +
            String sql=" select fr.sign_code code,fr.old_hospital hospital,fr.old_admin_team_id admin_team_id ,fr.patient " +
                    " from wlyy_sign_family_renew_log fr " +
                    " join wlyy_patient p ON p.idcard = fr.idcard " +
                    " where " +
                    " fr.apply_date<'"+ tomorrow+"' and  fr.sign_year= '" + Constant.getNowYearByDate(tomorrow) + "' and fr.admin_team_id!=fr.old_admin_team_id and fr.hospital!=fr.old_hospital and LEFT(fr.hospital,6)!=LEFT(fr.old_hospital,6)  and LENGTH(fr.hospital)=10 and LENGTH(fr.old_hospital)=10 ";
            //抽取數據