|
@ -5,6 +5,8 @@ import com.yihu.wlyy.statistics.etl.dataFilter.RenewSignDataFilter;
|
|
|
import com.yihu.wlyy.statistics.etl.extract.DBExtract;
|
|
|
import com.yihu.wlyy.statistics.etl.model.ETLModel;
|
|
|
import com.yihu.wlyy.statistics.etl.model.FilterModel;
|
|
|
import com.yihu.wlyy.statistics.etl.model.RenewCacheModel;
|
|
|
import com.yihu.wlyy.statistics.etl.mycache.CachePool;
|
|
|
import com.yihu.wlyy.statistics.etl.role.Level1Role;
|
|
|
import com.yihu.wlyy.statistics.etl.storage.DBStorage;
|
|
|
import com.yihu.wlyy.statistics.model.job.QuartzJobLog;
|
|
@ -46,6 +48,8 @@ public class RenewSignTownOutJob implements Job {
|
|
|
private DBExtract dbExtract;
|
|
|
@Autowired
|
|
|
private RenewSignDataFilter signDataFilter;
|
|
|
@Autowired
|
|
|
private CachePool cachePool;
|
|
|
|
|
|
String yesterday;
|
|
|
String daybefore;
|
|
@ -82,16 +86,18 @@ public class RenewSignTownOutJob implements Job {
|
|
|
quartzJobLog.setJobStartTime(new Date());
|
|
|
quartzJobLog.setJobId(wlyyJobConfig.getId());
|
|
|
quartzJobLog.setJobName(wlyyJobConfig.getJobName());
|
|
|
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<'"+ yesterday + Constant.quota_date_last+"' " +
|
|
|
" and fr.sign_year ='"+Constant.getNowYearByDate(yesterday)+"'" +
|
|
|
" 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<'"+ yesterday + Constant.quota_date_last+"' " +
|
|
|
// " and fr.sign_year ='"+Constant.getNowYearByDate(yesterday)+"'" +
|
|
|
// " and LEFT(fr.hospital,6)!=LEFT(fr.old_hospital,6) " +
|
|
|
// " and LENGTH(fr.hospital)=10 " +
|
|
|
// " and LENGTH(fr.old_hospital)=10 ";
|
|
|
// //抽取數據
|
|
|
// List<SignFamilyRenew> signFamilies= dbExtract.extract(SignFamilyRenew.class,sql);
|
|
|
//抽取數據
|
|
|
List<SignFamilyRenew> signFamilies= dbExtract.extract(SignFamilyRenew.class,sql);
|
|
|
RenewCacheModel cacheModel= cachePool.getArriveRenewSignTownOutMapByDate(yesterday);
|
|
|
//清洗數據
|
|
|
FilterModel etlModels= signDataFilter.filter(signFamilies,null,null,sql,yesterday);
|
|
|
FilterModel etlModels= signDataFilter.filter(cacheModel.getSignFamilies(),null,null,cacheModel.getSql(),yesterday);
|
|
|
//统计数据
|
|
|
List<Map<String, List<ETLModel>>> returnDatas= levelRole.elt(etlModels.getEtlModelList());
|
|
|
//保存数据
|