From f06d46469ecf51748c868d16cfb7a35fd2eeddd4 Mon Sep 17 00:00:00 2001 From: dfdg <2710245601@qq.com> Date: Fri, 22 Aug 2025 19:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E9=87=87=E7=AE=A1=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusListOfWinningBidsController.java | 8 +- .../bidding/domain/BusListOfWinningBids.java | 134 +++++++------- .../domain/bo/BusListOfWinningBidsBo.java | 136 +++++++------- .../domain/vo/BusListOfWinningBidsVo.java | 169 ++++++++++-------- .../mapper/BusListOfWinningBidsMapper.java | 2 +- .../service/IBusListOfWinningBidsService.java | 15 +- .../BusBiddingLimitVersionsServiceImpl.java | 63 +++++++ .../impl/BusListOfWinningBidsServiceImpl.java | 51 +++--- .../controller/BusBiddingPlanController.java | 33 +++- .../dromara/tender/domain/BusBiddingPlan.java | 11 +- .../tender/domain/TenderSupplierInput.java | 8 + .../tender/domain/bo/BusBiddingPlanBo.java | 17 +- .../domain/bo/TenderSupplierInputBo.java | 7 + .../domain/vo/BusBiddingPlanDetailVo.java | 144 +++++++++++++++ .../tender/domain/vo/BusBiddingPlanVo.java | 12 +- .../domain/vo/TenderSupplierInputVo.java | 9 + .../service/IBusBiddingPlanService.java | 15 +- .../BusBLimitListVersionsServiceImpl.java | 63 +++++++ .../impl/BusBiddingPlanServiceImpl.java | 135 +++++++++++--- ...sBillofquantitiesLimitListServiceImpl.java | 9 + ...SegmentedIndicatorPlanningServiceImpl.java | 6 + .../impl/TenderSupplierInputServiceImpl.java | 2 + 22 files changed, 775 insertions(+), 274 deletions(-) create mode 100644 xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanDetailVo.java diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/controller/BusListOfWinningBidsController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/controller/BusListOfWinningBidsController.java index 3b0ed6e9..615acea9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/controller/BusListOfWinningBidsController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/controller/BusListOfWinningBidsController.java @@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor; import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.constraints.*; import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.tender.domain.bo.BusBiddingPlanBo; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; import org.dromara.common.idempotent.annotation.RepeatSubmit; @@ -21,12 +22,13 @@ import org.dromara.bidding.domain.vo.BusListOfWinningBidsVo; import org.dromara.bidding.domain.bo.BusListOfWinningBidsBo; import org.dromara.bidding.service.IBusListOfWinningBidsService; import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 中标项目一览 * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ @Validated @RequiredArgsConstructor @@ -75,8 +77,8 @@ public class BusListOfWinningBidsController extends BaseController { @Log(title = "中标项目一览", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() - public R add(@RequestBody BusListOfWinningBidsBo bo) { - return toAjax(busListOfWinningBidsService.insertByBo(bo)); + public R add(@RequestPart("bo") BusListOfWinningBidsBo bo ,@RequestParam(name = "file", required = false) MultipartFile file) { + return toAjax(busListOfWinningBidsService.insertByBo(bo,file)); } /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/BusListOfWinningBids.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/BusListOfWinningBids.java index 0353557f..ed7b21f1 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/BusListOfWinningBids.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/BusListOfWinningBids.java @@ -6,7 +6,6 @@ import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.time.LocalDate; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; @@ -16,7 +15,7 @@ import java.io.Serial; * 中标项目一览对象 bus_list_of_winning_bids * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ @Data @EqualsAndHashCode(callSuper = true) @@ -37,90 +36,105 @@ public class BusListOfWinningBids extends BaseEntity { */ private Long projectId; - /** - * 项目状态 - */ - private String projectStatus; - /** * 项目名称 */ private String projectName; /** - * 中标价(原币) + * 项目简称 */ - private BigDecimal winningBidOriginal; + private String shortName; /** - * 汇率 + * 负责人 */ - private BigDecimal exchangeRate; + private String principal; /** - * 币种 + * 负责人电话 */ - private String currency; + private String principalPhone; /** - * 所属主体 + * 项目类型 */ - private String subject; + private String projectType; + + /** + * 项目阶段 + */ + private String projectStage; + + /** + * 开工时间 + */ + private String onStreamTime; + + /** + * 经度 + */ + private String lng; + + /** + * 纬度 + */ + private String lat; + + /** + * 项目地址 + */ + private String projectSite; + + /** + * 计划容量 + */ + private String plan; + + /** + * 实际容量 + */ + private String actual; + + /** + * 设计总量 + */ + private Long designTotal; + + /** + * 备注 + */ + private String remark; + + /** + * 排序字段 + */ + private Long sort; + + /** + * 删除时间 + */ + private Date deletedAt; + + /** + * 是否中标(0中标 1未中标) + */ + private String whetherBid; /** * 中标价 */ - private BigDecimal winningBid; + private BigDecimal bidPrice; /** - * 中标日期 + * 中标通知书 */ - private LocalDate bidWinningDate; + private String bidFile; /** - * 投标保证金 + * 中标通知书名称 */ - private BigDecimal bidDeposit; - - /** - * 是否退还 - */ - private String whetherSendBack; - - /** - * 建设单位(客户) - */ - private String construction; - - /** - * 总造价 - */ - private BigDecimal totalCost; - - /** - * 立项申请人 - */ - private String projectApplicant; - - /** - * 立项部门 - */ - private String projectApplicantDept; - - /** - * 立项申请日期 - */ - private LocalDate projectApplicantTime; - - /** - * 流程状态 - */ - private String processStatus; - - /** - * 项目编号 - */ - private String projectNumbering; + private String bidFileName; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/bo/BusListOfWinningBidsBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/bo/BusListOfWinningBidsBo.java index d8cf364b..458a6567 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/bo/BusListOfWinningBidsBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/bo/BusListOfWinningBidsBo.java @@ -10,7 +10,6 @@ import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; import java.math.BigDecimal; -import java.time.LocalDate; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; @@ -18,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * 中标项目一览业务对象 bus_list_of_winning_bids * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ @Data @EqualsAndHashCode(callSuper = true) @@ -34,93 +33,110 @@ public class BusListOfWinningBidsBo extends BaseEntity { /** * 项目id */ - @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) private Long projectId; - /** - * 项目状态 - */ - private String projectStatus; - /** * 项目名称 */ private String projectName; /** - * 中标价(原币) + * 项目简称 */ - private BigDecimal winningBidOriginal; + private String shortName; /** - * 汇率 + * 负责人 */ - private BigDecimal exchangeRate; + private String principal; /** - * 币种 + * 负责人电话 */ - private String currency; + private String principalPhone; /** - * 所属主体 + * 项目类型 */ - private String subject; + private String projectType; + + /** + * 项目阶段 + */ + private String projectStage; + + /** + * 开工时间 + */ + private String onStreamTime; + + /** + * 经度 + */ + private String lng; + + /** + * 纬度 + */ + private String lat; + + /** + * 项目地址 + */ + private String projectSite; + + /** + * 计划容量 + */ + private String plan; + + /** + * 实际容量 + */ + private String actual; + + /** + * 设计总量 + */ + @NotNull(message = "设计总量不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long designTotal; + + /** + * 备注 + */ + private String remark; + + /** + * 排序字段 + */ + @NotNull(message = "排序字段不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long sort; + + /** + * 删除时间 + */ + private Date deletedAt; + + /** + * 是否中标(0中标 1未中标) + */ + private String whetherBid; /** * 中标价 */ - private BigDecimal winningBid; + private BigDecimal bidPrice; /** - * 中标日期 + * 中标通知书 */ - private LocalDate bidWinningDate; + private String bidFile; /** - * 投标保证金 + * 中标通知书名称 */ - private BigDecimal bidDeposit; + private String bidFileName; - /** - * 是否退还 - */ - private String whetherSendBack; - - /** - * 建设单位(客户) - */ - private String construction; - - /** - * 总造价 - */ - private BigDecimal totalCost; - - /** - * 立项申请人 - */ - private String projectApplicant; - - /** - * 立项部门 - */ - private String projectApplicantDept; - - /** - * 立项申请日期 - */ - private LocalDate projectApplicantTime; - - /** - * 流程状态 - */ - private String processStatus; - - /** - * 项目编号 - */ - private String projectNumbering; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/vo/BusListOfWinningBidsVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/vo/BusListOfWinningBidsVo.java index 04f7cd0f..1cbea85f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/vo/BusListOfWinningBidsVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/domain/vo/BusListOfWinningBidsVo.java @@ -1,7 +1,6 @@ package org.dromara.bidding.domain.vo; import java.math.BigDecimal; -import java.time.LocalDate; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import org.dromara.bidding.domain.BusListOfWinningBids; @@ -22,7 +21,7 @@ import java.util.Date; * 中标项目一览视图对象 bus_list_of_winning_bids * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ @Data @ExcelIgnoreUnannotated @@ -44,12 +43,6 @@ public class BusListOfWinningBidsVo implements Serializable { @ExcelProperty(value = "项目id") private Long projectId; - /** - * 项目状态 - */ - @ExcelProperty(value = "项目状态") - private String projectStatus; - /** * 项目名称 */ @@ -57,95 +50,119 @@ public class BusListOfWinningBidsVo implements Serializable { private String projectName; /** - * 中标价(原币) + * 项目简称 */ - @ExcelProperty(value = "中标价(原币)", converter = ExcelDictConvert.class) - private BigDecimal winningBidOriginal; + @ExcelProperty(value = "项目简称") + private String shortName; /** - * 汇率 + * 负责人 */ - @ExcelProperty(value = "汇率") - private BigDecimal exchangeRate; + @ExcelProperty(value = "负责人") + private String principal; /** - * 币种 + * 负责人电话 */ - @ExcelProperty(value = "币种") - private String currency; + @ExcelProperty(value = "负责人电话") + private String principalPhone; /** - * 所属主体 + * 项目类型 */ - @ExcelProperty(value = "所属主体") - private String subject; + @ExcelProperty(value = "项目类型") + private String projectType; + + /** + * 项目阶段 + */ + @ExcelProperty(value = "项目阶段") + private String projectStage; + + /** + * 开工时间 + */ + @ExcelProperty(value = "开工时间") + private String onStreamTime; + + /** + * 经度 + */ + @ExcelProperty(value = "经度") + private String lng; + + /** + * 纬度 + */ + @ExcelProperty(value = "纬度") + private String lat; + + /** + * 项目地址 + */ + @ExcelProperty(value = "项目地址") + private String projectSite; + + /** + * 计划容量 + */ + @ExcelProperty(value = "计划容量") + private String plan; + + /** + * 实际容量 + */ + @ExcelProperty(value = "实际容量") + private String actual; + + /** + * 设计总量 + */ + @ExcelProperty(value = "设计总量") + private Long designTotal; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 排序字段 + */ + @ExcelProperty(value = "排序字段") + private Long sort; + + /** + * 删除时间 + */ + @ExcelProperty(value = "删除时间") + private Date deletedAt; + + /** + * 是否中标(0中标 1未中标) + */ + @ExcelProperty(value = "是否中标", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=中标,1=未中标") + private String whetherBid; /** * 中标价 */ @ExcelProperty(value = "中标价") - private BigDecimal winningBid; + private BigDecimal bidPrice; /** - * 中标日期 + * 中标通知书 */ - @ExcelProperty(value = "中标日期") - private LocalDate bidWinningDate; + @ExcelProperty(value = "中标通知书") + private String bidFile; /** - * 投标保证金 + * 中标通知书名称 */ - @ExcelProperty(value = "投标保证金") - private BigDecimal bidDeposit; - - /** - * 是否退还 - */ - @ExcelProperty(value = "是否退还") - private String whetherSendBack; - - /** - * 建设单位(客户) - */ - @ExcelProperty(value = "建设单位", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "客=户") - private String construction; - - /** - * 总造价 - */ - @ExcelProperty(value = "总造价") - private BigDecimal totalCost; - - /** - * 立项申请人 - */ - @ExcelProperty(value = "立项申请人") - private String projectApplicant; - - /** - * 立项部门 - */ - @ExcelProperty(value = "立项部门") - private String projectApplicantDept; - - /** - * 立项申请日期 - */ - @ExcelProperty(value = "立项申请日期") - private LocalDate projectApplicantTime; - - /** - * 流程状态 - */ - @ExcelProperty(value = "流程状态") - private String processStatus; - - /** - * 项目编号 - */ - @ExcelProperty(value = "项目编号") - private String projectNumbering; + @ExcelProperty(value = "中标通知书名称") + private String bidFileName; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/mapper/BusListOfWinningBidsMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/mapper/BusListOfWinningBidsMapper.java index 4b549d3d..89460c2c 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/mapper/BusListOfWinningBidsMapper.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/mapper/BusListOfWinningBidsMapper.java @@ -8,7 +8,7 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; * 中标项目一览Mapper接口 * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ public interface BusListOfWinningBidsMapper extends BaseMapperPlus { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/IBusListOfWinningBidsService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/IBusListOfWinningBidsService.java index 6c0de3be..af3603cc 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/IBusListOfWinningBidsService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/IBusListOfWinningBidsService.java @@ -3,11 +3,12 @@ package org.dromara.bidding.service; import org.dromara.bidding.domain.vo.BusListOfWinningBidsVo; import org.dromara.bidding.domain.bo.BusListOfWinningBidsBo; import org.dromara.bidding.domain.BusListOfWinningBids; -import org.dromara.common.core.domain.R; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.PageQuery; import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.multipart.MultipartFile; + import java.util.Collection; import java.util.List; @@ -15,7 +16,7 @@ import java.util.List; * 中标项目一览Service接口 * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ public interface IBusListOfWinningBidsService extends IService{ @@ -47,10 +48,11 @@ public interface IBusListOfWinningBidsService extends IService ids, Boolean isValid); + /** + * 根据项目id获取数据 + * @param bo + * @return + */ BusListOfWinningBidsVo queryOne(BusListOfWinningBidsBo bo); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusBiddingLimitVersionsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusBiddingLimitVersionsServiceImpl.java index 6be6e6c5..5ace9959 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusBiddingLimitVersionsServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusBiddingLimitVersionsServiceImpl.java @@ -1,6 +1,10 @@ package org.dromara.bidding.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -9,6 +13,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.design.domain.BusBillofquantitiesVersions; +import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; import org.dromara.bidding.domain.bo.BusBiddingLimitVersionsBo; import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo; @@ -26,6 +32,7 @@ import java.util.Collection; * @author Lion Li * @date 2025-08-21 */ +@Slf4j @RequiredArgsConstructor @Service public class BusBiddingLimitVersionsServiceImpl extends ServiceImpl implements IBusBiddingLimitVersionsService { @@ -131,4 +138,60 @@ public class BusBiddingLimitVersionsServiceImpl extends ServiceImpl 0; } + + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('biddingEquipmentList')") + public void processPlansHandlErequipmentList(ProcessEvent processEvent) { + log.info("物资设备清单审核任务执行了{}", processEvent.toString()); + String id = processEvent.getBusinessId(); + LambdaQueryWrapper eq = new LambdaQueryWrapper() + .eq(BusBiddingLimitVersions::getVersions, id); + BusBiddingLimitVersions busBiddingLimitVersions = new BusBiddingLimitVersions(); + busBiddingLimitVersions.setStatus(processEvent.getStatus()); + + boolean update = this.update(busBiddingLimitVersions, eq); +// BusBiddingPlan biddingPlan = baseMapper.selectById(Long.valueOf(id)); +// if (biddingPlan == null) { +// log.error(""); +// } +// if (BusinessStatusEnum.DRAFT.getStatus().equals(biddingPlan.getStatus())) { +// biddingPlan.setBidStatus(1); +// } +// biddingPlan.setStatus(processEvent.getStatus()); +// baseMapper.updateById(biddingPlan); + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('biddingEquipmentList')") + public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { + log.info("物资设备清单审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('biddingEquipmentList')") + public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { + log.info("物资设备清单计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString()); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusListOfWinningBidsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusListOfWinningBidsServiceImpl.java index 79d2979b..16c32973 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusListOfWinningBidsServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bidding/service/impl/BusListOfWinningBidsServiceImpl.java @@ -1,32 +1,35 @@ package org.dromara.bidding.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.dromara.common.core.domain.R; -import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.PageQuery; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.system.domain.vo.SysOssUploadVo; +import org.dromara.system.service.ISysOssService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.dromara.bidding.domain.bo.BusListOfWinningBidsBo; import org.dromara.bidding.domain.vo.BusListOfWinningBidsVo; import org.dromara.bidding.domain.BusListOfWinningBids; import org.dromara.bidding.mapper.BusListOfWinningBidsMapper; import org.dromara.bidding.service.IBusListOfWinningBidsService; +import org.springframework.web.multipart.MultipartFile; import java.util.List; import java.util.Map; import java.util.Collection; +import static org.dromara.common.constant.MinioPathConstant.FormalitiesAnnex; + /** * 中标项目一览Service业务层处理 * * @author Lion Li - * @date 2025-08-20 + * @date 2025-08-22 */ @RequiredArgsConstructor @Service @@ -34,6 +37,9 @@ public class BusListOfWinningBidsServiceImpl extends ServiceImpl lqw = Wrappers.lambdaQuery(); lqw.orderByDesc(BusListOfWinningBids::getId); lqw.eq(bo.getProjectId() != null, BusListOfWinningBids::getProjectId, bo.getProjectId()); - lqw.eq(StringUtils.isNotBlank(bo.getProjectStatus()), BusListOfWinningBids::getProjectStatus, bo.getProjectStatus()); - lqw.like(StringUtils.isNotBlank(bo.getProjectName()), BusListOfWinningBids::getProjectName, bo.getProjectName()); - lqw.eq(bo.getWinningBidOriginal() != null, BusListOfWinningBids::getWinningBidOriginal, bo.getWinningBidOriginal()); - lqw.eq(bo.getExchangeRate() != null, BusListOfWinningBids::getExchangeRate, bo.getExchangeRate()); - lqw.eq(StringUtils.isNotBlank(bo.getCurrency()), BusListOfWinningBids::getCurrency, bo.getCurrency()); - lqw.eq(StringUtils.isNotBlank(bo.getSubject()), BusListOfWinningBids::getSubject, bo.getSubject()); - lqw.eq(bo.getWinningBid() != null, BusListOfWinningBids::getWinningBid, bo.getWinningBid()); - lqw.eq(bo.getBidWinningDate() != null, BusListOfWinningBids::getBidWinningDate, bo.getBidWinningDate()); - lqw.eq(bo.getBidDeposit() != null, BusListOfWinningBids::getBidDeposit, bo.getBidDeposit()); - lqw.eq(StringUtils.isNotBlank(bo.getWhetherSendBack()), BusListOfWinningBids::getWhetherSendBack, bo.getWhetherSendBack()); - lqw.eq(StringUtils.isNotBlank(bo.getConstruction()), BusListOfWinningBids::getConstruction, bo.getConstruction()); - lqw.eq(bo.getTotalCost() != null, BusListOfWinningBids::getTotalCost, bo.getTotalCost()); - lqw.eq(StringUtils.isNotBlank(bo.getProjectApplicant()), BusListOfWinningBids::getProjectApplicant, bo.getProjectApplicant()); - lqw.eq(StringUtils.isNotBlank(bo.getProjectApplicantDept()), BusListOfWinningBids::getProjectApplicantDept, bo.getProjectApplicantDept()); - lqw.eq(bo.getProjectApplicantTime() != null, BusListOfWinningBids::getProjectApplicantTime, bo.getProjectApplicantTime()); - lqw.eq(StringUtils.isNotBlank(bo.getProcessStatus()), BusListOfWinningBids::getProcessStatus, bo.getProcessStatus()); - lqw.eq(StringUtils.isNotBlank(bo.getProjectNumbering()), BusListOfWinningBids::getProjectNumbering, bo.getProjectNumbering()); + lqw.eq(bo.getId() != null, BusListOfWinningBids::getId, bo.getId()); return lqw; } /** * 新增中标项目一览 * - * @param bo 中标项目一览 + * @param bo 中标项目一览 + * @param file * @return 是否新增成功 */ @Override - public Boolean insertByBo(BusListOfWinningBidsBo bo) { + public Boolean insertByBo(BusListOfWinningBidsBo bo, MultipartFile file) { + if ("0".equals(bo.getWhetherBid())){ + SysOssUploadVo wordEntity = ossService.uploadWithNoSave(file, ossService.minioFileName(FormalitiesAnnex,file)); + bo.setBidFile(wordEntity.getUrl()); + bo.setBidFileName(wordEntity.getFileName()); + }else { + bo.setBidPrice(null); + bo.setBidFile(null); + bo.setBidFileName(null); + } if (bo.getId() == null) { BusListOfWinningBids add = MapstructUtils.convert(bo, BusListOfWinningBids.class); - Long count = baseMapper.selectCount(new LambdaQueryWrapper().eq(BusListOfWinningBids::getProjectId, bo.getProjectId())); - if (count > 0) { - throw new ServiceException("项目已存在不允许新增"); - } validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; if (flag) { bo.setId(add.getId()); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/BusBiddingPlanController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/BusBiddingPlanController.java index 4d393c5d..e478feea 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/BusBiddingPlanController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/controller/BusBiddingPlanController.java @@ -10,6 +10,8 @@ import org.dromara.common.core.exception.ServiceException; import org.dromara.formalities.domain.bo.BusFormalitiesAnnexBo; import org.dromara.formalities.domain.bo.BusFormalitiesAreConsolidatedBo; import org.dromara.tender.domain.bo.BusSegmentedIndicatorPlanningBo; +import org.dromara.tender.domain.vo.BusBiddingPlanAnnexVo; +import org.dromara.tender.domain.vo.BusBiddingPlanDetailVo; import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; @@ -68,6 +70,20 @@ public class BusBiddingPlanController extends BaseController { return R.ok(busBiddingPlanService.getMore(bo)); } + /** + * 查看招标文件详情 + * @param bo + * @return + */ + @SaCheckPermission("tender:biddingPlan:getAnnex") + @GetMapping("/getAnnex") + public R> getAnnex(BusBiddingPlanBo bo) { + if (bo.getId() == null) { + throw new ServiceException("id不能为空"); + } + return R.ok(busBiddingPlanService.getAnnex(bo)); + } + /** * 导出招标计划列表 @@ -85,12 +101,12 @@ public class BusBiddingPlanController extends BaseController { * * @param id 主键 */ -// @SaCheckPermission("tender:biddingPlan:query") -// @GetMapping("/{id}") -// public R getInfo(@NotNull(message = "主键不能为空") -// @PathVariable Long id) { -// return R.ok(busBiddingPlanService.queryById(id)); -// } + @SaCheckPermission("tender:biddingPlan:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(busBiddingPlanService.queryDetailById(id)); + } /** * 新增招标计划 @@ -122,9 +138,8 @@ public class BusBiddingPlanController extends BaseController { @Log(title = "招标计划", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() - public R edit(BusBiddingPlanBo bo, - @RequestPart("file") MultipartFile bidFile) { - return toAjax(busBiddingPlanService.updateByBo(bo,bidFile)); + public R edit( @Validated(EditGroup.class) @RequestBody BusBiddingPlanBo bo) { + return toAjax(busBiddingPlanService.updateByBo(bo)); } /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/BusBiddingPlan.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/BusBiddingPlan.java index 4281e105..553d7dd8 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/BusBiddingPlan.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/BusBiddingPlan.java @@ -71,6 +71,10 @@ public class BusBiddingPlan extends BaseEntity { * 分包内容 */ private String content; + /** + * 类型(2、招采,3、物资) + */ + private String type; /** * 中标通知书 @@ -95,7 +99,12 @@ public class BusBiddingPlan extends BaseEntity { /** * 状态 */ - private Integer status; + private Integer bidStatus; + + /** + * 审核状态 + */ + private String status; /** * 中标单位 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/TenderSupplierInput.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/TenderSupplierInput.java index fa4d6a78..082e745a 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/TenderSupplierInput.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/TenderSupplierInput.java @@ -1,5 +1,8 @@ package org.dromara.tender.domain; +import jakarta.validation.constraints.NotNull; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; import org.dromara.common.mybatis.core.domain.BaseEntity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; @@ -32,6 +35,11 @@ public class TenderSupplierInput extends BaseEntity { @TableId(value = "id") private Long id; + /** + * 项目Id + */ + private Long projectId; + /** * 企业登记注册类型 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/BusBiddingPlanBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/BusBiddingPlanBo.java index 9f5ad16a..452a6393 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/BusBiddingPlanBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/BusBiddingPlanBo.java @@ -99,10 +99,20 @@ public class BusBiddingPlanBo extends BaseEntity { */ private String contractFileName; + /** + * 类型(2、招采,3、物资) + */ + private String type; + /** * 状态 */ - private Integer status; + private Integer bidStatus; + + /** + * 审核状态 + */ + private String status; /** * 中标单位id @@ -114,4 +124,9 @@ public class BusBiddingPlanBo extends BaseEntity { */ private List limitListBos; + /** + * 文件类型 + */ + private Integer fileType; + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/TenderSupplierInputBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/TenderSupplierInputBo.java index 3559d4a1..e5c7f5f9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/TenderSupplierInputBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/bo/TenderSupplierInputBo.java @@ -1,5 +1,6 @@ package org.dromara.tender.domain.bo; +import org.dromara.common.core.validate.AddGroup; import org.dromara.tender.domain.TenderSupplierInput; import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.common.core.validate.EditGroup; @@ -29,6 +30,12 @@ public class TenderSupplierInputBo extends BaseEntity { @NotNull(message = "不能为空", groups = { EditGroup.class }) private Long id; + /** + * 项目Id + */ + @NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + /** * 企业登记注册类型 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanDetailVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanDetailVo.java new file mode 100644 index 00000000..8d83a505 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanDetailVo.java @@ -0,0 +1,144 @@ +package org.dromara.tender.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.tender.domain.BusBiddingPlan; + +import java.io.Serial; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + + +/** + * 招标计划视图对象 bus_bidding_plan + * + * @author Lion Li + * @date 2025-08-21 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = BusBiddingPlan.class) +public class BusBiddingPlanDetailVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 项目Id + */ + @ExcelProperty(value = "项目Id") + private Long projectId; + + /** + * 分包类型名称 + */ + @ExcelProperty(value = "分包类型名称") + private String dictName; + + /** + * 名称 + */ + @ExcelProperty(value = "名称") + private String name; + + /** + * 计划招标时间 + */ + @ExcelProperty(value = "计划招标时间") + private LocalDate plannedBiddingTime; + + /** + * 招标方式(公招,邀标) + */ + @ExcelProperty(value = "招标方式(公招,邀标)") + private String plannedBiddingMethod; + + /** + * 总价 + */ + @ExcelProperty(value = "总价") + private BigDecimal price; + + /** + * 合同额 + */ + @ExcelProperty(value = "合同额") + private BigDecimal contractPrice; + + /** + * 分包内容 + */ + @ExcelProperty(value = "分包内容") + private String content; + + /** + * 中标通知书 + */ + @ExcelProperty(value = "中标通知书") + private String bidFile; + + /** + * 中标通知书名称 + */ + @ExcelProperty(value = "中标通知书名称") + private String bidFileName; + + /** + * 合同文件 + */ + @ExcelProperty(value = "合同文件") + private String contractFile; + + /** + * 合同文件名称 + */ + @ExcelProperty(value = "合同文件名称") + private String contractFileName; + + /** + * 状态 + */ + private Integer bidStatus; + + /** + * 审核状态 + */ + private String status; + + /** + * 类型(2、招采,3、物资) + */ + private String type; + + /** + * 中标单位 + */ + private String winningBidder; + + /** + * 中标单位id + */ + private Long winningBidderId; + + + /** + * 招采一览表数据 + */ + List billofquantitiesLimitList; + + /** + * 招标文件数据 + */ + List biddingPlanAnnexVoList; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanVo.java index ab9fa112..ebac3a96 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/BusBiddingPlanVo.java @@ -113,7 +113,17 @@ public class BusBiddingPlanVo implements Serializable { /** * 状态 */ - private Integer status; + private Integer bidStatus; + + /** + * 审核状态 + */ + private String status; + + /** + * 类型(2、招采,3、物资) + */ + private String type; /** * 中标单位 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java index d663161a..ae201c5e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/domain/vo/TenderSupplierInputVo.java @@ -3,6 +3,9 @@ package org.dromara.tender.domain.vo; import java.time.LocalDateTime; import java.util.Date; +import jakarta.validation.constraints.NotNull; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; import org.dromara.tender.domain.TenderSupplierInput; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -33,6 +36,12 @@ public class TenderSupplierInputVo implements Serializable { @ExcelProperty(value = "") private Long id; + /** + * 项目Id + */ + @ExcelProperty(value = "项目Id") + private Long projectId; + /** * 企业登记注册类型 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/IBusBiddingPlanService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/IBusBiddingPlanService.java index 2665b26d..d764ac4b 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/IBusBiddingPlanService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/IBusBiddingPlanService.java @@ -1,5 +1,8 @@ package org.dromara.tender.service; +import jakarta.validation.constraints.NotNull; +import org.dromara.tender.domain.vo.BusBiddingPlanAnnexVo; +import org.dromara.tender.domain.vo.BusBiddingPlanDetailVo; import org.dromara.tender.domain.vo.BusBiddingPlanVo; import org.dromara.tender.domain.bo.BusBiddingPlanBo; import org.dromara.tender.domain.BusBiddingPlan; @@ -58,10 +61,9 @@ public interface IBusBiddingPlanService extends IService{ * 修改招标计划 * * @param bo 招标计划 - * @param bidFile * @return 是否修改成功 */ - Boolean updateByBo(BusBiddingPlanBo bo, MultipartFile bidFile); + Boolean updateByBo(BusBiddingPlanBo bo); /** * 校验并批量删除招标计划信息 @@ -88,4 +90,13 @@ public interface IBusBiddingPlanService extends IService{ * @return */ Boolean editStatus(BusBiddingPlanBo bo); + + /** + * 查看招标文件 + * @param bo + * @return + */ + List getAnnex(BusBiddingPlanBo bo); + + BusBiddingPlanDetailVo queryDetailById(Long id); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBLimitListVersionsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBLimitListVersionsServiceImpl.java index 996594e2..c40d740a 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBLimitListVersionsServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBLimitListVersionsServiceImpl.java @@ -1,6 +1,10 @@ package org.dromara.tender.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -9,6 +13,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.design.domain.BusBillofquantitiesVersions; +import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; import org.dromara.tender.domain.bo.BusBLimitListVersionsBo; import org.dromara.tender.domain.vo.BusBLimitListVersionsVo; @@ -26,6 +32,7 @@ import java.util.Collection; * @author Lion Li * @date 2025-08-21 */ +@Slf4j @RequiredArgsConstructor @Service public class BusBLimitListVersionsServiceImpl extends ServiceImpl implements IBusBLimitListVersionsService { @@ -132,4 +139,60 @@ public class BusBLimitListVersionsServiceImpl extends ServiceImpl 0; } + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('biddingEquipmentList')") + public void processPlansHandlErequipmentList(ProcessEvent processEvent) { + log.info("物资设备清单审核任务执行了{}", processEvent.toString()); + String id = processEvent.getBusinessId(); + LambdaQueryWrapper eq = new LambdaQueryWrapper() + .eq(BusBLimitListVersions::getVersions, id); + BusBLimitListVersions busBLimitListVersions = new BusBLimitListVersions(); + busBLimitListVersions.setStatus(processEvent.getStatus()); +// +// + boolean update = this.update(busBLimitListVersions, eq); +// BusBiddingPlan biddingPlan = baseMapper.selectById(Long.valueOf(id)); +// if (biddingPlan == null) { +// log.error(""); +// } +// if (BusinessStatusEnum.DRAFT.getStatus().equals(biddingPlan.getStatus())) { +// biddingPlan.setBidStatus(1); +// } +// biddingPlan.setStatus(processEvent.getStatus()); +// baseMapper.updateById(biddingPlan); + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('biddingEquipmentList')") + public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) { + log.info("物资设备清单审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('biddingEquipmentList')") + public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) { + log.info("物资设备清单计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString()); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBiddingPlanServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBiddingPlanServiceImpl.java index ff4ebd58..4fbf30f5 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBiddingPlanServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBiddingPlanServiceImpl.java @@ -1,6 +1,12 @@ package org.dromara.tender.service.impl; +import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; +import org.dromara.common.core.enums.BusinessStatusEnum; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; @@ -10,23 +16,28 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.common.oss.core.OssClient; +import org.dromara.common.oss.factory.OssFactory; +import org.dromara.design.domain.BusBillofquantities; +import org.dromara.design.domain.BusBillofquantitiesVersions; import org.dromara.formalities.domain.BusFormalitiesAnnex; import org.dromara.system.domain.vo.SysOssUploadVo; import org.dromara.system.service.ISysOssService; -import org.dromara.tender.domain.BusBiddingPlanAnnex; -import org.dromara.tender.domain.BusTenderPlanningLimitList; +import org.dromara.tender.domain.*; import org.dromara.tender.domain.bo.BusBiddingPlanAnnexBo; import org.dromara.tender.domain.bo.BusTenderPlanningLimitListBo; import org.dromara.tender.domain.vo.BusBiddingPlanAnnexVo; +import org.dromara.tender.domain.vo.BusBiddingPlanDetailVo; import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo; import org.dromara.tender.mapper.BusTenderPlanningLimitListMapper; import org.dromara.tender.service.IBusBiddingPlanAnnexService; import org.dromara.tender.service.IBusBillofquantitiesLimitListService; +import org.dromara.tender.service.ITenderSupplierInputService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; import org.dromara.tender.domain.bo.BusBiddingPlanBo; import org.dromara.tender.domain.vo.BusBiddingPlanVo; -import org.dromara.tender.domain.BusBiddingPlan; import org.dromara.tender.mapper.BusBiddingPlanMapper; import org.dromara.tender.service.IBusBiddingPlanService; import org.springframework.web.multipart.MultipartFile; @@ -44,6 +55,7 @@ import static org.dromara.common.constant.MinioPathConstant.FormalitiesAnnex; * @author Lion Li * @date 2025-08-21 */ +@Slf4j @RequiredArgsConstructor @Service public class BusBiddingPlanServiceImpl extends ServiceImpl implements IBusBiddingPlanService { @@ -62,6 +74,10 @@ public class BusBiddingPlanServiceImpl extends ServiceImpl 0) { throw new ServiceException(busBillofquantitiesLimitListVo.getName()+"数量超过了总数量"); } - price.add(busBillofquantitiesLimitListVo.getUnitPrice().multiply(limitListBo.getNum())); + if (busBillofquantitiesLimitListVo.getUnitPrice() != null && limitListBo.getNum() != null){ + price = price.add(busBillofquantitiesLimitListVo.getUnitPrice().multiply(limitListBo.getNum()).setScale(2, RoundingMode.HALF_UP)); + } busTenderPlanningLimitList.setNum(limitListBo.getNum()); planningLimitListList.add(busTenderPlanningLimitList); } @@ -162,35 +181,28 @@ public class BusBiddingPlanServiceImpl extends ServiceImpl planAnnexVoList = busBiddingPlanAnnexService.queryList(planAnnex); - if (planAnnexVoList != null && !planAnnexVoList.isEmpty() ) { - if (!bidFile.isEmpty()){ - SysOssUploadVo wordEntity = ossService.uploadWithNoSave(bidFile, ossService.minioFileName(FormalitiesAnnex,bidFile)); - update.setBidFile(wordEntity.getUrl()); - update.setBidFileName(wordEntity.getFileName()); - } -// if (!contractFile.isEmpty()){ -// SysOssUploadVo wordEntity = ossService.uploadWithNoSave(contractFile, ossService.minioFileName(FormalitiesAnnex,contractFile)); -// update.setContractFile(wordEntity.getUrl()); -// update.setContractFileName(wordEntity.getFileName()); -// -// } - if (bo.getContractPrice() != null && bo.getBidFile().isEmpty()){ - throw new ServiceException("中标文件未上传"); - } - if (bo.getWinningBidder() != null && bo.getBidFile().isEmpty()){ - throw new ServiceException("中标单位不能为空"); + if (update != null) { + //修改合同额和中标单位时对前置条件进行校验 + if (bo.getContractPrice() !=null || bo.getWinningBidderId() != null){ + //判断招标文件是否上传 + BusBiddingPlanAnnexBo planAnnex = new BusBiddingPlanAnnexBo(); + planAnnex.setBiddingPlanId(bo.getId()); + List planAnnexVoList = busBiddingPlanAnnexService.queryList(planAnnex); + if (planAnnexVoList == null || planAnnexVoList.isEmpty() ) { + throw new ServiceException("招标文件未上传"); + } + //判断中标文件是否上传 + if ((bo.getBidFile() == null || bo.getBidFile().isEmpty()) && (bo.getContractPrice() != null ||bo.getWinningBidderId() != null)){ + throw new ServiceException("中标文件未上传"); + } } } // validEntityBeforeSave(update); @@ -260,7 +272,7 @@ public class BusBiddingPlanServiceImpl extends ServiceImpl files) { - if (bo.getStatus() == 1){ + if (bo.getBidStatus() == 1){ throw new ServiceException("数据已锁定,不允许继续上传附件"); } List annexArrayList = new ArrayList<>(); @@ -268,6 +280,28 @@ public class BusBiddingPlanServiceImpl extends ServiceImpl planAnnexVoList = busBiddingPlanAnnexService.queryList(planAnnex); + BusBiddingPlan biddingPlan = baseMapper.selectById(bo.getId()); + //冗余中标单位名称 + TenderSupplierInput tenderSupplierInput = tenderSupplierInputService.getById(bo.getWinningBidderId()); + biddingPlan.setWinningBidderId(bo.getWinningBidderId()); + biddingPlan.setWinningBidder(tenderSupplierInput.getSupplierName()); + if (biddingPlan.getPlannedBiddingTime() == null){ + throw new ServiceException("计划招标时间不能为空!!"); + } + if (planAnnexVoList == null || planAnnexVoList.isEmpty() ) { + throw new ServiceException("请先上传招标文件再上传中标文件!!"); + } + if (!file.isEmpty()){ + SysOssUploadVo wordEntity = ossService.uploadWithNoSave(file, ossService.minioFileName(FormalitiesAnnex,file)); + biddingPlan.setBidFile(wordEntity.getUrl()); + biddingPlan.setBidFileName(wordEntity.getFileName()); + return baseMapper.updateById(biddingPlan) > 0; + } + } // 处理单个文件前,先判断是否为空文件(isEmpty()) if (file.isEmpty()) { System.out.println("跳过空文件"); @@ -287,9 +321,52 @@ public class BusBiddingPlanServiceImpl extends ServiceImpl planAnnexVoList = busBiddingPlanAnnexService.queryList(planAnnex); + if (biddingPlan.getPlannedBiddingTime() == null){ + throw new ServiceException("请填写计划招标时间!!"); + } + if (planAnnexVoList == null || planAnnexVoList.isEmpty() ) { + throw new ServiceException("请上传招标文件!!"); + } + if (biddingPlan.getBidFile() == null || biddingPlan.getBidFile().isEmpty()) { + throw new ServiceException("请上传中标通知书!!"); + + } + if (biddingPlan.getWinningBidderId() == null){ + throw new ServiceException("请填写中标单位!!"); + } + if (biddingPlan.getContractPrice() == null){ + throw new ServiceException("请填写合同额!!"); + } + update.setBidStatus(1); return baseMapper.updateById(update) >0; } + @Override + public List getAnnex(BusBiddingPlanBo bo) { + BusBiddingPlanAnnexBo annexBo = new BusBiddingPlanAnnexBo(); + annexBo.setBiddingPlanId(bo.getId()); + + return busBiddingPlanAnnexService.queryList(annexBo); + } + + @Override + public BusBiddingPlanDetailVo queryDetailById(Long id) { + BusBiddingPlan biddingPlan = baseMapper.selectById(id); + BusBiddingPlanBo bo = new BusBiddingPlanBo(); + bo.setId(id); + BusBiddingPlanDetailVo detailVo = new BusBiddingPlanDetailVo(); + BeanUtil.copyProperties(biddingPlan, detailVo); + List more = getMore(bo); + detailVo.setBillofquantitiesLimitList(more); + List annex = getAnnex(bo); + detailVo.setBiddingPlanAnnexVoList(annex); + return detailVo; + } + /** * 递归构建树形结构 * @param parentId 父节点ID(顶级节点为0) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBillofquantitiesLimitListServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBillofquantitiesLimitListServiceImpl.java index 523de325..83c5987f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBillofquantitiesLimitListServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusBillofquantitiesLimitListServiceImpl.java @@ -1,6 +1,11 @@ package org.dromara.tender.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.domain.event.ProcessDeleteEvent; +import org.dromara.common.core.domain.event.ProcessEvent; +import org.dromara.common.core.domain.event.ProcessTaskEvent; +import org.dromara.common.core.enums.BusinessStatusEnum; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -10,12 +15,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; import org.dromara.common.utils.excel.ExcelDynamicReader; +import org.dromara.design.domain.BusBillofquantitiesVersions; +import org.dromara.tender.domain.BusBiddingPlan; import org.dromara.tender.domain.bo.BusBLimitListVersionsBo; import org.dromara.tender.domain.bo.TenderAllVersionNumbersReq; import org.dromara.tender.domain.vo.BusBLimitListVersionsVo; import org.dromara.tender.enums.LimitListTypeEnum; import org.dromara.tender.service.IBusBLimitListVersionsService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo; import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo; @@ -35,6 +43,7 @@ import java.util.stream.Collectors; * @author Lion Li * @date 2025-08-19 */ +@Slf4j @RequiredArgsConstructor @Service public class BusBillofquantitiesLimitListServiceImpl extends ServiceImpl implements IBusBillofquantitiesLimitListService { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusSegmentedIndicatorPlanningServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusSegmentedIndicatorPlanningServiceImpl.java index b7fa2a94..c12847bc 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusSegmentedIndicatorPlanningServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/tender/service/impl/BusSegmentedIndicatorPlanningServiceImpl.java @@ -119,6 +119,7 @@ public class BusSegmentedIndicatorPlanningServiceImpl extends ServiceImpl 0; + BigDecimal price = BigDecimal.valueOf(0); if (flag) { bo.setId(add.getId()); if (bo.getLimitListBos() != null && !bo.getLimitListBos().isEmpty()) { @@ -138,9 +139,14 @@ public class BusSegmentedIndicatorPlanningServiceImpl extends ServiceImpl params = bo.getParams(); LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); lqw.orderByDesc(TenderSupplierInput::getId); + lqw.eq(bo.getProjectId() != null, TenderSupplierInput::getProjectId, bo.getProjectId()); lqw.eq(StringUtils.isNotBlank(bo.getSupplierType()), TenderSupplierInput::getSupplierType, bo.getSupplierType()); lqw.eq(StringUtils.isNotBlank(bo.getInputFile()), TenderSupplierInput::getInputFile, bo.getInputFile()); lqw.like(StringUtils.isNotBlank(bo.getSupplierName()), TenderSupplierInput::getSupplierName, bo.getSupplierName());