对接swaggerjson转对象
public List getLocalDepartment() {
List result = new ArrayList();
StringBuffer sql = new StringBuffer()
.append(" SELECT * FROM prpscompany WHERE validstatus = 1 AND LENGTH(comcode) = 12; ");
result = this.jdbcTemplate.String(), new RowMapper<HisDepartmentModel>() {
@Override
public HisDepartmentModel mapRow(ResultSet rs, int rowNum) throws SQLException {
HisDepartmentModel departmentModel = new HisDepartmentModel();
departmentModel.tDEPT_String("hiscode"));
departmentModel.tDEPT_String("comcname"));
return departmentModel;
}
});
return result;
}
/** 读取患者 */
private List<HisPatient> mHisPatients = new ArrayList<HisPatient>();
@Scheduled(cron = "0 0/1 * * * ?")
private void doPatientBaoShan() {
if (hisPatientBaoShans == null || hisPatientBaoShans.size() == 0) {
return;
wife的意思}
for (HisPatientBaoShan hisPatientBaoShan : hisPatientBaoShans) {
try {
HisPatient patient = new HisPatient();
if (PatientID()!=null) {
patient.PatientID());
}
if (PatientName()!=null) {
patient.PatientName());
}
if (PatientCardno()!=null) {
patient.PatientCardno());
System.out.println("CardNumber= "+PatientCardno());
}
if (PatientMobile()!=null) {
patient.PatientMobile());
}
if (GenderCode()!=null) {
if (GenderCode().equals("1")) {
patient.tGender("0");
}el if (GenderCode().equals("2")) {
patient.tGender("1");
}el {
patient.tGender("9");
}
}
if (BirthDate()!=null) {
if (BirthDate()!=null) {
patient.BirthDate(), Constants.format1));
}
if (DeptCode()!=null) {
patient.DeptCode());
time for miracles
}
if (WardCode()!=null) {
patient.WardCode());
patient.WardCode());
}
if (SickbedNo()!=null) {
patient.SickbedNo());
System.out.println("BedNumber= "+SickbedNo());
}
上海塞万提斯学院if (EmployeeId()!=null) {谨言
patient.EmployeeId());
}
if (EmployeeName()!=null) {
patient.EmployeeName());
System.out.println("DoctorName= "+EmployeeName());
}
patient.tHospitalState("0");
6742mHisPatients.add(patient);
mPatientServiceImpl.doPatient(patient);
} catch (Exception e) {
e.printStackTrace();
}
}
} catch (Exception e) {
e.printStackTrace();
}humantouch
checkPatient(mHisPatients);
System.out.vert((new Date()), Constants.format2) + " 患者结束");
}
/**
* 检查患者是否出院
*
*/
private void checkPatient(List<HisPatient> pPatients) {
英语签名
System.out.vert((new Date()), Constants.format2) + " 患者出院开始");
if (pPatients == null || pPatients.size() == 0) {
return;
}
java.util.List<HisPatient> result = new ArrayList<HisPatient>();
StringBuffer sql = new StringBuffer().append(
"SELECT us.name,up.bed_number,us.phone,us.address, up.in_hospital_id,up.card_number,up.hospital_date FROM ur_patient AS up JOIN ur AS u s WHERE us.ur_id = up.ur_id AND up.in_hospital_status = 0 ");
result = this.jdbcTemplate.String(), new RowMapper<HisPatient>() {
@Override
a princepublic HisPatient mapRow(ResultSet rs, int rowNum) throws SQLException {
HisPatient patient = new HisPatient();
patient.String("name"));
patient.String("in_hospital_id"));
patient.String("card_number"));
patient.String("phone"));
patient.String("bed_number"));novel
patient.String("address"));
patient.String("address"));
if (rs.getString("hospital_date") != null) {
patient.String("hospital_date"), Constants.format2)); }
return patient;
}
});
slinefor (HisPatient hisPatient : result) {
boolean isExist = fal;
for (HisPatient ppatient : pPatients) {
if (PatientId().PatientId())) {
isExist = true;
}
}
if (!isExist) {
System.out.println("患者出院,姓名:" + Name());
hisPatient.tHospitalState("1");
hisPatient.tDischargeDate(new Date());
mPatientServiceImpl.doPatient(hisPatient);
}
}
System.out.vert((new Date()), Constants.format2) + " 患者出院结束");
}