|
|
|
@ -281,11 +281,10 @@ public class HeartService {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public SpsSyncBasicDataResponse getBasicData(SyncDataSetEntity info, String taskId, Date now, Date syncTime) {
|
|
|
|
|
StringBuffer remark = new StringBuffer();
|
|
|
|
|
StringBuilder remark = new StringBuilder();
|
|
|
|
|
SpsSyncBasicDataResponse dataResponse = null;
|
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
|
syncTimeMap.put("oldDate", syncTime);
|
|
|
|
|
//确认有开启物资字典同步
|
|
|
|
|
if (needExec(info.getBasicProducts())) {
|
|
|
|
|
Map<String, Object> map;
|
|
|
|
@ -293,6 +292,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_PRODUCTS);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<BasicHospTypeEntity> hospTypeList = basicHospTypeDao.selectList(Wrappers.lambdaQuery(BasicHospTypeEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), BasicHospTypeEntity::getUpdateTime, now)
|
|
|
|
@ -348,6 +348,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_CORP);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<BasicCorpEntity> corpList = corpDao.selectList(Wrappers.lambdaQuery(BasicCorpEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), BasicCorpEntity::getUpdateTime, now)
|
|
|
|
@ -370,6 +371,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SUP_CERT);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<SupCertEntity> supCertList = supCertDao.selectList(Wrappers.lambdaQuery(SupCertEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), SupCertEntity::getUpdateTime, now)
|
|
|
|
@ -456,7 +458,6 @@ public class HeartService {
|
|
|
|
|
SpsSyncOtherDataResponse dataResponse = null;
|
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
|
syncTimeMap.put("oldDate", syncTime);
|
|
|
|
|
//确认有开启udi码补齐同步
|
|
|
|
|
if (needExec(info.getUdiCodeLost())) {
|
|
|
|
|
Map<String, Object> map;
|
|
|
|
@ -464,6 +465,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.IO_CODE_LOST);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<IoCodeLostEntity> ioCodeLostList = ioCodeLostMapper.selectList(Wrappers.lambdaQuery(IoCodeLostEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), IoCodeLostEntity::getUpdateTime, now)
|
|
|
|
@ -483,6 +485,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.IO_CODE_REL);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<IoCodeRelEntity> ioCodeRelList = ioCodeRelMapper.selectList(Wrappers.lambdaQuery(IoCodeRelEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), IoCodeRelEntity::getUpdateTime, now)
|
|
|
|
@ -554,6 +557,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_BUSSINESS_TYPE);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<BasicBussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.list(Wrappers.lambdaQuery(BasicBussinessTypeEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), BasicBussinessTypeEntity::getUpdateTime, now)
|
|
|
|
@ -573,6 +577,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BASIC_BUSTYPE_CHANGE);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<BasicBusTypeChangeEntity> busTypeChangeList = busTypeChangeService.list(Wrappers.lambdaQuery(BasicBusTypeChangeEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), BasicBusTypeChangeEntity::getUpdateTime, now)
|
|
|
|
@ -595,6 +600,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_BUSTYPE_ORIGIN);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<ThrBusTypeOriginEntity> thrBusTypeOriginEntities = thrBusTypeOriginService.list(Wrappers.lambdaQuery(ThrBusTypeOriginEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), ThrBusTypeOriginEntity::getUpdateTime, now)
|
|
|
|
@ -640,7 +646,6 @@ public class HeartService {
|
|
|
|
|
SpsSyncDataResponse dataResponse = null;
|
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
|
syncTimeMap.put("oldDate", syncTime);
|
|
|
|
|
StringBuffer remark = new StringBuffer();
|
|
|
|
|
//确认有开启部门信息同步
|
|
|
|
|
if (needExec(info.getBasicDept())) {
|
|
|
|
@ -649,6 +654,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.DEPT_DATA);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<DeptEntity> deptEntityList = deptService.list(Wrappers.lambdaQuery(DeptEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), DeptEntity::getUpdateTime, now)
|
|
|
|
@ -681,6 +687,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.WAREHOUSE_DICT);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<InvWarehouseEntity> warehouseEntityList = warehouseService.list(Wrappers.lambdaQuery(InvWarehouseEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), InvWarehouseEntity::getUpdateTime, now)
|
|
|
|
@ -739,6 +746,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.USER_DATA);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<AuthAdmin> adminList = adminService.list(Wrappers.lambdaQuery(AuthAdmin.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), AuthAdmin::getLastModifyTime, now)
|
|
|
|
@ -791,7 +799,6 @@ public class HeartService {
|
|
|
|
|
SpsSyncThrDataResponse dataResponse = null;
|
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
|
syncTimeMap.put("oldDate", syncTime);
|
|
|
|
|
StringBuffer remark = new StringBuffer();
|
|
|
|
|
//确认有开启第三方部门信息同步
|
|
|
|
|
if (needExec(info.getBasicThirdInv())) {
|
|
|
|
@ -800,6 +807,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_DEPT);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<ThrDeptEntity> deptEntityList = thrDeptService.list(Wrappers.lambdaQuery(ThrDeptEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), ThrDeptEntity::getUpdateTime, now)
|
|
|
|
@ -820,6 +828,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_WAREHOUSE);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<ThrInvWarehouseEntity> warehouseEntityList = thrInvWarehouseService.list(Wrappers.lambdaQuery(ThrInvWarehouseEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), ThrInvWarehouseEntity::getUpdateTime, now)
|
|
|
|
@ -842,6 +851,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_PRODUCTS);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<ThrProductsEntity> productsEntityList = thrProductsService.list(Wrappers.lambdaQuery(ThrProductsEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), ThrProductsEntity::getUpdateTime, now)
|
|
|
|
@ -864,6 +874,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.THR_CORP);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<ThrCorpEntity> corpEntities = thrCorpService.list(Wrappers.lambdaQuery(ThrCorpEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), ThrCorpEntity::getUpdateTime, now)
|
|
|
|
@ -911,7 +922,6 @@ public class HeartService {
|
|
|
|
|
SpsSyncSysSettingResponse dataResponse = null;
|
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
|
syncTimeMap.put("oldDate", syncTime);
|
|
|
|
|
StringBuffer remark = new StringBuffer();
|
|
|
|
|
if (needExec(info.getSystemConfig())) {
|
|
|
|
|
Map<String, Object> map;
|
|
|
|
@ -919,6 +929,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SYSTEM_PARAM_CONFIG);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<SystemParamConfigEntity> systemParamConfigEntities = systemParamConfigService.list(Wrappers.lambdaQuery(SystemParamConfigEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), SystemParamConfigEntity::getUpdateTime, now)
|
|
|
|
@ -937,6 +948,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.ENTRUST_ACCEPT);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<EntrustReceEntity> entrustReceEntities = entrustReceService.list(Wrappers.lambdaQuery(EntrustReceEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), EntrustReceEntity::getUpdateTime, now)
|
|
|
|
@ -957,6 +969,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.PRINT_CONFIG);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<SystemPDFModuleEntity> systemPDFModuleEntities = systemPDFModuleService.list(Wrappers.lambdaQuery(SystemPDFModuleEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), SystemPDFModuleEntity::getUpdate_time, now)
|
|
|
|
@ -1043,6 +1056,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SCAN_CHANGE);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<BasicBusTypePreEntity> basicBusTypePreEntities = iBasicBusTypePreService.list(Wrappers.lambdaQuery(BasicBusTypePreEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), BasicBusTypePreEntity::getUpdateTime, now)
|
|
|
|
@ -1061,6 +1075,7 @@ public class HeartService {
|
|
|
|
|
map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.BUS_TYPE_CHANGE);
|
|
|
|
|
} else {
|
|
|
|
|
map = syncTimeMap;
|
|
|
|
|
now = syncTime;
|
|
|
|
|
}
|
|
|
|
|
List<BasicBusTypeChangeEntity> basicBusTypeChangeEntities = iBasicBusTypeChangeService.list(Wrappers.lambdaQuery(BasicBusTypeChangeEntity.class)
|
|
|
|
|
.le((boolean) map.get("isNew"), BasicBusTypeChangeEntity::getUpdateTime, now)
|
|
|
|
|