|
|
@@ -56,7 +56,6 @@ public class XCFYDataV_MEDICAL_RECORD_HOMEPAGEJob implements Job {
|
|
|
}
|
|
|
|
|
|
public void transferHomePage(Map<String, String> dischargeMethodMap) {
|
|
|
- String openStr = sysDictService.queryDictTextByKey(Constant.JOB_DELETE_OLD_DATE_SWITCH,"SWITCH");;
|
|
|
String querySql = "select * from V_YBKF_MASTER_ADMISSION_BILL where hisid is not null and to_char(bill_date,'yyyy-MM-dd')=to_char(sysdate-10,'yyyy-MM-dd') ";
|
|
|
Date endBillDate = DateUtil.offsetDay(new Date(), -10);
|
|
|
log.info("开始10天前master_admission_bill数据,获取同步日期:{}", endBillDate);
|
|
|
@@ -64,12 +63,9 @@ public class XCFYDataV_MEDICAL_RECORD_HOMEPAGEJob implements Job {
|
|
|
Integer count = xcfyDataTransferService.transferDataList(querySql, null, paramMap, new TransferDataCallFunction() {
|
|
|
@Override
|
|
|
public Boolean transferData(Map<String, Object> dataMap) throws Exception {
|
|
|
-
|
|
|
- String zyh = dataMap.get("ZYH").toString();
|
|
|
- if (Constant.SWITCH_OPEN.equals(openStr.toString())) {
|
|
|
- medicalRecordHomepageService.lambdaUpdate().eq(MedicalRecordHomepage::getZyh, zyh).remove();
|
|
|
- }
|
|
|
- transferMedicalRecordHomePage(zyh, dischargeMethodMap);
|
|
|
+ String hisid = dataMap.get("HISID").toString();
|
|
|
+ medicalRecordHomepageService.lambdaUpdate().eq(MedicalRecordHomepage::getBridgeId, hisid).remove();
|
|
|
+ transferMedicalRecordHomePage(hisid, dischargeMethodMap);
|
|
|
return true;
|
|
|
}
|
|
|
}, new TransferDataCallFunction() {
|
|
|
@@ -84,13 +80,13 @@ public class XCFYDataV_MEDICAL_RECORD_HOMEPAGEJob implements Job {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public Integer transferMedicalRecordHomePage(String zyh, Map<String, String> dischargeMethodMap) {
|
|
|
- String querySql = "select * from V_YBKF_MEDICAL_RECORD_HOMEPAGE where ZYH=:ZYH";
|
|
|
+ public Integer transferMedicalRecordHomePage(String hisid, Map<String, String> dischargeMethodMap) {
|
|
|
+ String querySql = "select * from V_YBKF_MEDICAL_RECORD_HOMEPAGE where BRIDGE_ID=:HISID";
|
|
|
|
|
|
- log.info("开始同步V_YBKF_MEDICAL_RECORD_HOMEPAGE数据,获取zyh:{}", zyh);
|
|
|
+ log.info("开始同步V_YBKF_MEDICAL_RECORD_HOMEPAGE数据,获取HISID:{}", hisid);
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
|
|
|
- paramMap.put("ZYH", zyh);
|
|
|
+ paramMap.put("HISID", hisid);
|
|
|
Integer count = xcfyDataTransferService.transferDataList(querySql, recordHomePageInsertSql, paramMap, new TransferDataCallFunction() {
|
|
|
@Override
|
|
|
public Boolean transferData(Map<String, Object> dataMap) throws Exception {
|
|
|
@@ -116,7 +112,7 @@ public class XCFYDataV_MEDICAL_RECORD_HOMEPAGEJob implements Job {
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
- log.info("结束同步V_YBKF_MEDICAL_RECORD_HOMEPAGE数据,获取zyh:{} 条数:{}", zyh, count);
|
|
|
+ log.info("结束同步V_YBKF_MEDICAL_RECORD_HOMEPAGE数据,获取zyh:{} 条数:{}", hisid, count);
|
|
|
return count;
|
|
|
}
|
|
|
|