08-20-供应商入库增加字段,完成招标计划

This commit is contained in:
2025-08-20 20:39:36 +08:00
parent 7e885a5eb1
commit b295b09fe9
6 changed files with 500 additions and 39 deletions

View File

@ -0,0 +1,132 @@
package org.dromara.tender.controller;
import java.util.ArrayList;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.dromara.system.domain.vo.SysOssVo;
import org.dromara.system.service.ISysOssService;
import org.dromara.system.service.impl.SysOssServiceImpl;
import org.dromara.tender.domain.TenderPlanFile;
import org.dromara.tender.service.impl.TenderPlanFileServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.common.log.annotation.Log;
import org.dromara.common.web.core.BaseController;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.tender.domain.vo.BusSegmentedIndicatorPlanningVo;
import org.dromara.tender.domain.bo.BusSegmentedIndicatorPlanningBo;
import org.dromara.tender.service.IBusSegmentedIndicatorPlanningService;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 招标计划
*
* @author Lion Li
* @date 2025-08-20
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/plan/plan")
public class TenderPlanController extends BaseController {
private final IBusSegmentedIndicatorPlanningService busSegmentedIndicatorPlanningService;
@Autowired private SysOssServiceImpl sysOssService;
@Autowired private TenderPlanFileServiceImpl tenderPlanFileService;
/**
* 查询招标计划列表
*/
@SaCheckPermission("plan:plan:list")
@GetMapping("/list")
public TableDataInfo<BusSegmentedIndicatorPlanningVo> list(BusSegmentedIndicatorPlanningBo bo, PageQuery pageQuery) {
return busSegmentedIndicatorPlanningService.queryPageList(bo, pageQuery);
}
/**
* 导出招标计划列表
*/
// @SaCheckPermission("plan:plan:export")
// @Log(title = "招标计划", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(BusSegmentedIndicatorPlanningBo bo, HttpServletResponse response) {
// List<BusSegmentedIndicatorPlanningVo> list = busSegmentedIndicatorPlanningService.queryList(bo);
// ExcelUtil.exportExcel(list, "招标计划", BusSegmentedIndicatorPlanningVo.class, response);
// }
/**
* 获取招标计划详细信息
*
* @param id 主键
*/
@SaCheckPermission("plan:plan:query")
@GetMapping("/{id}")
public R<BusSegmentedIndicatorPlanningVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(busSegmentedIndicatorPlanningService.queryById(id));
}
/**
* 新增招标计划
*/
// @SaCheckPermission("plan:plan:add")
// @Log(title = "招标计划", businessType = BusinessType.INSERT)
// @RepeatSubmit()
// @PostMapping()
// public R<Void> add(@Validated(AddGroup.class) @RequestBody BusSegmentedIndicatorPlanningBo bo) {
// return toAjax(busSegmentedIndicatorPlanningService.insertByBo(bo));
// }
/**
* 修改招标计划
*/
@Transactional
@SaCheckPermission("plan:plan:edit")
@Log(title = "招标计划", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@RequestBody BusSegmentedIndicatorPlanningBo bo, @RequestParam(value = "files", required = false) List<MultipartFile> files) {
if ( files != null &&!files.isEmpty()){
List<TenderPlanFile> tenderPlanFiles = new ArrayList<>();
for (MultipartFile file : files) {
SysOssVo upload = sysOssService.upload(file);
TenderPlanFile tenderPlanFile = new TenderPlanFile();
tenderPlanFile.setFileId(upload.getOssId());
tenderPlanFile.setFileUrl(upload.getUrl());
tenderPlanFile.setPlanId(bo.getId());
tenderPlanFiles.add(tenderPlanFile);
}
boolean b = tenderPlanFileService.saveBatch(tenderPlanFiles);
if (!b){
throw new RuntimeException("保存多个文件失败");
}
}
return toAjax(busSegmentedIndicatorPlanningService.updateByBo(bo));
}
/**
* 删除招标计划
*
* @param ids 主键串
*/
// @SaCheckPermission("plan:plan:remove")
// @Log(title = "招标计划", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public R<Void> remove(@NotEmpty(message = "主键不能为空")
// @PathVariable Long[] ids) {
// return toAjax(busSegmentedIndicatorPlanningService.deleteWithValidByIds(List.of(ids), true));
// }
}

View File

@ -4,6 +4,8 @@ import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial;
@ -11,7 +13,7 @@ import java.io.Serial;
* 供应商入库对象 tender_supplier_input
*
* @author Lion Li
* @date 2025-08-19
* @date 2025-08-20
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ -22,33 +24,118 @@ public class TenderSupplierInput extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*
*/
@TableId(value = "id")
private Long id;
/**
* 供应商类型
* 企业登记注册类型
*/
private String supplierType;
/***
* 供应商名称
/**
* 企业名称
*/
private String supplierName;
/***
* 供应商负责
/**
* 企业法定代表
*/
private String supplierPerson;
/***
* 负责人电话
/**
* 统一社会信用代码
*/
private String supplierCode;
/**
* 企业注册地址
*/
private String supplierAddres;
/**
* 负责人姓名
*/
private String personName;
/**
* 负责人联系电话
*/
private String personPhone;
/***
* 资料文件ID
/**
* 开户行户名
*/
private String bankPersonName;
/**
* 开户银行
*/
private String bankName;
/**
* 开户行账号
*/
private String bankAccount;
/**
* 纳税规模
*/
private String taxScale;
/**
* 经营范围
*/
private String scope;
/**
* 企业资质等级
*/
private String supplierLivel;
/**
* 发证日期
*/
private Date issueDate;
/**
* 证书有效期
*/
private Date certificateValidity;
/**
* 近三年营业额
*/
private String pastThreeYears;
/**
* 安全生产许可证编号
*/
private String safeCode;
/**
* 安全生产许可证发证日期
*/
private Date safeCodeData;
/**
* 证书有效期
*/
private String safeCertificateValidity;
/**
* 注册注册人员的数量
*/
private String registeredNumber;
/**
* 职称人员数量
*/
private String personnelNumber;
/**
* 存储文件ID
*/
private Long fileId;
@ -57,7 +144,7 @@ public class TenderSupplierInput extends BaseEntity {
*/
private String inputFile;
/***
/**
* 审核状态
*/
private String state;

View File

@ -68,6 +68,26 @@ public class BusSegmentedIndicatorPlanningBo extends BaseEntity {
private String content;
/**
* 计划招标方式
*/
private String plannedBiddingMethod;
/**
* 限价
*/
private BigDecimal limitPrice;
/**
* 合同额
*/
private BigDecimal contractPrice;
/**
* 中标通知书
*/
private String bidFile;
/**
* 限价一览表ids
*/

View File

@ -2,18 +2,18 @@ package org.dromara.tender.domain.bo;
import org.dromara.tender.domain.TenderSupplierInput;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
/**
* 供应商入库业务对象 tender_supplier_input
*
* @author Lion Li
* @date 2025-08-19
* @date 2025-08-20
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ -27,31 +27,121 @@ public class TenderSupplierInputBo extends BaseEntity {
private Long id;
/**
* 供应商类型
* 企业登记注册类型
*/
private String supplierType;
/***
* 供应商名称
/**
* 企业名称
*/
private String supplierName;
/***
* 供应商负责
/**
* 企业法定代表
*/
private String supplierPerson;
/***
* 负责人电话
/**
* 统一社会信用代码
*/
private String supplierCode;
/**
* 企业注册地址
*/
private String supplierAddres;
/**
* 负责人姓名
*/
private String personName;
/**
* 负责人联系电话
*/
private String personPhone;
/**
* 开户行户名
*/
private String bankPersonName;
/**
* 开户银行
*/
private String bankName;
/**
* 开户行账号
*/
private String bankAccount;
/**
* 纳税规模
*/
private String taxScale;
/**
* 经营范围
*/
private String scope;
/**
* 企业资质等级
*/
private String supplierLivel;
/**
* 发证日期
*/
private Date issueDate;
/**
* 证书有效期
*/
private Date certificateValidity;
/**
* 近三年营业额
*/
private String pastThreeYears;
/**
* 安全生产许可证编号
*/
private String safeCode;
/**
* 安全生产许可证发证日期
*/
private Date safeCodeData;
/**
* 证书有效期
*/
private String safeCertificateValidity;
/**
* 注册注册人员的数量
*/
private String registeredNumber;
/**
* 职称人员数量
*/
private String personnelNumber;
/**
* 存储文件ID
*/
private Long fileId;
/**
* 入库资料
*/
private String inputFile;
/***
/**
* 审核状态
*/
private String state;

View File

@ -76,4 +76,29 @@ public class BusSegmentedIndicatorPlanningVo implements Serializable {
private String content;
/**
* 计划招标方式
*/
@ExcelProperty(value = "计划招标方式")
private String plannedBiddingMethod;
/**
* 限价
*/
@ExcelProperty(value = "限价")
private BigDecimal limitPrice;
/**
* 合同额
*/
@ExcelProperty(value = "合同额")
private BigDecimal contractPrice;
/**
* 中标通知书
*/
@ExcelProperty(value = "中标通知书")
private String bidFile;
}

View File

@ -1,24 +1,22 @@
package org.dromara.tender.domain.vo;
import java.util.Date;
import org.dromara.tender.domain.TenderSupplierInput;
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;
import java.util.Date;
/**
* 供应商入库视图对象 tender_supplier_input
*
* @author Lion Li
* @date 2025-08-19
* @date 2025-08-20
*/
@Data
@ExcelIgnoreUnannotated
@ -35,39 +33,148 @@ public class TenderSupplierInputVo implements Serializable {
private Long id;
/**
* 供应商类型
* 企业登记注册类型
*/
@ExcelProperty(value = "供应商类型")
@ExcelProperty(value = "企业登记注册类型")
private String supplierType;
/***
* 供应商名称
/**
* 企业名称
*/
@ExcelProperty(value = "供应商名称")
@ExcelProperty(value = "企业名称")
private String supplierName;
/***
* 供应商负责
/**
* 企业法定代表
*/
@ExcelProperty(value = "供应商负责")
@ExcelProperty(value = "企业法定代表")
private String supplierPerson;
/***
* 负责人电话
/**
* 统一社会信用代码
*/
@ExcelProperty(value = "负责人电话")
@ExcelProperty(value = "统一社会信用代码")
private String supplierCode;
/**
* 企业注册地址
*/
@ExcelProperty(value = "企业注册地址")
private String supplierAddres;
/**
* 负责人姓名
*/
@ExcelProperty(value = "负责人姓名")
private String personName;
/**
* 负责人联系电话
*/
@ExcelProperty(value = "负责人联系电话")
private String personPhone;
/**
* 开户行户名
*/
@ExcelProperty(value = "开户行户名")
private String bankPersonName;
/**
* 开户银行
*/
@ExcelProperty(value = "开户银行")
private String bankName;
/**
* 开户行账号
*/
@ExcelProperty(value = "开户行账号")
private String bankAccount;
/**
* 纳税规模
*/
@ExcelProperty(value = "纳税规模")
private String taxScale;
/**
* 经营范围
*/
@ExcelProperty(value = "经营范围")
private String scope;
/**
* 企业资质等级
*/
@ExcelProperty(value = "企业资质等级")
private String supplierLivel;
/**
* 发证日期
*/
@ExcelProperty(value = "发证日期")
private Date issueDate;
/**
* 证书有效期
*/
@ExcelProperty(value = "证书有效期")
private Date certificateValidity;
/**
* 近三年营业额
*/
@ExcelProperty(value = "近三年营业额")
private String pastThreeYears;
/**
* 安全生产许可证编号
*/
@ExcelProperty(value = "安全生产许可证编号")
private String safeCode;
/**
* 安全生产许可证发证日期
*/
@ExcelProperty(value = "安全生产许可证发证日期")
private Date safeCodeData;
/**
* 证书有效期
*/
@ExcelProperty(value = "证书有效期")
private String safeCertificateValidity;
/**
* 注册注册人员的数量
*/
@ExcelProperty(value = "注册注册人员的数量")
private String registeredNumber;
/**
* 职称人员数量
*/
@ExcelProperty(value = "职称人员数量")
private String personnelNumber;
/**
* 存储文件ID
*/
@ExcelProperty(value = "存储文件ID")
private Long fileId;
/**
* 入库资料
*/
@ExcelProperty(value = "入库资料")
private String inputFile;
/***
/**
* 审核状态
*/
@ExcelProperty(value = "审核状态")
private String state;
}