1.修改数据同步日志记录

master
x_z 3 years ago
parent bbf1313ee7
commit dafbbe64f8

@ -77,9 +77,16 @@ public class HeartService {
basicExportStatusEntity1.setStatus(1);
basicExportStatusEntity1.setEndTime(new Date());
basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity);
} else {
basicExportStatusEntity1.setRemark(baseResponse1.getMessage());
}
//拼接日志
String logs = "";
if (CollUtil.isNotEmpty(spsSyncOrderResponse.getOrderEntities()))
logs = logs + "单据:" + spsSyncOrderResponse.getOrderEntities().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncOrderResponse.getOrderDetailEntityList()))
logs = logs + "单据详情:" + spsSyncOrderResponse.getOrderDetailEntityList().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncOrderResponse.getWarehouseEntityList()))
logs = logs + "条码信息:" + spsSyncOrderResponse.getWarehouseEntityList().size() + "条\n";
basicExportStatusEntity1.setRemark(logs);
basicExportStatusEntity1.setUpdateTime(new Date());
basicExportService.updateExportStatus(basicExportStatusEntity1);
return ResultVOUtils.success();
@ -115,10 +122,16 @@ public class HeartService {
basicExportStatusEntity2.setStatus(1);
basicExportStatusEntity2.setEndTime(new Date());
basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity);
} else {
basicExportStatusEntity2.setRemark(baseResponse2.getMessage());
}
//拼接日志
String logs = "";
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessTypeEntities()))
logs = logs + "扫码单据类型:" + spsSyncBusResponse.getBussinessTypeEntities().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessLocalTypeEntities()))
logs = logs + "业务单据类型:" + spsSyncBusResponse.getBussinessLocalTypeEntities().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessOriginTypeEntities()))
logs = logs + "第三方单据类型:" + spsSyncBusResponse.getBussinessOriginTypeEntities().size() + "条\n";
basicExportStatusEntity2.setRemark(logs);
basicExportStatusEntity2.setUpdateTime(new Date());
basicExportService.updateExportStatus(basicExportStatusEntity2);
return ResultVOUtils.success();
@ -164,9 +177,29 @@ public class HeartService {
basicExportStatusEntity3.setStatus(1);
basicExportStatusEntity3.setEndTime(new Date());
basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity);
} else {
basicExportStatusEntity3.setRemark(baseResponse.getMessage());
}
String logs = "";
if (CollUtil.isNotEmpty(syncDataResponse.getUdiRelevanceEntities()))
logs = logs + "耗材字典:" + syncDataResponse.getUdiRelevanceEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getUdiInfoEntities()))
logs = logs + "耗材字典:" + syncDataResponse.getUdiInfoEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getBasicUnitMaintainEntities()))
logs = logs + "往来单位:" + syncDataResponse.getBasicUnitMaintainEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getCompanyProductRelevanceEntities()))
logs = logs + "供应商关联产品信息:" + syncDataResponse.getCompanyProductRelevanceEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getInvWarehouseEntities()))
logs = logs + "仓库字典:" + syncDataResponse.getInvWarehouseEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getThrInvWarehouseEntities()))
logs = logs + "第三方仓库字典:" + syncDataResponse.getThrInvWarehouseEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getThrOrderEntities()))
logs = logs + "第三方业务单据:" + syncDataResponse.getThrOrderEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getThrOrderDetailEntities()))
logs = logs + "第三方业务单据详情:" + syncDataResponse.getThrOrderDetailEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getThrOrderEntities()))
logs = logs + "第三方产品信息:" + syncDataResponse.getThrProductsEntities().size() + "条\n";
if (CollUtil.isNotEmpty(syncDataResponse.getThrCorpEntities()))
logs = logs + "第三方往来单位:" + syncDataResponse.getThrCorpEntities().size() + "条\n";
basicExportStatusEntity3.setRemark(logs);
basicExportStatusEntity3.setUpdateTime(new Date());
basicExportService.updateExportStatus(basicExportStatusEntity3);
return ResultVOUtils.success();
@ -189,11 +222,14 @@ public class HeartService {
} else {
for (BasicExportStatusEntity basicExportStatusEntity : basicExportStatusEntities) {
basicExportStatusEntity.setRemark(baseResponse.getMessage());
String logs = "";
if (CollUtil.isNotEmpty(spsSyncScheduleResponse.getBasicExportStatusEntities())) {
logs = logs + "被下载基础信息任务:" + spsSyncScheduleResponse.getBasicExportStatusEntities().size() + "条\n";
}
basicExportStatusEntity.setRemark(logs);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportService.updateExportStatus(basicExportStatusEntity);
}
}

Loading…
Cancel
Save