Commit 3428e9c9 by 王璐琦

feat(report): 同步更新华为配送数量统计数据

- 新增获取配送数量字段deliveryCount的逻辑
- 构建StaffDailyReportHuawei对象并设置配送数量和相关信息
- 调用远程服务更新配送数量数据
- 在MerchantDailyReportHuawei报表中设置配送数量
- 保存更新后的华为商户日常报表数据
- 添加日志记录同步成功的信息
1 parent b13a8bf5
...@@ -369,6 +369,19 @@ public class DailyReportRecordService { ...@@ -369,6 +369,19 @@ public class DailyReportRecordService {
.findFirst().orElse(null); .findFirst().orElse(null);
if (otherBrand != null) { if (otherBrand != null) {
try { try {
Integer deliveryCount = getIntField(fieldDataList, DailyReportFieldEnum.F2_37.getValue());
StaffDailyReportHuawei deliveryUpdate = new StaffDailyReportHuawei();
deliveryUpdate.setMerchantId(merchantId);
deliveryUpdate.setYqMerchantId(yqMerchantId);
deliveryUpdate.setReportDate(dailyReportRecordDTO.getReportDate());
deliveryUpdate.setFirstBrandId(-1);
deliveryUpdate.setBrandId(-1);
deliveryUpdate.setSceneType(sceneType);
deliveryUpdate.setDeliveryCount(deliveryCount);
deliveryUpdate.setUpdatedBy(dailyReportRecordDTO.getUpdatedBy());
deliveryUpdate.setUpdatedDate(new Date());
staffDailyReportRemote.updateStaffDailyReportHuaweiDeliveryCount(deliveryUpdate);
MerchantDailyReportHuawei report = new MerchantDailyReportHuawei(); MerchantDailyReportHuawei report = new MerchantDailyReportHuawei();
report.setMerchantId(merchantId); report.setMerchantId(merchantId);
report.setMerchantName(dailyReportRecordDTO.getMerchantName()); report.setMerchantName(dailyReportRecordDTO.getMerchantName());
...@@ -389,7 +402,7 @@ public class DailyReportRecordService { ...@@ -389,7 +402,7 @@ public class DailyReportRecordService {
report.setWaitInviteCount(getIntField(fieldDataList, DailyReportFieldEnum.F2_24.getValue())); report.setWaitInviteCount(getIntField(fieldDataList, DailyReportFieldEnum.F2_24.getValue()));
report.setCustomerLossCount(getIntField(fieldDataList, DailyReportFieldEnum.F2_25.getValue())); report.setCustomerLossCount(getIntField(fieldDataList, DailyReportFieldEnum.F2_25.getValue()));
report.setIssueCouponCount(getIntField(fieldDataList, DailyReportFieldEnum.F2_23.getValue())); report.setIssueCouponCount(getIntField(fieldDataList, DailyReportFieldEnum.F2_23.getValue()));
report.setDeliveryCount(deliveryCount);
merchantDailyReportHuaweiRemote.saveMerchantDailyReportHuawei(report); merchantDailyReportHuaweiRemote.saveMerchantDailyReportHuawei(report);
log.info("syncMerchantDailyReportHuawei success, merchantId={}, sceneType=1,brand={}", merchantId, otherBrand.getBrandName()); log.info("syncMerchantDailyReportHuawei success, merchantId={}, sceneType=1,brand={}", merchantId, otherBrand.getBrandName());
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!