|
|
|
@ -96,9 +96,14 @@ public class MzsyPatientInfoSyncServiceImpl implements PatientInfoSyncService {
|
|
|
|
Map<String, TBasic> existsJzhBasicMap = existsBasicList.stream().collect(Collectors.toMap(TBasic::getJzh, Function.identity()));
|
|
|
|
Map<String, TBasic> existsJzhBasicMap = existsBasicList.stream().collect(Collectors.toMap(TBasic::getJzh, Function.identity()));
|
|
|
|
List<TBasic> insertBasicList = new ArrayList<>();
|
|
|
|
List<TBasic> insertBasicList = new ArrayList<>();
|
|
|
|
List<TBasic> updateBasicList = new ArrayList<>();
|
|
|
|
List<TBasic> updateBasicList = new ArrayList<>();
|
|
|
|
|
|
|
|
List<String> deleteList = new ArrayList<>();
|
|
|
|
List<TBasic> leaveMethodList = new ArrayList<>();
|
|
|
|
List<TBasic> leaveMethodList = new ArrayList<>();
|
|
|
|
for (TBasic iuBasic : iuBasicList) {
|
|
|
|
for (TBasic iuBasic : iuBasicList) {
|
|
|
|
if (existsJzhBasicMap.containsKey(iuBasic.getJzh())) {
|
|
|
|
if (existsJzhBasicMap.containsKey(iuBasic.getJzh())) {
|
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(iuBasic.getDisDate())) {
|
|
|
|
|
|
|
|
deleteList.add(iuBasic.getJzh());
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
TBasic tBasic = existsJzhBasicMap.get(iuBasic.getJzh());
|
|
|
|
TBasic tBasic = existsJzhBasicMap.get(iuBasic.getJzh());
|
|
|
|
tBasic.setName(iuBasic.getName());
|
|
|
|
tBasic.setName(iuBasic.getName());
|
|
|
|
tBasic.setInpatientNo(iuBasic.getInpatientNo());
|
|
|
|
tBasic.setInpatientNo(iuBasic.getInpatientNo());
|
|
|
|
@ -142,7 +147,10 @@ public class MzsyPatientInfoSyncServiceImpl implements PatientInfoSyncService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
insertBasicList.add(iuBasic);
|
|
|
|
insertBasicList.add(iuBasic);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Func.isNotEmpty(deleteList)) {
|
|
|
|
|
|
|
|
tBasicMapper.deleteBatch(deleteList);
|
|
|
|
|
|
|
|
syncZkInfo(insertBasicList);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (Func.isNotEmpty(insertBasicList)) {
|
|
|
|
if (Func.isNotEmpty(insertBasicList)) {
|
|
|
|
tBasicMapper.insertBatch(insertBasicList);
|
|
|
|
tBasicMapper.insertBatch(insertBasicList);
|
|
|
|
syncZkInfo(insertBasicList);
|
|
|
|
syncZkInfo(insertBasicList);
|
|
|
|
|