Merge remote-tracking branch 'origin/dev' into lcj
This commit is contained in:
@ -263,6 +263,8 @@ springdoc:
|
||||
packages-to-scan: org.dromara.message
|
||||
- group: 20.合同模块
|
||||
packages-to-scan: org.dromara.ctr
|
||||
- group: 21.招标模块
|
||||
packages-to-scan: org.dromara.tender
|
||||
# knife4j的增强配置,不需要增强可以不配
|
||||
knife4j:
|
||||
enable: true
|
||||
|
@ -17,6 +17,7 @@ public class constant {
|
||||
public static final String EquipmentOrdering = "equipmentOrdering"; //订货
|
||||
public static final String PURCHASE_DOC_FILE_URL = "docs/purchase/doc/"; // 采购联系单文件路径
|
||||
public static final String PURCHASE_DOC_TEMPLATE_PATH = "template/物资采购联系单模版.docx"; // 采购联系单文件路径
|
||||
public static final String SUPPLIER_INPUT = "supplierInput";//供应商入库
|
||||
|
||||
/**
|
||||
* 获取物资采购联系单文件名
|
||||
|
@ -213,7 +213,14 @@ public class BusPurchaseDocServiceImpl extends ServiceImpl<BusPurchaseDocMapper,
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusPurchaseDoc entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
List<BusPurchaseDoc> list = list(Wrappers.lambdaQuery(BusPurchaseDoc.class)
|
||||
.eq(BusPurchaseDoc::getProjectId, entity.getProjectId())
|
||||
.eq(BusPurchaseDoc::getDocCode, entity.getDocCode())
|
||||
.ne(entity.getId() != null, BusPurchaseDoc::getId, entity.getId())
|
||||
);
|
||||
if (!list.isEmpty()) {
|
||||
throw new ServiceException("该项目已存在此采购单编号");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,5 +68,29 @@ public class CtrExpensesContract extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 预付款比例
|
||||
*/
|
||||
private BigDecimal advancePayRatio;
|
||||
|
||||
/**
|
||||
* 尾款比例
|
||||
*/
|
||||
private BigDecimal balancePayRatio;
|
||||
|
||||
/**
|
||||
* 质保金比例
|
||||
*/
|
||||
private BigDecimal assuranceDepositRatio;
|
||||
|
||||
/**
|
||||
* 付款类型 1-月结算 2-形象节点
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 付款比例
|
||||
*/
|
||||
private BigDecimal payRatio;
|
||||
|
||||
}
|
||||
|
@ -63,5 +63,29 @@ public class CtrIncomeContract extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 预付款比例
|
||||
*/
|
||||
private BigDecimal advancePayRatio;
|
||||
|
||||
/**
|
||||
* 尾款比例
|
||||
*/
|
||||
private BigDecimal balancePayRatio;
|
||||
|
||||
/**
|
||||
* 质保金比例
|
||||
*/
|
||||
private BigDecimal assuranceDepositRatio;
|
||||
|
||||
/**
|
||||
* 付款类型 1-月结算 2-形象节点
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 付款比例
|
||||
*/
|
||||
private BigDecimal payRatio;
|
||||
|
||||
}
|
||||
|
@ -74,5 +74,28 @@ public class CtrExpensesContractBo extends BaseEntity {
|
||||
*/
|
||||
private List<CtrFileBo> fileList;
|
||||
|
||||
/**
|
||||
* 预付款比例
|
||||
*/
|
||||
private BigDecimal advancePayRatio;
|
||||
|
||||
/**
|
||||
* 尾款比例
|
||||
*/
|
||||
private BigDecimal balancePayRatio;
|
||||
|
||||
/**
|
||||
* 质保金比例
|
||||
*/
|
||||
private BigDecimal assuranceDepositRatio;
|
||||
|
||||
/**
|
||||
* 付款类型 1-月结算 2-形象节点
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 付款比例
|
||||
*/
|
||||
private BigDecimal payRatio;
|
||||
}
|
||||
|
@ -68,4 +68,29 @@ public class CtrIncomeContractBo extends BaseEntity {
|
||||
* 附件
|
||||
*/
|
||||
private List<CtrFileBo> fileList;
|
||||
|
||||
/**
|
||||
* 预付款比例
|
||||
*/
|
||||
private BigDecimal advancePayRatio;
|
||||
|
||||
/**
|
||||
* 尾款比例
|
||||
*/
|
||||
private BigDecimal balancePayRatio;
|
||||
|
||||
/**
|
||||
* 质保金比例
|
||||
*/
|
||||
private BigDecimal assuranceDepositRatio;
|
||||
|
||||
/**
|
||||
* 付款类型 1-月结算 2-形象节点
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 付款比例
|
||||
*/
|
||||
private BigDecimal payRatio;
|
||||
}
|
||||
|
@ -93,4 +93,28 @@ public class CtrExpensesContractVo implements Serializable {
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 预付款比例
|
||||
*/
|
||||
private BigDecimal advancePayRatio;
|
||||
|
||||
/**
|
||||
* 尾款比例
|
||||
*/
|
||||
private BigDecimal balancePayRatio;
|
||||
|
||||
/**
|
||||
* 质保金比例
|
||||
*/
|
||||
private BigDecimal assuranceDepositRatio;
|
||||
|
||||
/**
|
||||
* 付款类型 1-月结算 2-形象节点
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 付款比例
|
||||
*/
|
||||
private BigDecimal payRatio;
|
||||
}
|
||||
|
@ -87,5 +87,28 @@ public class CtrIncomeContractVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 预付款比例
|
||||
*/
|
||||
private BigDecimal advancePayRatio;
|
||||
|
||||
/**
|
||||
* 尾款比例
|
||||
*/
|
||||
private BigDecimal balancePayRatio;
|
||||
|
||||
/**
|
||||
* 质保金比例
|
||||
*/
|
||||
private BigDecimal assuranceDepositRatio;
|
||||
|
||||
/**
|
||||
* 付款类型 1-月结算 2-形象节点
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 付款比例
|
||||
*/
|
||||
private BigDecimal payRatio;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ import org.dromara.design.service.IDesDesignChangeService;
|
||||
import org.dromara.design.service.IDesDrawingService;
|
||||
import org.dromara.design.service.IDesVolumeCatalogService;
|
||||
import org.dromara.design.service.IDesVolumeFileService;
|
||||
import org.dromara.facility.domain.FacMatrix;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
@ -277,6 +278,15 @@ public class DesDesignChangeServiceImpl extends ServiceImpl<DesDesignChangeMappe
|
||||
if (projectId != null && projectService.getById(projectId) == null) {
|
||||
throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
//编号不能重复
|
||||
List<DesDesignChange> list = list(Wrappers.lambdaQuery(DesDesignChange.class)
|
||||
.eq(DesDesignChange::getFormNo, entity.getFormNo())
|
||||
.eq(DesDesignChange::getProjectId, projectId)
|
||||
.ne(!create, DesDesignChange::getId, entity.getId())
|
||||
);
|
||||
if (!list.isEmpty()) {
|
||||
throw new ServiceException("编号已存在");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,9 +43,9 @@ public class BusSegmentedIndicatorPlanningController extends BaseController {
|
||||
@SaCheckPermission("tender:segmentedIndicatorPlanning:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusSegmentedIndicatorPlanningVo> list(BusSegmentedIndicatorPlanningBo bo, PageQuery pageQuery) {
|
||||
if (bo.getProjectId() == null) {
|
||||
throw new ServiceException("项目id不能为空");
|
||||
}
|
||||
// if (bo.getProjectId() == null) {
|
||||
// throw new ServiceException("项目id不能为空");
|
||||
// }
|
||||
if (bo.getDictName() == null) {
|
||||
throw new ServiceException("分包类型不能为空");
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
package org.dromara.tender.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/planFile")
|
||||
public class TenderPlanFileController extends BaseController {
|
||||
|
||||
// private final ITenderPlanFileService tenderPlanFileService;
|
||||
//
|
||||
// /**
|
||||
// * 查询招标计划-招标文件列表
|
||||
// */
|
||||
// @SaCheckPermission("/:planFile:list")
|
||||
// @GetMapping("/list")
|
||||
// public TableDataInfo<TenderPlanFileVo> list(TenderPlanFileBo bo, PageQuery pageQuery) {
|
||||
// return tenderPlanFileService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 导出招标计划-招标文件列表
|
||||
// */
|
||||
// @SaCheckPermission("/:planFile:export")
|
||||
// @Log(title = "招标计划-招标文件", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(TenderPlanFileBo bo, HttpServletResponse response) {
|
||||
// List<TenderPlanFileVo> list = tenderPlanFileService.queryList(bo);
|
||||
// ExcelUtil.exportExcel(list, "招标计划-招标文件", TenderPlanFileVo.class, response);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取招标计划-招标文件详细信息
|
||||
// *
|
||||
// * @param id 主键
|
||||
// */
|
||||
// @SaCheckPermission("/:planFile:query")
|
||||
// @GetMapping("/{id}")
|
||||
// public R<TenderPlanFileVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
// @PathVariable Long id) {
|
||||
// return R.ok(tenderPlanFileService.queryById(id));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增招标计划-招标文件
|
||||
// */
|
||||
// @SaCheckPermission("/:planFile:add")
|
||||
// @Log(title = "招标计划-招标文件", businessType = BusinessType.INSERT)
|
||||
// @RepeatSubmit()
|
||||
// @PostMapping()
|
||||
// public R<Void> add(@Validated(AddGroup.class) @RequestBody TenderPlanFileBo bo) {
|
||||
// return toAjax(tenderPlanFileService.insertByBo(bo));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改招标计划-招标文件
|
||||
// */
|
||||
// @SaCheckPermission("/:planFile:edit")
|
||||
// @Log(title = "招标计划-招标文件", businessType = BusinessType.UPDATE)
|
||||
// @RepeatSubmit()
|
||||
// @PutMapping()
|
||||
// public R<Void> edit(@Validated(EditGroup.class) @RequestBody TenderPlanFileBo bo) {
|
||||
// return toAjax(tenderPlanFileService.updateByBo(bo));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除招标计划-招标文件
|
||||
// *
|
||||
// * @param ids 主键串
|
||||
// */
|
||||
// @SaCheckPermission("/:planFile:remove")
|
||||
// @Log(title = "招标计划-招标文件", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
// @PathVariable Long[] ids) {
|
||||
// return toAjax(tenderPlanFileService.deleteWithValidByIds(List.of(ids), true));
|
||||
// }
|
||||
}
|
@ -2,10 +2,15 @@ package org.dromara.tender.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.cailiaoshebei.controller.constant;
|
||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -31,6 +36,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
* @author Lion Li
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -62,5 +63,24 @@ public class BusSegmentedIndicatorPlanning extends BaseEntity {
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 计划招标方式
|
||||
*/
|
||||
private String plannedBiddingMethod;
|
||||
|
||||
/**
|
||||
* 限价
|
||||
*/
|
||||
private BigDecimal limitPrice;
|
||||
|
||||
/**
|
||||
* 合同额
|
||||
*/
|
||||
private BigDecimal contractPrice;
|
||||
|
||||
/**
|
||||
* 中标通知书
|
||||
*/
|
||||
private String bidFile;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package org.dromara.tender.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件对象 tender_plan_file
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tender_plan_file")
|
||||
public class TenderPlanFile extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 招标计划ID(bus_segmented_indicator_planning)
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private Long fileId;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
|
||||
}
|
@ -32,6 +32,21 @@ public class TenderSupplierInput extends BaseEntity {
|
||||
*/
|
||||
private String supplierType;
|
||||
|
||||
/***
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
|
||||
/***
|
||||
* 供应商负责人
|
||||
*/
|
||||
private String supplierPerson;
|
||||
|
||||
/***
|
||||
* 负责人电话
|
||||
*/
|
||||
private String personPhone;
|
||||
|
||||
/***
|
||||
* 资料文件ID
|
||||
*/
|
||||
@ -42,5 +57,10 @@ public class TenderSupplierInput extends BaseEntity {
|
||||
*/
|
||||
private String inputFile;
|
||||
|
||||
/***
|
||||
* 审核状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
|
||||
}
|
||||
|
@ -36,8 +36,8 @@ public class BusSegmentedIndicatorPlanningBo extends BaseEntity {
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
// @NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// private Long projectId;
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,44 @@
|
||||
package org.dromara.tender.domain.bo;
|
||||
|
||||
import org.dromara.tender.domain.TenderPlanFile;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件业务对象 tender_plan_file
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TenderPlanFile.class, reverseConvertGenerate = false)
|
||||
public class TenderPlanFileBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 招标计划ID(bus_segmented_indicator_planning)
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private Long fileId;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
|
||||
}
|
@ -31,10 +31,30 @@ public class TenderSupplierInputBo extends BaseEntity {
|
||||
*/
|
||||
private String supplierType;
|
||||
|
||||
/***
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
|
||||
/***
|
||||
* 供应商负责人
|
||||
*/
|
||||
private String supplierPerson;
|
||||
|
||||
/***
|
||||
* 负责人电话
|
||||
*/
|
||||
private String personPhone;
|
||||
|
||||
/**
|
||||
* 入库资料
|
||||
*/
|
||||
private String inputFile;
|
||||
|
||||
/***
|
||||
* 审核状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ public class BusSegmentedIndicatorPlanningVo implements Serializable {
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ExcelProperty(value = "项目Id")
|
||||
private Long projectId;
|
||||
// @ExcelProperty(value = "项目Id")
|
||||
// private Long projectId;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,55 @@
|
||||
package org.dromara.tender.domain.vo;
|
||||
|
||||
import org.dromara.tender.domain.TenderPlanFile;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件视图对象 tender_plan_file
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TenderPlanFile.class)
|
||||
public class TenderPlanFileVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 招标计划ID(bus_segmented_indicator_planning)
|
||||
*/
|
||||
@ExcelProperty(value = "招标计划ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "b=us_segmented_indicator_planning")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private Long fileId;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
@ExcelProperty(value = "文件地址")
|
||||
private String fileUrl;
|
||||
|
||||
|
||||
}
|
@ -40,11 +40,34 @@ public class TenderSupplierInputVo implements Serializable {
|
||||
@ExcelProperty(value = "供应商类型")
|
||||
private String supplierType;
|
||||
|
||||
/***
|
||||
* 供应商名称
|
||||
*/
|
||||
@ExcelProperty(value = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/***
|
||||
* 供应商负责人
|
||||
*/
|
||||
@ExcelProperty(value = "供应商负责人")
|
||||
private String supplierPerson;
|
||||
|
||||
/***
|
||||
* 负责人电话
|
||||
*/
|
||||
@ExcelProperty(value = "负责人电话")
|
||||
private String personPhone;
|
||||
|
||||
/**
|
||||
* 入库资料
|
||||
*/
|
||||
@ExcelProperty(value = "入库资料")
|
||||
private String inputFile;
|
||||
|
||||
/***
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String state;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.tender.mapper;
|
||||
|
||||
import org.dromara.tender.domain.TenderPlanFile;
|
||||
import org.dromara.tender.domain.vo.TenderPlanFileVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
public interface TenderPlanFileMapper extends BaseMapperPlus<TenderPlanFile, TenderPlanFileVo> {
|
||||
|
||||
}
|
@ -7,6 +7,8 @@ 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;
|
||||
|
||||
|
@ -0,0 +1,70 @@
|
||||
package org.dromara.tender.service;
|
||||
|
||||
import org.dromara.tender.domain.vo.TenderPlanFileVo;
|
||||
import org.dromara.tender.domain.bo.TenderPlanFileBo;
|
||||
import org.dromara.tender.domain.TenderPlanFile;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
public interface ITenderPlanFileService extends IService<TenderPlanFile>{
|
||||
|
||||
/**
|
||||
* 查询招标计划-招标文件
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 招标计划-招标文件
|
||||
*/
|
||||
TenderPlanFileVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询招标计划-招标文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 招标计划-招标文件分页列表
|
||||
*/
|
||||
TableDataInfo<TenderPlanFileVo> queryPageList(TenderPlanFileBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的招标计划-招标文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 招标计划-招标文件列表
|
||||
*/
|
||||
List<TenderPlanFileVo> queryList(TenderPlanFileBo bo);
|
||||
|
||||
/**
|
||||
* 新增招标计划-招标文件
|
||||
*
|
||||
* @param bo 招标计划-招标文件
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TenderPlanFileBo bo);
|
||||
|
||||
/**
|
||||
* 修改招标计划-招标文件
|
||||
*
|
||||
* @param bo 招标计划-招标文件
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TenderPlanFileBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除招标计划-招标文件信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -18,7 +18,8 @@ import java.util.List;
|
||||
* @author Lion Li
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface ITenderSupplierInputService extends IService<TenderSupplierInput>{
|
||||
public interface
|
||||
ITenderSupplierInputService extends IService<TenderSupplierInput>{
|
||||
|
||||
/**
|
||||
* 查询供应商入库
|
||||
|
@ -89,7 +89,7 @@ public class BusSegmentedIndicatorPlanningServiceImpl extends ServiceImpl<BusSeg
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BusSegmentedIndicatorPlanning> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(BusSegmentedIndicatorPlanning::getPlannedBiddingTime);
|
||||
lqw.eq(bo.getProjectId() != null, BusSegmentedIndicatorPlanning::getProjectId, bo.getProjectId());
|
||||
// lqw.eq(bo.getProjectId() != null, BusSegmentedIndicatorPlanning::getProjectId, bo.getProjectId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDictName()), BusSegmentedIndicatorPlanning::getDictName, bo.getDictName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), BusSegmentedIndicatorPlanning::getName, bo.getName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContent()), BusSegmentedIndicatorPlanning::getContent, bo.getContent());
|
||||
|
@ -0,0 +1,133 @@
|
||||
package org.dromara.tender.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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.springframework.stereotype.Service;
|
||||
import org.dromara.tender.domain.bo.TenderPlanFileBo;
|
||||
import org.dromara.tender.domain.vo.TenderPlanFileVo;
|
||||
import org.dromara.tender.domain.TenderPlanFile;
|
||||
import org.dromara.tender.mapper.TenderPlanFileMapper;
|
||||
import org.dromara.tender.service.ITenderPlanFileService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 招标计划-招标文件Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TenderPlanFileServiceImpl extends ServiceImpl<TenderPlanFileMapper, TenderPlanFile> implements ITenderPlanFileService {
|
||||
|
||||
private final TenderPlanFileMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询招标计划-招标文件
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 招标计划-招标文件
|
||||
*/
|
||||
@Override
|
||||
public TenderPlanFileVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询招标计划-招标文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 招标计划-招标文件分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TenderPlanFileVo> queryPageList(TenderPlanFileBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TenderPlanFile> lqw = buildQueryWrapper(bo);
|
||||
Page<TenderPlanFileVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的招标计划-招标文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 招标计划-招标文件列表
|
||||
*/
|
||||
@Override
|
||||
public List<TenderPlanFileVo> queryList(TenderPlanFileBo bo) {
|
||||
LambdaQueryWrapper<TenderPlanFile> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TenderPlanFile> buildQueryWrapper(TenderPlanFileBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TenderPlanFile> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(TenderPlanFile::getId);
|
||||
lqw.eq(bo.getPlanId() != null, TenderPlanFile::getPlanId, bo.getPlanId());
|
||||
lqw.eq(bo.getFileId() != null, TenderPlanFile::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), TenderPlanFile::getFileUrl, bo.getFileUrl());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增招标计划-招标文件
|
||||
*
|
||||
* @param bo 招标计划-招标文件
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TenderPlanFileBo bo) {
|
||||
TenderPlanFile add = MapstructUtils.convert(bo, TenderPlanFile.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改招标计划-招标文件
|
||||
*
|
||||
* @param bo 招标计划-招标文件
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TenderPlanFileBo bo) {
|
||||
TenderPlanFile update = MapstructUtils.convert(bo, TenderPlanFile.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TenderPlanFile entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除招标计划-招标文件信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -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.cailiaoshebei.controller.constant;
|
||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||
import org.dromara.common.core.service.OssService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@ -11,6 +15,7 @@ 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.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -35,6 +40,7 @@ import static org.dromara.common.constant.MinioPathConstant.SupplierInput;
|
||||
* @author Lion Li
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TenderSupplierInputServiceImpl extends ServiceImpl<TenderSupplierInputMapper, TenderSupplierInput> implements ITenderSupplierInputService {
|
||||
@ -97,9 +103,9 @@ public class TenderSupplierInputServiceImpl extends ServiceImpl<TenderSupplierIn
|
||||
@Override
|
||||
public Boolean insertByBo(TenderSupplierInputBo bo, MultipartFile file) {
|
||||
TenderSupplierInput add = MapstructUtils.convert(bo, TenderSupplierInput.class);
|
||||
SysOssUploadVo sysOssUploadVo = ossService.uploadWithNoSave(file, ossService.minioFileName(SupplierInput, file));
|
||||
add.setInputFile(sysOssUploadVo.getUrl());
|
||||
add.setFileId(Long.valueOf(sysOssUploadVo.getOssId()));
|
||||
SysOssVo upload = ossService.upload(file, ossService.minioFileName(SupplierInput, file));
|
||||
add.setInputFile(upload.getUrl());
|
||||
add.setFileId(Long.valueOf(upload.getOssId()));
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@ -120,7 +126,7 @@ public class TenderSupplierInputServiceImpl extends ServiceImpl<TenderSupplierIn
|
||||
TenderSupplierInput byId = getById(update.getId());
|
||||
ossService.deleteWithValidByIds(List.of(byId.getFileId()), false);
|
||||
|
||||
SysOssUploadVo sysOssUploadVo = ossService.uploadWithNoSave(file, ossService.minioFileName(SupplierInput, file));
|
||||
SysOssVo sysOssUploadVo = ossService.upload(file, ossService.minioFileName(SupplierInput, file));
|
||||
update.setInputFile(sysOssUploadVo.getUrl());
|
||||
update.setFileId(Long.valueOf(sysOssUploadVo.getOssId()));
|
||||
validEntityBeforeSave(update);
|
||||
@ -152,8 +158,35 @@ public class TenderSupplierInputServiceImpl extends ServiceImpl<TenderSupplierIn
|
||||
fileIds.add(byId.getFileId());
|
||||
}
|
||||
}
|
||||
if (!fileIds.isEmpty()) {
|
||||
ossService.deleteWithValidByIds(fileIds, false);
|
||||
}
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('"+ constant.SUPPLIER_INPUT+"')")
|
||||
public void processPlansHandler(ProcessEvent processEvent) {
|
||||
log.info("物资计划审核任务执行了{}", processEvent.toString());
|
||||
TenderSupplierInput byId = getById(processEvent.getBusinessId());
|
||||
byId.setState(processEvent.getStatus());
|
||||
boolean b = updateById(byId);
|
||||
if (!b){
|
||||
log.error("更改供应商入库状态失败");
|
||||
}
|
||||
// String batchNumber = processEvent.getBusinessId().split("_")[0];
|
||||
// //1、根据批次ID改编审核状态
|
||||
// BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici().setApprovalPlan(processEvent.getStatus());
|
||||
// busCailiaoshebeiPiciService.update(busCailiaoshebeiPici, new LambdaQueryWrapper<BusCailiaoshebeiPici>()
|
||||
// .eq(BusCailiaoshebeiPici::getBatchNumber, batchNumber));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user