招投标
This commit is contained in:
parent
3717cbc4ce
commit
6c698b5256
|
@ -79,4 +79,8 @@ public class Message implements Serializable {
|
|||
public static final String EQUIPMENT_USE_RECORD_STATUS_ERROR = "设备使用记录状态不合法";
|
||||
public static final String EQUIPMENT_IS_USED = "设备已被使用";
|
||||
public static final String EQUIPMENT_IS_RETURN = "设备已归还";
|
||||
public static final String DAILY_REPORT_EXISTS = "当日已提交日报";
|
||||
public static final String BIDDING_INFO_ID_IS_NOT_EXIST = "招标信息id不存在";
|
||||
public static final String TENDER_INFO_ID_IS_NOT_EXIST = "投标信息id不存在";
|
||||
public static final String OUTBID_INFO_ID_IS_NOT_EXIST = "中标信息id不存在";
|
||||
}
|
||||
|
|
|
@ -124,5 +124,8 @@ public interface Converts {
|
|||
EquipmentEntity toEquipmentUseRecordEntity(EquipmentReq req);
|
||||
|
||||
EquipmentUseRecordEntity toEquipmentUseRecordEntity(EquipmentUseRecordReq req);
|
||||
BiddingInfoEntity toBiddingInfoReq (BiddingInfoReq req);
|
||||
TenderInfoEntity toTenderInfoEntity (TenderInfoReq req);
|
||||
OutbidInfoEntity toOutbidInfoEntity (OutbidInfoReq req);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ public class BiddingInfoEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("招标信息来源网址")
|
||||
private String sourceWebsite;
|
||||
|
||||
@ApiModelProperty("招标文件")
|
||||
private String biddingFile;
|
||||
@ApiModelProperty("招标文件id")
|
||||
private String biddingFileId;
|
||||
|
||||
@ApiModelProperty("状态:0-待报名,1-已报名")
|
||||
private String status;
|
||||
|
|
|
@ -46,7 +46,7 @@ public class OutbidInfoEntity extends AuditableEntity implements Serializable {
|
|||
private LocalDateTime outbidNotifyDate;
|
||||
|
||||
@ApiModelProperty("中标通知文件")
|
||||
private String outbidFile;
|
||||
private String outbidNoticeFileId;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
|
|
|
@ -55,7 +55,7 @@ public class TenderInfoEntity extends AuditableEntity implements Serializable {
|
|||
private String tenderManagerPhone;
|
||||
|
||||
@ApiModelProperty("投标文件")
|
||||
private String tenderFile;
|
||||
private String tenderFileId;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
|
|
|
@ -51,5 +51,5 @@ public class BiddingInfoReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("招标文件")
|
||||
@Size(max = 200, message = "招标文件不能超过200个字符")
|
||||
private String biddingFile;
|
||||
private String biddingFileId;
|
||||
}
|
||||
|
|
|
@ -20,4 +20,9 @@ public class BiddingInfoResp extends BiddingInfoReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("招标文件地址")
|
||||
private String attachPath;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@ public class OutbidInfoReq implements Serializable {
|
|||
private LocalDateTime outbidNotifyDate;
|
||||
|
||||
@ApiModelProperty("中标通知文件")
|
||||
@Size(max = 200, message = "中标通知文件长度不能超过200")
|
||||
private String outbidNoticeFile;
|
||||
private String outbidNoticeFileId;
|
||||
|
||||
@ApiModelProperty("状态:0-已通知,1-已签约")
|
||||
private String status;
|
||||
|
|
|
@ -26,4 +26,7 @@ public class OutbidInfoResp extends OutbidInfoReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("招标公司")
|
||||
private String biddingCompany;
|
||||
|
||||
@ApiModelProperty("中标通知文件地址")
|
||||
private String attachPath;
|
||||
}
|
||||
|
|
|
@ -43,9 +43,8 @@ public class TenderInfoReq implements Serializable {
|
|||
@ApiModelProperty("招标负责人联系方式")
|
||||
private String tenderManagerPhone;
|
||||
|
||||
@Size(max = 100, message = "投标文件不能超过100个字符")
|
||||
@ApiModelProperty("投标文件")
|
||||
private String tenderFile;
|
||||
private String tenderFileId;
|
||||
|
||||
@Size(max = 500, message = "项目描述不能超过500个字符")
|
||||
@ApiModelProperty("项目描述")
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.io.Serializable;
|
|||
*/
|
||||
@Data
|
||||
@ApiModel("投标信息响应实体")
|
||||
public class TenderInfoResp extends BiddingInfoReq implements Serializable {
|
||||
public class TenderInfoResp extends TenderInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -8445413467535624096L;
|
||||
|
||||
|
@ -33,4 +33,10 @@ public class TenderInfoResp extends BiddingInfoReq implements Serializable {
|
|||
@ApiModelProperty("招标公司")
|
||||
private String biddingCompany;
|
||||
|
||||
@ApiModelProperty("投标文件地址")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("投标负责人姓名")
|
||||
private String tenderManagerName;
|
||||
|
||||
}
|
|
@ -2,6 +2,10 @@ package com.dite.znpt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.BiddingInfoEntity;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -9,4 +13,6 @@ import com.dite.znpt.domain.entity.BiddingInfoEntity;
|
|||
* @description
|
||||
*/
|
||||
public interface BiddingInfoMapper extends BaseMapper<BiddingInfoEntity> {
|
||||
|
||||
List<BiddingInfoResp> listBiddingInfoResp(@Param("projectName") String projectName);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ package com.dite.znpt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.OutbidInfoEntity;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -9,4 +13,7 @@ import com.dite.znpt.domain.entity.OutbidInfoEntity;
|
|||
* @description
|
||||
*/
|
||||
public interface OutbidInfoMapper extends BaseMapper<OutbidInfoEntity> {
|
||||
List<OutbidInfoResp> listOutbidInfoResp(@Param("projectName") String projectName);
|
||||
|
||||
OutbidInfoResp getOutbidInfoResp(@Param("outbidInfoId") String outbidInfoId);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,11 @@ package com.dite.znpt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.TenderInfoEntity;
|
||||
import com.dite.znpt.domain.vo.TenderInfoResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -9,4 +14,7 @@ import com.dite.znpt.domain.entity.TenderInfoEntity;
|
|||
* @description
|
||||
*/
|
||||
public interface TenderInfoMapper extends BaseMapper<TenderInfoEntity> {
|
||||
List<TenderInfoResp> listTenderInfoResp(@Param("projectName") String projectName);
|
||||
|
||||
TenderInfoResp getTenderInfoResp(@Param("tenderInfoId") String tenderInfoId);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ public interface BiddingInfoService extends IService<BiddingInfoEntity> {
|
|||
List<BiddingInfoResp> list(String projectName);
|
||||
void save(BiddingInfoReq req);
|
||||
void update(String biddingInfoId, BiddingInfoReq req);
|
||||
void uploadBiddingInfoFile(String biddingInfoId, String biddingFileId);
|
||||
void apply(String biddingInfoId);
|
||||
void uploadBiddingInfoFile(String biddingInfoId, MultipartFile file);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.dite.znpt.domain.entity.OutbidInfoEntity;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoReq;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoResp;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
@ -22,6 +21,6 @@ public interface OutbidInfoService extends IService<OutbidInfoEntity> {
|
|||
void save(OutbidInfoReq req);
|
||||
void update(String outbidInfoId, OutbidInfoReq req);
|
||||
void deleteById(String outbidInfoId);
|
||||
void uploadOutbidInfoFile(String outbidInfoId, MultipartFile file);
|
||||
void downLoadTenderInfoFile(String outbidInfoId, HttpServletResponse response);
|
||||
void uploadOutbidNoticeFile(String outBidInfoId, String outbidFileId);
|
||||
void downLoadOutbidNoticeFile(String outbidFileId, HttpServletResponse response) throws Exception;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@ public interface TenderInfoService extends IService<TenderInfoEntity> {
|
|||
void save(TenderInfoReq req);
|
||||
void update(String tenderInfoId, TenderInfoReq req);
|
||||
void deleteById(String tenderInfoId);
|
||||
void uploadBiddingInfoFile(String tenderInfoId, MultipartFile file);
|
||||
void uploadBiddingInfoFile(String tenderInfoId, String tenderFileId);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Constants;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.converts.Converts;
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.BiddingInfoEntity;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoReq;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.BiddingInfoMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.BiddingInfoService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -19,33 +27,61 @@ import java.util.List;
|
|||
@Service
|
||||
public class BiddingInfoServiceImpl extends ServiceImpl<BiddingInfoMapper, BiddingInfoEntity> implements BiddingInfoService {
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attachInfoService;
|
||||
@Override
|
||||
public List<BiddingInfoResp> page(String projectName) {
|
||||
return List.of();
|
||||
PageUtil.startPage();
|
||||
return this.list(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BiddingInfoResp> list(String projectName) {
|
||||
return List.of();
|
||||
return this.baseMapper.listBiddingInfoResp(projectName);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(BiddingInfoReq req) {
|
||||
|
||||
BiddingInfoEntity entity = Converts.INSTANCE.toBiddingInfoReq(req);
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String biddingInfoId, BiddingInfoReq req) {
|
||||
|
||||
BiddingInfoEntity biddingInfo = this.getById(biddingInfoId);
|
||||
if(null ==biddingInfo){
|
||||
throw new ServiceException(Message.BIDDING_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
BiddingInfoEntity entity = Converts.INSTANCE.toBiddingInfoReq(req);
|
||||
entity.setBiddingInfoId(biddingInfoId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void uploadBiddingInfoFile(String biddingInfoId, String biddingFileId) {
|
||||
BiddingInfoEntity entity = this.getById(biddingInfoId);
|
||||
if(null ==entity){
|
||||
throw new ServiceException(Message.BIDDING_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(biddingFileId);
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setBiddingFileId(biddingFileId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void apply(String biddingInfoId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadBiddingInfoFile(String biddingInfoId, MultipartFile file) {
|
||||
|
||||
BiddingInfoEntity entity = this.getById(biddingInfoId);
|
||||
if(null ==entity){
|
||||
throw new ServiceException(Message.BIDDING_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setStatus("1");
|
||||
this.updateById(entity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Constants;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.converts.Converts;
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.OutbidInfoEntity;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoReq;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.OutbidInfoMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.OutbidInfoService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -19,43 +28,71 @@ import java.util.List;
|
|||
*/
|
||||
@Service
|
||||
public class OutbidInfoServiceImpl extends ServiceImpl<OutbidInfoMapper, OutbidInfoEntity> implements OutbidInfoService {
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attachInfoService;
|
||||
@Override
|
||||
public List<OutbidInfoResp> page(String projectName) {
|
||||
return List.of();
|
||||
PageUtil.startPage();
|
||||
return this.list(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutbidInfoResp> list(String projectName) {
|
||||
return List.of();
|
||||
return this.baseMapper.listOutbidInfoResp(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutbidInfoResp detail(String outbidInfoId) {
|
||||
return null;
|
||||
return this.baseMapper.getOutbidInfoResp(outbidInfoId);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(OutbidInfoReq req) {
|
||||
|
||||
OutbidInfoEntity entity = Converts.INSTANCE.toOutbidInfoEntity(req);
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String outbidInfoId, OutbidInfoReq req) {
|
||||
|
||||
OutbidInfoEntity outbidInfo = this.getById(outbidInfoId);
|
||||
if(null == outbidInfo){
|
||||
throw new ServiceException(Message.OUTBID_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
OutbidInfoEntity entity = Converts.INSTANCE.toOutbidInfoEntity(req);
|
||||
entity.setOutbidId(outbidInfoId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void deleteById(String outbidInfoId) {
|
||||
|
||||
OutbidInfoEntity outbidInfo = this.getById(outbidInfoId);
|
||||
if(null == outbidInfo){
|
||||
throw new ServiceException(Message.OUTBID_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
this.removeById(outbidInfoId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadOutbidInfoFile(String outbidInfoId, MultipartFile file) {
|
||||
|
||||
public void uploadOutbidNoticeFile(String outbidInfoId, String outbidNoticeFileId) {
|
||||
OutbidInfoEntity outbidInfo = this.getById(outbidInfoId);
|
||||
if(null == outbidInfo){
|
||||
throw new ServiceException(Message.OUTBID_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(outbidNoticeFileId);
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
outbidInfo.setOutbidNoticeFileId(outbidNoticeFileId);
|
||||
this.updateById(outbidInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downLoadTenderInfoFile(String outbidInfoId, HttpServletResponse response) {
|
||||
|
||||
public void downLoadOutbidNoticeFile(String outbidNoticeFileId, HttpServletResponse response) throws Exception {
|
||||
attachInfoService.download(outbidNoticeFileId, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Constants;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.converts.Converts;
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.TenderInfoEntity;
|
||||
import com.dite.znpt.domain.vo.TenderInfoReq;
|
||||
import com.dite.znpt.domain.vo.TenderInfoResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.TenderInfoMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.TenderInfoService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -18,38 +27,67 @@ import java.util.List;
|
|||
*/
|
||||
@Service
|
||||
public class TenderInfoServiceImpl extends ServiceImpl<TenderInfoMapper, TenderInfoEntity> implements TenderInfoService {
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attachInfoService;
|
||||
@Override
|
||||
public List<TenderInfoResp> page(String projectName) {
|
||||
return null;
|
||||
PageUtil.startPage();
|
||||
return this.list(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TenderInfoResp> list(String projectName) {
|
||||
return List.of();
|
||||
return this.baseMapper.listTenderInfoResp(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TenderInfoResp detail(String tenderInfoId) {
|
||||
return null;
|
||||
return this.baseMapper.getTenderInfoResp(tenderInfoId);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(TenderInfoReq req) {
|
||||
|
||||
TenderInfoEntity entity = Converts.INSTANCE.toTenderInfoEntity(req);
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String tenderInfoId, TenderInfoReq req) {
|
||||
|
||||
TenderInfoEntity tenderInfo = this.getById(tenderInfoId);
|
||||
if(null ==tenderInfo){
|
||||
throw new ServiceException(Message.TENDER_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
TenderInfoEntity entity = Converts.INSTANCE.toTenderInfoEntity(req);
|
||||
entity.setTenderInfoId(tenderInfoId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void deleteById(String tenderInfoId) {
|
||||
|
||||
TenderInfoEntity tenderInfo = this.getById(tenderInfoId);
|
||||
if(null ==tenderInfo){
|
||||
throw new ServiceException(Message.TENDER_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
this.removeById(tenderInfoId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadBiddingInfoFile(String tenderInfoId, MultipartFile file) {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void uploadBiddingInfoFile(String tenderInfoId, String tenderFileId) {
|
||||
TenderInfoEntity entity = this.getById(tenderInfoId);
|
||||
if(null == entity){
|
||||
throw new ServiceException(Message.TENDER_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(tenderInfoId);
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setTenderFileId(tenderFileId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,4 +2,14 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.BiddingInfoMapper">
|
||||
|
||||
<select id="listBiddingInfoResp" resultType="com.dite.znpt.domain.vo.BiddingInfoResp">
|
||||
SELECT bi.bidding_info_id, bi.bidding_project, bi.bidding_company, bi.bidding_amount, bi.bidding_deadline, bi.info_entry_time, bi.source, bi.source_website, ai.attach_path
|
||||
FROM bidding_info bi
|
||||
LEFT JOIN attach_info ai ON bi.bidding_file_id = ai.attach_id
|
||||
<where>
|
||||
<if test="projectName != null and projectName != ''">
|
||||
AND bi.bidding_project LIKE concat ('%', #{projectName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -2,4 +2,23 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.OutbidInfoMapper">
|
||||
|
||||
<select id="listOutbidInfoResp" resultType="com.dite.znpt.domain.vo.OutbidInfoResp">
|
||||
SELECT oi.outbid_info_id, oi.bidding_info_id, bi.bidding_project, bi.bidding_company, oi.outbid_amount, oi.outbid_notify_date, oi.outbid_notice_file_id, oi.status, ai.attach_path
|
||||
FROM outbid_info oi
|
||||
LEFT JOIN bidding_info bi ON oi.bidding_info_id = bi.bidding_info_id
|
||||
LEFT JOIN attach_info ai ON oi.outbid_notice_file_id = ai.attach_id
|
||||
<where>
|
||||
oi.del_flag = '0'
|
||||
<if test="projectName != null and project != ''">
|
||||
AND bi.bidding_project LIKE concat ('%', #{projectName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getOutbidInfoResp" resultType="com.dite.znpt.domain.vo.OutbidInfoResp">
|
||||
SELECT oi.outbid_info_id, oi.bidding_info_id, bi.bidding_project, bi.bidding_company, oi.outbid_amount, oi.outbid_notify_date, oi.outbid_notice_file_id, oi.status, ai.attach_path
|
||||
FROM outbid_info oi
|
||||
LEFT JOIN bidding_info bi ON oi.bidding_info_id = bi.bidding_info_id
|
||||
LEFT JOIN attach_info ai ON oi.outbid_notice_file_id = ai.attach_id
|
||||
WHERE oi.outbid_info_id = #{outbidInfoId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,28 @@
|
|||
<?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="com.dite.znpt.mapper.TenderInfoMapper">
|
||||
|
||||
<select id="listTenderInfoResp" resultType="com.dite.znpt.domain.vo.TenderInfoResp">
|
||||
SELECT ti.tender_info_id, ti.bidding_info_id, bi.bidding_project, bi.bidding_company, ti.tender_amount, ti.project_address,ti.project_type, ti.tender_manager, u.name AS 'tenderManagerName',
|
||||
ti.tender_manager_phone, ti.project_description, ti.tender_file_id, ai.attach_path
|
||||
FROM tender_info ti
|
||||
LEFT JOIN bidding_info bi ON ti.bidding_info_id = bi.bidding_info_id
|
||||
LEFT JOIN user u ON ti.tender_manager = u.user_id
|
||||
LEFT JOIN attach_info ai ON ti.tender_file_id = ai.attach_id
|
||||
<where>
|
||||
ti.del_flag = '0'
|
||||
<if test="projectName != null and project != ''">
|
||||
AND bi.bidding_project LIKE concat ('%', #{projectName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getTenderInfoResp" resultType="com.dite.znpt.domain.vo.TenderInfoResp">
|
||||
SELECT ti.tender_info_id, ti.bidding_info_id, bi.bidding_project, bi.bidding_company, ti.tender_amount, ti.project_address,ti.project_type, ti.tender_manager, u.name AS 'tenderManagerName',
|
||||
ti.tender_manager_phone, ti.project_description, ti.tender_file_id, ai.attach_path
|
||||
FROM tender_info ti
|
||||
LEFT JOIN bidding_info bi ON ti.bidding_info_id = bi.bidding_info_id
|
||||
LEFT JOIN user u ON ti.tender_manager = u.user_id
|
||||
LEFT JOIN attach_info ai ON ti.tender_file_id = ai.attach_id
|
||||
WHERE ti.tender_info_id = #{tenderInfoId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,5 +0,0 @@
|
|||
<?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="com.dite.znpt.mapper.TenderInfoMapper">
|
||||
|
||||
</mapper>
|
|
@ -46,23 +46,23 @@ public class BiddingInfoController {
|
|||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑招标小心", httpMethod = "POST")
|
||||
@ApiOperation(value = "编辑招标消息",httpMethod = "POST")
|
||||
@PutMapping
|
||||
public Result<?> edit(@PathVariable String biddingInfoId, @Validated @RequestBody BiddingInfoReq req){
|
||||
biddingInfoService.update(biddingInfoId, req);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上传招标文件",httpMethod = "PUT", notes = "上传附件调用新增附件信息接口:/attach-info/biddingInfo,userDefinedPath = {biddingInfoId}")
|
||||
@PutMapping("/{biddingInfoId}/upload-bidding-info_file/{biddingFileId}")
|
||||
public Result<?> uploadBiddingInfoFile(@PathVariable String biddingInfoId, @PathVariable String biddingFileId){
|
||||
biddingInfoService.uploadBiddingInfoFile(biddingInfoId, biddingFileId);
|
||||
return Result.ok();
|
||||
}
|
||||
@ApiOperation(value = "报名", httpMethod = "PUT")
|
||||
@PutMapping("/apply/{biddingInfoId}")
|
||||
public Result<?> apply(@PathVariable String biddingInfoId){
|
||||
biddingInfoService.apply(biddingInfoId);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上传招标信息文件", httpMethod = "POST")
|
||||
@PostMapping("/upload-bidding-info-file/{biddingInfoId}")
|
||||
public Result<?> uploadBiddingInfoFile(@PathVariable String biddingInfoId, @RequestParam("file") MultipartFile file) {
|
||||
biddingInfoService.uploadBiddingInfoFile(biddingInfoId, file);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,8 @@ import com.dite.znpt.domain.vo.OutbidInfoReq;
|
|||
import com.dite.znpt.domain.vo.OutbidInfoResp;
|
||||
import com.dite.znpt.service.OutbidInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -44,14 +42,14 @@ public class OutbidInfoController {
|
|||
return Result.ok(outbidInfoService.detail(outbidInfoId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增中标通知信息", httpMethod = "POST")
|
||||
@ApiOperation(value = "新增中标通知信息", httpMethod = "POST", notes = "上传附件调用新增附件信息接口:/attach-info/outbidInfo,userDefinedPath = {outbidInfoId}")
|
||||
@PostMapping
|
||||
public Result<Object> add(@RequestBody OutbidInfoReq req){
|
||||
outbidInfoService.save(req);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据中标通知信息Id更新信息", httpMethod = "PUT")
|
||||
@ApiOperation(value = "根据中标通知信息Id更新信息", httpMethod = "PUT", notes = "上传附件调用新增附件信息接口:/attach-info/outbidInfo,userDefinedPath = {outbidInfoId}")
|
||||
@PutMapping("/{outbidInfoId}")
|
||||
public Result<Object> update(@PathVariable String outbidInfoId, @RequestBody OutbidInfoReq req){
|
||||
outbidInfoService.update(outbidInfoId, req);
|
||||
|
@ -66,16 +64,16 @@ public class OutbidInfoController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "上传中标通知信息文件", httpMethod = "POST")
|
||||
@PostMapping("/upload-outbid-info-file/{outBidInfoId}")
|
||||
public Result<?> uploadTenderInfoFile(@PathVariable String outBidInfoId, @RequestParam("file") MultipartFile file) {
|
||||
outbidInfoService.uploadOutbidInfoFile(outBidInfoId, file);
|
||||
@PostMapping("/{outBidInfoId}/upload-outbid-info-file/{outbidNoticeFileId}")
|
||||
public Result<?> uploadOutbidNoticeFile(@PathVariable String outBidInfoId, @PathVariable String outbidNoticeFileId) {
|
||||
outbidInfoService.uploadOutbidNoticeFile(outBidInfoId, outbidNoticeFileId);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "下载中标通知信息文件", httpMethod = "POST")
|
||||
@PostMapping("/download-outbid-info-file/{outBidInfoId}")
|
||||
public Result<?> downLoadTenderInfoFile(@PathVariable String outBidInfoId, HttpServletResponse response) {
|
||||
outbidInfoService.downLoadTenderInfoFile(outBidInfoId, response);
|
||||
@PostMapping("/download-outbid-info-file/{outbidNoticeFileId}")
|
||||
public Result<?> downLoadOutbidNoticeFile(@PathVariable String outbidNoticeFileId, HttpServletResponse response) throws Exception {
|
||||
outbidInfoService.downLoadOutbidNoticeFile(outbidNoticeFileId, response);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,10 +66,10 @@ public class TenderInfoController {
|
|||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上传投标信息文件", httpMethod = "POST")
|
||||
@PostMapping("/upload-tender-info-file/{tenderInfoId}")
|
||||
public Result<?> uploadTenderInfoFile(@PathVariable String tenderInfoId, @RequestParam("file") MultipartFile file) {
|
||||
tenderInfoService.uploadBiddingInfoFile(tenderInfoId, file);
|
||||
@ApiOperation(value = "上传投标信息文件", httpMethod = "POST", notes = "上传附件调用新增附件信息接口:/attach-info/tenderInfo,userDefinedPath = {tenderInfoId}")
|
||||
@PostMapping("/{tenderInfoId}/upload-tender-info-file/{tenderFileId}")
|
||||
public Result<?> uploadTenderInfoFile(@PathVariable String tenderInfoId, @PathVariable String tenderFileId) {
|
||||
tenderInfoService.uploadBiddingInfoFile(tenderInfoId, tenderFileId);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue