From efaca449a1d35ea78f3ee8d387630e61cc187de9 Mon Sep 17 00:00:00 2001 From: ic_excellent <2570192571@qq.com> Date: Thu, 6 Jul 2023 11:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=AE=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiao/xhny_report/mapper/SourceTrackingMapper.java | 10 +++++----- .../xiao/xhny_report/mapper/VendorReportMapper.java | 8 ++++++++ .../xhny_report/schedule/GenerateReportSchedule.java | 5 +++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/weaver/bokang/xiao/xhny_report/mapper/SourceTrackingMapper.java b/src/main/java/weaver/bokang/xiao/xhny_report/mapper/SourceTrackingMapper.java index ab6c435..bfddab0 100644 --- a/src/main/java/weaver/bokang/xiao/xhny_report/mapper/SourceTrackingMapper.java +++ b/src/main/java/weaver/bokang/xiao/xhny_report/mapper/SourceTrackingMapper.java @@ -68,11 +68,11 @@ public interface SourceTrackingMapper { List queryQuotaList(@ParamMapper("sourceTackingCode")String sourceTackingCode); /** - *

更新询价表是否已评分字段

- * @param sourceTrackingCode 寻原单号 - * @return 更新结果 + *

删除报表数据

+ * @param ids 主键id数组 + * @return 操作结果 */ - @Update("update uf_src_rfq set sfypf = 0 where xydh = #{sourceTrackingCode}") - boolean updateSourceTrackingStatus(String sourceTrackingCode); + @Delete("delete from uf_vendorMarkReport where id in ($t{ids})") + boolean deleteReport(@ParamMapper("ids")String ids); } diff --git a/src/main/java/weaver/bokang/xiao/xhny_report/mapper/VendorReportMapper.java b/src/main/java/weaver/bokang/xiao/xhny_report/mapper/VendorReportMapper.java index fc8cf46..d4f7aaf 100644 --- a/src/main/java/weaver/bokang/xiao/xhny_report/mapper/VendorReportMapper.java +++ b/src/main/java/weaver/bokang/xiao/xhny_report/mapper/VendorReportMapper.java @@ -39,6 +39,14 @@ public interface VendorReportMapper { "values(#{item.project},#{item.desc},#{item.weight},#{item.score},#{item.detailDesc},#{mainId})") boolean insertReportDt(@BatchSqlArgs List vendorMarkReportDtList,@ParamMapper("mainId") int mainId); + /** + *

更新询价表是否已评分字段

+ * @param sourceTrackingCode 寻原单号 + * @return 更新结果 + */ + @Update("update uf_src_rfq set sfypf = 0 where xydh = #{sourceTrackingCode}") + boolean updateSourceTrackingStatus(String sourceTrackingCode); + /** *

删除报表数据

* @param ids 主键id数组 diff --git a/src/main/java/weaver/bokang/xiao/xhny_report/schedule/GenerateReportSchedule.java b/src/main/java/weaver/bokang/xiao/xhny_report/schedule/GenerateReportSchedule.java index 2d38d42..77513b5 100644 --- a/src/main/java/weaver/bokang/xiao/xhny_report/schedule/GenerateReportSchedule.java +++ b/src/main/java/weaver/bokang/xiao/xhny_report/schedule/GenerateReportSchedule.java @@ -92,14 +92,15 @@ public class GenerateReportSchedule extends CusBaseCronJob { vendorReportMapper.updateReport(vendorMarkReport); vendorReportMapper.insertReportDt(vendorMarkReport.getVendorMarkReportDtList(),dataId); } - sourceTrackingMapper.updateSourceTrackingStatus(sourceTrackingData.getSourceTrackingCode()); + vendorReportMapper.updateSourceTrackingStatus(sourceTrackingData.getSourceTrackingCode()); Util.rebuildModeDataShareByAsyncList(1,Util.getIntValue(reportModelId),reportIdList); Util.commitTransMapper(VendorReportMapper.class); }catch (Exception e){ + log.info("GenerateReportSchedule execute error!!! "+Util.getErrString(e)); Util.rollbackTransMapper(VendorReportMapper.class); if(!reportIdList.isEmpty()) { String ids = reportIdList.stream().map(Util::null2String).collect(Collectors.joining(",")); - vendorReportMapper.deleteReport(ids); + sourceTrackingMapper.deleteReport(ids); } } }