|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.lantone.common.enums.IsDeleteEnum;
|
|
import com.lantone.common.enums.IsDeleteEnum;
|
|
import com.lantone.common.exception.Asserts;
|
|
import com.lantone.common.exception.Asserts;
|
|
import com.lantone.common.util.BeanUtil;
|
|
import com.lantone.common.util.BeanUtil;
|
|
|
|
+import com.lantone.common.util.DateUtil;
|
|
import com.lantone.common.util.EntityUtil;
|
|
import com.lantone.common.util.EntityUtil;
|
|
import com.lantone.common.util.ListUtil;
|
|
import com.lantone.common.util.ListUtil;
|
|
import com.lantone.common.util.StringUtil;
|
|
import com.lantone.common.util.StringUtil;
|
|
@@ -124,12 +125,36 @@ public class HisDataManagementFacade {
|
|
|
|
|
|
//插入新查出的his数据
|
|
//插入新查出的his数据
|
|
try {
|
|
try {
|
|
- behospitalInfoServiceImpl.saveBatch(BeanUtil.listCopyTo(hisBehospitalInfos, BehospitalInfo.class));
|
|
|
|
- homePageServiceImpl.saveBatch(BeanUtil.listCopyTo(hisHomePages, HomePage.class));
|
|
|
|
- medicalRecordServiceImpl.saveBatch(BeanUtil.listCopyTo(hisMedicalRecords, MedicalRecord.class));
|
|
|
|
- if (ListUtil.isNotEmpty(hisMedicalRecordContents)) {
|
|
|
|
- medicalRecordContentServiceImpl.saveBatch(BeanUtil.listCopyTo(hisMedicalRecordContents, MedicalRecordContent.class));
|
|
|
|
|
|
+ List<BehospitalInfo> saveCodes = BeanUtil.listCopyTo(hisBehospitalInfos, BehospitalInfo.class);
|
|
|
|
+ List<HomePage> saveHomepages = BeanUtil.listCopyTo(hisHomePages, HomePage.class);
|
|
|
|
+ List<MedicalRecord> saveMedicalRecords = BeanUtil.listCopyTo(hisMedicalRecords, MedicalRecord.class);
|
|
|
|
+ if (ListUtil.isNotEmpty(saveCodes)) {
|
|
|
|
+ saveCodes.stream().forEach(behospitalInfo -> {
|
|
|
|
+ behospitalInfo.setGmtModified(DateUtil.now());
|
|
|
|
+ behospitalInfo.setGmtCreate(DateUtil.now());
|
|
|
|
+ });
|
|
|
|
+ behospitalInfoServiceImpl.saveBatch(saveCodes);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (ListUtil.isNotEmpty(saveHomepages)) {
|
|
|
|
+ saveHomepages.stream().forEach(homePage -> {
|
|
|
|
+ homePage.setGmtModified(DateUtil.now());
|
|
|
|
+ homePage.setGmtCreate(DateUtil.now());
|
|
|
|
+ });
|
|
|
|
+ homePageServiceImpl.saveBatch(saveHomepages);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (ListUtil.isNotEmpty(saveMedicalRecords)) {
|
|
|
|
+ saveMedicalRecords.stream().forEach(medicalRecord -> {
|
|
|
|
+ medicalRecord.setGmtModified(DateUtil.now());
|
|
|
|
+ medicalRecord.setGmtCreate(DateUtil.now());
|
|
|
|
+ });
|
|
|
|
+ medicalRecordServiceImpl.saveBatch(saveMedicalRecords);
|
|
|
|
+ if (ListUtil.isNotEmpty(hisMedicalRecordContents)) {
|
|
|
|
+ medicalRecordContentServiceImpl.saveBatch(BeanUtil.listCopyTo(hisMedicalRecordContents, MedicalRecordContent.class));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
Asserts.fail("文书批量插入过程出错");
|
|
Asserts.fail("文书批量插入过程出错");
|
|
}
|
|
}
|
|
@@ -164,7 +189,7 @@ public class HisDataManagementFacade {
|
|
//文书
|
|
//文书
|
|
List<HisMedicalRecord> hisMedicalRecords = hisMedicalRecordFacade.list(new QueryWrapper<HisMedicalRecord>().select("rec_id,rec_title,behospital_code")
|
|
List<HisMedicalRecord> hisMedicalRecords = hisMedicalRecordFacade.list(new QueryWrapper<HisMedicalRecord>().select("rec_id,rec_title,behospital_code")
|
|
.eq(dataCompareVO.getHospitalId() != null, "hospital_id", dataCompareVO.getHospitalId())
|
|
.eq(dataCompareVO.getHospitalId() != null, "hospital_id", dataCompareVO.getHospitalId())
|
|
- .in("behospital_code", codes) );
|
|
|
|
|
|
+ .in("behospital_code", codes));
|
|
Map<String, List<HisMedicalRecord>> medicalRecordMap = EntityUtil.makeEntityListMap(hisMedicalRecords, "behospitalCode");
|
|
Map<String, List<HisMedicalRecord>> medicalRecordMap = EntityUtil.makeEntityListMap(hisMedicalRecords, "behospitalCode");
|
|
|
|
|
|
//拼装
|
|
//拼装
|