Compare commits
6 Commits
64d469210a
...
47fb031221
Author | SHA1 | Date |
---|---|---|
|
47fb031221 | |
|
345b931de9 | |
|
4cd953ff08 | |
|
8db8dec22b | |
|
6c698b5256 | |
|
3717cbc4ce |
|
@ -79,4 +79,10 @@ 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 TENDER_INFO_IS_EXIST = "招标[{}]已存中投信息存在";
|
||||
public static final String OUTBID_INFO_ID_IS_NOT_EXIST = "中标信息id不存在";
|
||||
public static final String OUTBID_INFO_IS_EXIST = "招标[{}]已存中标信息存在";
|
||||
}
|
||||
|
|
|
@ -124,5 +124,9 @@ public interface Converts {
|
|||
EquipmentEntity toEquipmentUseRecordEntity(EquipmentReq req);
|
||||
|
||||
EquipmentUseRecordEntity toEquipmentUseRecordEntity(EquipmentUseRecordReq req);
|
||||
BiddingInfoEntity toBiddingInfoReq (BiddingInfoReq req);
|
||||
List<BiddingInfoEntity> toBiddingInfoReq (List<BiddingInfoReq> req);
|
||||
TenderInfoEntity toTenderInfoEntity (TenderInfoReq req);
|
||||
OutbidInfoEntity toOutbidInfoEntity (OutbidInfoReq req);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@ public class AttachInfoEntity extends AuditableEntity implements Serializable {
|
|||
@TableField("business_type")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
@TableField("file_name")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
@TableField("file_type")
|
||||
private String fileType;
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 15:42
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("bidding_info")
|
||||
@ApiModel(value="BiddingInfoEntity对象", description="招标信息表")
|
||||
public class BiddingInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2451841606051749490L;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("招标项目")
|
||||
private String biddingProject;
|
||||
|
||||
@ApiModelProperty("招标公司")
|
||||
private String biddingCompany;
|
||||
|
||||
@ApiModelProperty("招标金额")
|
||||
private BigDecimal biddingAmount;
|
||||
|
||||
@ApiModelProperty("招标截止时间")
|
||||
private String biddingDeadline;
|
||||
|
||||
@ApiModelProperty("招标信息录入时间")
|
||||
private LocalDateTime infoEntryTime;
|
||||
|
||||
@ApiModelProperty("招标信息来源")
|
||||
private String source;
|
||||
|
||||
@ApiModelProperty("招标信息来源网址")
|
||||
private String sourceWebsite;
|
||||
|
||||
@ApiModelProperty("招标文件id")
|
||||
private String biddingFileId;
|
||||
|
||||
@ApiModelProperty("状态:0-待报名,1-已报名")
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 15:44
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("outbid_info")
|
||||
@ApiModel(value="OutbidInfoEntity对象", description="中标通知信息表")
|
||||
public class OutbidInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6941283868242292970L;
|
||||
|
||||
@ApiModelProperty("中标通知信息id")
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String outbidInfoId;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("中标金额,单位元,精确到分")
|
||||
private BigDecimal outbidAmount;
|
||||
|
||||
@ApiModelProperty("工期,单位天")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty("中标通知日期")
|
||||
private LocalDateTime outbidNotifyDate;
|
||||
|
||||
@ApiModelProperty("中标通知文件")
|
||||
private String outbidNoticeFileId;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private String delFlag;
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 15:47
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tender_info")
|
||||
@ApiModel(value="TenderInfoEntity对象", description="投标信息表")
|
||||
public class TenderInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5677009089047831619L;
|
||||
|
||||
@ApiModelProperty("投标信息id")
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String tenderInfoId;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("投标金额")
|
||||
private BigDecimal tenderAmount;
|
||||
|
||||
@ApiModelProperty("项目地址")
|
||||
private String projectAddress;
|
||||
|
||||
@ApiModelProperty("项目类型")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty("项目描述")
|
||||
private String projectDescription;
|
||||
|
||||
@ApiModelProperty("投标负责人")
|
||||
private String tenderManager;
|
||||
|
||||
@ApiModelProperty("投标负责人手机号")
|
||||
private String tenderManagerPhone;
|
||||
|
||||
@ApiModelProperty("投标文件")
|
||||
private String tenderFileId;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private String delFlag;
|
||||
}
|
|
@ -24,6 +24,9 @@ public class AttachInfoReq implements Serializable {
|
|||
@ApiModelProperty("自定义路径")
|
||||
private String userDefinedPath;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@ public class AttachInfoResp implements Serializable {
|
|||
@ApiModelProperty("附件路径")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:18
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("招标信息请求实体")
|
||||
public class BiddingInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6967025339487392364L;
|
||||
@ColumnWidth(40)
|
||||
@ExcelProperty(index = 0, value = "招标项目")
|
||||
@ApiModelProperty("招标项目")
|
||||
@Size(max = 50, message = "招标项目不能超过50个字符")
|
||||
private String biddingProject;
|
||||
|
||||
@ColumnWidth(40)
|
||||
@ExcelProperty(index = 1, value = "招标公司")
|
||||
@ApiModelProperty("招标公司")
|
||||
@Size(max = 50, message = "招标公司不能超过50个字符")
|
||||
private String biddingCompany;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(index = 2, value = "招标金额\n(单位元,精确到分)")
|
||||
@ApiModelProperty("招标金额")
|
||||
private BigDecimal biddingAmount;
|
||||
|
||||
@ColumnWidth(30)
|
||||
@ExcelProperty(index = 3, value = "招标截止时间\n(yyyy-MM-dd HH:mm:ss)")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("招标截止时间")
|
||||
private LocalDateTime biddingDeadline;
|
||||
|
||||
@ColumnWidth(30)
|
||||
@ExcelProperty(index = 4, value = "信息录入时间\n(yyyy-MM-dd HH:mm:ss)")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("信息录入时间")
|
||||
private LocalDateTime infoEntryTime;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(index = 5, value = "信息来源")
|
||||
@ApiModelProperty("信息来源")
|
||||
@NotBlank(message = "信息来源不能为空")
|
||||
@Size(max = 50, message = "信息来源不能超过50个字符")
|
||||
private String source;
|
||||
|
||||
@ColumnWidth(60)
|
||||
@ExcelProperty(index = 6, value = "信息来源网址")
|
||||
@ApiModelProperty("信息来源网址")
|
||||
@NotBlank(message = "信息来源网址不能为空")
|
||||
@Size(max = 100, message = "信息来源网址不能超过100个字符")
|
||||
private String sourceWebsite;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:17
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("招标信息响应实体")
|
||||
public class BiddingInfoResp extends BiddingInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2750666223381829115L;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("招标文件地址")
|
||||
private String attachPath;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 17:05
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("中标信息请求实体")
|
||||
public class OutbidInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1781661335173747275L;
|
||||
|
||||
@ApiModelProperty("中标信息ID")
|
||||
@NotBlank(message = "中标信息ID不能为空")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("中标金额")
|
||||
private BigDecimal outbidAmount;
|
||||
|
||||
@ApiModelProperty("工期")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty("中标通知日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime outbidNotifyDate;
|
||||
|
||||
@ApiModelProperty("中标通知文件")
|
||||
private String outbidNoticeFileId;
|
||||
|
||||
@ApiModelProperty("状态:0-已通知,1-已签约")
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 17:36
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("中标信息响应实体")
|
||||
public class OutbidInfoResp extends OutbidInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -718886028432322862L;
|
||||
|
||||
@ApiModelProperty("中标信息ID")
|
||||
private String outbidInfoId;
|
||||
|
||||
@ApiModelProperty("招标项目")
|
||||
private String biddingProject;
|
||||
|
||||
@ApiModelProperty("招标公司")
|
||||
private String biddingCompany;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("中标通知文件地址")
|
||||
private String attachPath;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:23
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("投标信息请求实体")
|
||||
public class TenderInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5653933337345116548L;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
@NotBlank(message = "招标信息id不能为空")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("投标金额")
|
||||
private BigDecimal tenderAmount;
|
||||
|
||||
@ApiModelProperty("项目地址")
|
||||
@Size(max = 500, message = "项目地址不能超过500个字符")
|
||||
private String projectAddress;
|
||||
|
||||
@ApiModelProperty("项目类型,枚举:ProjectTypeEnum")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty("招标负责人")
|
||||
@Size(min = 32, max = 32, message = "招标负责人长度必须为32个字符")
|
||||
private String tenderManager;
|
||||
|
||||
@Size(min = 11, max = 11, message = "招标负责人联系方式长度必须为11个字符")
|
||||
@ApiModelProperty("招标负责人联系方式")
|
||||
private String tenderManagerPhone;
|
||||
|
||||
@ApiModelProperty("投标文件")
|
||||
private String tenderFileId;
|
||||
|
||||
@Size(max = 500, message = "项目描述不能超过500个字符")
|
||||
@ApiModelProperty("项目描述")
|
||||
private String projectDescription;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:50
|
||||
* @description
|
||||
*/
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:49
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("投标信息响应实体")
|
||||
public class TenderInfoResp extends TenderInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -8445413467535624096L;
|
||||
|
||||
@ApiModelProperty("投标标信息ID")
|
||||
private String tenderInfoId;
|
||||
|
||||
@ApiModelProperty("招标项目")
|
||||
private String biddingProject;
|
||||
|
||||
@ApiModelProperty("招标公司")
|
||||
private String biddingCompany;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("投标文件地址")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("投标负责人姓名")
|
||||
private String tenderManagerName;
|
||||
|
||||
}
|
|
@ -19,6 +19,10 @@ public enum AttachBusinessTypeEnum {
|
|||
DEFECT_MARK_PIC("defect_mark_pic", "缺陷标注图片"),
|
||||
REPORT("report", "报告"),
|
||||
PROJECT_BUDGE("project_budge", "预算文件"),
|
||||
PROJECT_DAILY_REPORT("project_daily_report", "项目日报文件"),
|
||||
BIDDING_INFO("bidding_info", "招标信息"),
|
||||
TENDER_INFO("tender_info", "投标信息"),
|
||||
OUTBID_INFO("outbid_info", "中标信息"),
|
||||
;
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:35
|
||||
* @description
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectTypeEnum {
|
||||
BLADE_CHECK("blade_check", "风电叶片检查"),
|
||||
OPERATION("operation", "风电运维"),
|
||||
INSTALL("install", "风电安装"),
|
||||
OTHER("other", "其他");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static ProjectTypeEnum getByCode(String code){
|
||||
for (ProjectTypeEnum e : ProjectTypeEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code){
|
||||
ProjectTypeEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(ProjectTypeEnum.values().length);
|
||||
for (ProjectTypeEnum e : ProjectTypeEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(String.valueOf(e.code), e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
* @date 2025/7/28/周一 16:06
|
||||
* @description
|
||||
*/
|
||||
public interface BiddingInfoMapper extends BaseMapper<BiddingInfoEntity> {
|
||||
|
||||
List<BiddingInfoResp> listBiddingInfoResp(@Param("projectName") String projectName);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
* @date 2025/7/28/周一 16:11
|
||||
* @description
|
||||
*/
|
||||
public interface OutbidInfoMapper extends BaseMapper<OutbidInfoEntity> {
|
||||
List<OutbidInfoResp> listOutbidInfoResp(@Param("projectName") String projectName);
|
||||
|
||||
OutbidInfoResp getOutbidInfoResp(@Param("outbidInfoId") String outbidInfoId);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
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
|
||||
* @date 2025/7/28/周一 16:08
|
||||
* @description
|
||||
*/
|
||||
public interface TenderInfoMapper extends BaseMapper<TenderInfoEntity> {
|
||||
List<TenderInfoResp> listTenderInfoResp(@Param("projectName") String projectName);
|
||||
|
||||
TenderInfoResp getTenderInfoResp(@Param("tenderInfoId") String tenderInfoId);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.BiddingInfoEntity;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoReq;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoResp;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:06
|
||||
* @description
|
||||
*/
|
||||
public interface BiddingInfoService extends IService<BiddingInfoEntity> {
|
||||
|
||||
List<BiddingInfoResp> page(String projectName);
|
||||
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);
|
||||
Result<?> importData(List<BiddingInfoReq> dataList, BindingResult bindingResult);
|
||||
}
|
|
@ -25,7 +25,7 @@ public interface ImageService extends IService<ImageEntity> {
|
|||
|
||||
List<ImageReq> batchUploadDefectImage(String partId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files);
|
||||
|
||||
List<ImageReq> uploadProjectBatch(String projectId, String imageSource, MultipartFile[] files);
|
||||
List<ImageReq> uploadProjectBatch(String projectId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files);
|
||||
|
||||
List<String> batchUploadCommonImage(String imageSource, ImageWorkReq imageWorkReq, MultipartFile[] file) throws IOException;
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
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 javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:11
|
||||
* @description
|
||||
*/
|
||||
public interface OutbidInfoService extends IService<OutbidInfoEntity> {
|
||||
|
||||
List<OutbidInfoResp> page(String projectName);
|
||||
List<OutbidInfoResp> list(String projectName);
|
||||
OutbidInfoResp detail(String outbidInfoId);
|
||||
void save(OutbidInfoReq req);
|
||||
void update(String outbidInfoId, OutbidInfoReq req);
|
||||
void deleteById(String outbidInfoId);
|
||||
void downLoadOutbidNoticeFile(String outbidFileId, HttpServletResponse response) throws Exception;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.TenderInfoEntity;
|
||||
import com.dite.znpt.domain.vo.TenderInfoReq;
|
||||
import com.dite.znpt.domain.vo.TenderInfoResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:09
|
||||
* @description
|
||||
*/
|
||||
public interface TenderInfoService extends IService<TenderInfoEntity> {
|
||||
List<TenderInfoResp> page(String projectName);
|
||||
List<TenderInfoResp> list(String projectName);
|
||||
TenderInfoResp detail(String tenderInfoId);
|
||||
void save(TenderInfoReq req);
|
||||
void update(String tenderInfoId, TenderInfoReq req);
|
||||
void deleteById(String tenderInfoId);
|
||||
|
||||
}
|
|
@ -81,9 +81,11 @@ public class AttachInfoServiceImpl extends ServiceImpl<FileInfoMapper, AttachInf
|
|||
try {
|
||||
String path = temPathPrefix + file.getOriginalFilename();
|
||||
FileUtil.writeBytes(file.getBytes(),path);
|
||||
String fileName = StrUtil.isBlank(infoReq.getFileName()) ? file.getOriginalFilename() : infoReq.getFileName();
|
||||
AttachInfoEntity attachInfo = AttachInfoEntity.builder()
|
||||
.attachPath(FilePathEnum.ATTACH.getFileDownPath(path))
|
||||
.businessType(businessType)
|
||||
.fileName(fileName)
|
||||
.fileType(infoReq.getFileType())
|
||||
.remark(infoReq.getRemark())
|
||||
.build();
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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.Result;
|
||||
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 com.pig4cloud.plugin.excel.vo.ErrorMessage;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:07
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class BiddingInfoServiceImpl extends ServiceImpl<BiddingInfoMapper, BiddingInfoEntity> implements BiddingInfoService {
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attachInfoService;
|
||||
@Override
|
||||
public List<BiddingInfoResp> page(String projectName) {
|
||||
PageUtil.startPage();
|
||||
return this.list(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BiddingInfoResp> list(String projectName) {
|
||||
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);
|
||||
|
||||
attachInfo.setBusinessId(biddingInfoId);
|
||||
attachInfoService.updateById(attachInfo);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void apply(String biddingInfoId) {
|
||||
BiddingInfoEntity entity = this.getById(biddingInfoId);
|
||||
if(null ==entity){
|
||||
throw new ServiceException(Message.BIDDING_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setStatus("1");
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result<?> importData(List<BiddingInfoReq> dataList, BindingResult bindingResult) {
|
||||
List<String> sourceWebsites = dataList.stream().map(BiddingInfoReq::getSourceWebsite).distinct().toList();
|
||||
if(sourceWebsites.size() != dataList.size()){
|
||||
return Result.error(Constants.SERVICE_EXCEPTION, "导入失败,存在重复数据");
|
||||
}
|
||||
List<String> existSourceWebsites = this.list().stream().map(BiddingInfoEntity::getSourceWebsite).toList();
|
||||
if(CollUtil.containsAny(existSourceWebsites, sourceWebsites)){
|
||||
return Result.error(Constants.SERVICE_EXCEPTION, "导入失败,存在重复数据");
|
||||
}
|
||||
this.saveBatch(Converts.INSTANCE.toBiddingInfoReq(dataList));
|
||||
return Result.okM("导入"+ dataList.size()+"条数据");
|
||||
}
|
||||
}
|
|
@ -161,7 +161,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
if (!file.isEmpty()) {
|
||||
try {
|
||||
String path = temPathPrefix + file.getOriginalFilename();
|
||||
FileUtil.writeBytes(file.getBytes(),path);
|
||||
FileUtil.writeFromStream(file.getInputStream(),path);
|
||||
String fileDownPath = FilePathEnum.IMAGE_TEMP.getFileDownPath(path);
|
||||
ImageReq imageReq = imageRespBuilder(path, fileDownPath);
|
||||
imageReq.setImageId(IdUtil.simpleUUID());
|
||||
|
@ -185,7 +185,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public List<ImageReq> uploadProjectBatch(String projectId, String imageSource, MultipartFile[] files) {
|
||||
public List<ImageReq> uploadProjectBatch(String projectId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files) {
|
||||
if (Objects.isNull(projectService.getById(projectId))) {
|
||||
throw new ServiceException(Message.PROJECT_ID_IS_NOT_EXIST);
|
||||
}
|
||||
|
@ -202,13 +202,13 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
List<ImageReq> list = new ArrayList<>(files.length);
|
||||
List<ImageEntity> imageList = new ArrayList<>();
|
||||
|
||||
ImageCollectEntity imageCollect = new ImageCollectEntity();
|
||||
ImageCollectEntity imageCollect = Optional.ofNullable(BeanUtil.copyProperties(collectReq, ImageCollectEntity.class)).orElse(new ImageCollectEntity());
|
||||
imageCollect.setCollectId(IdUtil.simpleUUID());
|
||||
imageCollect.setCollectorId(StpUtil.getLoginIdAsString());
|
||||
imageCollect.setCollectorName(userService.getById(StpUtil.getLoginIdAsString()).getName());
|
||||
for (MultipartFile multipartFile : files) {
|
||||
String absolutePath = path_prefix + multipartFile.getOriginalFilename();
|
||||
FileUtil.writeBytes(multipartFile.getBytes(),absolutePath);
|
||||
FileUtil.writeFromStream(multipartFile.getInputStream(),absolutePath);
|
||||
String fileDownPath = FilePathEnum.IMAGE.getFileDownPath(absolutePath);
|
||||
ImageEntity imageEntity = new ImageEntity();
|
||||
try {
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
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.BiddingInfoService;
|
||||
import com.dite.znpt.service.OutbidInfoService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:12
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class OutbidInfoServiceImpl extends ServiceImpl<OutbidInfoMapper, OutbidInfoEntity> implements OutbidInfoService {
|
||||
|
||||
@Resource
|
||||
private BiddingInfoService biddingInfoService;
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attachInfoService;
|
||||
|
||||
@Override
|
||||
public List<OutbidInfoResp> page(String projectName) {
|
||||
PageUtil.startPage();
|
||||
return this.list(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OutbidInfoResp> list(String projectName) {
|
||||
return this.baseMapper.listOutbidInfoResp(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutbidInfoResp detail(String outbidInfoId) {
|
||||
return this.baseMapper.getOutbidInfoResp(outbidInfoId);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(OutbidInfoReq req) {
|
||||
OutbidInfoEntity entity = Converts.INSTANCE.toOutbidInfoEntity(req);
|
||||
if(!listByBiddingInfoId(req.getBiddingInfoId()).isEmpty()){
|
||||
throw new ServiceException(StrUtil.format(Message.OUTBID_INFO_IS_EXIST, req.getBiddingInfoId()));
|
||||
}
|
||||
this.save(entity);
|
||||
if(StrUtil.isNotBlank(req.getOutbidNoticeFileId())){
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(req.getOutbidNoticeFileId());
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
attachInfo.setBusinessId(entity.getOutbidInfoId());
|
||||
attachInfoService.updateById(attachInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private List<OutbidInfoEntity> listByBiddingInfoId(String biddingInfoId){
|
||||
return this.list(Wrappers.<OutbidInfoEntity>lambdaQuery().eq(OutbidInfoEntity::getBiddingInfoId, biddingInfoId));
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
if(!outbidInfo.getBiddingInfoId().equals(req.getBiddingInfoId())){
|
||||
if(!listByBiddingInfoId(req.getBiddingInfoId()).isEmpty()){
|
||||
throw new ServiceException(StrUtil.format(Message.OUTBID_INFO_IS_EXIST, req.getBiddingInfoId()));
|
||||
}
|
||||
}
|
||||
OutbidInfoEntity entity = Converts.INSTANCE.toOutbidInfoEntity(req);
|
||||
entity.setOutbidInfoId(outbidInfoId);
|
||||
this.updateById(entity);
|
||||
if(StrUtil.isNotBlank(req.getOutbidNoticeFileId())){
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(req.getOutbidNoticeFileId());
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
attachInfo.setBusinessId(outbidInfoId);
|
||||
attachInfoService.updateById(attachInfo);
|
||||
}else {
|
||||
if(StrUtil.isNotBlank(outbidInfo.getOutbidNoticeFileId())){
|
||||
attachInfoService.deleteByAttachInfoId(outbidInfo.getOutbidNoticeFileId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if(StrUtil.isNotBlank(outbidInfo.getOutbidNoticeFileId())){
|
||||
attachInfoService.deleteByAttachInfoId(outbidInfo.getOutbidNoticeFileId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downLoadOutbidNoticeFile(String outbidNoticeFileId, HttpServletResponse response) throws Exception {
|
||||
attachInfoService.download(outbidNoticeFileId, response);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
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.entity.TenderInfoEntity;
|
||||
import com.dite.znpt.domain.entity.UserEntity;
|
||||
import com.dite.znpt.domain.vo.TenderInfoReq;
|
||||
import com.dite.znpt.domain.vo.TenderInfoResp;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
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.service.UserService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:09
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class TenderInfoServiceImpl extends ServiceImpl<TenderInfoMapper, TenderInfoEntity> implements TenderInfoService {
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attachInfoService;
|
||||
|
||||
@Override
|
||||
public List<TenderInfoResp> page(String projectName) {
|
||||
PageUtil.startPage();
|
||||
return this.list(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TenderInfoResp> list(String projectName) {
|
||||
return this.baseMapper.listTenderInfoResp(projectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TenderInfoResp detail(String tenderInfoId) {
|
||||
return this.baseMapper.getTenderInfoResp(tenderInfoId);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(TenderInfoReq req) {
|
||||
TenderInfoEntity entity = Converts.INSTANCE.toTenderInfoEntity(req);
|
||||
if(StrUtil.isNotBlank(req.getTenderManager())){
|
||||
UserEntity user = userService.getById(req.getTenderManager());
|
||||
if(null == user || !Constants.DEL_FLAG_0.equals(user.getDelFlag())){
|
||||
throw new ServiceException(Message.USER_ID_NOT_EXIST);
|
||||
}
|
||||
}
|
||||
if(!listByBiddingInfoId(req.getBiddingInfoId()).isEmpty()){
|
||||
throw new ServiceException(StrUtil.format(Message.TENDER_INFO_IS_EXIST,req.getBiddingInfoId()));
|
||||
}
|
||||
this.save(entity);
|
||||
if(StrUtil.isNotBlank(req.getTenderFileId())){
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(req.getTenderFileId());
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
attachInfo.setBusinessId(entity.getTenderInfoId());
|
||||
attachInfoService.updateById(attachInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
if(!tenderInfo.getBiddingInfoId().equals(req.getBiddingInfoId())){
|
||||
if(!listByBiddingInfoId(req.getBiddingInfoId()).isEmpty()){
|
||||
throw new ServiceException(StrUtil.format(Message.TENDER_INFO_IS_EXIST,req.getBiddingInfoId()));
|
||||
}
|
||||
}
|
||||
if(StrUtil.isNotBlank(req.getTenderFileId())){
|
||||
AttachInfoEntity attachInfo = attachInfoService.getById(req.getTenderFileId());
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServiceException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
attachInfo.setBusinessId(tenderInfoId);
|
||||
attachInfoService.updateById(attachInfo);
|
||||
}else{
|
||||
if(StrUtil.isNotBlank(tenderInfo.getTenderFileId())){
|
||||
attachInfoService.deleteByAttachInfoId(tenderInfo.getTenderFileId());
|
||||
}
|
||||
}
|
||||
TenderInfoEntity entity = Converts.INSTANCE.toTenderInfoEntity(req);
|
||||
if(StrUtil.isNotBlank(req.getTenderManager())){
|
||||
UserEntity user = userService.getById(req.getTenderManager());
|
||||
if(null == user || !Constants.DEL_FLAG_0.equals(user.getDelFlag())){
|
||||
throw new ServiceException(Message.USER_ID_NOT_EXIST);
|
||||
}
|
||||
}
|
||||
entity.setTenderInfoId(tenderInfoId);
|
||||
this.updateById(entity);
|
||||
|
||||
}
|
||||
|
||||
private List<TenderInfoEntity> listByBiddingInfoId(String biddingInfoId){
|
||||
return this.list(Wrappers.<TenderInfoEntity>lambdaQuery().eq(TenderInfoEntity::getBiddingInfoId, biddingInfoId));
|
||||
}
|
||||
|
||||
@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);
|
||||
if(StrUtil.isNotBlank(tenderInfo.getTenderFileId())){
|
||||
attachInfoService.deleteByAttachInfoId(tenderInfo.getTenderFileId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<?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.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.file_name, 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>
|
|
@ -0,0 +1,24 @@
|
|||
<?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.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.file_name, 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.file_name, 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.file_name, 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.file_name, 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>
|
|
@ -16,7 +16,7 @@
|
|||
LEFT JOIN role r ON ur.role_id = r.role_id
|
||||
LEFT JOIN user_post up ON up.user_id = u.user_id
|
||||
LEFT JOIN post p ON p.post_id = up.post_id
|
||||
<where>
|
||||
WHERE u.del_flag = '0'
|
||||
<if test="userCode != null and userCode != ''">
|
||||
AND u.user_code LIKE concat ('%', #{userCode}, '%')
|
||||
</if>
|
||||
|
@ -38,7 +38,6 @@
|
|||
<if test="userType != null and userType!=''">
|
||||
AND u.user_Type = #{userType}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY u.user_id, u.account, u.status, u.name, u.user_code, u.user_type, u.user_status, d.dept_name, u.mobile, u.create_time
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
package com.dite.znpt.web.controller;
|
||||
|
||||
import com.dite.znpt.domain.PageResult;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoReq;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoResp;
|
||||
import com.dite.znpt.service.BiddingInfoService;
|
||||
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
|
||||
import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:07
|
||||
* @description
|
||||
*/
|
||||
@Api(tags = "招标信息")
|
||||
@RestController
|
||||
@RequestMapping("/bidding-info")
|
||||
public class BiddingInfoController {
|
||||
|
||||
@Resource
|
||||
private BiddingInfoService biddingInfoService;
|
||||
|
||||
@ApiOperation(value = "分页查询招标信息列表", httpMethod = "GET")
|
||||
@GetMapping("/page")
|
||||
public PageResult<BiddingInfoResp> page(String projectName) {
|
||||
return PageResult.ok(biddingInfoService.page(projectName));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询招标信息列表", httpMethod = "GET")
|
||||
@GetMapping("/list")
|
||||
public Result<List<BiddingInfoResp>> list(String projectName) {
|
||||
return Result.ok(biddingInfoService.list(projectName));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增招标信息", httpMethod = "POST")
|
||||
@PostMapping
|
||||
public Result<?> add(@Validated @RequestBody BiddingInfoReq req){
|
||||
biddingInfoService.save(req);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑招标消息",httpMethod = "POST")
|
||||
@PutMapping("/{biddingInfoId}")
|
||||
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 = "GET")
|
||||
@GetMapping("/download-template")
|
||||
@ResponseExcel(name = "招标信息导入模板")
|
||||
public List<?> downloadTemplate() {
|
||||
return List.of(new BiddingInfoReq());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导入招标信息", httpMethod = "POST")
|
||||
@PostMapping("/import")
|
||||
public Result<?> importData(@RequestExcel List<BiddingInfoReq> dataList, BindingResult bindingResult) {
|
||||
return biddingInfoService.importData(dataList, bindingResult);
|
||||
}
|
||||
|
||||
}
|
|
@ -57,8 +57,8 @@ public class ImageController {
|
|||
|
||||
@ApiOperation(value = "手动批量上传文件夹图像到项目", httpMethod = "POST")
|
||||
@PostMapping("/{projectId}/{imageSource}/upload-batch")
|
||||
public Result<List<ImageReq>> uploadProjectBatch(@PathVariable String projectId, @PathVariable String imageSource, @RequestParam("files") MultipartFile[] files) {
|
||||
return Result.ok(imageService.uploadProjectBatch(projectId, imageSource, files));
|
||||
public Result<List<ImageReq>> uploadProjectBatch(@PathVariable String projectId, @PathVariable String imageSource, ImageCollectReq collectReq, @RequestParam("files") MultipartFile[] files) {
|
||||
return Result.ok(imageService.uploadProjectBatch(projectId, imageSource, collectReq, files));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上传图像", httpMethod = "POST")
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
package com.dite.znpt.web.controller;
|
||||
|
||||
import com.dite.znpt.domain.PageResult;
|
||||
import com.dite.znpt.domain.Result;
|
||||
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.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:13
|
||||
* @description
|
||||
*/
|
||||
@Api(tags = "中标信息")
|
||||
@RestController
|
||||
@RequestMapping("/outbid-info")
|
||||
public class OutbidInfoController {
|
||||
@Resource
|
||||
private OutbidInfoService outbidInfoService;
|
||||
|
||||
@ApiOperation(value = "分页查询中标通知信息列表", httpMethod = "GET")
|
||||
@GetMapping("/page")
|
||||
public PageResult<OutbidInfoResp> page(String projectName){
|
||||
return PageResult.ok(outbidInfoService.page(projectName));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询中标通知信息列表", httpMethod = "GET")
|
||||
@GetMapping("/list")
|
||||
public Result<?> list(String projectName){
|
||||
return Result.ok(outbidInfoService.list(projectName));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据中标通知信息Id获取详细信息", httpMethod = "GET")
|
||||
@GetMapping("/detail/{outbidInfoId}")
|
||||
public Result<OutbidInfoResp> detail(@PathVariable String outbidInfoId){
|
||||
return Result.ok(outbidInfoService.detail(outbidInfoId));
|
||||
}
|
||||
|
||||
@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", notes = "上传附件调用新增附件信息接口:/attach-info/outbidInfo,userDefinedPath = {outbidInfoId}")
|
||||
@PutMapping("/{outbidInfoId}")
|
||||
public Result<Object> update(@PathVariable String outbidInfoId, @RequestBody OutbidInfoReq req){
|
||||
outbidInfoService.update(outbidInfoId, req);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据中标通知信息Id删除信息", httpMethod = "DELETE")
|
||||
@DeleteMapping("/{outbidInfoId}")
|
||||
public Result<Object> delete(@PathVariable String outbidInfoId){
|
||||
outbidInfoService.deleteById(outbidInfoId);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "下载中标通知信息文件", httpMethod = "POST")
|
||||
@PostMapping("/download-outbid-info-file/{outbidNoticeFileId}")
|
||||
public Result<?> downLoadOutbidNoticeFile(@PathVariable String outbidNoticeFileId, HttpServletResponse response) throws Exception {
|
||||
outbidInfoService.downLoadOutbidNoticeFile(outbidNoticeFileId, response);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.dite.znpt.web.controller;
|
||||
|
||||
import com.dite.znpt.domain.PageResult;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoResp;
|
||||
import com.dite.znpt.domain.vo.TenderInfoReq;
|
||||
import com.dite.znpt.domain.vo.TenderInfoResp;
|
||||
import com.dite.znpt.service.TenderInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:10
|
||||
* @description
|
||||
*/
|
||||
@Api(tags = "投标信息")
|
||||
@RestController
|
||||
@RequestMapping("/tender-info")
|
||||
public class TenderInfoController {
|
||||
|
||||
@Resource
|
||||
private TenderInfoService tenderInfoService;
|
||||
|
||||
@ApiOperation(value = "分页查询投标信息列表", httpMethod = "GET")
|
||||
@GetMapping("/page")
|
||||
public PageResult<TenderInfoResp> page(String projectName){
|
||||
return PageResult.ok(tenderInfoService.page(projectName));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询投标信息列表", httpMethod = "GET")
|
||||
@GetMapping("/list")
|
||||
public Result<List<TenderInfoResp>> list(String projectName){
|
||||
return Result.ok(tenderInfoService.list(projectName));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据投标信息Id获取详细信息", httpMethod = "GET")
|
||||
@GetMapping("/detail/{tenderInfoId}")
|
||||
public Result<TenderInfoResp> detail(@PathVariable String tenderInfoId){
|
||||
return Result.ok(tenderInfoService.detail(tenderInfoId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增投标信息", httpMethod = "POST")
|
||||
@PostMapping
|
||||
public Result<?> add(@Validated @RequestBody TenderInfoReq req) {
|
||||
tenderInfoService.save(req);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改投标信息", httpMethod = "PUT", notes = "上传附件调用新增附件信息接口:/attach-info/tenderInfo,userDefinedPath = {tenderInfoId}")
|
||||
@PutMapping("/{tenderInfoId}")
|
||||
public Result<?> edit(@PathVariable String tenderInfoId, @Validated @RequestBody TenderInfoReq req) {
|
||||
tenderInfoService.update(tenderInfoId, req);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除投标信息", httpMethod = "DELETE", notes = "上传附件调用新增附件信息接口:/attach-info/tenderInfo,userDefinedPath = {tenderInfoId}")
|
||||
@DeleteMapping("/{tenderInfoId}")
|
||||
public Result<?> delete(@PathVariable String tenderInfoId) {
|
||||
tenderInfoService.deleteById(tenderInfoId);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue