|
@ -1,26 +1,19 @@
|
|
|
package com.yihu.wlyy.job;
|
|
|
|
|
|
import com.yihu.wlyy.entity.*;
|
|
|
import com.yihu.wlyy.entity.address.Hospital;
|
|
|
import com.yihu.wlyy.entity.address.Town;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroupInfo;
|
|
|
import com.yihu.wlyy.entity.job.QuartzJobLog;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.PatientDisease;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.entity.statistics.WlyyQuotaResult;
|
|
|
import com.yihu.wlyy.repository.*;
|
|
|
import com.yihu.wlyy.repository.address.TownDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorPatientGroupInfoDao;
|
|
|
import com.yihu.wlyy.repository.job.QuartzJobLogDao;
|
|
|
import com.yihu.wlyy.repository.organization.HospitalDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.repository.statistics.WlyyQuotaResultDao;
|
|
|
import com.yihu.wlyy.service.app.disease.PatientDiseaseService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.util.IdCardUtil;
|
|
|
import com.yihu.wlyy.web.quota.WlyyJobConfigVO;
|
|
|
import com.yihu.wlyy.web.quota.WlyyQuotaVO;
|
|
@ -157,8 +150,10 @@ public class SignJob implements Job {
|
|
|
compute_level2_1(townSexMap,town, sex);
|
|
|
//统计机构
|
|
|
//统计站
|
|
|
if (!"00".equals(hospitalCode.substring(8))) {
|
|
|
String orgCodeTemp = hospitalCode.substring(0, 8) + "00";
|
|
|
String orgCode=hospital.getCode();
|
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
|
//统计站
|
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
compute_level2_1(orgSexMap,orgCodeTemp, sex);
|
|
|
} else {
|
|
|
//统计社区
|
|
@ -216,7 +211,7 @@ public class SignJob implements Job {
|
|
|
}
|
|
|
}
|
|
|
QuartzJobLog.setJobEndTime(new Date());
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约性别数据完成 ");
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约性别数据完成 ,得到签约数目:"+signFamilys.size());
|
|
|
QuartzJobLog.setJobType("1");
|
|
|
quartzJobLogDao.save(QuartzJobLog);
|
|
|
} catch (Exception e) {
|
|
@ -360,8 +355,10 @@ public class SignJob implements Job {
|
|
|
townGroupMap.put(town, groupMapTemp);
|
|
|
}
|
|
|
//统计站
|
|
|
if (!"00".equals(hospital.getCode().substring(8))) {
|
|
|
String orgCodeTemp = hospital.getCode().substring(0, 8) + "00";
|
|
|
String orgCode=hospital.getCode();
|
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
|
//统计站
|
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
//统计机构
|
|
|
if (orgGroupMap.containsKey(orgCodeTemp)) {
|
|
|
Map<String, Long> groupMapTemp = orgGroupMap.get(orgCodeTemp);
|
|
@ -852,7 +849,7 @@ public class SignJob implements Job {
|
|
|
}
|
|
|
|
|
|
QuartzJobLog.setJobEndTime(new Date());
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约病人分组数据完成 ");
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约病人分组数据完成 ,得到签约数目:"+signFamilys.size());
|
|
|
QuartzJobLog.setJobType("1");
|
|
|
quartzJobLogDao.save(QuartzJobLog);
|
|
|
} catch (Exception e) {
|
|
@ -920,8 +917,10 @@ public class SignJob implements Job {
|
|
|
}
|
|
|
//统计机构
|
|
|
//统计站
|
|
|
if (!"00".equals(hospital.getCode().substring(8))) {
|
|
|
String orgCodeTemp = hospital.getCode().substring(0, 8) + "00";
|
|
|
String orgCode=hospital.getCode();
|
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
|
//统计站
|
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
//统计机构
|
|
|
if (orgAgeMap.containsKey(orgCodeTemp)) {
|
|
|
Map<String, Long> groupMapTemp = orgAgeMap.get(hospital.getCode());
|
|
@ -1325,7 +1324,7 @@ public class SignJob implements Job {
|
|
|
}
|
|
|
|
|
|
QuartzJobLog.setJobEndTime(new Date());
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约患者年龄数据完成 ");
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约患者年龄数据完成 ,得到签约数目:"+signFamilys.size());
|
|
|
QuartzJobLog.setJobType("1");
|
|
|
quartzJobLogDao.save(QuartzJobLog);
|
|
|
} catch (Exception e) {
|
|
@ -1384,8 +1383,9 @@ public class SignJob implements Job {
|
|
|
String orgCode = doctor.getHospital();
|
|
|
//统计机构
|
|
|
//统计站
|
|
|
if (!"00".equals(orgCode.substring(8))) {
|
|
|
String orgCodeTemp = orgCode.substring(0, 8) + "00";
|
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
|
//统计站
|
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
compute_level1(tjOrgMap, orgCodeTemp);
|
|
|
} else {
|
|
|
//统计社区
|
|
@ -1469,7 +1469,7 @@ public class SignJob implements Job {
|
|
|
}
|
|
|
|
|
|
QuartzJobLog.setJobEndTime(new Date());
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约数据完成 ");
|
|
|
QuartzJobLog.setJobContent("统计" + getYesterday() + " 的签约数据完成 ,得到签约数目:"+signFamilys.size());
|
|
|
QuartzJobLog.setJobType("1");
|
|
|
quartzJobLogDao.save(QuartzJobLog);
|
|
|
}
|