招采管理模块
This commit is contained in:
@ -5,7 +5,9 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.bidding.domain.bo.BusBiddingLimitListBo;
|
import org.dromara.bidding.domain.bo.BusBiddingLimitListBo;
|
||||||
|
import org.dromara.bidding.domain.bo.BiddingAllVersionNumbersReq;
|
||||||
import org.dromara.bidding.domain.vo.BusBiddingLimitListVo;
|
import org.dromara.bidding.domain.vo.BusBiddingLimitListVo;
|
||||||
|
import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo;
|
||||||
import org.dromara.bidding.service.IBusBiddingLimitListService;
|
import org.dromara.bidding.service.IBusBiddingLimitListService;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
@ -57,7 +59,7 @@ public class BusBiddingLimitListController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("bidding:biddingLimitList:obtainAllVersionNumbers")
|
@SaCheckPermission("bidding:biddingLimitList:obtainAllVersionNumbers")
|
||||||
@GetMapping("/obtainAllVersionNumbers")
|
@GetMapping("/obtainAllVersionNumbers")
|
||||||
public R<List<String>> obtainAllVersionNumbers(BusBiddingLimitListBo bo) {
|
public R<List<BusBiddingLimitVersionsVo>> obtainAllVersionNumbers(BiddingAllVersionNumbersReq bo) {
|
||||||
return R.ok(busBiddingLimitListService.obtainAllVersionNumbers(bo));
|
return R.ok(busBiddingLimitListService.obtainAllVersionNumbers(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.bidding.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本- 投标版本对象 bus_bidding_limit_versions
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bus_bidding_limit_versions")
|
||||||
|
public class BusBiddingLimitVersions extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型(字典)
|
||||||
|
*/
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel文件
|
||||||
|
*/
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package org.dromara.bidding.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class BiddingAllVersionNumbersReq implements Serializable {
|
||||||
|
/**
|
||||||
|
* 工单类型(字典)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单类型(字典)不能为空")
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package org.dromara.bidding.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.bidding.domain.BusBiddingLimitVersions;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本- 投标版本业务对象 bus_bidding_limit_versions
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BusBiddingLimitVersions.class, reverseConvertGenerate = false)
|
||||||
|
public class BusBiddingLimitVersionsBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型(字典)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单类型(字典)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "版本号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel文件
|
||||||
|
*/
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.bidding.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.bidding.domain.BusBiddingLimitVersions;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本- 投标版本视图对象 bus_bidding_limit_versions
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BusBiddingLimitVersions.class)
|
||||||
|
public class BusBiddingLimitVersionsVo 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 workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "版本号")
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel文件
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "excel文件")
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "流程审核状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.bidding.mapper;
|
||||||
|
|
||||||
|
import org.dromara.bidding.domain.BusBiddingLimitVersions;
|
||||||
|
import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本- 投标版本Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface BusBiddingLimitVersionsMapper extends BaseMapperPlus<BusBiddingLimitVersions, BusBiddingLimitVersionsVo> {
|
||||||
|
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
package org.dromara.bidding.service;
|
package org.dromara.bidding.service;
|
||||||
|
|
||||||
|
import org.dromara.bidding.domain.bo.BiddingAllVersionNumbersReq;
|
||||||
import org.dromara.bidding.domain.vo.BusBiddingLimitListVo;
|
import org.dromara.bidding.domain.vo.BusBiddingLimitListVo;
|
||||||
import org.dromara.bidding.domain.bo.BusBiddingLimitListBo;
|
import org.dromara.bidding.domain.bo.BusBiddingLimitListBo;
|
||||||
import org.dromara.bidding.domain.BusBiddingLimitList;
|
import org.dromara.bidding.domain.BusBiddingLimitList;
|
||||||
|
import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
@ -79,7 +81,7 @@ public interface IBusBiddingLimitListService extends IService<BusBiddingLimitLis
|
|||||||
|
|
||||||
Boolean importExcelFile(Long projectId, MultipartFile file);
|
Boolean importExcelFile(Long projectId, MultipartFile file);
|
||||||
|
|
||||||
List<String> obtainAllVersionNumbers(BusBiddingLimitListBo bo);
|
List<BusBiddingLimitVersionsVo> obtainAllVersionNumbers(BiddingAllVersionNumbersReq bo);
|
||||||
|
|
||||||
List<String> sheetList(BusBiddingLimitListBo bo);
|
List<String> sheetList(BusBiddingLimitListBo bo);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.bidding.service;
|
||||||
|
|
||||||
|
import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo;
|
||||||
|
import org.dromara.bidding.domain.bo.BusBiddingLimitVersionsBo;
|
||||||
|
import org.dromara.bidding.domain.BusBiddingLimitVersions;
|
||||||
|
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-21
|
||||||
|
*/
|
||||||
|
public interface IBusBiddingLimitVersionsService extends IService<BusBiddingLimitVersions>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成本- 投标版本
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 成本- 投标版本
|
||||||
|
*/
|
||||||
|
BusBiddingLimitVersionsVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询成本- 投标版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 成本- 投标版本分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BusBiddingLimitVersionsVo> queryPageList(BusBiddingLimitVersionsBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的成本- 投标版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 成本- 投标版本列表
|
||||||
|
*/
|
||||||
|
List<BusBiddingLimitVersionsVo> queryList(BusBiddingLimitVersionsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成本- 投标版本
|
||||||
|
*
|
||||||
|
* @param bo 成本- 投标版本
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BusBiddingLimitVersionsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成本- 投标版本
|
||||||
|
*
|
||||||
|
* @param bo 成本- 投标版本
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BusBiddingLimitVersionsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除成本- 投标版本信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
@ -9,9 +9,13 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.bidding.domain.BusBiddingLimitList;
|
import org.dromara.bidding.domain.BusBiddingLimitList;
|
||||||
import org.dromara.bidding.domain.bo.BusBiddingLimitListBo;
|
import org.dromara.bidding.domain.bo.BusBiddingLimitListBo;
|
||||||
|
import org.dromara.bidding.domain.bo.BusBiddingLimitVersionsBo;
|
||||||
|
import org.dromara.bidding.domain.bo.BiddingAllVersionNumbersReq;
|
||||||
import org.dromara.bidding.domain.vo.BusBiddingLimitListVo;
|
import org.dromara.bidding.domain.vo.BusBiddingLimitListVo;
|
||||||
|
import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo;
|
||||||
import org.dromara.bidding.mapper.BusBiddingLimitListMapper;
|
import org.dromara.bidding.mapper.BusBiddingLimitListMapper;
|
||||||
import org.dromara.bidding.service.IBusBiddingLimitListService;
|
import org.dromara.bidding.service.IBusBiddingLimitListService;
|
||||||
|
import org.dromara.bidding.service.IBusBiddingLimitVersionsService;
|
||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
@ -19,6 +23,7 @@ import org.dromara.common.core.utils.StringUtils;
|
|||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@ -39,6 +44,9 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class BusBiddingLimitListServiceImpl extends ServiceImpl<BusBiddingLimitListMapper, BusBiddingLimitList> implements IBusBiddingLimitListService {
|
public class BusBiddingLimitListServiceImpl extends ServiceImpl<BusBiddingLimitListMapper, BusBiddingLimitList> implements IBusBiddingLimitListService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBusBiddingLimitVersionsService busBiddingLimitVersionsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询成本-投标
|
* 查询成本-投标
|
||||||
*
|
*
|
||||||
@ -205,16 +213,15 @@ public class BusBiddingLimitListServiceImpl extends ServiceImpl<BusBiddingLimitL
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> obtainAllVersionNumbers(BusBiddingLimitListBo bo) {
|
public List<BusBiddingLimitVersionsVo> obtainAllVersionNumbers(BiddingAllVersionNumbersReq bo) {
|
||||||
List<BusBiddingLimitList> busBiddingLimitLists = baseMapper.selectList(new LambdaQueryWrapper<BusBiddingLimitList>()
|
|
||||||
.select(BusBiddingLimitList::getVersions)
|
BusBiddingLimitVersionsBo biddingLimitVersionsBo = new BusBiddingLimitVersionsBo();
|
||||||
.eq(bo.getProjectId() != null, BusBiddingLimitList::getProjectId, bo.getProjectId())
|
biddingLimitVersionsBo.setProjectId(bo.getProjectId());
|
||||||
.orderByDesc(BusBiddingLimitList::getCreateTime)
|
biddingLimitVersionsBo.setWorkOrderType(bo.getWorkOrderType());
|
||||||
.groupBy(BusBiddingLimitList::getVersions));
|
|
||||||
return busBiddingLimitLists.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.map(BusBiddingLimitList::getVersions)
|
return busBiddingLimitVersionsService.queryList(biddingLimitVersionsBo);
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,134 @@
|
|||||||
|
package org.dromara.bidding.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.bidding.domain.bo.BusBiddingLimitVersionsBo;
|
||||||
|
import org.dromara.bidding.domain.vo.BusBiddingLimitVersionsVo;
|
||||||
|
import org.dromara.bidding.domain.BusBiddingLimitVersions;
|
||||||
|
import org.dromara.bidding.mapper.BusBiddingLimitVersionsMapper;
|
||||||
|
import org.dromara.bidding.service.IBusBiddingLimitVersionsService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本- 投标版本Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BusBiddingLimitVersionsServiceImpl extends ServiceImpl<BusBiddingLimitVersionsMapper, BusBiddingLimitVersions> implements IBusBiddingLimitVersionsService {
|
||||||
|
|
||||||
|
private final BusBiddingLimitVersionsMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成本- 投标版本
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 成本- 投标版本
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusBiddingLimitVersionsVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询成本- 投标版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 成本- 投标版本分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BusBiddingLimitVersionsVo> queryPageList(BusBiddingLimitVersionsBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BusBiddingLimitVersions> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BusBiddingLimitVersionsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的成本- 投标版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 成本- 投标版本列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusBiddingLimitVersionsVo> queryList(BusBiddingLimitVersionsBo bo) {
|
||||||
|
LambdaQueryWrapper<BusBiddingLimitVersions> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BusBiddingLimitVersions> buildQueryWrapper(BusBiddingLimitVersionsBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BusBiddingLimitVersions> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(BusBiddingLimitVersions::getCreateTime);
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusBiddingLimitVersions::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getWorkOrderType()), BusBiddingLimitVersions::getWorkOrderType, bo.getWorkOrderType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getExcelFile()), BusBiddingLimitVersions::getExcelFile, bo.getExcelFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BusBiddingLimitVersions::getStatus, bo.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成本- 投标版本
|
||||||
|
*
|
||||||
|
* @param bo 成本- 投标版本
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BusBiddingLimitVersionsBo bo) {
|
||||||
|
BusBiddingLimitVersions add = MapstructUtils.convert(bo, BusBiddingLimitVersions.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成本- 投标版本
|
||||||
|
*
|
||||||
|
* @param bo 成本- 投标版本
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BusBiddingLimitVersionsBo bo) {
|
||||||
|
BusBiddingLimitVersions update = MapstructUtils.convert(bo, BusBiddingLimitVersions.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BusBiddingLimitVersions entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除成本- 投标版本信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
@ -6,10 +6,8 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import org.dromara.design.domain.bo.ImportExcelFileReq;
|
import org.dromara.tender.domain.bo.TenderAllVersionNumbersReq;
|
||||||
import org.dromara.design.domain.bo.ObtainAllVersionNumbersReq;
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
import org.dromara.design.domain.bo.SheetListReq;
|
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
|
||||||
import org.dromara.tender.enums.LimitListTypeEnum;
|
import org.dromara.tender.enums.LimitListTypeEnum;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -18,14 +16,12 @@ import org.dromara.common.log.annotation.Log;
|
|||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.core.domain.R;
|
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.core.validate.EditGroup;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
||||||
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
||||||
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,17 +60,17 @@ public class BusBillofquantitiesLimitListController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取所有版本号
|
* 获取所有版本号
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:billofquantitiesLimitList:obtainAllVersionNumbers")
|
@SaCheckPermission("tender:billofquantitiesLimitList:obtainAllVersionNumbers")
|
||||||
@GetMapping("/obtainAllVersionNumbers")
|
@GetMapping("/obtainAllVersionNumbers")
|
||||||
public R<List<String>> obtainAllVersionNumbers(BusBillofquantitiesLimitListBo bo) {
|
public R<List<BusBLimitListVersionsVo>> obtainAllVersionNumbers(TenderAllVersionNumbersReq bo) {
|
||||||
bo.setType(LimitListTypeEnum.COMPANY.getCode());
|
bo.setWorkOrderType(LimitListTypeEnum.COMPANY.getCode());
|
||||||
return R.ok(busBillofquantitiesLimitListService.obtainAllVersionNumbers(bo));
|
return R.ok(busBillofquantitiesLimitListService.obtainAllVersionNumbers(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定版本的sheet
|
* 获取指定版本的sheet
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:billofquantitiesLimitList:sheetList")
|
@SaCheckPermission("tender:billofquantitiesLimitList:sheetList")
|
||||||
@GetMapping("/sheetList")
|
@GetMapping("/sheetList")
|
||||||
public R<List<String>> sheetList(BusBillofquantitiesLimitListBo bo) {
|
public R<List<String>> sheetList(BusBillofquantitiesLimitListBo bo) {
|
||||||
bo.setType(LimitListTypeEnum.COMPANY.getCode());
|
bo.setType(LimitListTypeEnum.COMPANY.getCode());
|
||||||
|
@ -14,8 +14,9 @@ import org.dromara.common.log.enums.BusinessType;
|
|||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
||||||
|
import org.dromara.tender.domain.bo.TenderAllVersionNumbersReq;
|
||||||
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
||||||
import org.dromara.tender.enums.LimitListTypeEnum;
|
|
||||||
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -57,16 +58,16 @@ public class BusTenderPlanLimitListController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取所有版本号
|
* 获取所有版本号
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:tenderPlanLimitList:obtainAllVersionNumbers")
|
@SaCheckPermission("tender:tenderPlanLimitList:obtainAllVersionNumbers")
|
||||||
@GetMapping("/obtainAllVersionNumbers")
|
@GetMapping("/obtainAllVersionNumbers")
|
||||||
public R<List<String>> obtainAllVersionNumbers(BusBillofquantitiesLimitListBo bo) {
|
public R<List<BusBLimitListVersionsVo>> obtainAllVersionNumbers(TenderAllVersionNumbersReq bo) {
|
||||||
return R.ok(busBillofquantitiesLimitListService.obtainAllVersionNumbers(bo));
|
return R.ok(busBillofquantitiesLimitListService.obtainAllVersionNumbers(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定版本的sheet
|
* 获取指定版本的sheet
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("design:tenderPlanLimitList:sheetList")
|
@SaCheckPermission("tender:tenderPlanLimitList:sheetList")
|
||||||
@GetMapping("/sheetList")
|
@GetMapping("/sheetList")
|
||||||
public R<List<String>> sheetList(BusBillofquantitiesLimitListBo bo) {
|
public R<List<String>> sheetList(BusBillofquantitiesLimitListBo bo) {
|
||||||
return R.ok(busBillofquantitiesLimitListService.sheetList(bo));
|
return R.ok(busBillofquantitiesLimitListService.sheetList(bo));
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本-限价版本对象 bus_b_limit_list_versions
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("bus_b_limit_list_versions")
|
||||||
|
public class BusBLimitListVersions extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型(字典)
|
||||||
|
*/
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel文件
|
||||||
|
*/
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package org.dromara.tender.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.tender.domain.BusBLimitListVersions;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本-限价版本业务对象 bus_b_limit_list_versions
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BusBLimitListVersions.class, reverseConvertGenerate = false)
|
||||||
|
public class BusBLimitListVersionsBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型(字典)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单类型(字典)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "版本号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel文件
|
||||||
|
*/
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.tender.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class TenderAllVersionNumbersReq implements Serializable {
|
||||||
|
/**
|
||||||
|
* 工单类型(字典)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单类型(字典)不能为空")
|
||||||
|
private String workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.tender.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.tender.domain.BusBLimitListVersions;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本-限价版本视图对象 bus_b_limit_list_versions
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BusBLimitListVersions.class)
|
||||||
|
public class BusBLimitListVersionsVo 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 workOrderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "版本号")
|
||||||
|
private String versions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* excel文件
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "excel文件")
|
||||||
|
private String excelFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程审核状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "流程审核状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.tender.mapper;
|
||||||
|
|
||||||
|
import org.dromara.tender.domain.BusBLimitListVersions;
|
||||||
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本-限价版本Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface BusBLimitListVersionsMapper extends BaseMapperPlus<BusBLimitListVersions, BusBLimitListVersionsVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.tender.service;
|
||||||
|
|
||||||
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
|
import org.dromara.tender.domain.bo.BusBLimitListVersionsBo;
|
||||||
|
import org.dromara.tender.domain.BusBLimitListVersions;
|
||||||
|
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-21
|
||||||
|
*/
|
||||||
|
public interface IBusBLimitListVersionsService extends IService<BusBLimitListVersions>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成本-限价版本
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 成本-限价版本
|
||||||
|
*/
|
||||||
|
BusBLimitListVersionsVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询成本-限价版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 成本-限价版本分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BusBLimitListVersionsVo> queryPageList(BusBLimitListVersionsBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的成本-限价版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 成本-限价版本列表
|
||||||
|
*/
|
||||||
|
List<BusBLimitListVersionsVo> queryList(BusBLimitListVersionsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成本-限价版本
|
||||||
|
*
|
||||||
|
* @param bo 成本-限价版本
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BusBLimitListVersionsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成本-限价版本
|
||||||
|
*
|
||||||
|
* @param bo 成本-限价版本
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BusBLimitListVersionsBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除成本-限价版本信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.tender.service;
|
package org.dromara.tender.service;
|
||||||
|
|
||||||
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
|
import org.dromara.tender.domain.bo.TenderAllVersionNumbersReq;
|
||||||
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
||||||
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
||||||
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
|
||||||
@ -80,7 +81,7 @@ public interface IBusBillofquantitiesLimitListService extends IService<BusBillof
|
|||||||
/**
|
/**
|
||||||
* 获取所有版本号
|
* 获取所有版本号
|
||||||
*/
|
*/
|
||||||
List<String> obtainAllVersionNumbers(BusBillofquantitiesLimitListBo bo);
|
List<BusBLimitListVersionsVo> obtainAllVersionNumbers(TenderAllVersionNumbersReq bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定版本的sheet
|
* 获取指定版本的sheet
|
||||||
|
@ -0,0 +1,135 @@
|
|||||||
|
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.BusBLimitListVersionsBo;
|
||||||
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
|
import org.dromara.tender.domain.BusBLimitListVersions;
|
||||||
|
import org.dromara.tender.mapper.BusBLimitListVersionsMapper;
|
||||||
|
import org.dromara.tender.service.IBusBLimitListVersionsService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本-限价版本Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-08-21
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BusBLimitListVersionsServiceImpl extends ServiceImpl<BusBLimitListVersionsMapper, BusBLimitListVersions> implements IBusBLimitListVersionsService {
|
||||||
|
|
||||||
|
private final BusBLimitListVersionsMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成本-限价版本
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 成本-限价版本
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusBLimitListVersionsVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询成本-限价版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 成本-限价版本分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BusBLimitListVersionsVo> queryPageList(BusBLimitListVersionsBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BusBLimitListVersions> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BusBLimitListVersionsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的成本-限价版本列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 成本-限价版本列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusBLimitListVersionsVo> queryList(BusBLimitListVersionsBo bo) {
|
||||||
|
LambdaQueryWrapper<BusBLimitListVersions> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BusBLimitListVersions> buildQueryWrapper(BusBLimitListVersionsBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BusBLimitListVersions> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(BusBLimitListVersions::getId);
|
||||||
|
lqw.eq(bo.getProjectId() != null, BusBLimitListVersions::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getWorkOrderType()), BusBLimitListVersions::getWorkOrderType, bo.getWorkOrderType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getVersions()), BusBLimitListVersions::getVersions, bo.getVersions());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getExcelFile()), BusBLimitListVersions::getExcelFile, bo.getExcelFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BusBLimitListVersions::getStatus, bo.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成本-限价版本
|
||||||
|
*
|
||||||
|
* @param bo 成本-限价版本
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BusBLimitListVersionsBo bo) {
|
||||||
|
BusBLimitListVersions add = MapstructUtils.convert(bo, BusBLimitListVersions.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成本-限价版本
|
||||||
|
*
|
||||||
|
* @param bo 成本-限价版本
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BusBLimitListVersionsBo bo) {
|
||||||
|
BusBLimitListVersions update = MapstructUtils.convert(bo, BusBLimitListVersions.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BusBLimitListVersions 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,10 +1,8 @@
|
|||||||
package org.dromara.tender.service.impl;
|
package org.dromara.tender.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.excel.coryUtils.ExcelReader;
|
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -12,8 +10,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
import org.dromara.common.utils.excel.ExcelDynamicReader;
|
||||||
import org.dromara.design.domain.BusBillofquantities;
|
import org.dromara.tender.domain.bo.BusBLimitListVersionsBo;
|
||||||
import org.dromara.design.domain.dto.MaterialsAndEquipmentExcelDto;
|
import org.dromara.tender.domain.bo.TenderAllVersionNumbersReq;
|
||||||
|
import org.dromara.tender.domain.vo.BusBLimitListVersionsVo;
|
||||||
|
import org.dromara.tender.service.IBusBLimitListVersionsService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
import org.dromara.tender.domain.bo.BusBillofquantitiesLimitListBo;
|
||||||
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
|
||||||
@ -39,6 +40,9 @@ public class BusBillofquantitiesLimitListServiceImpl extends ServiceImpl<BusBill
|
|||||||
|
|
||||||
private final BusBillofquantitiesLimitListMapper baseMapper;
|
private final BusBillofquantitiesLimitListMapper baseMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBusBLimitListVersionsService busBLimitListVersionsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询限价一览
|
* 查询限价一览
|
||||||
*
|
*
|
||||||
@ -168,17 +172,11 @@ public class BusBillofquantitiesLimitListServiceImpl extends ServiceImpl<BusBill
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> obtainAllVersionNumbers(BusBillofquantitiesLimitListBo bo) {
|
public List<BusBLimitListVersionsVo> obtainAllVersionNumbers(TenderAllVersionNumbersReq bo) {
|
||||||
List<BusBillofquantitiesLimitList> busBillofquantitiesLimitLists = baseMapper.selectList(new LambdaQueryWrapper<BusBillofquantitiesLimitList>()
|
BusBLimitListVersionsBo listVersions = new BusBLimitListVersionsBo();
|
||||||
.select(BusBillofquantitiesLimitList::getVersions)
|
listVersions.setProjectId(bo.getProjectId());
|
||||||
.eq(bo.getProjectId() != null, BusBillofquantitiesLimitList::getProjectId, bo.getProjectId())
|
listVersions.setWorkOrderType(bo.getWorkOrderType());
|
||||||
.eq(StringUtils.isNotBlank(bo.getType()), BusBillofquantitiesLimitList::getType, bo.getType())
|
return busBLimitListVersionsService.queryList(listVersions);
|
||||||
.orderByDesc(BusBillofquantitiesLimitList::getCreateTime)
|
|
||||||
.groupBy(BusBillofquantitiesLimitList::getVersions));
|
|
||||||
return busBillofquantitiesLimitLists.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.map(BusBillofquantitiesLimitList::getVersions)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.bidding.mapper.BusBiddingLimitVersionsMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.tender.mapper.BusBLimitListVersionsMapper">
|
||||||
|
|
||||||
|
</mapper>
|
Reference in New Issue
Block a user