|
@@ -5,15 +5,14 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.jeecg.common.system.vo.DictModel;
|
|
|
-import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.modules.medical.Constant;
|
|
|
-import org.jeecg.modules.medical.SystemEventAttrConstant;
|
|
|
import org.jeecg.modules.medical.afterwaring.XCFYDataTransferService;
|
|
|
import org.jeecg.modules.medical.common.CommonUtil;
|
|
|
import org.jeecg.modules.medical.entity.MasterAdmissionBill;
|
|
|
import org.jeecg.modules.medical.ruleengine.TransferDataCallFunction;
|
|
|
import org.jeecg.modules.medical.service.IMasterAdmissionBillService;
|
|
|
import org.jeecg.modules.system.service.ISysDictService;
|
|
|
+import org.jeecg.modules.utils.DateTimeUtil;
|
|
|
import org.quartz.Job;
|
|
|
import org.quartz.JobExecutionContext;
|
|
|
import org.quartz.JobExecutionException;
|
|
@@ -38,22 +37,56 @@ public class XCFYDatav_master_admission_billJob implements Job {
|
|
|
@Autowired
|
|
|
ISysDictService sysDictService;
|
|
|
|
|
|
- String insertSql = "INSERT INTO `master_admission_bill` (`id`, `bridge_id`, `hisid`, `zyh`, `recipe_no`, `pay_method`, `benefit_type`, `hospital_id`, `hospital_name`, `p_level_yy`, `refund_flag`, `p_level`, `bmi_area_id`, `bmi_area_name`, `bill_date`, `refund_date`, `admission_dept_id`, `admission_dept_name`, `adm_bed`, `transfer_dept_id`, `transfer_dept_name`, `discharge_dept_id`, `discharge_dept_name`, `dscg_bed`, `doctor_id`, `doctor_name`, `patient_id`, `patient_name`, `patient_gender`, `patient_birthday`, `patient_age`, `patient_age_days`, `claim_type`, `visit_time`, `if_local_flag`, `admission_date`, `discharge_date`, `zyts`, `discharge_status`, `pre_admission_date`, `days_re_admission_31`, `yb_admission_disease_id`, `yb_admission_disease_name`, `yb_discharge_disease_id_main`, `yb_discharge_disease_name_main`, `admission_disease_id`, `admission_disease_name`, `discharge_disease_id_main`, `discharge_disease_name_main`, `yb_pay_type`, `drgs_code`, `drgs_name`, `medfee_sumamt`, `fulamt_ownpay_amt`, `overlmt_selfpay`, `preselfpay_amt`, `inscp_scp_amt`, `act_pay_dedc`, `hifp_pay`, `pool_prop_selfpay`, `cvlserv_pay`, `hifes_pay`, `hifmi_pay`, `hifob_pay`, `maf_pay`, `oth_pay`, `fund_pay_sumamt`, `state`, `create_time`, `create_by`) " +
|
|
|
- "VALUES (:ID,:BRIDGE_ID,:HISID,:ZYH,:RECIPE_NO,:PAY_METHOD,:BENEFIT_TYPE,:HOSPITAL_ID,:HOSPITAL_NAME,:P_LEVEL_YY,:REFUND_FLAG,:P_LEVEL,:BMI_AREA_ID,:BMI_AREA_NAME,:BILL_DATE,:REFUND_DATE,:ADMISSION_DEPT_ID,:ADMISSION_DEPT_NAME,:ADM_BED,:TRANSFER_DEPT_ID,:TRANSFER_DEPT_NAME,:DISCHARGE_DEPT_ID,:DISCHARGE_DEPT_NAME,:DSCG_BED,:DOCTOR_ID,:DOCTOR_NAME,:PATIENT_ID,:PATIENT_NAME,:PATIENT_GENDER,:PATIENT_BIRTHDAY,:PATIENT_AGE,:PATIENT_AGE_DAYS,:CLAIM_TYPE,:VISIT_TIME,:IF_LOCAL_FLAG,:ADMISSION_DATE,:DISCHARGE_DATE,:ZYTS,:DISCHARGE_STATUS,:PRE_ADMISSION_DATE,:DAYS_RE_ADMISSION_31,:YB_ADMISSION_DISEASE_ID,:YB_ADMISSION_DISEASE_NAME,:YB_DISCHARGE_DISEASE_ID_MAIN,:YB_DISCHARGE_DISEASE_NAME_MAIN,:ADMISSION_DISEASE_ID,:ADMISSION_DISEASE_NAME,:DISCHARGE_DISEASE_ID_MAIN,:DISCHARGE_DISEASE_NAME_MAIN,:YB_PAY_TYPE,:DRGS_CODE,:DRGS_NAME,:MEDFEE_SUMAMT,:FULAMT_OWNPAY_AMT,:OVERLMT_SELFPAY,:PRESELFPAY_AMT,:INSCP_SCP_AMT,:ACT_PAY_DEDC,:HIFP_PAY,:POOL_PROP_SELFPAY,:CVLSERV_PAY,:HIFES_PAY,:HIFMI_PAY,:HIFOB_PAY,:MAF_PAY,:OTH_PAY,:FUND_PAY_SUMAMT,:STATE,:CREATE_TIME,:CREATE_BY)";
|
|
|
+ String insertSql = "INSERT INTO `master_admission_bill` (`id`, `bridge_id`, `hisid`, `zyh`, `recipe_no`, `pay_method`, `benefit_type`," +
|
|
|
+ " `hospital_id`, `hospital_name`, `p_level_yy`, `refund_flag`, `p_level`, `bmi_area_id`, `bmi_area_name`, `bill_date`, " +
|
|
|
+ "`refund_date`, `admission_dept_id`, `admission_dept_name`, `adm_bed`, `transfer_dept_id`, `transfer_dept_name`, " +
|
|
|
+ "`discharge_dept_id`, `discharge_dept_name`, `dscg_bed`, `doctor_id`, `doctor_name`, `patient_id`, `patient_name`, " +
|
|
|
+ "`patient_gender`, `patient_birthday`, `patient_age`, `patient_age_days`, `claim_type`, `visit_time`, `if_local_flag`, " +
|
|
|
+ "`admission_date`, `discharge_date`, `zyts`, `discharge_status`, `pre_admission_date`, `days_re_admission_31`, " +
|
|
|
+ "`yb_admission_disease_id`, `yb_admission_disease_name`, `yb_discharge_disease_id_main`, `yb_discharge_disease_name_main`, " +
|
|
|
+ "`admission_disease_id`, `admission_disease_name`, `discharge_disease_id_main`, `discharge_disease_name_main`, " +
|
|
|
+ "`yb_pay_type`, `drgs_code`, `drgs_name`, `medfee_sumamt`, `fulamt_ownpay_amt`, `overlmt_selfpay`, `preselfpay_amt`, " +
|
|
|
+ "`inscp_scp_amt`, `act_pay_dedc`, `hifp_pay`, `pool_prop_selfpay`, `cvlserv_pay`, `hifes_pay`, `hifmi_pay`, `hifob_pay`, " +
|
|
|
+ "`maf_pay`, `oth_pay`, `fund_pay_sumamt`, `state`, `create_time`, `create_by`, settle_type, invalid_operator, invalid_date, back_receipt_no) " +
|
|
|
+ "VALUES (:ID,:BRIDGE_ID,:HISID,:ZYH,:RECIPE_NO,:PAY_METHOD,:BENEFIT_TYPE,:HOSPITAL_ID,:HOSPITAL_NAME,:P_LEVEL_YY," +
|
|
|
+ ":REFUND_FLAG,:P_LEVEL,:BMI_AREA_ID,:BMI_AREA_NAME,:BILL_DATE,:REFUND_DATE,:ADMISSION_DEPT_ID,:ADMISSION_DEPT_NAME," +
|
|
|
+ ":ADM_BED,:TRANSFER_DEPT_ID,:TRANSFER_DEPT_NAME,:DISCHARGE_DEPT_ID,:DISCHARGE_DEPT_NAME,:DSCG_BED,:DOCTOR_ID," +
|
|
|
+ ":DOCTOR_NAME,:PATIENT_ID,:PATIENT_NAME,:PATIENT_GENDER,:PATIENT_BIRTHDAY,:PATIENT_AGE,:PATIENT_AGE_DAYS," +
|
|
|
+ ":CLAIM_TYPE,:VISIT_TIME,:IF_LOCAL_FLAG,:ADMISSION_DATE,:DISCHARGE_DATE,:ZYTS,:DISCHARGE_STATUS," +
|
|
|
+ ":PRE_ADMISSION_DATE,:DAYS_RE_ADMISSION_31,:YB_ADMISSION_DISEASE_ID,:YB_ADMISSION_DISEASE_NAME,:YB_DISCHARGE_DISEASE_ID_MAIN," +
|
|
|
+ ":YB_DISCHARGE_DISEASE_NAME_MAIN,:ADMISSION_DISEASE_ID,:ADMISSION_DISEASE_NAME,:DISCHARGE_DISEASE_ID_MAIN," +
|
|
|
+ ":DISCHARGE_DISEASE_NAME_MAIN,:YB_PAY_TYPE,:DRGS_CODE,:DRGS_NAME,:MEDFEE_SUMAMT,:FULAMT_OWNPAY_AMT,:OVERLMT_SELFPAY," +
|
|
|
+ ":PRESELFPAY_AMT,:INSCP_SCP_AMT,:ACT_PAY_DEDC,:HIFP_PAY,:POOL_PROP_SELFPAY,:CVLSERV_PAY,:HIFES_PAY,:HIFMI_PAY," +
|
|
|
+ ":HIFOB_PAY,:MAF_PAY,:OTH_PAY,:FUND_PAY_SUMAMT,:STATE,:CREATE_TIME,:CREATE_BY,:SETTLE_TYPE, :INVALID_OPERATOR, :INVALID_DATE, :BACK_RECEIPT_NO)";
|
|
|
+
|
|
|
+ String hosSeDetailInsertSql = "INSERT INTO hospitalizatio_settle_detail (id, hisid, patient_id, zyh, hospital_id, p_category, " +
|
|
|
+ "categories_items, usage_date, discharge_dept_id, discharge_dept_name, item_id, item_name, item_id_hosp, " +
|
|
|
+ "item_name_hosp, drug_spec, dosage_form, package_unit, unit_price, num, cost, use_day, bmi_convered_amount, " +
|
|
|
+ "bmi_pay_amount, individual_payment_amount, amount_refusal, amount_reason, discharge_medication, refund_falge, " +
|
|
|
+ "refund_date, p_type, p_type_pct, create_time, create_by) VALUES (:ID,:HISID,:PATIENT_ID,:ZYH,:HOSPITAL_ID," +
|
|
|
+ ":P_CATEGORY,:CATEGORIES_ITEMS,:USAGE_DATE,:DISCHARGE_DEPT_ID,:DISCHARGE_DEPT_NAME,:ITEM_ID,:ITEM_NAME," +
|
|
|
+ ":ITEM_ID_HOSP,:ITEM_NAME_HOSP,:DRUG_SPEC,:DOSAGE_FORM,:PACKAGE_UNIT,:UNIT_PRICE,:NUM,:COST,:USE_DAY," +
|
|
|
+ ":BMI_CONVERED_AMOUNT,:BMI_PAY_AMOUNT,:INDIVIDUAL_PAYMENT_AMOUNT,:AMOUNT_REFUSAL,:AMOUNT_REASON,:DISCHARGE_MEDICATION," +
|
|
|
+ ":REFUND_FALGE,:REFUND_DATE,:P_TYPE,:P_TYPE_PCT,:CREATE_TIME,:CREATE_BY)";
|
|
|
+
|
|
|
+ String recordHomePageInsertSql = "INSERT INTO medical_record_homepage (id, bridge_id, zyh, hospital_id, patient_name, patient_id, social_card_id, patient_address, patient_company, icd10_code_basy, icd10_name_basy, icd10_name_describe, special_remarks, disease_id1, disease_name1, icd9_code_basy, icd9_name_basy, icd9_code1, icd9_name1, nb_weight, nb_admission_weight, bm_hours, icu_flag, icu_hours, main_con_desc, treatment_process, pathological_findings, discharge_condition, discharge_order, death_date, death_diagnosis, death_cause, admission_plan, disease_his, past_his, personal_his, auxiliary_inspection, assist_lab_test_results, auxiliary_imaging_ex_results, discharge_status, create_time, create_by) " +
|
|
|
+ "VALUES (:ID,:BRIDGE_ID,:ZYH,:HOSPITAL_ID,:PATIENT_NAME,:PATIENT_ID,:SOCIAL_CARD_ID,:PATIENT_ADDRESS,:PATIENT_COMPANY,:ICD10_CODE_BASY,:ICD10_NAME_BASY,:ICD10_NAME_DESCRIBE,:SPECIAL_REMARKS,:DISEASE_ID1,:DISEASE_NAME1,:ICD9_CODE_BASY,:ICD9_NAME_BASY,:ICD9_CODE1,:ICD9_NAME1,:NB_WEIGHT,:NB_ADMISSION_WEIGHT,:BM_HOURS,:ICU_FLAG,:ICU_HOURS,:MAIN_CON_DESC,:TREATMENT_PROCESS,:PATHOLOGICAL_FINDINGS,:DISCHARGE_CONDITION,:DISCHARGE_ORDER,:DEATH_DATE,:DEATH_DIAGNOSIS,:DEATH_CAUSE,:ADMISSION_PLAN,:DISEASE_HIS,:PAST_HIS,:PERSONAL_HIS,:AUXILIARY_INSPECTION,:ASSIST_LAB_TEST_RESULTS,:AUXILIARY_IMAGING_EX_RESULTS,:DISCHARGE_STATUS,:CREATE_TIME,:CREATE_BY)";
|
|
|
|
|
|
@Override
|
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
- String sql = "select * from V_MASTER_ADMISSION_BILL where rownum<1000 %s ";
|
|
|
+ String sql = "select * from V_MASTER_ADMISSION_BILL where hisid is not null and bill_date<=:END_BILL_DATE %s and rownum<=1000 ";
|
|
|
+ Date endBillDate = DateUtil.yesterday();
|
|
|
+ endBillDate = DateUtil.endOfDay(endBillDate);
|
|
|
while (true) {
|
|
|
- log.info("开始同步master_admission_bill数据");
|
|
|
String whereSql = "";
|
|
|
- Long id = getLastId();
|
|
|
- log.info("开始同步master_admission_bill数据,获取上个同步记录主键ID:{}", id);
|
|
|
+ Date billDate = getBillDate();
|
|
|
+ log.info("开始同步master_admission_bill数据,获取上个同步开始结算日期:{} 结束日期:{}", billDate, endBillDate);
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
- if (null != id && id > 0) {
|
|
|
- whereSql = "and ID>:ID";
|
|
|
- paramMap.put("ID", id);
|
|
|
+ if (null != billDate) {
|
|
|
+ whereSql = " and BILL_DATE>:BILL_DATE";
|
|
|
+ paramMap.put("BILL_DATE", billDate);
|
|
|
}
|
|
|
+ paramMap.put("END_BILL_DATE", endBillDate);
|
|
|
String querySql = String.format(sql, whereSql);
|
|
|
Integer count = xcfyDataTransferService.transferDataList(querySql, insertSql, paramMap, new TransferDataCallFunction() {
|
|
|
@Override
|
|
@@ -64,65 +97,149 @@ public class XCFYDatav_master_admission_billJob implements Job {
|
|
|
if (null != ybDiagCode) {
|
|
|
dataMap.put("YB_ADMISSION_DISEASE_ID", ybDiagCode[0]);
|
|
|
dataMap.put("YB_ADMISSION_DISEASE_NAME", ybDiagCode[1]);
|
|
|
+ } else {
|
|
|
+ log.error("医院诊断编码:{} 有hisid 缺少医保编码映射关系", diagCode);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
String disDiagCode = dataMap.getOrDefault("DISCHARGE_DISEASE_ID_MAIN", "").toString();
|
|
|
- if(StringUtils.isNotBlank(disDiagCode)){
|
|
|
+ if (StringUtils.isNotBlank(disDiagCode)) {
|
|
|
String[] ybDiagCode = CommonUtil.getMedicalCodeAndName(disDiagCode);
|
|
|
if (null != ybDiagCode) {
|
|
|
dataMap.put("YB_DISCHARGE_DISEASE_ID_MAIN", ybDiagCode[0]);
|
|
|
dataMap.put("YB_DISCHARGE_DISEASE_NAME_MAIN", ybDiagCode[1]);
|
|
|
+ } else {
|
|
|
+ log.error("医院诊断编码:{} 有hisid 缺少医保编码映射关系", diagCode);
|
|
|
}
|
|
|
}
|
|
|
- Object patientAge = dataMap.get("PATIENT_AGE");
|
|
|
+ Object patientAge = dataMap.getOrDefault("PATIENT_AGE", "0天");
|
|
|
+ Integer days = DateTimeUtil.getDayByAgeStr(patientAge.toString());
|
|
|
Object visitTime = dataMap.get("VISIT_TIME");
|
|
|
Object patientBirthday = dataMap.get("PATIENT_BIRTHDAY");
|
|
|
Long ageDays = 0l;
|
|
|
- if(null != patientBirthday){
|
|
|
+ if (null != patientBirthday && days <= 0) {
|
|
|
Date patientBirthDayDate = (Date) patientBirthday;
|
|
|
|
|
|
- if(null != visitTime){
|
|
|
+ if (null != visitTime) {
|
|
|
Date visitTimeDate = (Date) visitTime;
|
|
|
ageDays = DateUtil.betweenDay(patientBirthDayDate, visitTimeDate, false);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
ageDays = DateUtil.betweenDay(patientBirthDayDate, new Date(), false);
|
|
|
}
|
|
|
dataMap.put("PATIENT_AGE_DAYS", ageDays.doubleValue());
|
|
|
- }else{
|
|
|
- if(null != patientAge){
|
|
|
- try {
|
|
|
- Double patientAgeDouble = Double.parseDouble(patientAge.toString());
|
|
|
- Double patientAgeDays = patientAgeDouble * 365;
|
|
|
- dataMap.put("PATIENT_AGE_DAYS", patientAgeDays);
|
|
|
- }catch (Exception e){
|
|
|
- log.error(e.getMessage(), e);
|
|
|
- }
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ dataMap.put("PATIENT_AGE_DAYS", days.doubleValue());
|
|
|
}
|
|
|
-
|
|
|
dataMap.put("CREATE_BY", "auto");
|
|
|
dataMap.put("CREATE_TIME", new Date());
|
|
|
+ Object patientGender = dataMap.get("PATIENT_GENDER");
|
|
|
+ dataMap.put("PATIENT_GENDER", CommonUtil.getMedicalSex(patientGender));
|
|
|
+ String hisId = dataMap.get("HISID").toString();
|
|
|
+ Integer count = transferHospSettleDetail(hisId);
|
|
|
+ if (null == count || count <= 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ xcfyDataTransferService.transferCheckList(hisId);
|
|
|
+ String zyh = dataMap.get("ZYH").toString();
|
|
|
+ xcfyDataTransferService.transferPrescriptionOrder(zyh);
|
|
|
+ transferMedicalRecordHomePage(zyh);
|
|
|
+ xcfyDataTransferService.transferOperation(zyh);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
if (count <= 0) {
|
|
|
- log.error("V_MASTER_ADMISSION_BILL 未查询到大于住院ID:{} 的数据, 停止同步", id);
|
|
|
+ log.error("V_MASTER_ADMISSION_BILL 未查询到大于住院billdate:{} 小于等于住院billdate:{} 的数据,停止同步", billDate, endBillDate);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据主单hisid同步明细数据
|
|
|
+ *
|
|
|
+ * @param hisId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer transferHospSettleDetail(String hisId) {
|
|
|
+ try {
|
|
|
+ List<DictModel> cateGoriesList = sysDictService.getDictItems(Constant.DICT_CATEGORIES_ITEMS_KEY);
|
|
|
+ Map<String, String> cateGoriesMap = new HashMap<>();
|
|
|
+ for (DictModel dictModel : cateGoriesList) {
|
|
|
+ cateGoriesMap.put(dictModel.getText(), dictModel.getValue());
|
|
|
+ }
|
|
|
+ String whereSql = "";
|
|
|
+ log.info("开始同步v_hospitalizatio_settle_detail数据,HISID:{}", hisId);
|
|
|
+ String sql = "select * from V_HOSPITALIZATIO_SETTLE_DETAIL where hisid=:HISID";
|
|
|
+ Map<String, Object> paramMap = new HashMap<>();
|
|
|
+
|
|
|
+ paramMap.put("HISID", hisId);
|
|
|
+
|
|
|
+ String querySql = String.format(sql, whereSql);
|
|
|
+ Integer count = xcfyDataTransferService.transferDataList(querySql, hosSeDetailInsertSql, paramMap, new TransferDataCallFunction() {
|
|
|
+ @Override
|
|
|
+ public void transferData(Map<String, Object> dataMap) throws Exception {
|
|
|
+ dataMap.put("CREATE_BY", "auto");
|
|
|
+ dataMap.put("CREATE_TIME", new Date());
|
|
|
+ String itemIDHosp = dataMap.getOrDefault("ITEM_ID_HOSP", "").toString();
|
|
|
+ String itemId = dataMap.getOrDefault("ITEM_ID", "").toString();
|
|
|
+ if (StringUtils.isNotBlank(itemIDHosp) && StringUtils.isBlank(itemId)) {
|
|
|
+ String[] itemIdArr = CommonUtil.getMedicalCodeAndName(itemIDHosp);
|
|
|
+ if (null != itemIdArr) {
|
|
|
+ dataMap.put("ITEM_ID", itemIdArr[0]);
|
|
|
+ dataMap.put("ITEM_NAME", itemIdArr[1]);
|
|
|
+ } else {
|
|
|
+ log.error("住院结算明细医院项目编码:{} 医保在基础信息目录未匹配到", itemIDHosp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Object useDay = dataMap.get("USE_DAY");
|
|
|
+ if (null == useDay) {
|
|
|
+ dataMap.put("USE_DAY", 1);
|
|
|
+ }
|
|
|
+ String pCategory = dataMap.getOrDefault("P_CATEGORY", "").toString();
|
|
|
+ if (StringUtils.isNotBlank(pCategory)) {
|
|
|
+ dataMap.put("P_CATEGORY", cateGoriesMap.getOrDefault(pCategory, pCategory));
|
|
|
+ }
|
|
|
+
|
|
|
+ String categoriesItems = dataMap.getOrDefault("CATEGORIES_ITEMS", "").toString();
|
|
|
+ if (StringUtils.isNotBlank(pCategory)) {
|
|
|
+ dataMap.put("CATEGORIES_ITEMS", cateGoriesMap.getOrDefault(categoriesItems, categoriesItems));
|
|
|
+ }
|
|
|
+ //甲类
|
|
|
+ dataMap.put("P_TYPE", "01");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ log.info("结束同步v_hospitalizatio_settle_detail数据,HISID:{} 条数:{}", hisId, count);
|
|
|
+ return count;
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
+ public Integer transferMedicalRecordHomePage(String zyh) {
|
|
|
+ String querySql = "select * from V_MEDICAL_RECORD_HOMEPAGE where ZYH=:ZYH";
|
|
|
+
|
|
|
+ log.info("开始同步V_MEDICAL_RECORD_HOMEPAGE数据,获取zyh:{}", zyh);
|
|
|
+ Map<String, Object> paramMap = new HashMap<>();
|
|
|
+
|
|
|
+ paramMap.put("ZYH", zyh);
|
|
|
+ Integer count = xcfyDataTransferService.transferDataList(querySql, recordHomePageInsertSql, paramMap, new TransferDataCallFunction() {
|
|
|
+ @Override
|
|
|
+ public void transferData(Map<String, Object> dataMap) throws Exception {
|
|
|
+ dataMap.put("CREATE_BY", "auto");
|
|
|
+ dataMap.put("CREATE_TIME", new Date());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ log.info("结束同步V_MEDICAL_RECORD_HOMEPAGE数据,获取zyh:{} 条数:{}", zyh, count);
|
|
|
+ return count;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- public Long getLastId() {
|
|
|
- List<MasterAdmissionBill> masterAdmissionBillList = masterAdmissionBillService.lambdaQuery().orderByDesc(MasterAdmissionBill::getId).last("limit 1").list();
|
|
|
+ public Date getBillDate() {
|
|
|
+ List<MasterAdmissionBill> masterAdmissionBillList = masterAdmissionBillService.lambdaQuery().orderByDesc(MasterAdmissionBill::getBillDate).last("limit 1").list();
|
|
|
if (CollectionUtil.isEmpty(masterAdmissionBillList)) {
|
|
|
return null;
|
|
|
}
|
|
|
- return masterAdmissionBillList.get(0).getId();
|
|
|
+ return masterAdmissionBillList.get(0).getBillDate();
|
|
|
}
|
|
|
|
|
|
}
|