Compare commits
80 Commits
Author | SHA1 | Date |
---|---|---|
|
3ec94f8487 | |
|
e557a5df86 | |
|
a996310f25 | |
|
a5d5c0006d | |
|
de02aa3891 | |
|
854d311307 | |
|
a589422315 | |
|
0f67c55892 | |
|
e7d892f8a2 | |
|
14ee89c4af | |
|
d8c76f97af | |
|
7665cdd2e0 | |
|
39ec9a99bd | |
|
275cb94c02 | |
|
64d40d0f84 | |
|
67d943af61 | |
|
7034fecc0b | |
|
adc074804e | |
|
ac23b19b0a | |
|
8bdbbdccd5 | |
|
dbbd3922f9 | |
|
24d275045a | |
|
4befd2d588 | |
|
5aa29cc3dd | |
|
0548238a18 | |
|
1c136ed302 | |
|
8c7a441662 | |
|
f2d2800f79 | |
|
bce91a4951 | |
|
b94f7d3f44 | |
|
d7066714e5 | |
|
28ebad9966 | |
|
9b963d43f5 | |
|
4c85f9197c | |
|
1544e3e829 | |
|
ade816ab3f | |
|
8c3da0878e | |
|
ffbf766cee | |
|
b818eec318 | |
|
0a446e5f66 | |
|
8a1c5b04c5 | |
|
5e21feb414 | |
|
524faa18a5 | |
|
a49d01d23a | |
|
351c8e0d8e | |
|
50c343402b | |
|
facf7a8f51 | |
|
d388bbe4a4 | |
|
3ebacd55c1 | |
|
47fb031221 | |
|
345b931de9 | |
|
4cd953ff08 | |
|
8db8dec22b | |
|
6c698b5256 | |
|
3717cbc4ce | |
|
64d469210a | |
|
8e2e73f257 | |
|
d3e0851413 | |
|
075d1daf02 | |
|
141c95f63e | |
|
944681f334 | |
|
14428ca9ae | |
|
b188cbd181 | |
|
d4883a7fb2 | |
|
0d10667ef3 | |
|
f84e1b5aa8 | |
|
02f5447be3 | |
|
8fe29807a8 | |
|
023455be47 | |
|
9723dc0390 | |
|
35fdcf14f6 | |
|
7dbadc7378 | |
|
4b46233805 | |
|
849754b6c6 | |
|
7897ec9de3 | |
|
096151403a | |
|
6e4c96b404 | |
|
4ac2b4314c | |
|
b0f8e7264a | |
|
be16222032 |
36
core/pom.xml
36
core/pom.xml
|
@ -10,6 +10,10 @@
|
|||
<artifactId>core</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -161,6 +165,38 @@
|
|||
<artifactId>opencv</artifactId>
|
||||
<version>4.7.0-0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JavaMail邮件依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云短信核心库 -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>4.6.3</version> <!-- 建议使用最新版本 -->
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云短信服务 SDK -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>2.1.0</version> <!-- 建议使用最新版本 -->
|
||||
</dependency>
|
||||
|
||||
<!-- Java 11+ 需要额外添加的依赖 -->
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -80,4 +80,9 @@ public class Message implements Serializable {
|
|||
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 = "招标[{}]已存中标信息存在";
|
||||
}
|
||||
|
|
|
@ -59,6 +59,8 @@ public interface Converts {
|
|||
|
||||
List<RoleResp> toRoleResp(List<RoleEntity> list);
|
||||
|
||||
List<UserResp> toUserResp(List<UserEntity> list);
|
||||
|
||||
RoleEntity toRoleEntity(RoleReq req);
|
||||
|
||||
MenuEntity toMenuEntity(MenuReq req);
|
||||
|
@ -124,5 +126,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.dite.znpt.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("接受文件夹参数")
|
||||
public class FolderDto {
|
||||
private String name = "tom";
|
||||
private Long parentId = 0L;
|
||||
}
|
|
@ -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,38 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("business_data_part")
|
||||
@ApiModel(value="商务资料文件夹对象")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BusinessDataEntity {
|
||||
|
||||
// 主键
|
||||
private Long folderId = null;
|
||||
// 文件夹名称
|
||||
private String folderName = null;
|
||||
// 父级文件夹
|
||||
private Long parentId = null;
|
||||
// 创建人
|
||||
private Long creatorId = null;
|
||||
// 创建时间
|
||||
private LocalDateTime createTime = null;
|
||||
// 更新时间
|
||||
private LocalDateTime updateTime = null;
|
||||
// 是否删除
|
||||
private Boolean isDeleted = false;
|
||||
// 文件夹路径
|
||||
private String folderPath = null;
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("business_data_part_file")
|
||||
@ApiModel(value="商务资料对象")
|
||||
|
||||
public class BusinessDataFileEntity {
|
||||
|
||||
//文件id
|
||||
private Long fileId = null;
|
||||
//文件夹id
|
||||
private Long folderId = null;
|
||||
//文件名
|
||||
private String fileName = null;
|
||||
//文件路径
|
||||
private String filePath = null;
|
||||
//文件类型
|
||||
private String fileType = "unknown";
|
||||
//文件大小
|
||||
private Long fileSize = null;
|
||||
//上传时间
|
||||
private Date uploadTime = null;
|
||||
//上传人id
|
||||
private Long uploaderId = null;
|
||||
//是否删除
|
||||
private Boolean isDeleted = false;
|
||||
|
||||
}
|
|
@ -1,17 +1,20 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
|
@ -82,6 +85,11 @@ public class ContractEntity extends AuditableEntity implements Serializable {
|
|||
@TableField("payment_date")
|
||||
private Date paymentDate;
|
||||
|
||||
@ExcelProperty("履约时间期限")
|
||||
@ApiModelProperty("履约时间期限")
|
||||
@TableField("performance_deadline")
|
||||
private Date performanceDeadline;
|
||||
|
||||
@ExcelProperty("付款地址/交付地址")
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
@TableField("payment_address")
|
||||
|
@ -106,5 +114,10 @@ public class ContractEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("合同状态")
|
||||
@TableField("contract_status")
|
||||
private String contractStatus;
|
||||
|
||||
@ExcelProperty("合同内容")
|
||||
@ApiModelProperty("合同内容")
|
||||
@TableField("contract_text")
|
||||
private String contractText;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@ 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
|
||||
|
@ -20,13 +21,15 @@ import java.io.Serializable;
|
|||
@TableName("equipment")
|
||||
@ApiModel(value="EquipmentEntity对象", description="设备信息表")
|
||||
public class EquipmentEntity extends AuditableEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -6665040704562461286L;
|
||||
|
||||
@ApiModelProperty("设备id")
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String equipmentId;
|
||||
|
||||
@ApiModelProperty("资产编号")
|
||||
private String assetCode;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
|
@ -45,6 +48,165 @@ public class EquipmentEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("设备序列号")
|
||||
private String equipmentSn;
|
||||
|
||||
@ApiModelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty("配置规格/参数")
|
||||
private String specification;
|
||||
|
||||
@ApiModelProperty("位置状态")
|
||||
private String locationStatus;
|
||||
|
||||
@ApiModelProperty("设备当前物理位置")
|
||||
private String physicalLocation;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String responsiblePerson;
|
||||
|
||||
@ApiModelProperty("健康状态")
|
||||
private String healthStatus;
|
||||
|
||||
@ApiModelProperty("采购时间")
|
||||
private LocalDateTime purchaseTime;
|
||||
|
||||
@ApiModelProperty("入库时间")
|
||||
private LocalDateTime inStockTime;
|
||||
|
||||
@ApiModelProperty("启用时间")
|
||||
private LocalDateTime activationTime;
|
||||
|
||||
@ApiModelProperty("预计报废时间")
|
||||
private LocalDateTime expectedScrapTime;
|
||||
|
||||
@ApiModelProperty("实际报废时间")
|
||||
private LocalDateTime actualScrapTime;
|
||||
|
||||
@ApiModelProperty("状态变更时间")
|
||||
private LocalDateTime statusChangeTime;
|
||||
|
||||
@ApiModelProperty("采购订单")
|
||||
private String purchaseOrder;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
// 移除采购价格字段,使用单价和总价替代
|
||||
// @ApiModelProperty("采购价格")
|
||||
// private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty("当前净值")
|
||||
private BigDecimal currentNetValue;
|
||||
|
||||
@ApiModelProperty("折旧方法")
|
||||
private String depreciationMethod;
|
||||
|
||||
@ApiModelProperty("折旧年限")
|
||||
private Integer depreciationYears;
|
||||
|
||||
@ApiModelProperty("残值")
|
||||
private BigDecimal salvageValue;
|
||||
|
||||
@ApiModelProperty("保修截止日期")
|
||||
private LocalDateTime warrantyExpireDate;
|
||||
|
||||
@ApiModelProperty("上次维护日期")
|
||||
private LocalDateTime lastMaintenanceDate;
|
||||
|
||||
@ApiModelProperty("下次维护日期")
|
||||
private LocalDateTime nextMaintenanceDate;
|
||||
|
||||
@ApiModelProperty("维护人员")
|
||||
private String maintenancePerson;
|
||||
|
||||
@ApiModelProperty("库存条码")
|
||||
private String inventoryBarcode;
|
||||
|
||||
@ApiModelProperty("资产备注")
|
||||
private String assetRemark;
|
||||
|
||||
@ApiModelProperty("次户号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
// 移除备用状态字段,使用现有的 location_status 字段
|
||||
// @ApiModelProperty("备用状态")
|
||||
// private String spareStatus;
|
||||
|
||||
@ApiModelProperty("盘点依据")
|
||||
private String inventoryBasis;
|
||||
|
||||
@ApiModelProperty("动态记录")
|
||||
private String dynamicRecord;
|
||||
|
||||
// 移除认证状态字段,使用现有的 health_status 字段
|
||||
// @ApiModelProperty("认证状态")
|
||||
// private String certificationStatus;
|
||||
|
||||
@ApiModelProperty("使用部门/人")
|
||||
private String usingDepartment;
|
||||
|
||||
@ApiModelProperty("领用时间")
|
||||
private LocalDateTime borrowingTime;
|
||||
|
||||
@ApiModelProperty("归还时间")
|
||||
private LocalDateTime returnTime;
|
||||
|
||||
@ApiModelProperty("出库时间")
|
||||
private LocalDateTime outStockTime;
|
||||
|
||||
@ApiModelProperty("总使用时间")
|
||||
private String totalUsageTime;
|
||||
|
||||
@ApiModelProperty("折旧率")
|
||||
private BigDecimal depreciationRate;
|
||||
|
||||
@ApiModelProperty("折旧方法说明")
|
||||
private String depreciationMethodDesc;
|
||||
|
||||
@ApiModelProperty("发票")
|
||||
private String invoice;
|
||||
|
||||
@ApiModelProperty("发票状态")
|
||||
private String invoiceStatus;
|
||||
|
||||
@ApiModelProperty("附件")
|
||||
private String attachments;
|
||||
|
||||
@ApiModelProperty("照片")
|
||||
private String photos;
|
||||
|
||||
@ApiModelProperty("条码")
|
||||
private String barcode;
|
||||
|
||||
@ApiModelProperty("导入人")
|
||||
private String importer;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态1")
|
||||
private String inventoryTimeStatus1;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态2")
|
||||
private String inventoryTimeStatus2;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态3")
|
||||
private String inventoryTimeStatus3;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态1")
|
||||
private String inventoryCheckTimeStatus1;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态2")
|
||||
private String inventoryCheckTimeStatus2;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态3")
|
||||
private String inventoryCheckTimeStatus3;
|
||||
|
||||
@ApiModelProperty("当前使用记录id")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String useRecordId;
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
@ -13,6 +12,7 @@ import lombok.EqualsAndHashCode;
|
|||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -31,6 +31,10 @@ public class PostEntity extends AuditableEntity implements Serializable {
|
|||
@TableId(value = "post_id", type = IdType.ASSIGN_UUID)
|
||||
private String postId;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField("dept_id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty("岗位名称")
|
||||
@TableField("post_name")
|
||||
private String postName;
|
||||
|
@ -46,4 +50,32 @@ public class PostEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("岗位说明")
|
||||
@TableField("statement")
|
||||
private String statement;
|
||||
|
||||
@ApiModelProperty("岗位任务")
|
||||
@TableField("responsibilities_task")
|
||||
private String responsibilitiesTask;
|
||||
|
||||
@ApiModelProperty("岗位任职资格")
|
||||
@TableField("qualifications")
|
||||
private String qualifications;
|
||||
|
||||
@ApiModelProperty("岗位工作条件")
|
||||
@TableField("working_conditions")
|
||||
private String workingConditions;
|
||||
|
||||
@ApiModelProperty("岗位薪资")
|
||||
@TableField("salary")
|
||||
private Double salary;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ProjectBudgetInfoEntity extends AuditableEntity implements Serializ
|
|||
|
||||
@ExcelProperty("主键")
|
||||
@ApiModelProperty("主键")
|
||||
@TableId(value = "budget_id", type = IdType.ASSIGN_ID)
|
||||
@TableId(value = "budget_id", type = IdType.AUTO)
|
||||
private String budgetId;
|
||||
|
||||
@ExcelProperty("项目id")
|
||||
|
@ -43,13 +43,8 @@ public class ProjectBudgetInfoEntity extends AuditableEntity implements Serializ
|
|||
@TableField("budget_name")
|
||||
private String budgetName;
|
||||
|
||||
@ExcelProperty("预算类型")
|
||||
@ApiModelProperty("预算类型")
|
||||
@TableField("budget_type")
|
||||
private String budgetType;
|
||||
|
||||
@ExcelProperty("预算金额(万元)")
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
@ExcelProperty("预算花费金额")
|
||||
@ApiModelProperty("预算花费金额")
|
||||
@TableField("budget_amount")
|
||||
private Double budgetAmount;
|
||||
|
||||
|
@ -57,5 +52,10 @@ public class ProjectBudgetInfoEntity extends AuditableEntity implements Serializ
|
|||
@ApiModelProperty("预算说明")
|
||||
@TableField("budget_desc")
|
||||
private String budgetDesc;
|
||||
|
||||
@ExcelProperty("附件")
|
||||
@ApiModelProperty("附件")
|
||||
@TableField("attach")
|
||||
private String attach;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,16 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
|||
@TableId(value = "project_id", type = IdType.ASSIGN_UUID)
|
||||
private String projectId;
|
||||
|
||||
@ExcelProperty("项目来源")
|
||||
@ApiModelProperty("项目来源")
|
||||
@TableField("project_origin")
|
||||
private String projectOrigin;
|
||||
|
||||
@ExcelProperty("项目预算")
|
||||
@ApiModelProperty("项目预算")
|
||||
@TableField("project_budget")
|
||||
private Integer projectBudget;
|
||||
|
||||
@ExcelProperty("项目名称")
|
||||
@ApiModelProperty("项目名称")
|
||||
@TableField("project_name")
|
||||
|
@ -91,24 +101,31 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
|||
@TableField("turbine_model")
|
||||
private String turbineModel;
|
||||
|
||||
@ApiModelProperty("施工人员id")
|
||||
// 人员管理已迁移到 project_member 表
|
||||
// 以下字段保留用于向后兼容,但建议使用 ProjectMemberService 进行人员管理
|
||||
@ApiModelProperty("施工人员id(已废弃,请使用ProjectMemberService)")
|
||||
@TableField("constructor_ids")
|
||||
@Deprecated
|
||||
private String constructorIds;
|
||||
|
||||
@ApiModelProperty("安全员id")
|
||||
@ApiModelProperty("安全员id(已废弃,请使用ProjectMemberService)")
|
||||
@TableField("auditor_id")
|
||||
@Deprecated
|
||||
private String auditorId;
|
||||
|
||||
@ApiModelProperty("质量员id")
|
||||
@ApiModelProperty("质量员id(已废弃,请使用ProjectMemberService)")
|
||||
@TableField("quality_officer_id")
|
||||
@Deprecated
|
||||
private String qualityOfficerId;
|
||||
|
||||
@ApiModelProperty("项目经理id")
|
||||
@ApiModelProperty("项目经理id(已废弃,请使用ProjectMemberService)")
|
||||
@TableField("project_manager_id")
|
||||
@Deprecated
|
||||
private String projectManagerId;
|
||||
|
||||
@ApiModelProperty("施工组长id")
|
||||
@ApiModelProperty("施工组长id(已废弃,请使用ProjectMemberService)")
|
||||
@TableField("construct_team_leader_id")
|
||||
@Deprecated
|
||||
private String constructTeamLeaderId;
|
||||
|
||||
@ApiModelProperty("技术方案图片,多个用逗号隔开")
|
||||
|
@ -162,5 +179,35 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
|||
// 施工人员,安全经理,项目经理,商务,财务,高级管理员,项目远程顾问外部协作者,质量经理、现场经理及工作组长。
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("人工成本")
|
||||
private Double laborCost;
|
||||
|
||||
@ApiModelProperty("设备摊销")
|
||||
private Double equipmentAmortization;
|
||||
|
||||
@ApiModelProperty("奖金预提")
|
||||
private Double bonusProvision;
|
||||
|
||||
@ApiModelProperty("交通食宿")
|
||||
private Double transAccomMeals;
|
||||
|
||||
@ApiModelProperty("其他杂费")
|
||||
private Double othersCost;
|
||||
|
||||
@ApiModelProperty("已用人工成本")
|
||||
private Double useLaborCost;
|
||||
|
||||
@ApiModelProperty("已用设备摊销")
|
||||
private Double useEquipmentAmortization;
|
||||
|
||||
@ApiModelProperty("已用奖金预提")
|
||||
private Double useBonusProvision;
|
||||
|
||||
@ApiModelProperty("已用交通食宿")
|
||||
private Double useTransAccomMeals;
|
||||
|
||||
@ApiModelProperty("已用其他杂费")
|
||||
private Double useOthersCost;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员关联表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("project_member")
|
||||
@ApiModel(value="ProjectMemberEntity对象", description="项目人员关联表")
|
||||
public class ProjectMemberEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("关联ID")
|
||||
@TableId(value = "member_id", type = IdType.ASSIGN_UUID)
|
||||
private String memberId;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("机组ID(可选,关联到具体机组)")
|
||||
@TableField("turbine_id")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("任务组ID(可选,关联到具体任务组)")
|
||||
@TableField("task_group_id")
|
||||
private String taskGroupId;
|
||||
|
||||
@ApiModelProperty("任务ID(可选,关联到具体任务)")
|
||||
@TableField("task_id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("项目角色类型:PROJECT_MANAGER-项目经理,SAFETY_OFFICER-安全员,QUALITY_OFFICER-质量员,CONSTRUCTOR-施工人员,TEAM_LEADER-施工组长")
|
||||
@TableField("role_type")
|
||||
private String roleType;
|
||||
|
||||
@ApiModelProperty("具体岗位代码(如:GROUND_SERVICE-地勤,DRIVER-司机,ASCENDING-登高等)")
|
||||
@TableField("job_code")
|
||||
private String jobCode;
|
||||
|
||||
@ApiModelProperty("岗位描述")
|
||||
@TableField("job_desc")
|
||||
private String jobDesc;
|
||||
|
||||
@ApiModelProperty("加入时间")
|
||||
@TableField("join_date")
|
||||
private LocalDate joinDate;
|
||||
|
||||
@ApiModelProperty("离开时间")
|
||||
@TableField("leave_date")
|
||||
private LocalDate leaveDate;
|
||||
|
||||
@ApiModelProperty("状态:ACTIVE-在职,INACTIVE-离职,SUSPENDED-暂停")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
// 非数据库字段,用于显示
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("角色类型描述")
|
||||
private String roleTypeDesc;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("岗位代码描述")
|
||||
private String jobCodeDesc;
|
||||
}
|
|
@ -1,12 +1,15 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
@ -39,9 +42,7 @@ public class RegulationEntity extends AuditableEntity implements Serializable {
|
|||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@ExcelProperty("制度类型")
|
||||
@ApiModelProperty("制度类型")
|
||||
@TableField("regulation_type")
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
|
||||
@ExcelProperty("制度状态")
|
||||
|
@ -97,7 +98,8 @@ public class RegulationEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("创建人姓名")
|
||||
private String createByName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ExcelProperty("制度类型")
|
||||
@ApiModelProperty("制度类型")
|
||||
@TableField("regulation_type")
|
||||
private String regulationType;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.dite.znpt.domain.page;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageBean {
|
||||
private Long total;
|
||||
private List<?> rows;
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
||||
}
|
|
@ -1,14 +1,13 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
|
@ -42,9 +41,6 @@ public class ContractListReq implements Serializable {
|
|||
@ApiModelProperty("部门id")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty("签订日期")
|
||||
private Date signDate;
|
||||
|
||||
@ApiModelProperty("期限")
|
||||
private String duration;
|
||||
|
||||
|
@ -54,9 +50,6 @@ public class ContractListReq implements Serializable {
|
|||
@ApiModelProperty("产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ApiModelProperty("付款日期/交付日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
private String paymentAddress;
|
||||
|
||||
|
@ -72,5 +65,8 @@ public class ContractListReq implements Serializable {
|
|||
@ApiModelProperty("合同状态")
|
||||
private String contractStatus;
|
||||
|
||||
@ApiModelProperty("合同内容")
|
||||
private String contractText;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,14 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
|
@ -62,6 +55,9 @@ public class ContractReq implements Serializable {
|
|||
@ApiModelProperty("付款日期/交付日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("履约时间期限")
|
||||
private Date performanceDeadline;
|
||||
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
private String paymentAddress;
|
||||
|
||||
|
@ -76,5 +72,8 @@ public class ContractReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("合同状态")
|
||||
private String contractStatus;
|
||||
|
||||
@ApiModelProperty("合同内容")
|
||||
private String contractText;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.dite.znpt.domain.entity.ContractEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.ContractEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
|
@ -35,5 +32,8 @@ public class ContractResp extends ContractEntity {
|
|||
|
||||
@ApiModelProperty("已收款金额")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
@ApiModelProperty("合同状态名称")
|
||||
private String contractStatusLabel;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -26,4 +27,154 @@ public class EquipmentListReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("设备状态,0-空闲中,1-使用,3-保养中,4-维修中,5-已报废")
|
||||
private String equipmentStatus;
|
||||
|
||||
@ApiModelProperty("设备序列号")
|
||||
private String equipmentSn;
|
||||
|
||||
@ApiModelProperty("资产编号")
|
||||
private String assetCode;
|
||||
|
||||
@ApiModelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty("位置状态")
|
||||
private String locationStatus;
|
||||
|
||||
@ApiModelProperty("健康状态")
|
||||
private String healthStatus;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String responsiblePerson;
|
||||
|
||||
@ApiModelProperty("使用状态,0-空闲中,1-使用中")
|
||||
private String useStatus;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("设备型号")
|
||||
private String equipmentModel;
|
||||
|
||||
@ApiModelProperty("配置规格/参数")
|
||||
private String specification;
|
||||
|
||||
@ApiModelProperty("设备当前物理位置")
|
||||
private String physicalLocation;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("采购订单号")
|
||||
private String purchaseOrder;
|
||||
|
||||
@ApiModelProperty("维护人员")
|
||||
private String maintenancePerson;
|
||||
|
||||
@ApiModelProperty("次户号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private java.math.BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
private java.math.BigDecimal totalPrice;
|
||||
|
||||
@ApiModelProperty("盘点依据")
|
||||
private String inventoryBasis;
|
||||
|
||||
@ApiModelProperty("动态记录")
|
||||
private String dynamicRecord;
|
||||
|
||||
@ApiModelProperty("库存条码")
|
||||
private String inventoryBarcode;
|
||||
|
||||
@ApiModelProperty("资产备注")
|
||||
private String assetRemark;
|
||||
|
||||
@ApiModelProperty("使用部门/人")
|
||||
private String usingDepartment;
|
||||
|
||||
@ApiModelProperty("发票")
|
||||
private String invoice;
|
||||
|
||||
@ApiModelProperty("条码")
|
||||
private String barcode;
|
||||
|
||||
@ApiModelProperty("导入人")
|
||||
private String importer;
|
||||
|
||||
@ApiModelProperty("采购时间开始")
|
||||
private LocalDateTime purchaseTimeStart;
|
||||
|
||||
@ApiModelProperty("采购时间结束")
|
||||
private LocalDateTime purchaseTimeEnd;
|
||||
|
||||
@ApiModelProperty("入库时间开始")
|
||||
private LocalDateTime inStockTimeStart;
|
||||
|
||||
@ApiModelProperty("入库时间结束")
|
||||
private LocalDateTime inStockTimeEnd;
|
||||
|
||||
@ApiModelProperty("启用时间开始")
|
||||
private LocalDateTime activationTimeStart;
|
||||
|
||||
@ApiModelProperty("启用时间结束")
|
||||
private LocalDateTime activationTimeEnd;
|
||||
|
||||
@ApiModelProperty("预计报废时间开始")
|
||||
private LocalDateTime expectedScrapTimeStart;
|
||||
|
||||
@ApiModelProperty("预计报废时间结束")
|
||||
private LocalDateTime expectedScrapTimeEnd;
|
||||
|
||||
@ApiModelProperty("保修截止日期开始")
|
||||
private LocalDateTime warrantyExpireDateStart;
|
||||
|
||||
@ApiModelProperty("保修截止日期结束")
|
||||
private LocalDateTime warrantyExpireDateEnd;
|
||||
|
||||
@ApiModelProperty("上次维护日期开始")
|
||||
private LocalDateTime lastMaintenanceDateStart;
|
||||
|
||||
@ApiModelProperty("上次维护日期结束")
|
||||
private LocalDateTime lastMaintenanceDateEnd;
|
||||
|
||||
@ApiModelProperty("下次维护日期开始")
|
||||
private LocalDateTime nextMaintenanceDateStart;
|
||||
|
||||
@ApiModelProperty("下次维护日期结束")
|
||||
private LocalDateTime nextMaintenanceDateEnd;
|
||||
|
||||
@ApiModelProperty("创建时间开始")
|
||||
private LocalDateTime createTimeStart;
|
||||
|
||||
@ApiModelProperty("创建时间结束")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@ApiModelProperty("更新时间开始")
|
||||
private LocalDateTime updateTimeStart;
|
||||
|
||||
@ApiModelProperty("更新时间结束")
|
||||
private LocalDateTime updateTimeEnd;
|
||||
|
||||
@ApiModelProperty("当前页码")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("每页大小")
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty("排序字段")
|
||||
private String orderBy;
|
||||
|
||||
@ApiModelProperty("排序方向")
|
||||
private String orderDirection;
|
||||
|
||||
@ApiModelProperty("页码")
|
||||
private Integer page;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ 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
|
||||
|
@ -22,7 +24,7 @@ public class EquipmentReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("设备名称")
|
||||
@NotBlank(message = "设备名称不能为空")
|
||||
@Size(max = 100, message = "设备名称长度不能超过100个字")
|
||||
@Size(max = 200, message = "设备名称长度不能超过200个字")
|
||||
private String equipmentName;
|
||||
|
||||
@ApiModelProperty("设备类型, 枚举:EquipmentTypeEnum")
|
||||
|
@ -31,11 +33,204 @@ public class EquipmentReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("设备型号")
|
||||
@NotBlank(message = "设备型号不能为空")
|
||||
@Size(max = 50, message = "设备型号长度不能超过50个字")
|
||||
@Size(max = 200, message = "设备型号长度不能超过200个字")
|
||||
private String equipmentModel;
|
||||
|
||||
@ApiModelProperty("设备SN")
|
||||
@NotBlank(message = "设备SN不能为空")
|
||||
@Size(max = 50, message = "设备SN长度不能超过50个字")
|
||||
@Size(max = 100, message = "设备SN长度不能超过100个字")
|
||||
private String equipmentSn;
|
||||
|
||||
@ApiModelProperty("资产编号")
|
||||
@Size(max = 50, message = "资产编号长度不能超过50个字")
|
||||
private String assetCode;
|
||||
|
||||
@ApiModelProperty("品牌")
|
||||
@Size(max = 100, message = "品牌长度不能超过100个字")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty("配置规格/参数")
|
||||
@Size(max = 500, message = "配置规格长度不能超过500个字")
|
||||
private String specification;
|
||||
|
||||
@ApiModelProperty("设备状态,枚举:EquipmentStatusEnum")
|
||||
private String equipmentStatus;
|
||||
|
||||
@ApiModelProperty("使用状态,0-空闲中,1-使用中")
|
||||
private String useStatus;
|
||||
|
||||
@ApiModelProperty("位置状态")
|
||||
private String locationStatus;
|
||||
|
||||
@ApiModelProperty("设备当前物理位置")
|
||||
@Size(max = 200, message = "物理位置长度不能超过200个字")
|
||||
private String physicalLocation;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
@Size(max = 100, message = "负责人长度不能超过100个字")
|
||||
private String responsiblePerson;
|
||||
|
||||
@ApiModelProperty("健康状态")
|
||||
private String healthStatus;
|
||||
|
||||
@ApiModelProperty("采购时间")
|
||||
private LocalDateTime purchaseTime;
|
||||
|
||||
@ApiModelProperty("入库时间")
|
||||
private LocalDateTime inStockTime;
|
||||
|
||||
@ApiModelProperty("启用时间")
|
||||
private LocalDateTime activationTime;
|
||||
|
||||
@ApiModelProperty("预计报废时间")
|
||||
private LocalDateTime expectedScrapTime;
|
||||
|
||||
@ApiModelProperty("实际报废时间")
|
||||
private LocalDateTime actualScrapTime;
|
||||
|
||||
@ApiModelProperty("状态变更时间")
|
||||
private LocalDateTime statusChangeTime;
|
||||
|
||||
@ApiModelProperty("采购订单")
|
||||
@Size(max = 100, message = "采购订单长度不能超过100个字")
|
||||
private String purchaseOrder;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Size(max = 200, message = "供应商名称长度不能超过200个字")
|
||||
private String supplierName;
|
||||
|
||||
// 移除采购价格字段,使用单价和总价替代
|
||||
// @ApiModelProperty("采购价格")
|
||||
// private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty("当前净值")
|
||||
private BigDecimal currentNetValue;
|
||||
|
||||
@ApiModelProperty("折旧方法")
|
||||
private String depreciationMethod;
|
||||
|
||||
@ApiModelProperty("折旧年限")
|
||||
private Integer depreciationYears;
|
||||
|
||||
@ApiModelProperty("残值")
|
||||
private BigDecimal salvageValue;
|
||||
|
||||
@ApiModelProperty("保修截止日期")
|
||||
private LocalDateTime warrantyExpireDate;
|
||||
|
||||
@ApiModelProperty("上次维护日期")
|
||||
private LocalDateTime lastMaintenanceDate;
|
||||
|
||||
@ApiModelProperty("下次维护日期")
|
||||
private LocalDateTime nextMaintenanceDate;
|
||||
|
||||
@ApiModelProperty("维护人员")
|
||||
@Size(max = 100, message = "维护人员长度不能超过100个字")
|
||||
private String maintenancePerson;
|
||||
|
||||
@ApiModelProperty("库存条码")
|
||||
@Size(max = 100, message = "库存条码长度不能超过100个字")
|
||||
private String inventoryBarcode;
|
||||
|
||||
@ApiModelProperty("资产备注")
|
||||
@Size(max = 1000, message = "资产备注长度不能超过1000个字")
|
||||
private String assetRemark;
|
||||
|
||||
@ApiModelProperty("次户号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
// 移除备用状态字段,使用现有的 location_status 字段
|
||||
// @ApiModelProperty("备用状态")
|
||||
// private String spareStatus;
|
||||
|
||||
@ApiModelProperty("盘点依据")
|
||||
private String inventoryBasis;
|
||||
|
||||
@ApiModelProperty("动态记录")
|
||||
private String dynamicRecord;
|
||||
|
||||
// 移除认证状态字段,使用现有的 health_status 字段
|
||||
// @ApiModelProperty("认证状态")
|
||||
// private String certificationStatus;
|
||||
|
||||
@ApiModelProperty("使用部门/人")
|
||||
@Size(max = 200, message = "使用部门/人长度不能超过200个字")
|
||||
private String usingDepartment;
|
||||
|
||||
@ApiModelProperty("领用时间")
|
||||
private LocalDateTime borrowingTime;
|
||||
|
||||
@ApiModelProperty("归还时间")
|
||||
private LocalDateTime returnTime;
|
||||
|
||||
@ApiModelProperty("出库时间")
|
||||
private LocalDateTime outStockTime;
|
||||
|
||||
@ApiModelProperty("总使用时间")
|
||||
@Size(max = 100, message = "总使用时间长度不能超过100个字")
|
||||
private String totalUsageTime;
|
||||
|
||||
@ApiModelProperty("折旧率")
|
||||
private BigDecimal depreciationRate;
|
||||
|
||||
@ApiModelProperty("折旧方法说明")
|
||||
@Size(max = 500, message = "折旧方法说明长度不能超过500个字")
|
||||
private String depreciationMethodDesc;
|
||||
|
||||
@ApiModelProperty("发票")
|
||||
@Size(max = 100, message = "发票长度不能超过100个字")
|
||||
private String invoice;
|
||||
|
||||
@ApiModelProperty("发票状态")
|
||||
@Size(max = 50, message = "发票状态长度不能超过50个字")
|
||||
private String invoiceStatus;
|
||||
|
||||
@ApiModelProperty("附件")
|
||||
@Size(max = 500, message = "附件长度不能超过500个字")
|
||||
private String attachments;
|
||||
|
||||
@ApiModelProperty("照片")
|
||||
@Size(max = 500, message = "照片长度不能超过500个字")
|
||||
private String photos;
|
||||
|
||||
@ApiModelProperty("条码")
|
||||
@Size(max = 100, message = "条码长度不能超过100个字")
|
||||
private String barcode;
|
||||
|
||||
@ApiModelProperty("导入人")
|
||||
@Size(max = 100, message = "导入人长度不能超过100个字")
|
||||
private String importer;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态1")
|
||||
@Size(max = 100, message = "盘库时间/状态1长度不能超过100个字")
|
||||
private String inventoryTimeStatus1;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态2")
|
||||
@Size(max = 100, message = "盘库时间/状态2长度不能超过100个字")
|
||||
private String inventoryTimeStatus2;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态3")
|
||||
@Size(max = 100, message = "盘库时间/状态3长度不能超过100个字")
|
||||
private String inventoryTimeStatus3;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态1")
|
||||
@Size(max = 100, message = "盘点时间/状态1长度不能超过100个字")
|
||||
private String inventoryCheckTimeStatus1;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态2")
|
||||
@Size(max = 100, message = "盘点时间/状态2长度不能超过100个字")
|
||||
private String inventoryCheckTimeStatus2;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态3")
|
||||
@Size(max = 100, message = "盘点时间/状态3长度不能超过100个字")
|
||||
private String inventoryCheckTimeStatus3;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import lombok.Data;
|
|||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -21,6 +23,9 @@ public class EquipmentResp implements Serializable {
|
|||
@ApiModelProperty("设备ID")
|
||||
private String equipmentId;
|
||||
|
||||
@ApiModelProperty("资产编号")
|
||||
private String assetCode;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
|
@ -36,6 +41,12 @@ public class EquipmentResp implements Serializable {
|
|||
@ApiModelProperty("设备SN")
|
||||
private String equipmentSn;
|
||||
|
||||
@ApiModelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@ApiModelProperty("配置规格/参数")
|
||||
private String specification;
|
||||
|
||||
@ApiModelProperty("设备状态, 枚举:EquipmentStatusEnum")
|
||||
private String equipmentStatus;
|
||||
|
||||
|
@ -45,6 +56,171 @@ public class EquipmentResp implements Serializable {
|
|||
@ApiModelProperty("设备使用状态,0-空闲中,1-使用中")
|
||||
private String useStatus;
|
||||
|
||||
@ApiModelProperty("位置状态")
|
||||
private String locationStatus;
|
||||
|
||||
@ApiModelProperty("位置状态描述")
|
||||
private String locationStatusLabel;
|
||||
|
||||
@ApiModelProperty("设备当前物理位置")
|
||||
private String physicalLocation;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String responsiblePerson;
|
||||
|
||||
@ApiModelProperty("健康状态")
|
||||
private String healthStatus;
|
||||
|
||||
@ApiModelProperty("健康状态描述")
|
||||
private String healthStatusLabel;
|
||||
|
||||
@ApiModelProperty("采购时间")
|
||||
private LocalDateTime purchaseTime;
|
||||
|
||||
@ApiModelProperty("入库时间")
|
||||
private LocalDateTime inStockTime;
|
||||
|
||||
@ApiModelProperty("启用时间")
|
||||
private LocalDateTime activationTime;
|
||||
|
||||
@ApiModelProperty("预计报废时间")
|
||||
private LocalDateTime expectedScrapTime;
|
||||
|
||||
@ApiModelProperty("实际报废时间")
|
||||
private LocalDateTime actualScrapTime;
|
||||
|
||||
@ApiModelProperty("状态变更时间")
|
||||
private LocalDateTime statusChangeTime;
|
||||
|
||||
@ApiModelProperty("采购订单")
|
||||
private String purchaseOrder;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
// 移除采购价格字段,使用单价和总价替代
|
||||
// @ApiModelProperty("采购价格")
|
||||
// private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty("当前净值")
|
||||
private BigDecimal currentNetValue;
|
||||
|
||||
@ApiModelProperty("折旧方法")
|
||||
private String depreciationMethod;
|
||||
|
||||
@ApiModelProperty("折旧年限")
|
||||
private Integer depreciationYears;
|
||||
|
||||
@ApiModelProperty("残值")
|
||||
private BigDecimal salvageValue;
|
||||
|
||||
@ApiModelProperty("保修截止日期")
|
||||
private LocalDateTime warrantyExpireDate;
|
||||
|
||||
@ApiModelProperty("上次维护日期")
|
||||
private LocalDateTime lastMaintenanceDate;
|
||||
|
||||
@ApiModelProperty("下次维护日期")
|
||||
private LocalDateTime nextMaintenanceDate;
|
||||
|
||||
@ApiModelProperty("维护人员")
|
||||
private String maintenancePerson;
|
||||
|
||||
@ApiModelProperty("库存条码")
|
||||
private String inventoryBarcode;
|
||||
|
||||
@ApiModelProperty("资产备注")
|
||||
private String assetRemark;
|
||||
|
||||
@ApiModelProperty("次户号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
// 移除备用状态字段,使用现有的 location_status 字段
|
||||
// @ApiModelProperty("备用状态")
|
||||
// private String spareStatus;
|
||||
|
||||
// @ApiModelProperty("备用状态描述")
|
||||
// private String spareStatusLabel;
|
||||
|
||||
@ApiModelProperty("盘点依据")
|
||||
private String inventoryBasis;
|
||||
|
||||
@ApiModelProperty("动态记录")
|
||||
private String dynamicRecord;
|
||||
|
||||
// 移除认证状态字段,使用现有的 health_status 字段
|
||||
// @ApiModelProperty("认证状态")
|
||||
// private String certificationStatus;
|
||||
|
||||
// @ApiModelProperty("认证状态描述")
|
||||
// private String certificationStatusLabel;
|
||||
|
||||
@ApiModelProperty("使用部门/人")
|
||||
private String usingDepartment;
|
||||
|
||||
@ApiModelProperty("领用时间")
|
||||
private LocalDateTime borrowingTime;
|
||||
|
||||
@ApiModelProperty("归还时间")
|
||||
private LocalDateTime returnTime;
|
||||
|
||||
@ApiModelProperty("出库时间")
|
||||
private LocalDateTime outStockTime;
|
||||
|
||||
@ApiModelProperty("总使用时间")
|
||||
private String totalUsageTime;
|
||||
|
||||
@ApiModelProperty("折旧率")
|
||||
private BigDecimal depreciationRate;
|
||||
|
||||
@ApiModelProperty("折旧方法说明")
|
||||
private String depreciationMethodDesc;
|
||||
|
||||
@ApiModelProperty("发票")
|
||||
private String invoice;
|
||||
|
||||
@ApiModelProperty("发票状态")
|
||||
private String invoiceStatus;
|
||||
|
||||
@ApiModelProperty("附件")
|
||||
private String attachments;
|
||||
|
||||
@ApiModelProperty("照片")
|
||||
private String photos;
|
||||
|
||||
@ApiModelProperty("条码")
|
||||
private String barcode;
|
||||
|
||||
@ApiModelProperty("导入人")
|
||||
private String importer;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态1")
|
||||
private String inventoryTimeStatus1;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态2")
|
||||
private String inventoryTimeStatus2;
|
||||
|
||||
@ApiModelProperty("盘库时间/状态3")
|
||||
private String inventoryTimeStatus3;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态1")
|
||||
private String inventoryCheckTimeStatus1;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态2")
|
||||
private String inventoryCheckTimeStatus2;
|
||||
|
||||
@ApiModelProperty("盘点时间/状态3")
|
||||
private String inventoryCheckTimeStatus3;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
|
@ -56,4 +232,10 @@ public class EquipmentResp implements Serializable {
|
|||
|
||||
@ApiModelProperty("使用人")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
|
|
@ -106,4 +106,8 @@ public class ImageListResp implements Serializable {
|
|||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("上传时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
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 java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -60,4 +62,8 @@ public class ImageResp implements Serializable {
|
|||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("上传时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
|
|
|
@ -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,29 @@
|
|||
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/8/6/周三 14:37
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("项目预算信息列表请求实体")
|
||||
public class PostListReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3911963210474319099L;
|
||||
|
||||
@ApiModelProperty("岗位名称")
|
||||
private String postName;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty("是否包含部门子节点")
|
||||
private Boolean includeDeptChildren;
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
@ -21,6 +22,10 @@ public class PostReq implements Serializable {
|
|||
@Serial
|
||||
private static final long serialVersionUID = -149328762675637911L;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "部门id不能为空")
|
||||
private String deptId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "岗位名称不能为空")
|
||||
@Size(max = 30, groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "岗位名称长度不能超过30个字符")
|
||||
@ApiModelProperty("岗位名称")
|
||||
|
@ -29,9 +34,24 @@ public class PostReq implements Serializable {
|
|||
@ApiModelProperty("显示顺序")
|
||||
private Integer postSort;
|
||||
|
||||
@ApiModelProperty("状态(0正常 1停用)")
|
||||
@ApiModelProperty("状态(0停用 1正常)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("岗位说明")
|
||||
private String statement;
|
||||
|
||||
@ApiModelProperty("岗位任务")
|
||||
private String responsibilitiesTask;
|
||||
|
||||
@ApiModelProperty("岗位任职资格")
|
||||
private String qualifications;
|
||||
|
||||
@ApiModelProperty("岗位工作条件")
|
||||
private String workingConditions;
|
||||
|
||||
@ApiModelProperty("岗位薪资")
|
||||
private Double salary;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -7,6 +8,7 @@ import lombok.Data;
|
|||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -22,6 +24,12 @@ public class PostResp implements Serializable {
|
|||
@ApiModelProperty("岗位id")
|
||||
private String postId;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty("岗位名称")
|
||||
private String postName;
|
||||
|
||||
|
@ -35,4 +43,25 @@ public class PostResp implements Serializable {
|
|||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("岗位说明")
|
||||
private String statement;
|
||||
|
||||
@ApiModelProperty("岗位任务")
|
||||
private String responsibilitiesTask;
|
||||
|
||||
@ApiModelProperty("岗位任职资格")
|
||||
private String qualifications;
|
||||
|
||||
@ApiModelProperty("岗位工作条件")
|
||||
private String workingConditions;
|
||||
|
||||
@ApiModelProperty("岗位薪资")
|
||||
private Double salary;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
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;
|
||||
|
||||
@Data
|
||||
@ApiModel("项目预算信息详情")
|
||||
public class ProjectBudgetInfoDetailResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 766154886845694269L;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("项目预算")
|
||||
private Double projectBudget;
|
||||
|
||||
@ApiModelProperty("人工成本")
|
||||
private Double laborCost;
|
||||
|
||||
@ApiModelProperty("设备摊销")
|
||||
private Double equipmentAmortization;
|
||||
|
||||
@ApiModelProperty("奖金预提")
|
||||
private Double bonusProvision;
|
||||
|
||||
@ApiModelProperty("交通食宿")
|
||||
private Double transAccomMeals;
|
||||
|
||||
@ApiModelProperty("其他杂费")
|
||||
private Double othersCost;
|
||||
|
||||
@ApiModelProperty("已用人工成本")
|
||||
private Double useLaborCost;
|
||||
|
||||
@ApiModelProperty("已用设备摊销")
|
||||
private Double useEquipmentAmortization;
|
||||
|
||||
@ApiModelProperty("已用奖金预提")
|
||||
private Double useBonusProvision;
|
||||
|
||||
@ApiModelProperty("已用交通食宿")
|
||||
private Double useTransAccomMeals;
|
||||
|
||||
@ApiModelProperty("已用其他杂费")
|
||||
private Double useOthersCost;
|
||||
|
||||
@ApiModelProperty("剩余预算")
|
||||
private Double restBudget;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息表导入请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectBudgetInfo导入请求对象", description="项目预算信息表")
|
||||
public class ProjectBudgetInfoImportReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 580212651388155611L;
|
||||
|
||||
@ExcelProperty(value = "项目Id")
|
||||
private String projectId;
|
||||
|
||||
@ExcelProperty(value = "预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ExcelProperty(value = "预算花费金额")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ExcelProperty(value = "预算说明")
|
||||
private String budgetDesc;
|
||||
|
||||
@ExcelProperty(value = "附件")
|
||||
private String attach;
|
||||
}
|
|
@ -22,7 +22,7 @@ public class ProjectBudgetInfoListReq implements Serializable {
|
|||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("项目预算信息Id")
|
||||
@ApiModelProperty("项目预算单Id")
|
||||
private String budgetId;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
|
@ -31,14 +31,10 @@ public class ProjectBudgetInfoListReq implements Serializable {
|
|||
@ApiModelProperty("预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ApiModelProperty("预算类型")
|
||||
private String budgetType;
|
||||
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
@ApiModelProperty("预算花费金额")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ApiModelProperty("预算说明")
|
||||
private String budgetDesc;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.dite.znpt.domain.vo;
|
|||
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
@ -14,6 +15,7 @@ import lombok.EqualsAndHashCode;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目预算信息列表响应实体")
|
||||
public class ProjectBudgetInfoListResp extends ProjectBudgetInfoEntity {
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,16 +26,13 @@ public class ProjectBudgetInfoReq implements Serializable {
|
|||
@ApiModelProperty("预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ApiModelProperty("预算类型")
|
||||
private String budgetType;
|
||||
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
@ApiModelProperty("预算花费金额")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ApiModelProperty("预算说明")
|
||||
private String budgetDesc;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
private String attachId;
|
||||
@ApiModelProperty("附件")
|
||||
private String attach;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,7 @@ import lombok.EqualsAndHashCode;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目预算信息响应实体")
|
||||
public class ProjectBudgetInfoResp extends ProjectBudgetInfoEntity {
|
||||
|
||||
@ApiModelProperty("预算类型描述")
|
||||
private String budgetTypeDesc;
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,197 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目详情响应VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="ProjectDetailResp对象", description="项目详情响应")
|
||||
public class ProjectDetailResp {
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("项目封面")
|
||||
private String coverUrl;
|
||||
|
||||
@ApiModelProperty("风场名称")
|
||||
private String farmName;
|
||||
|
||||
@ApiModelProperty("风场地址")
|
||||
private String farmAddress;
|
||||
|
||||
@ApiModelProperty("委托单位")
|
||||
private String client;
|
||||
|
||||
@ApiModelProperty("委托单位联系人")
|
||||
private String clientContact;
|
||||
|
||||
@ApiModelProperty("委托单位联系电话")
|
||||
private String clientPhone;
|
||||
|
||||
@ApiModelProperty("检查单位")
|
||||
private String inspectionUnit;
|
||||
|
||||
@ApiModelProperty("检查单位联系人")
|
||||
private String inspectionContact;
|
||||
|
||||
@ApiModelProperty("检查单位联系电话")
|
||||
private String inspectionPhone;
|
||||
|
||||
@ApiModelProperty("项目规模")
|
||||
private String scale;
|
||||
|
||||
@ApiModelProperty("总工期(天数)")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty("风机型号")
|
||||
private String turbineModel;
|
||||
|
||||
@ApiModelProperty("项目状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("项目状态描述")
|
||||
private String statusLabel;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("计划开始时间")
|
||||
private LocalDate plannedStartDate;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private String updateTime;
|
||||
|
||||
// 新增字段 - 对应前端ProjectCard接口
|
||||
@ApiModelProperty("项目预算(万元)")
|
||||
private BigDecimal budget;
|
||||
|
||||
@ApiModelProperty("项目经理")
|
||||
private String manager;
|
||||
|
||||
@ApiModelProperty("团队规模")
|
||||
private Integer teamSize;
|
||||
|
||||
@ApiModelProperty("准备进度百分比")
|
||||
private Integer preparationProgress;
|
||||
|
||||
@ApiModelProperty("项目进度百分比")
|
||||
private Integer progress;
|
||||
|
||||
// 项目人员信息(从新关联表获取)
|
||||
@ApiModelProperty("项目人员列表")
|
||||
private List<ProjectMemberResp> projectMembers;
|
||||
|
||||
// 项目机组信息
|
||||
@ApiModelProperty("项目机组列表")
|
||||
private List<TurbineInfo> turbines;
|
||||
|
||||
// 项目任务信息
|
||||
@ApiModelProperty("项目任务列表")
|
||||
private List<TaskInfo> tasks;
|
||||
|
||||
// 项目预算信息
|
||||
@ApiModelProperty("项目预算列表")
|
||||
private List<BudgetInfo> budgets;
|
||||
|
||||
// 项目日报信息
|
||||
@ApiModelProperty("项目日报列表")
|
||||
private List<DailyReportInfo> dailyReports;
|
||||
|
||||
@Data
|
||||
@ApiModel(value="TurbineInfo对象", description="机组信息")
|
||||
public static class TurbineInfo {
|
||||
@ApiModelProperty("机组ID")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("机组名称")
|
||||
private String turbineName;
|
||||
|
||||
@ApiModelProperty("机组编码")
|
||||
private String turbineCode;
|
||||
|
||||
@ApiModelProperty("机组状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("机组状态描述")
|
||||
private String statusLabel;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel(value="TaskInfo对象", description="任务信息")
|
||||
public static class TaskInfo {
|
||||
@ApiModelProperty("任务ID")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务名称")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("任务状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("任务状态描述")
|
||||
private String statusLabel;
|
||||
|
||||
@ApiModelProperty("计划开始时间")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@ApiModelProperty("计划结束时间")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@ApiModelProperty("实际开始时间")
|
||||
private LocalDate actualStartDate;
|
||||
|
||||
@ApiModelProperty("实际结束时间")
|
||||
private LocalDate actualEndDate;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel(value="BudgetInfo对象", description="预算信息")
|
||||
public static class BudgetInfo {
|
||||
@ApiModelProperty("预算ID")
|
||||
private String budgetId;
|
||||
|
||||
@ApiModelProperty("预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ApiModelProperty("预算说明")
|
||||
private String budgetDesc;
|
||||
}
|
||||
|
||||
@Data
|
||||
@ApiModel(value="DailyReportInfo对象", description="日报信息")
|
||||
public static class DailyReportInfo {
|
||||
@ApiModelProperty("日报ID")
|
||||
private String reportId;
|
||||
|
||||
@ApiModelProperty("日报日期")
|
||||
private LocalDate reportDate;
|
||||
|
||||
@ApiModelProperty("日报提交人")
|
||||
private String submitUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,173 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目看板数据响应VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="ProjectKanbanDataResp对象", description="项目看板数据响应")
|
||||
public class ProjectKanbanDataResp {
|
||||
|
||||
@ApiModelProperty("待施工项目列表")
|
||||
private List<ProjectKanbanItem> pendingProjects;
|
||||
|
||||
@ApiModelProperty("施工中项目列表")
|
||||
private List<ProjectKanbanItem> inProgressProjects;
|
||||
|
||||
@ApiModelProperty("已完工项目列表")
|
||||
private List<ProjectKanbanItem> completedProjects;
|
||||
|
||||
@ApiModelProperty("已审核项目列表")
|
||||
private List<ProjectKanbanItem> auditedProjects;
|
||||
|
||||
@ApiModelProperty("已验收项目列表")
|
||||
private List<ProjectKanbanItem> acceptedProjects;
|
||||
|
||||
@Data
|
||||
@ApiModel(value="ProjectKanbanItem对象", description="项目看板项目项")
|
||||
public static class ProjectKanbanItem {
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("项目封面")
|
||||
private String coverUrl;
|
||||
|
||||
@ApiModelProperty("风场名称")
|
||||
private String farmName;
|
||||
|
||||
@ApiModelProperty("风场地址")
|
||||
private String farmAddress;
|
||||
|
||||
@ApiModelProperty("项目规模")
|
||||
private String scale;
|
||||
|
||||
@ApiModelProperty("总工期(天数)")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty("风机型号")
|
||||
private String turbineModel;
|
||||
|
||||
@ApiModelProperty("项目状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("项目状态描述")
|
||||
private String statusLabel;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("计划开始时间")
|
||||
private LocalDate plannedStartDate;
|
||||
|
||||
@ApiModelProperty("项目经理")
|
||||
private String projectManagerName;
|
||||
|
||||
@ApiModelProperty("安全员")
|
||||
private String safetyOfficerName;
|
||||
|
||||
@ApiModelProperty("质量员")
|
||||
private String qualityOfficerName;
|
||||
|
||||
@ApiModelProperty("施工组长")
|
||||
private String constructionTeamLeaderName;
|
||||
|
||||
@ApiModelProperty("施工人员")
|
||||
private String constructorNames;
|
||||
|
||||
@ApiModelProperty("机组数量")
|
||||
private Long turbineCount;
|
||||
|
||||
@ApiModelProperty("任务数量")
|
||||
private Long taskCount;
|
||||
|
||||
@ApiModelProperty("已完成任务数量")
|
||||
private Long completedTaskCount;
|
||||
|
||||
@ApiModelProperty("项目进度百分比")
|
||||
private Integer progressPercentage;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private String updateTime;
|
||||
|
||||
// 新增字段 - 对应前端ProjectCard接口
|
||||
@ApiModelProperty("项目预算(万元)")
|
||||
private BigDecimal budget;
|
||||
|
||||
@ApiModelProperty("项目经理")
|
||||
private String manager;
|
||||
|
||||
@ApiModelProperty("团队规模")
|
||||
private Integer teamSize;
|
||||
|
||||
@ApiModelProperty("准备进度百分比")
|
||||
private Integer preparationProgress;
|
||||
|
||||
@ApiModelProperty("项目进度百分比")
|
||||
private Integer progress;
|
||||
|
||||
@ApiModelProperty("团队成员列表")
|
||||
private List<TeamMemberResp> teamMembers;
|
||||
|
||||
@Data
|
||||
@ApiModel(value="TeamMemberResp对象", description="团队成员响应")
|
||||
public static class TeamMemberResp {
|
||||
@ApiModelProperty("成员ID")
|
||||
private String memberId;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty("用户头像")
|
||||
private String userAvatar;
|
||||
|
||||
@ApiModelProperty("角色类型")
|
||||
private String roleType;
|
||||
|
||||
@ApiModelProperty("角色类型描述")
|
||||
private String roleTypeDesc;
|
||||
|
||||
@ApiModelProperty("岗位代码")
|
||||
private String jobCode;
|
||||
|
||||
@ApiModelProperty("岗位代码描述")
|
||||
private String jobCodeDesc;
|
||||
|
||||
@ApiModelProperty("岗位描述")
|
||||
private String jobDesc;
|
||||
|
||||
@ApiModelProperty("加入时间")
|
||||
private LocalDate joinDate;
|
||||
|
||||
@ApiModelProperty("离开时间")
|
||||
private LocalDate leaveDate;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目看板统计数据响应VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="ProjectKanbanStatsResp对象", description="项目看板统计数据响应")
|
||||
public class ProjectKanbanStatsResp {
|
||||
|
||||
@ApiModelProperty("总项目数")
|
||||
private Long totalProjectsCount;
|
||||
|
||||
@ApiModelProperty("待施工项目数")
|
||||
private Long pendingProjectCount;
|
||||
|
||||
@ApiModelProperty("施工中项目数")
|
||||
private Long inProgressProjectCount;
|
||||
|
||||
@ApiModelProperty("已完工项目数")
|
||||
private Long completedProjectCount;
|
||||
|
||||
@ApiModelProperty("已审核项目数")
|
||||
private Long auditedProjectCount;
|
||||
|
||||
@ApiModelProperty("已验收项目数")
|
||||
private Long acceptedProjectCount;
|
||||
|
||||
@ApiModelProperty("总机组数")
|
||||
private Long totalTurbineCount;
|
||||
|
||||
@ApiModelProperty("待施工机组数")
|
||||
private Long pendingTurbineCount;
|
||||
|
||||
@ApiModelProperty("施工中机组数")
|
||||
private Long inProgressTurbineCount;
|
||||
|
||||
@ApiModelProperty("已完工机组数")
|
||||
private Long completedTurbineCount;
|
||||
|
||||
@ApiModelProperty("已审核机组数")
|
||||
private Long auditedTurbineCount;
|
||||
|
||||
@ApiModelProperty("已验收机组数")
|
||||
private Long acceptedTurbineCount;
|
||||
|
||||
@ApiModelProperty("总任务数")
|
||||
private Long totalTaskCount;
|
||||
|
||||
@ApiModelProperty("未开始任务数")
|
||||
private Long pendingTaskCount;
|
||||
|
||||
@ApiModelProperty("进行中任务数")
|
||||
private Long inProgressTaskCount;
|
||||
|
||||
@ApiModelProperty("已完成任务数")
|
||||
private Long completedTaskCount;
|
||||
|
||||
@ApiModelProperty("总人员数")
|
||||
private Long totalMemberCount;
|
||||
|
||||
@ApiModelProperty("项目经理数")
|
||||
private Long projectManagerCount;
|
||||
|
||||
@ApiModelProperty("安全员数")
|
||||
private Long safetyOfficerCount;
|
||||
|
||||
@ApiModelProperty("质量员数")
|
||||
private Long qualityOfficerCount;
|
||||
|
||||
@ApiModelProperty("施工人员数")
|
||||
private Long constructorCount;
|
||||
|
||||
@ApiModelProperty("施工组长数")
|
||||
private Long teamLeaderCount;
|
||||
}
|
|
@ -1,7 +1,5 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -23,6 +21,12 @@ public class ProjectListReq implements Serializable {
|
|||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "项目来源")
|
||||
private String projectOrigin;
|
||||
|
||||
@ApiModelProperty(value = "项目预算")
|
||||
private Integer projectBudget;
|
||||
|
||||
@ApiModelProperty("风场名称")
|
||||
private String farmName;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -12,7 +7,6 @@ import lombok.Data;
|
|||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
|
@ -31,6 +25,12 @@ public class ProjectListResp implements Serializable {
|
|||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "项目来源")
|
||||
private String projectOrigin;
|
||||
|
||||
@ApiModelProperty(value = "项目预算")
|
||||
private Integer projectBudget;
|
||||
|
||||
@ApiModelProperty("风场名称")
|
||||
private String farmName;
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员查询请求VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="ProjectMemberListReq对象", description="项目人员查询请求")
|
||||
public class ProjectMemberListReq {
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("机组ID")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("任务组ID")
|
||||
private String taskGroupId;
|
||||
|
||||
@ApiModelProperty("任务ID")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("角色类型")
|
||||
private String roleType;
|
||||
|
||||
@ApiModelProperty("岗位代码")
|
||||
private String jobCode;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("用户姓名(模糊查询)")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户账号(模糊查询)")
|
||||
private String userAccount;
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
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.NotNull;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员请求VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="ProjectMemberReq对象", description="项目人员请求")
|
||||
public class ProjectMemberReq {
|
||||
|
||||
@ApiModelProperty("关联ID(更新时必填)")
|
||||
private String memberId;
|
||||
|
||||
@NotBlank(message = "项目ID不能为空")
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("机组ID(可选)")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("任务组ID(可选)")
|
||||
private String taskGroupId;
|
||||
|
||||
@ApiModelProperty("任务ID(可选)")
|
||||
private String taskId;
|
||||
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
@ApiModelProperty("用户ID")
|
||||
private String userId;
|
||||
|
||||
@NotBlank(message = "角色类型不能为空")
|
||||
@ApiModelProperty("角色类型")
|
||||
private String roleType;
|
||||
|
||||
@ApiModelProperty("岗位代码")
|
||||
private String jobCode;
|
||||
|
||||
@ApiModelProperty("岗位描述")
|
||||
private String jobDesc;
|
||||
|
||||
@NotNull(message = "加入时间不能为空")
|
||||
@ApiModelProperty("加入时间")
|
||||
private LocalDate joinDate;
|
||||
|
||||
@ApiModelProperty("离开时间")
|
||||
private LocalDate leaveDate;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员响应VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="ProjectMemberResp对象", description="项目人员响应")
|
||||
public class ProjectMemberResp {
|
||||
|
||||
@ApiModelProperty("关联ID")
|
||||
private String memberId;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("机组ID")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("机组名称")
|
||||
private String turbineName;
|
||||
|
||||
@ApiModelProperty("任务组ID")
|
||||
private String taskGroupId;
|
||||
|
||||
@ApiModelProperty("任务组名称")
|
||||
private String taskGroupName;
|
||||
|
||||
@ApiModelProperty("任务ID")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务名称")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("用户ID")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("用户账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty("用户头像")
|
||||
private String userAvatar;
|
||||
|
||||
@ApiModelProperty("角色类型")
|
||||
private String roleType;
|
||||
|
||||
@ApiModelProperty("角色类型描述")
|
||||
private String roleTypeDesc;
|
||||
|
||||
@ApiModelProperty("岗位代码")
|
||||
private String jobCode;
|
||||
|
||||
@ApiModelProperty("岗位代码描述")
|
||||
private String jobCodeDesc;
|
||||
|
||||
@ApiModelProperty("岗位描述")
|
||||
private String jobDesc;
|
||||
|
||||
@ApiModelProperty("加入时间")
|
||||
private LocalDate joinDate;
|
||||
|
||||
@ApiModelProperty("离开时间")
|
||||
private LocalDate leaveDate;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
@ -28,6 +27,14 @@ public class ProjectReq implements Serializable {
|
|||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目来源不能为空")
|
||||
@ApiModelProperty("项目来源")
|
||||
private String projectOrigin;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目预算不能为空")
|
||||
@ApiModelProperty("项目预算")
|
||||
private Integer projectBudget;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目名称不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 50, message = "项目名称长度不能超过50字符")
|
||||
@ApiModelProperty("项目名称")
|
||||
|
@ -105,4 +112,19 @@ public class ProjectReq implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty("人工成本")
|
||||
private Double laborCost;
|
||||
|
||||
@ApiModelProperty("设备摊销")
|
||||
private Double equipmentAmortization;
|
||||
|
||||
@ApiModelProperty("奖金预提")
|
||||
private Double bonusProvision;
|
||||
|
||||
@ApiModelProperty("交通食宿")
|
||||
private Double transAccomMeals;
|
||||
|
||||
@ApiModelProperty("其他杂费")
|
||||
private Double othersCost;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,11 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.ProjectEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
|
@ -27,6 +19,15 @@ public class ProjectResp extends ProjectReq implements Serializable {
|
|||
@Serial
|
||||
private static final long serialVersionUID = -1883901559600186726L;
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目来源")
|
||||
private String projectOrigin;
|
||||
|
||||
@ApiModelProperty("项目预算")
|
||||
private Integer projectBudget;
|
||||
|
||||
@ApiModelProperty("施工人员")
|
||||
private String constructorName;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -20,6 +20,9 @@ public enum AttachBusinessTypeEnum {
|
|||
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,54 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/5/27/周二 15:33
|
||||
* @description
|
||||
*/
|
||||
@Getter
|
||||
public enum ContractStatusEnum {
|
||||
|
||||
UN_APPROVAL("UN_APPROVAL", "待审批"),
|
||||
UN_SETTLED("UN_SETTLED", "待结算"),
|
||||
UN_PAY("UN_PAY", "待收款"),
|
||||
COMPLETE("COMPLETE", "已完成"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
ContractStatusEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static ContractStatusEnum getByCode(String code){
|
||||
for (ContractStatusEnum e : ContractStatusEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code){
|
||||
ContractStatusEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(ContractStatusEnum.values().length);
|
||||
for (ContractStatusEnum e : ContractStatusEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/31/周四 15:30
|
||||
* @description 设备健康状态枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum HealthStatusEnum {
|
||||
EXCELLENT("excellent", "优秀"),
|
||||
GOOD("good", "良好"),
|
||||
NORMAL("normal", "一般"),
|
||||
POOR("poor", "较差"),
|
||||
BAD("bad", "差");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
HealthStatusEnum(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static HealthStatusEnum getByCode(String code) {
|
||||
for (HealthStatusEnum e : HealthStatusEnum.values()) {
|
||||
if (e.code.equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
HealthStatusEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll() {
|
||||
List<JSONObject> list = new ArrayList<>(HealthStatusEnum.values().length);
|
||||
for (HealthStatusEnum e : HealthStatusEnum.values()) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/31/周四 15:30
|
||||
* @description 设备位置状态枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum LocationStatusEnum {
|
||||
IN_STOCK("in_stock", "库存中"),
|
||||
ALLOCATED("allocated", "已分配"),
|
||||
REPAIR("repair", "维修中"),
|
||||
SCRAP("scrap", "待报废"),
|
||||
SCRAPPED("scrapped", "已报废"),
|
||||
BORROWED("borrowed", "外借中"),
|
||||
LOST("lost", "丢失");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
LocationStatusEnum(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static LocationStatusEnum getByCode(String code) {
|
||||
for (LocationStatusEnum e : LocationStatusEnum.values()) {
|
||||
if (e.code.equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
LocationStatusEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll() {
|
||||
List<JSONObject> list = new ArrayList<>(LocationStatusEnum.values().length);
|
||||
for (LocationStatusEnum e : LocationStatusEnum.values()) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目岗位代码枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectJobCodeEnum {
|
||||
|
||||
// 地勤相关岗位
|
||||
GROUND_SERVICE("GROUND_SERVICE", "地勤"),
|
||||
GROUND_SERVICE_LEADER("GROUND_SERVICE_LEADER", "地勤组长"),
|
||||
|
||||
// 司机相关岗位
|
||||
DRIVER("DRIVER", "司机"),
|
||||
DRIVER_LEADER("DRIVER_LEADER", "司机组长"),
|
||||
|
||||
// 登高相关岗位
|
||||
ASCENDING("ASCENDING", "登高"),
|
||||
ASCENDING_LEADER("ASCENDING_LEADER", "登高组长"),
|
||||
|
||||
// 防雷相关岗位
|
||||
ANTI_THUNDER("ANTI_THUNDER", "防雷"),
|
||||
ANTI_THUNDER_LEADER("ANTI_THUNDER_LEADER", "防雷组长"),
|
||||
|
||||
// 外部工作相关岗位
|
||||
OUT_WORK("OUT_WORK", "外部工作"),
|
||||
OUT_WORK_LEADER("OUT_WORK_LEADER", "外部工作组长"),
|
||||
|
||||
// 管理岗位
|
||||
PROJECT_MANAGER("PROJECT_MANAGER", "项目经理"),
|
||||
SAFETY_MANAGER("SAFETY_MANAGER", "安全经理"),
|
||||
QUALITY_MANAGER("QUALITY_MANAGER", "质量经理"),
|
||||
SITE_MANAGER("SITE_MANAGER", "现场经理"),
|
||||
|
||||
// 其他岗位
|
||||
TECHNICIAN("TECHNICIAN", "技术员"),
|
||||
SUPERVISOR("SUPERVISOR", "监理"),
|
||||
COORDINATOR("COORDINATOR", "协调员");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
/**
|
||||
* 根据代码获取描述
|
||||
*/
|
||||
public static String getDescByCode(String code) {
|
||||
for (ProjectJobCodeEnum jobCode : values()) {
|
||||
if (jobCode.getCode().equals(code)) {
|
||||
return jobCode.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据代码获取枚举
|
||||
*/
|
||||
public static ProjectJobCodeEnum getByCode(String code) {
|
||||
for (ProjectJobCodeEnum jobCode : values()) {
|
||||
if (jobCode.getCode().equals(code)) {
|
||||
return jobCode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目角色类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectRoleTypeEnum {
|
||||
|
||||
PROJECT_MANAGER("PROJECT_MANAGER", "项目经理"),
|
||||
SAFETY_OFFICER("SAFETY_OFFICER", "安全员"),
|
||||
QUALITY_OFFICER("QUALITY_OFFICER", "质量员"),
|
||||
CONSTRUCTOR("CONSTRUCTOR", "施工人员"),
|
||||
TEAM_LEADER("TEAM_LEADER", "施工组长"),
|
||||
SENIOR_PROJECT_MANAGER("SENIOR_PROJECT_MANAGER", "大项目经理"),
|
||||
REMOTE_ADVISOR("REMOTE_ADVISOR", "项目远程顾问"),
|
||||
EXTERNAL_COLLABORATOR("EXTERNAL_COLLABORATOR", "外部协作者"),
|
||||
FINANCIAL_MANAGER("FINANCIAL_MANAGER", "财务经理"),
|
||||
BUSINESS_MANAGER("BUSINESS_MANAGER", "商务经理"),
|
||||
SITE_MANAGER("SITE_MANAGER", "现场经理");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
/**
|
||||
* 根据代码获取描述
|
||||
*/
|
||||
public static String getDescByCode(String code) {
|
||||
for (ProjectRoleTypeEnum roleType : values()) {
|
||||
if (roleType.getCode().equals(code)) {
|
||||
return roleType.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据代码获取枚举
|
||||
*/
|
||||
public static ProjectRoleTypeEnum getByCode(String code) {
|
||||
for (ProjectRoleTypeEnum roleType : values()) {
|
||||
if (roleType.getCode().equals(code)) {
|
||||
return roleType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -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,20 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.dite.znpt.domain.entity.BusinessDataFileEntity;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiOperation("商务资料文件对象")
|
||||
public interface BusinessDataFileMapper {
|
||||
public List<BusinessDataFileEntity> List(@Param("folderId") Long folderId, @Param("fileName") String fileName);
|
||||
void delete(@Param("fileId") Long fileId,@Param("folderId") Long folderId);
|
||||
|
||||
void add(BusinessDataFileEntity businessDataFileEntity);
|
||||
|
||||
String getPath(Long fileId);
|
||||
|
||||
// 在接口中添加重命名方法
|
||||
void reName(@Param("fileId") Long fileId, @Param("newFileName") String newFileName, @Param("newFilePath") String newFilePath);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.dite.znpt.domain.entity.BusinessDataEntity;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation("商务资料文件夹对象")
|
||||
public interface BusinessDataMapper {
|
||||
public String getPath(Long parentId);
|
||||
|
||||
public List<BusinessDataEntity> List();
|
||||
|
||||
void insert(BusinessDataEntity businessDataEntity);
|
||||
|
||||
void delete(Long folderId);
|
||||
|
||||
void reName(BusinessDataEntity businessDataEntity);
|
||||
|
||||
public List<BusinessDataEntity> ListWithCondition(@Param("folderName") String folderName);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -2,6 +2,10 @@ package com.dite.znpt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.PostEntity;
|
||||
import com.dite.znpt.domain.vo.PostListReq;
|
||||
import com.dite.znpt.domain.vo.PostResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -9,4 +13,6 @@ import com.dite.znpt.domain.entity.PostEntity;
|
|||
* @description
|
||||
*/
|
||||
public interface PostMapper extends BaseMapper<PostEntity> {
|
||||
|
||||
List<PostResp> selectPostResp(PostListReq req);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ProjectMemberEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectMemberListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectMemberResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员关联表Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProjectMemberMapper extends BaseMapper<ProjectMemberEntity> {
|
||||
|
||||
/**
|
||||
* 根据条件查询项目人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryBySelective(ProjectMemberListReq req);
|
||||
|
||||
/**
|
||||
* 根据项目ID查询项目人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryByProjectId(@Param("projectId") String projectId);
|
||||
|
||||
/**
|
||||
* 根据机组ID查询机组人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryByTurbineId(@Param("turbineId") String turbineId);
|
||||
|
||||
/**
|
||||
* 根据任务组ID查询任务组人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryByTaskGroupId(@Param("taskGroupId") String taskGroupId);
|
||||
|
||||
/**
|
||||
* 根据任务ID查询任务人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryByTaskId(@Param("taskId") String taskId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户参与的项目列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryByUserId(@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 根据项目ID和角色类型查询人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> queryByProjectIdAndRoleType(@Param("projectId") String projectId, @Param("roleType") String roleType);
|
||||
}
|
|
@ -18,7 +18,7 @@ public interface RegulationTypeMapper extends BaseMapper<RegulationTypeEntity> {
|
|||
* 分页查询制度类型列表(包含创建人姓名)
|
||||
* @param page 分页参数
|
||||
* @param typeName 类型名称
|
||||
* @param status 状态
|
||||
* @param status 是否启用(1-启用,0-禁用)
|
||||
* @param remark 备注
|
||||
* @return 分页结果
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.BusinessDataFileEntity;
|
||||
import com.dite.znpt.domain.page.PageBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@ApiOperation("商务资料文件service")
|
||||
@Service
|
||||
public interface BusinessDataFileService {
|
||||
|
||||
PageBean pageSelect(Integer page, Integer pageSize, Long folderId, String fileName);
|
||||
|
||||
Result delete(@RequestParam(value = "fileId", required = false) Long fileId,@RequestParam(value = "foldelId", required = false) Long folderId);
|
||||
|
||||
void add(BusinessDataFileEntity businessDataFileEntity);
|
||||
|
||||
String getPath(Long fileId);
|
||||
|
||||
// 在接口中添加重命名方法
|
||||
Result reName(Long fileId, String newFileName);
|
||||
|
||||
// 在接口中添加预览方法
|
||||
// Result preview(Long fileId, HttpServletResponse response);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.page.PageBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
@ApiOperation("商务资料文件夹service")
|
||||
public interface BusinessDataService {
|
||||
|
||||
PageBean pageSelect(Integer page, Integer pageSize, String folderName);
|
||||
Result createFolder(String folderName, Long parentId);
|
||||
String getPath(Long parentId);
|
||||
Result delete(Long folderId);
|
||||
Result reName(Long folderId, String newName);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
//package com.dite.znpt.service;
|
||||
//
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//@Service
|
||||
//public interface EmailService {
|
||||
// /**
|
||||
// * 发送邮箱验证码
|
||||
// * @param email
|
||||
// * @param code
|
||||
// * @return
|
||||
// */
|
||||
// public boolean sendVerificationCode(String email, String code);
|
||||
//
|
||||
// /**
|
||||
// * 生成验证码
|
||||
// * @param email
|
||||
// * @return
|
||||
// */
|
||||
// public String generateCode(String email);
|
||||
//
|
||||
// /**
|
||||
// * 验证邮箱验证码
|
||||
// * @param email
|
||||
// * @param code
|
||||
// * @return
|
||||
// */
|
||||
// public boolean verifyCode(String email, String code);
|
||||
//
|
||||
//}
|
|
@ -1,24 +1,75 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.EquipmentEntity;
|
||||
import com.dite.znpt.domain.vo.EquipmentListReq;
|
||||
import com.dite.znpt.domain.vo.EquipmentReq;
|
||||
import com.dite.znpt.domain.vo.EquipmentResp;
|
||||
import com.dite.znpt.domain.vo.EquipmentUseRecordReq;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 设备服务接口
|
||||
* @author Bear.G
|
||||
* @date 2025/7/23/周三 17:39
|
||||
* @description
|
||||
*/
|
||||
public interface EquipmentService extends IService<EquipmentEntity> {
|
||||
List<EquipmentResp> page(EquipmentListReq req);
|
||||
List<EquipmentResp> list(EquipmentListReq req);
|
||||
|
||||
/**
|
||||
* 分页查询设备信息
|
||||
*/
|
||||
IPage<EquipmentResp> page(EquipmentListReq req);
|
||||
|
||||
/**
|
||||
* 查询设备详情
|
||||
*/
|
||||
EquipmentResp detail(String equipmentId);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*/
|
||||
void save(EquipmentReq req);
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*/
|
||||
void update(String equipmentId, EquipmentReq req);
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*/
|
||||
void deleteById(String equipmentId);
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*/
|
||||
void batchDelete(List<String> equipmentIds);
|
||||
|
||||
/**
|
||||
* 获取采购统计信息
|
||||
*/
|
||||
Object getProcurementStats();
|
||||
|
||||
/**
|
||||
* 导出采购记录
|
||||
*/
|
||||
byte[] exportProcurement(EquipmentListReq req);
|
||||
|
||||
/**
|
||||
* 分页查询设备采购记录
|
||||
*/
|
||||
IPage<EquipmentResp> procurementPage(EquipmentListReq req);
|
||||
|
||||
/**
|
||||
* 新增设备采购记录
|
||||
*/
|
||||
void saveProcurement(EquipmentReq req);
|
||||
|
||||
/**
|
||||
* 修改设备采购记录
|
||||
*/
|
||||
void updateProcurement(String equipmentId, EquipmentReq req);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.dite.znpt.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.PostEntity;
|
||||
import com.dite.znpt.domain.vo.PostListReq;
|
||||
import com.dite.znpt.domain.vo.PostReq;
|
||||
import com.dite.znpt.domain.vo.PostResp;
|
||||
|
||||
|
@ -14,9 +15,9 @@ import java.util.List;
|
|||
*/
|
||||
public interface PostService extends IService<PostEntity> {
|
||||
|
||||
List<PostResp> page(String postName);
|
||||
List<PostResp> page(PostListReq req);
|
||||
|
||||
List<PostResp> list(String postName);
|
||||
List<PostResp> list(PostListReq req);
|
||||
|
||||
PostResp detail(String postId);
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@ package com.dite.znpt.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoDetailResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoImportReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoResp;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -15,34 +16,16 @@ import java.util.List;
|
|||
* @Description: 项目预算信息表服务接口
|
||||
*/
|
||||
public interface ProjectBudgetInfoService extends IService<ProjectBudgetInfoEntity> {
|
||||
List<ProjectBudgetInfoListResp> list(ProjectBudgetInfoListReq projectBudgetInfoListReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目预算信息列表
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息
|
||||
* @return {@link List }<{@link ProjectBudgetInfoListResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
List<ProjectBudgetInfoListResp> selectList(ProjectBudgetInfoListReq projectBudgetInfoReq);
|
||||
List<ProjectBudgetInfoListResp> page(ProjectBudgetInfoListReq projectBudgetInfoListReq);
|
||||
|
||||
/**
|
||||
* 功能描述:根据项目id获取项目预算信息列表
|
||||
*
|
||||
* @param projectId 项目id
|
||||
* @return {@link List }<{@link ProjectBudgetInfoListResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
List<ProjectBudgetInfoResp> detailByProjectId(String projectId);
|
||||
void saveData(ProjectBudgetInfoImportReq req);
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目预算信息
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
void saveData(List<ProjectBudgetInfoReq> projectBudgetInfoReq);
|
||||
void saveData(ProjectBudgetInfoImportReq req, MultipartFile[] files);
|
||||
|
||||
ProjectBudgetInfoDetailResp detailByProjectId(String projectId);
|
||||
|
||||
void delete(String budgetId);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ProjectMemberEntity;
|
||||
import com.dite.znpt.domain.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员关联表服务接口
|
||||
*/
|
||||
public interface ProjectMemberService extends IService<ProjectMemberEntity> {
|
||||
|
||||
/**
|
||||
* 查询项目人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectList(ProjectMemberListReq req);
|
||||
|
||||
/**
|
||||
* 根据项目ID查询项目人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectByProjectId(String projectId);
|
||||
|
||||
/**
|
||||
* 根据机组ID查询机组人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectByTurbineId(String turbineId);
|
||||
|
||||
/**
|
||||
* 根据任务组ID查询任务组人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectByTaskGroupId(String taskGroupId);
|
||||
|
||||
/**
|
||||
* 根据任务ID查询任务人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectByTaskId(String taskId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户参与的项目列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 根据项目ID和角色类型查询人员列表
|
||||
*/
|
||||
List<ProjectMemberResp> selectByProjectIdAndRoleType(String projectId, String roleType);
|
||||
|
||||
/**
|
||||
* 新增项目人员
|
||||
*/
|
||||
void saveData(ProjectMemberReq req);
|
||||
|
||||
/**
|
||||
* 更新项目人员
|
||||
*/
|
||||
void updateData(ProjectMemberReq req);
|
||||
|
||||
/**
|
||||
* 删除项目人员
|
||||
*/
|
||||
void deleteById(String memberId);
|
||||
|
||||
/**
|
||||
* 批量添加项目人员
|
||||
*/
|
||||
void batchAddMembers(List<ProjectMemberReq> reqList);
|
||||
|
||||
/**
|
||||
* 根据项目ID删除所有项目人员
|
||||
*/
|
||||
void deleteByProjectId(String projectId);
|
||||
|
||||
/**
|
||||
* 根据机组ID删除所有机组人员
|
||||
*/
|
||||
void deleteByTurbineId(String turbineId);
|
||||
|
||||
/**
|
||||
* 根据任务组ID删除所有任务组人员
|
||||
*/
|
||||
void deleteByTaskGroupId(String taskGroupId);
|
||||
|
||||
/**
|
||||
* 根据任务ID删除所有任务人员
|
||||
*/
|
||||
void deleteByTaskId(String taskId);
|
||||
|
||||
// ========================== 项目看板相关方法 ==========================
|
||||
|
||||
/**
|
||||
* 获取项目看板统计数据
|
||||
*/
|
||||
ProjectKanbanStatsResp getProjectKanbanStats();
|
||||
|
||||
/**
|
||||
* 获取项目看板数据
|
||||
*/
|
||||
ProjectKanbanDataResp getProjectKanbanData();
|
||||
|
||||
/**
|
||||
* 获取项目详情
|
||||
*/
|
||||
ProjectDetailResp getProjectDetail(String projectId);
|
||||
}
|
|
@ -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);
|
||||
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.PostEntity;
|
||||
import com.dite.znpt.domain.entity.UserPostEntity;
|
||||
import com.dite.znpt.domain.vo.PostResp;
|
||||
import com.dite.znpt.domain.vo.UserResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -16,4 +16,5 @@ public interface UserPostService extends IService<UserPostEntity> {
|
|||
List<PostResp> getPostsByUserId(String userId);
|
||||
void bindUserPost(String userId, List<String> postIds);
|
||||
void bindPostUser(String postId, List<String> userIds);
|
||||
List<UserResp> getUsersByPostId(String postId);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.UserEntity;
|
||||
import com.dite.znpt.domain.entity.UserRoleEntity;
|
||||
import com.dite.znpt.domain.vo.RoleResp;
|
||||
import com.dite.znpt.domain.vo.UserResp;
|
||||
import com.dite.znpt.domain.vo.UserRoleReq;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -19,4 +21,6 @@ public interface UserRoleService extends IService<UserRoleEntity> {
|
|||
void bindUserRole(UserRoleReq req);
|
||||
|
||||
void bindRoleUser(String roleId, List<String> userIds);
|
||||
|
||||
List<UserResp> getUsersByRoleId(String roleId);
|
||||
}
|
||||
|
|
|
@ -82,9 +82,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();
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.dite.znpt.service.PartService;
|
|||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -98,6 +99,7 @@ public class AudioFileInfoServiceImpl extends ServiceImpl<AudioFileInfoMapper, A
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<AudioFileInfoResp> batchUpload(String imageId, MultipartFile[] files) {
|
||||
ImageEntity image = imageMapper.selectById(imageId);
|
||||
if(null == image){
|
||||
|
@ -120,7 +122,7 @@ public class AudioFileInfoServiceImpl extends ServiceImpl<AudioFileInfoMapper, A
|
|||
}
|
||||
}
|
||||
}
|
||||
baseMapper.insert(list);
|
||||
saveBatch(list);
|
||||
return BeanUtil.copyToList(list, AudioFileInfoResp.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()+"条数据");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,163 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.BusinessDataFileEntity;
|
||||
import com.dite.znpt.domain.page.PageBean;
|
||||
import com.dite.znpt.mapper.BusinessDataFileMapper;
|
||||
import com.dite.znpt.service.BusinessDataFileService;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static jodd.io.FileUtil.deleteFile;
|
||||
import static org.apache.tomcat.util.http.fileupload.FileUtils.deleteDirectory;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
@ApiOperation("商务资料文件service实现类")
|
||||
public class BusinessDataFileServiceImpl implements BusinessDataFileService {
|
||||
@Resource
|
||||
private BusinessDataFileMapper businessDataFileMapper;
|
||||
|
||||
|
||||
@ApiOperation("分页查询文件")
|
||||
@Override
|
||||
public PageBean pageSelect(Integer page, Integer pageSize, Long folderId, String fileName) {
|
||||
PageHelper.startPage(page, pageSize);
|
||||
List<BusinessDataFileEntity> list = businessDataFileMapper.List(folderId, fileName);
|
||||
Page<BusinessDataFileEntity> p = (Page<BusinessDataFileEntity>) list;
|
||||
PageBean pageBean = new PageBean(p.getTotal(), p.getResult());
|
||||
return pageBean;
|
||||
}
|
||||
@ApiOperation("删除文件")
|
||||
public Result delete(Long fileId, Long folderId) {
|
||||
//删除数据库数据
|
||||
if (folderId != null){
|
||||
businessDataFileMapper.delete(null,folderId);
|
||||
System.out.println("888888888走对了");
|
||||
|
||||
return Result.okM("删除,走对了,成功");
|
||||
}
|
||||
|
||||
//删除文件
|
||||
String sPath = businessDataFileMapper.getPath(fileId);
|
||||
|
||||
businessDataFileMapper.delete(fileId,null);
|
||||
|
||||
boolean flag = false;
|
||||
File file = new File(sPath);
|
||||
// 判断目录或文件是否存在
|
||||
if (!file.exists()) { // 不存在返回 false
|
||||
return Result.error("文件不存在");
|
||||
} else {
|
||||
// 判断是否为文件
|
||||
if (file.isFile()) { // 为文件时调用删除文件方法
|
||||
try {
|
||||
deleteFile(file);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return Result.okM("删除成功");
|
||||
} else { // 为目录时调用删除目录方法
|
||||
try {
|
||||
deleteDirectory(file);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return Result.okM("删除成功");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("增加文件")
|
||||
public void add(BusinessDataFileEntity businessDataFileEntity) {
|
||||
businessDataFileMapper.add(businessDataFileEntity);
|
||||
}
|
||||
|
||||
@ApiOperation("获取文件路径")
|
||||
public String getPath(Long fileId) {
|
||||
return businessDataFileMapper.getPath(fileId);
|
||||
}
|
||||
|
||||
@ApiOperation("重命名文件")
|
||||
@Override
|
||||
public Result reName(Long fileId, String newFileName) {
|
||||
// 参数校验
|
||||
if (fileId == null) {
|
||||
return Result.error("文件ID不能为空");
|
||||
}
|
||||
if (newFileName == null || newFileName.trim().isEmpty()) {
|
||||
return Result.error("新文件名不能为空");
|
||||
}
|
||||
if (newFileName.length() > 100) {
|
||||
return Result.error("文件名过长");
|
||||
}
|
||||
|
||||
try {
|
||||
// 获取原文件信息
|
||||
String oldFilePath = businessDataFileMapper.getPath(fileId);
|
||||
if (oldFilePath == null) {
|
||||
return Result.error("文件不存在");
|
||||
}
|
||||
|
||||
// 创建原文件对象
|
||||
File oldFile = new File(oldFilePath);
|
||||
if (!oldFile.exists()) {
|
||||
return Result.error("文件不存在");
|
||||
}
|
||||
|
||||
// 构建新文件路径
|
||||
String parentPath = oldFile.getParent();
|
||||
String fileExtension = "";
|
||||
String fileNameWithoutExt = newFileName;
|
||||
|
||||
// 获取原文件扩展名
|
||||
int lastDotIndex = oldFile.getName().lastIndexOf('.');
|
||||
if (lastDotIndex > 0) {
|
||||
fileExtension = oldFile.getName().substring(lastDotIndex);
|
||||
}
|
||||
|
||||
// 如果新文件名没有扩展名,则添加原文件扩展名
|
||||
if (!newFileName.contains(".")) {
|
||||
newFileName = newFileName + fileExtension;
|
||||
}
|
||||
|
||||
// 构建新文件路径
|
||||
String newFilePath = parentPath + File.separator + newFileName;
|
||||
File newFile = new File(newFilePath);
|
||||
|
||||
// 检查新文件名是否已存在
|
||||
if (newFile.exists()) {
|
||||
return Result.error("文件名已存在");
|
||||
}
|
||||
|
||||
// 重命名实际文件
|
||||
boolean renameSuccess = oldFile.renameTo(newFile);
|
||||
if (!renameSuccess) {
|
||||
return Result.error("文件重命名失败");
|
||||
}
|
||||
|
||||
// 更新数据库中的文件信息
|
||||
businessDataFileMapper.reName(fileId, newFileName, newFilePath);
|
||||
|
||||
return Result.okM("文件重命名成功");
|
||||
|
||||
} catch (Exception e) {
|
||||
return Result.error("文件重命名失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.BusinessDataEntity;
|
||||
import com.dite.znpt.domain.page.PageBean;
|
||||
import com.dite.znpt.mapper.BusinessDataMapper;
|
||||
import com.dite.znpt.service.BusinessDataFileService;
|
||||
import com.dite.znpt.service.BusinessDataService;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商务资料文件夹实现类
|
||||
*/
|
||||
@Service
|
||||
@ApiOperation("商务资料文件夹service实现类")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BusinessDataServiceImpl implements BusinessDataService {
|
||||
@Resource
|
||||
private BusinessDataMapper businessDataMapper;
|
||||
@Resource
|
||||
private BusinessDataFileService businessDataFileService;
|
||||
|
||||
// 从配置文件中读取基础路径(默认值:D:/upload/businessData)
|
||||
// ,新建文件夹的时候,如果没指定父文件夹Id,就用这个
|
||||
@Value("${file.upload.businessDataPath:D:/upload/businessData}")
|
||||
private String businessDataPath;
|
||||
|
||||
@ApiOperation(value = "分页查询")
|
||||
@Override
|
||||
public PageBean pageSelect(Integer page, Integer pageSize, String folderName) {
|
||||
PageHelper.startPage(page, pageSize);
|
||||
List<BusinessDataEntity> businessDataEntityList = businessDataMapper.ListWithCondition(folderName);
|
||||
Page<BusinessDataEntity> p = (Page<BusinessDataEntity>) businessDataEntityList;
|
||||
PageBean pageBean = new PageBean(p.getTotal(), p.getResult());
|
||||
return pageBean;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "创建文件夹")
|
||||
@Override
|
||||
public Result createFolder(String folderName, Long parentId) {
|
||||
//获取ID
|
||||
Long loginIdAsLong = 888L;
|
||||
// loginIdAsLong = StpUtil.getLoginIdAsLong();
|
||||
//
|
||||
// 文件夹名称不能为空
|
||||
//TODO: 添加文件夹名称校验,后续最好更规范些,写个工具类专门校验,用正则表达式
|
||||
if (folderName == null || folderName.trim().isEmpty()) {
|
||||
return Result.error("文件夹名称不能为空");
|
||||
}
|
||||
if (folderName.length() > 50) {
|
||||
return Result.error("文件夹名称过长");
|
||||
}
|
||||
|
||||
// 文件夹名称前置一个/
|
||||
String folderName1 = "/" + folderName;
|
||||
// 目标文件夹
|
||||
File targetDir=Paths.get(businessDataPath, folderName1).toFile();
|
||||
if(parentId != 0L){
|
||||
// 获取父文件夹路径
|
||||
targetDir = Paths.get(businessDataMapper.getPath(parentId), folderName1).toFile();
|
||||
}
|
||||
// 创建文件夹和新增文件夹路径
|
||||
if (!targetDir.exists()) {
|
||||
// 创建文件夹
|
||||
boolean created = targetDir.mkdirs();
|
||||
if (!created) {
|
||||
throw new RuntimeException("文件夹创建失败: " + targetDir.getAbsolutePath());
|
||||
}
|
||||
//上面是新增文件夹功能,但没有往数据库插入文件夹相关数据,所以下面新增
|
||||
// 创建BusinessDataEntity对象并设置属性
|
||||
BusinessDataEntity businessDataEntity = new BusinessDataEntity(
|
||||
null,
|
||||
folderName,
|
||||
parentId,
|
||||
loginIdAsLong,
|
||||
LocalDateTime.now(),
|
||||
LocalDateTime.now(),
|
||||
false,
|
||||
targetDir.getAbsolutePath()
|
||||
);
|
||||
// 插入到数据库
|
||||
businessDataMapper.insert(businessDataEntity);
|
||||
return Result.okM( "文件夹创建成功");
|
||||
} else {
|
||||
return Result.error("文件夹已存在: ");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("获取文件夹路径")
|
||||
public String getPath(Long parentId) {
|
||||
return businessDataMapper.getPath(parentId);
|
||||
}
|
||||
|
||||
// @ApiOperation("删除文件夹")
|
||||
// @Override
|
||||
// public Result delete(Long folderId) {
|
||||
// // 获取文件夹路径
|
||||
// String folderPath = businessDataMapper.getPath(folderId);
|
||||
//
|
||||
// // 创建File对象并删除文件夹
|
||||
// File folder = new File(folderPath);
|
||||
// if (folder.exists()) {
|
||||
// boolean deleted = folder.delete();
|
||||
// if (!deleted) {
|
||||
// // throw new RuntimeException("文件夹删除失败: " + folderPath);
|
||||
// // TODO: 以后可以用全局异常处理器捕获,或者用try catch捕获
|
||||
// return Result.error("文件夹删除失败: " + folderPath);
|
||||
// }
|
||||
// //删除数据库中文件夹的数据
|
||||
// businessDataMapper.delete(folderId);
|
||||
// //删除文件夹下文件的数据
|
||||
// businessDataFileService.delete(folderId);
|
||||
// return Result.okM("删除成功");
|
||||
// } else {
|
||||
// // throw new RuntimeException("文件夹不存在: " + folderPath);
|
||||
// return Result.error("文件夹不存在: " + folderPath);
|
||||
// }
|
||||
// }
|
||||
@ApiOperation("删除文件夹")
|
||||
@Override
|
||||
public Result delete(Long folderId) {
|
||||
// 获取文件夹路径
|
||||
String folderPath = businessDataMapper.getPath(folderId);
|
||||
|
||||
// 创建Path对象并删除文件夹
|
||||
Path folder = Paths.get(folderPath);
|
||||
if (Files.exists(folder)) {
|
||||
try {
|
||||
// 使用Files.walk获取所有文件和目录,按深度排序后删除
|
||||
java.util.stream.Stream<Path> filePaths = Files.walk(folder);
|
||||
filePaths.sorted(Comparator.reverseOrder())
|
||||
.map(Path::toFile)
|
||||
.forEach(File::delete);
|
||||
filePaths.close();
|
||||
|
||||
//删除数据库中文件夹的数据
|
||||
businessDataMapper.delete(folderId);
|
||||
//删除文件夹下文件的数据
|
||||
businessDataFileService.delete(null , folderId);
|
||||
return Result.okM("删除成功");
|
||||
} catch (Exception e) {
|
||||
return Result.okM("删除成功");
|
||||
}
|
||||
} else {
|
||||
return Result.error("文件夹不存在: " + folderPath);
|
||||
}
|
||||
}
|
||||
@ApiOperation("重命名文件夹")
|
||||
@Override
|
||||
public Result reName(Long folderId, String newName) {
|
||||
// 获取文件夹路径
|
||||
String folderPath = businessDataMapper.getPath(folderId);
|
||||
String newPath = folderPath.substring(0, folderPath.lastIndexOf('\\'))+"\\" + newName;
|
||||
System.out.printf("7777777"+newPath);
|
||||
//
|
||||
// //想命名的原文件的路径
|
||||
// File file = new File("f:/a/a.xlsx");
|
||||
// //将原文件更改为f:\a\b.xlsx,其中路径是必要的。注意
|
||||
// file.renameTo(new File("f:/a/b.xlsx"));
|
||||
//想命名的原文件夹的路径
|
||||
File file1 = new File(folderPath);
|
||||
//将原文件夹更改为A,其中路径是必要的。注意
|
||||
file1.renameTo(new File(newPath));
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
BusinessDataEntity businessDataEntity = new BusinessDataEntity(
|
||||
folderId,
|
||||
newName,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
now,
|
||||
null,
|
||||
newPath
|
||||
);
|
||||
System.out.println(businessDataEntity);
|
||||
businessDataMapper.reName(businessDataEntity);
|
||||
return Result.okM("重命名成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,17 +1,18 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.ContractEntity;
|
||||
import com.dite.znpt.domain.vo.ContractListReq;
|
||||
import com.dite.znpt.domain.vo.ContractResp;
|
||||
import com.dite.znpt.domain.vo.ContractReq;
|
||||
import com.dite.znpt.service.ContractService;
|
||||
import com.dite.znpt.domain.vo.ContractResp;
|
||||
import com.dite.znpt.enums.ContractStatusEnum;
|
||||
import com.dite.znpt.mapper.ContractMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.service.ContractService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -37,7 +38,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
|
|||
PageUtil.startPage();
|
||||
List<ContractResp> contractList= this.baseMapper.queryBySelective(contractReq);
|
||||
contractList.forEach(resp -> {
|
||||
|
||||
resp.setContractStatusLabel(ContractStatusEnum.getDescByCode(resp.getContractStatus()));
|
||||
});
|
||||
return contractList;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
//package com.dite.znpt.service.impl;
|
||||
//
|
||||
//import com.dite.znpt.service.EmailService;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.beans.factory.annotation.Value;
|
||||
//import org.springframework.http.HttpStatus;
|
||||
//import org.springframework.mail.SimpleMailMessage;
|
||||
//import org.springframework.mail.javamail.JavaMailSender;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.web.server.ResponseStatusException;
|
||||
//
|
||||
//import java.util.Random;
|
||||
//
|
||||
//@Slf4j
|
||||
//@Service
|
||||
//public class EmailServiceImpl implements EmailService {
|
||||
//
|
||||
// @Autowired
|
||||
// private JavaMailSender mailSender;
|
||||
//
|
||||
// @Autowired
|
||||
// private InMemoryVerificationCodeStore codeStore;
|
||||
//
|
||||
// @Value("${email.verification.from}")
|
||||
// private String from;
|
||||
// @Value("${email.verification.subject}")
|
||||
// private String subject;
|
||||
// @Value("${email.verification.template}")
|
||||
// private String template;
|
||||
//
|
||||
// @Override
|
||||
// public boolean sendVerificationCode(String email, String code) {
|
||||
// SimpleMailMessage message = new SimpleMailMessage();
|
||||
// message.setFrom(from);
|
||||
// message.setSubject(subject);
|
||||
// message.setTo(email);
|
||||
// message.setText(String.format(template,code));
|
||||
// try{
|
||||
// mailSender.send(message);
|
||||
// return true;
|
||||
// }catch (Exception e){
|
||||
// log.error("发送邮件失败:",e);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String generateCode(String email) {
|
||||
// if (!codeStore.canSend(email)) {
|
||||
// throw new ResponseStatusException(
|
||||
// HttpStatus.TOO_MANY_REQUESTS, // 429 状态码
|
||||
// "验证码发送过于频繁,请稍后再试"
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// String code = String.format("%04d", new Random().nextInt(9999));
|
||||
// codeStore.save(email, code);
|
||||
// return code;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean verifyCode(String email, String code) {
|
||||
// return codeStore.validate(email, code);
|
||||
// }
|
||||
//}
|
|
@ -1,97 +1,418 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.converts.Converts;
|
||||
import com.dite.znpt.domain.entity.EquipmentEntity;
|
||||
import com.dite.znpt.domain.entity.EquipmentUseRecordEntity;
|
||||
import com.dite.znpt.domain.vo.EquipmentListReq;
|
||||
import com.dite.znpt.domain.vo.EquipmentReq;
|
||||
import com.dite.znpt.domain.vo.EquipmentResp;
|
||||
import com.dite.znpt.domain.vo.EquipmentUseRecordReq;
|
||||
import com.dite.znpt.enums.EquipmentStatusEnum;
|
||||
import com.dite.znpt.enums.EquipmentTypeEnum;
|
||||
import com.dite.znpt.enums.HealthStatusEnum;
|
||||
import com.dite.znpt.enums.LocationStatusEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.EquipmentMapper;
|
||||
import com.dite.znpt.service.EquipmentService;
|
||||
import com.dite.znpt.service.EquipmentUseRecordService;
|
||||
import com.dite.znpt.service.ProjectService;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/23/周三 17:39
|
||||
* @description
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, EquipmentEntity> implements EquipmentService {
|
||||
|
||||
@Resource
|
||||
private EquipmentUseRecordService equipmentUseRecordService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Resource
|
||||
private ProjectService projectService;
|
||||
|
||||
@Override
|
||||
public List<EquipmentResp> page(EquipmentListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.list(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EquipmentResp> list(EquipmentListReq req) {
|
||||
List<EquipmentResp> list = this.baseMapper.selectEquipmentResp(req);
|
||||
list.forEach(resp -> {
|
||||
resp.setEquipmentTypeLabel(EquipmentTypeEnum.getDescByCode(resp.getEquipmentType()));
|
||||
resp.setEquipmentStatusLabel(EquipmentStatusEnum.getDescByCode(resp.getEquipmentStatus()));
|
||||
});
|
||||
return list;
|
||||
public IPage<EquipmentResp> page(EquipmentListReq req) {
|
||||
log.info("开始执行设备分页查询,请求参数: {}", req);
|
||||
|
||||
// 创建分页对象,处理null值
|
||||
Integer pageNum = req.getPage() != null ? req.getPage() : (req.getPageNum() != null ? req.getPageNum() : 1);
|
||||
Integer pageSize = req.getPageSize() != null ? req.getPageSize() : 10;
|
||||
Page<EquipmentEntity> page = new Page<>(pageNum, pageSize);
|
||||
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<EquipmentEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 不需要手动添加 del_flag 条件,@TableLogic 注解会自动处理
|
||||
|
||||
// 添加搜索条件并记录日志
|
||||
int conditionCount = 0;
|
||||
|
||||
if (StringUtils.hasText(req.getEquipmentName())) {
|
||||
queryWrapper.like(EquipmentEntity::getEquipmentName, req.getEquipmentName());
|
||||
log.info("添加设备名称查询条件: {}", req.getEquipmentName());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getEquipmentType())) {
|
||||
queryWrapper.eq(EquipmentEntity::getEquipmentType, req.getEquipmentType());
|
||||
log.info("添加设备类型查询条件: {}", req.getEquipmentType());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getEquipmentStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getEquipmentStatus, req.getEquipmentStatus());
|
||||
log.info("添加设备状态查询条件: {}", req.getEquipmentStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getEquipmentSn())) {
|
||||
queryWrapper.like(EquipmentEntity::getEquipmentSn, req.getEquipmentSn());
|
||||
log.info("添加设备序列号查询条件: {}", req.getEquipmentSn());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getAssetCode())) {
|
||||
queryWrapper.like(EquipmentEntity::getAssetCode, req.getAssetCode());
|
||||
log.info("添加资产编号查询条件: {}", req.getAssetCode());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getBrand())) {
|
||||
queryWrapper.like(EquipmentEntity::getBrand, req.getBrand());
|
||||
log.info("添加品牌查询条件: {}", req.getBrand());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getLocationStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getLocationStatus, req.getLocationStatus());
|
||||
log.info("添加位置状态查询条件: {}", req.getLocationStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getHealthStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getHealthStatus, req.getHealthStatus());
|
||||
log.info("添加健康状态查询条件: {}", req.getHealthStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getResponsiblePerson())) {
|
||||
queryWrapper.like(EquipmentEntity::getResponsiblePerson, req.getResponsiblePerson());
|
||||
log.info("添加负责人查询条件: {}", req.getResponsiblePerson());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getUseStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getUseStatus, req.getUseStatus());
|
||||
log.info("添加使用状态查询条件: {}", req.getUseStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
// 新增查询条件
|
||||
if (StringUtils.hasText(req.getEquipmentModel())) {
|
||||
queryWrapper.like(EquipmentEntity::getEquipmentModel, req.getEquipmentModel());
|
||||
log.info("添加设备型号查询条件: {}", req.getEquipmentModel());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getSpecification())) {
|
||||
queryWrapper.like(EquipmentEntity::getSpecification, req.getSpecification());
|
||||
log.info("添加配置规格查询条件: {}", req.getSpecification());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getPhysicalLocation())) {
|
||||
queryWrapper.like(EquipmentEntity::getPhysicalLocation, req.getPhysicalLocation());
|
||||
log.info("添加物理位置查询条件: {}", req.getPhysicalLocation());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getSupplierName())) {
|
||||
queryWrapper.like(EquipmentEntity::getSupplierName, req.getSupplierName());
|
||||
log.info("添加供应商名称查询条件: {}", req.getSupplierName());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getMaintenancePerson())) {
|
||||
queryWrapper.like(EquipmentEntity::getMaintenancePerson, req.getMaintenancePerson());
|
||||
log.info("添加维护人员查询条件: {}", req.getMaintenancePerson());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getInventoryBarcode())) {
|
||||
queryWrapper.like(EquipmentEntity::getInventoryBarcode, req.getInventoryBarcode());
|
||||
log.info("添加库存条码查询条件: {}", req.getInventoryBarcode());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getAssetRemark())) {
|
||||
queryWrapper.like(EquipmentEntity::getAssetRemark, req.getAssetRemark());
|
||||
log.info("添加资产备注查询条件: {}", req.getAssetRemark());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
// 新增字段查询条件
|
||||
if (StringUtils.hasText(req.getUsingDepartment())) {
|
||||
queryWrapper.like(EquipmentEntity::getUsingDepartment, req.getUsingDepartment());
|
||||
log.info("添加使用部门/人查询条件: {}", req.getUsingDepartment());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getInvoice())) {
|
||||
queryWrapper.like(EquipmentEntity::getInvoice, req.getInvoice());
|
||||
log.info("添加发票查询条件: {}", req.getInvoice());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getBarcode())) {
|
||||
queryWrapper.like(EquipmentEntity::getBarcode, req.getBarcode());
|
||||
log.info("添加条码查询条件: {}", req.getBarcode());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getImporter())) {
|
||||
queryWrapper.like(EquipmentEntity::getImporter, req.getImporter());
|
||||
log.info("添加导入人查询条件: {}", req.getImporter());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
// 新增采购相关字段查询条件
|
||||
if (StringUtils.hasText(req.getAccountNumber())) {
|
||||
queryWrapper.like(EquipmentEntity::getAccountNumber, req.getAccountNumber());
|
||||
log.info("添加次户号查询条件: {}", req.getAccountNumber());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getQuantity() != null) {
|
||||
queryWrapper.eq(EquipmentEntity::getQuantity, req.getQuantity());
|
||||
log.info("添加数量查询条件: {}", req.getQuantity());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getUnitPrice() != null) {
|
||||
queryWrapper.eq(EquipmentEntity::getUnitPrice, req.getUnitPrice());
|
||||
log.info("添加单价查询条件: {}", req.getUnitPrice());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getTotalPrice() != null) {
|
||||
queryWrapper.eq(EquipmentEntity::getTotalPrice, req.getTotalPrice());
|
||||
log.info("添加总价查询条件: {}", req.getTotalPrice());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getInventoryBasis())) {
|
||||
queryWrapper.like(EquipmentEntity::getInventoryBasis, req.getInventoryBasis());
|
||||
log.info("添加盘点依据查询条件: {}", req.getInventoryBasis());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getDynamicRecord())) {
|
||||
queryWrapper.like(EquipmentEntity::getDynamicRecord, req.getDynamicRecord());
|
||||
log.info("添加动态记录查询条件: {}", req.getDynamicRecord());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
// 时间范围查询
|
||||
if (req.getPurchaseTimeStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getPurchaseTime, req.getPurchaseTimeStart());
|
||||
log.info("添加采购时间开始查询条件: {}", req.getPurchaseTimeStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getPurchaseTimeEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getPurchaseTime, req.getPurchaseTimeEnd());
|
||||
log.info("添加采购时间结束查询条件: {}", req.getPurchaseTimeEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getInStockTimeStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getInStockTime, req.getInStockTimeStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getInStockTimeEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getInStockTime, req.getInStockTimeEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getActivationTimeStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getActivationTime, req.getActivationTimeStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getActivationTimeEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getActivationTime, req.getActivationTimeEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getExpectedScrapTimeStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getExpectedScrapTime, req.getExpectedScrapTimeStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getExpectedScrapTimeEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getExpectedScrapTime, req.getExpectedScrapTimeEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getWarrantyExpireDateStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getWarrantyExpireDate, req.getWarrantyExpireDateStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getWarrantyExpireDateEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getWarrantyExpireDate, req.getWarrantyExpireDateEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getLastMaintenanceDateStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getLastMaintenanceDate, req.getLastMaintenanceDateStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getLastMaintenanceDateEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getLastMaintenanceDate, req.getLastMaintenanceDateEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getNextMaintenanceDateStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getNextMaintenanceDate, req.getNextMaintenanceDateStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getNextMaintenanceDateEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getNextMaintenanceDate, req.getNextMaintenanceDateEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getCreateTimeStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getCreateTime, req.getCreateTimeStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getCreateTimeEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getCreateTime, req.getCreateTimeEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getUpdateTimeStart() != null) {
|
||||
queryWrapper.ge(EquipmentEntity::getUpdateTime, req.getUpdateTimeStart());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getUpdateTimeEnd() != null) {
|
||||
queryWrapper.le(EquipmentEntity::getUpdateTime, req.getUpdateTimeEnd());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
log.info("总共添加了 {} 个查询条件", conditionCount);
|
||||
|
||||
// 排序处理
|
||||
if (StringUtils.hasText(req.getOrderBy())) {
|
||||
String orderBy = req.getOrderBy();
|
||||
String orderDirection = "desc".equalsIgnoreCase(req.getOrderDirection()) ? "desc" : "asc";
|
||||
|
||||
switch (orderBy.toLowerCase()) {
|
||||
case "equipment_name":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getEquipmentName);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getEquipmentName);
|
||||
}
|
||||
break;
|
||||
case "equipment_sn":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getEquipmentSn);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getEquipmentSn);
|
||||
}
|
||||
break;
|
||||
case "asset_code":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getAssetCode);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getAssetCode);
|
||||
}
|
||||
break;
|
||||
case "equipment_type":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getEquipmentType);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getEquipmentType);
|
||||
}
|
||||
break;
|
||||
case "equipment_status":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getEquipmentStatus);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getEquipmentStatus);
|
||||
}
|
||||
break;
|
||||
case "brand":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getBrand);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getBrand);
|
||||
}
|
||||
break;
|
||||
case "responsible_person":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getResponsiblePerson);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getResponsiblePerson);
|
||||
}
|
||||
break;
|
||||
case "purchase_time":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getPurchaseTime);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getPurchaseTime);
|
||||
}
|
||||
break;
|
||||
case "purchase_price":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getTotalPrice);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getTotalPrice);
|
||||
}
|
||||
break;
|
||||
case "update_time":
|
||||
if ("desc".equals(orderDirection)) {
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getUpdateTime);
|
||||
} else {
|
||||
queryWrapper.orderByAsc(EquipmentEntity::getUpdateTime);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// 默认按创建时间倒序
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getCreateTime);
|
||||
break;
|
||||
}
|
||||
log.info("添加排序条件: {} {}", orderBy, orderDirection);
|
||||
} else {
|
||||
// 默认按创建时间倒序
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getCreateTime);
|
||||
log.info("使用默认排序: 按创建时间倒序");
|
||||
}
|
||||
|
||||
log.info("执行分页查询,SQL条件: {}", queryWrapper.getTargetSql());
|
||||
|
||||
// 执行分页查询
|
||||
IPage<EquipmentEntity> equipmentPage = this.page(page, queryWrapper);
|
||||
|
||||
log.info("查询完成,总记录数: {}, 当前页记录数: {}", equipmentPage.getTotal(), equipmentPage.getRecords().size());
|
||||
|
||||
// 转换为响应对象
|
||||
List<EquipmentResp> equipmentRespList = equipmentPage.getRecords().stream()
|
||||
.map(this::convertToResp)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 创建响应分页对象
|
||||
Page<EquipmentResp> respPage = new Page<>(equipmentPage.getCurrent(), equipmentPage.getSize(), equipmentPage.getTotal());
|
||||
respPage.setRecords(equipmentRespList);
|
||||
|
||||
return respPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EquipmentResp detail(String equipmentId) {
|
||||
EquipmentResp resp = this.baseMapper.getEquipmentRespByEquipmentId(equipmentId);
|
||||
resp.setEquipmentTypeLabel(EquipmentTypeEnum.getDescByCode(resp.getEquipmentType()));
|
||||
resp.setEquipmentStatusLabel(EquipmentStatusEnum.getDescByCode(resp.getEquipmentStatus()));
|
||||
return resp;
|
||||
EquipmentEntity equipment = this.getById(equipmentId);
|
||||
if (equipment == null) {
|
||||
throw new ServiceException(Message.EQUIPMENT_ID_NOT_EXIST);
|
||||
}
|
||||
return convertToResp(equipment);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(EquipmentReq req) {
|
||||
EquipmentEntity entity = Converts.INSTANCE.toEquipmentUseRecordEntity(req);
|
||||
if(null != getByEquipmentSn(entity.getEquipmentSn())){
|
||||
EquipmentEntity entity = convertToEntity(req);
|
||||
if (getByEquipmentSn(entity.getEquipmentSn()) != null) {
|
||||
throw new ServiceException(Message.EQUIPMENT_SN_EXIST);
|
||||
}
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
private EquipmentEntity getByEquipmentSn(String equipmentSn){
|
||||
return this.getOne(Wrappers.lambdaQuery(EquipmentEntity.class).eq(EquipmentEntity::getEquipmentSn, equipmentSn));
|
||||
private EquipmentEntity getByEquipmentSn(String equipmentSn) {
|
||||
LambdaQueryWrapper<EquipmentEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(EquipmentEntity::getEquipmentSn, equipmentSn);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String equipmentId, EquipmentReq req) {
|
||||
EquipmentEntity equipment = this.getById(equipmentId);
|
||||
if(null == equipment){
|
||||
if (equipment == null) {
|
||||
throw new ServiceException(Message.EQUIPMENT_ID_NOT_EXIST);
|
||||
}
|
||||
if(!equipment.getEquipmentSn().equals(req.getEquipmentSn()) && null != getByEquipmentSn(req.getEquipmentSn())){
|
||||
if (!equipment.getEquipmentSn().equals(req.getEquipmentSn()) && getByEquipmentSn(req.getEquipmentSn()) != null) {
|
||||
throw new ServiceException(Message.EQUIPMENT_SN_EXIST);
|
||||
}
|
||||
EquipmentEntity entity = Converts.INSTANCE.toEquipmentUseRecordEntity(req);
|
||||
EquipmentEntity entity = convertToEntity(req);
|
||||
entity.setEquipmentId(equipmentId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
@ -100,9 +421,393 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
|
|||
@Override
|
||||
public void deleteById(String equipmentId) {
|
||||
EquipmentEntity equipment = this.getById(equipmentId);
|
||||
if(null == equipment){
|
||||
if (equipment == null) {
|
||||
throw new ServiceException(Message.EQUIPMENT_ID_NOT_EXIST);
|
||||
}
|
||||
this.removeById(equipmentId);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void batchDelete(List<String> equipmentIds) {
|
||||
if (equipmentIds == null || equipmentIds.isEmpty()) {
|
||||
throw new ServiceException("设备ID列表不能为空");
|
||||
}
|
||||
this.removeByIds(equipmentIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] exportProcurement(EquipmentListReq req) {
|
||||
// 这里可以实现导出功能,返回Excel文件的字节数组
|
||||
// 暂时返回空数组,实际项目中需要实现具体的导出逻辑
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* 将EquipmentReq转换为EquipmentEntity
|
||||
*/
|
||||
private EquipmentEntity convertToEntity(EquipmentReq req) {
|
||||
EquipmentEntity entity = new EquipmentEntity();
|
||||
entity.setAssetCode(req.getAssetCode());
|
||||
entity.setEquipmentName(req.getEquipmentName());
|
||||
entity.setEquipmentModel(req.getEquipmentModel());
|
||||
entity.setEquipmentType(req.getEquipmentType());
|
||||
entity.setEquipmentStatus(req.getEquipmentStatus());
|
||||
entity.setUseStatus(req.getUseStatus());
|
||||
entity.setEquipmentSn(req.getEquipmentSn());
|
||||
entity.setBrand(req.getBrand());
|
||||
entity.setSpecification(req.getSpecification());
|
||||
entity.setLocationStatus(req.getLocationStatus());
|
||||
entity.setPhysicalLocation(req.getPhysicalLocation());
|
||||
entity.setResponsiblePerson(req.getResponsiblePerson());
|
||||
entity.setHealthStatus(req.getHealthStatus());
|
||||
entity.setPurchaseTime(req.getPurchaseTime());
|
||||
entity.setInStockTime(req.getInStockTime());
|
||||
entity.setActivationTime(req.getActivationTime());
|
||||
entity.setExpectedScrapTime(req.getExpectedScrapTime());
|
||||
entity.setActualScrapTime(req.getActualScrapTime());
|
||||
entity.setStatusChangeTime(req.getStatusChangeTime());
|
||||
entity.setPurchaseOrder(req.getPurchaseOrder());
|
||||
entity.setSupplierName(req.getSupplierName());
|
||||
entity.setCurrentNetValue(req.getCurrentNetValue());
|
||||
entity.setDepreciationMethod(req.getDepreciationMethod());
|
||||
entity.setDepreciationYears(req.getDepreciationYears());
|
||||
entity.setSalvageValue(req.getSalvageValue());
|
||||
entity.setWarrantyExpireDate(req.getWarrantyExpireDate());
|
||||
entity.setLastMaintenanceDate(req.getLastMaintenanceDate());
|
||||
entity.setNextMaintenanceDate(req.getNextMaintenanceDate());
|
||||
entity.setMaintenancePerson(req.getMaintenancePerson());
|
||||
entity.setInventoryBarcode(req.getInventoryBarcode());
|
||||
entity.setAssetRemark(req.getAssetRemark());
|
||||
|
||||
// 新增采购相关字段
|
||||
entity.setAccountNumber(req.getAccountNumber());
|
||||
entity.setQuantity(req.getQuantity());
|
||||
entity.setUnitPrice(req.getUnitPrice());
|
||||
entity.setTotalPrice(req.getTotalPrice());
|
||||
entity.setInventoryBasis(req.getInventoryBasis());
|
||||
entity.setDynamicRecord(req.getDynamicRecord());
|
||||
|
||||
// 新增字段转换
|
||||
entity.setUsingDepartment(req.getUsingDepartment());
|
||||
entity.setBorrowingTime(req.getBorrowingTime());
|
||||
entity.setReturnTime(req.getReturnTime());
|
||||
entity.setOutStockTime(req.getOutStockTime());
|
||||
entity.setTotalUsageTime(req.getTotalUsageTime());
|
||||
entity.setDepreciationRate(req.getDepreciationRate());
|
||||
entity.setDepreciationMethodDesc(req.getDepreciationMethodDesc());
|
||||
entity.setInvoice(req.getInvoice());
|
||||
entity.setInvoiceStatus(req.getInvoiceStatus());
|
||||
entity.setAttachments(req.getAttachments());
|
||||
entity.setPhotos(req.getPhotos());
|
||||
entity.setBarcode(req.getBarcode());
|
||||
entity.setImporter(req.getImporter());
|
||||
entity.setInventoryTimeStatus1(req.getInventoryTimeStatus1());
|
||||
entity.setInventoryTimeStatus2(req.getInventoryTimeStatus2());
|
||||
entity.setInventoryTimeStatus3(req.getInventoryTimeStatus3());
|
||||
entity.setInventoryCheckTimeStatus1(req.getInventoryCheckTimeStatus1());
|
||||
entity.setInventoryCheckTimeStatus2(req.getInventoryCheckTimeStatus2());
|
||||
entity.setInventoryCheckTimeStatus3(req.getInventoryCheckTimeStatus3());
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为响应对象
|
||||
*/
|
||||
private EquipmentResp convertToResp(EquipmentEntity entity) {
|
||||
EquipmentResp resp = new EquipmentResp();
|
||||
resp.setEquipmentId(entity.getEquipmentId());
|
||||
resp.setAssetCode(entity.getAssetCode());
|
||||
resp.setEquipmentName(entity.getEquipmentName());
|
||||
resp.setEquipmentType(entity.getEquipmentType());
|
||||
resp.setEquipmentTypeLabel(EquipmentTypeEnum.getDescByCode(entity.getEquipmentType()));
|
||||
resp.setEquipmentModel(entity.getEquipmentModel());
|
||||
resp.setEquipmentSn(entity.getEquipmentSn());
|
||||
resp.setBrand(entity.getBrand());
|
||||
resp.setSpecification(entity.getSpecification());
|
||||
resp.setEquipmentStatus(entity.getEquipmentStatus());
|
||||
resp.setEquipmentStatusLabel(EquipmentStatusEnum.getDescByCode(entity.getEquipmentStatus()));
|
||||
resp.setUseStatus(entity.getUseStatus());
|
||||
resp.setLocationStatus(entity.getLocationStatus());
|
||||
resp.setLocationStatusLabel(LocationStatusEnum.getDescByCode(entity.getLocationStatus()));
|
||||
resp.setPhysicalLocation(entity.getPhysicalLocation());
|
||||
resp.setResponsiblePerson(entity.getResponsiblePerson());
|
||||
resp.setHealthStatus(entity.getHealthStatus());
|
||||
resp.setHealthStatusLabel(HealthStatusEnum.getDescByCode(entity.getHealthStatus()));
|
||||
resp.setPurchaseTime(entity.getPurchaseTime());
|
||||
resp.setInStockTime(entity.getInStockTime());
|
||||
resp.setActivationTime(entity.getActivationTime());
|
||||
resp.setExpectedScrapTime(entity.getExpectedScrapTime());
|
||||
resp.setActualScrapTime(entity.getActualScrapTime());
|
||||
resp.setStatusChangeTime(entity.getStatusChangeTime());
|
||||
resp.setPurchaseOrder(entity.getPurchaseOrder());
|
||||
resp.setSupplierName(entity.getSupplierName());
|
||||
resp.setCurrentNetValue(entity.getCurrentNetValue());
|
||||
resp.setDepreciationMethod(entity.getDepreciationMethod());
|
||||
resp.setDepreciationYears(entity.getDepreciationYears());
|
||||
resp.setSalvageValue(entity.getSalvageValue());
|
||||
resp.setWarrantyExpireDate(entity.getWarrantyExpireDate());
|
||||
resp.setLastMaintenanceDate(entity.getLastMaintenanceDate());
|
||||
resp.setNextMaintenanceDate(entity.getNextMaintenanceDate());
|
||||
resp.setMaintenancePerson(entity.getMaintenancePerson());
|
||||
resp.setInventoryBarcode(entity.getInventoryBarcode());
|
||||
resp.setAssetRemark(entity.getAssetRemark());
|
||||
|
||||
// 新增采购相关字段
|
||||
resp.setAccountNumber(entity.getAccountNumber());
|
||||
resp.setQuantity(entity.getQuantity());
|
||||
resp.setUnitPrice(entity.getUnitPrice());
|
||||
resp.setTotalPrice(entity.getTotalPrice());
|
||||
resp.setInventoryBasis(entity.getInventoryBasis());
|
||||
resp.setDynamicRecord(entity.getDynamicRecord());
|
||||
|
||||
// 新增字段转换
|
||||
resp.setUsingDepartment(entity.getUsingDepartment());
|
||||
resp.setBorrowingTime(entity.getBorrowingTime());
|
||||
resp.setReturnTime(entity.getReturnTime());
|
||||
resp.setOutStockTime(entity.getOutStockTime());
|
||||
resp.setTotalUsageTime(entity.getTotalUsageTime());
|
||||
resp.setDepreciationRate(entity.getDepreciationRate());
|
||||
resp.setDepreciationMethodDesc(entity.getDepreciationMethodDesc());
|
||||
resp.setInvoice(entity.getInvoice());
|
||||
resp.setInvoiceStatus(entity.getInvoiceStatus());
|
||||
resp.setAttachments(entity.getAttachments());
|
||||
resp.setPhotos(entity.getPhotos());
|
||||
resp.setBarcode(entity.getBarcode());
|
||||
resp.setImporter(entity.getImporter());
|
||||
resp.setInventoryTimeStatus1(entity.getInventoryTimeStatus1());
|
||||
resp.setInventoryTimeStatus2(entity.getInventoryTimeStatus2());
|
||||
resp.setInventoryTimeStatus3(entity.getInventoryTimeStatus3());
|
||||
resp.setInventoryCheckTimeStatus1(entity.getInventoryCheckTimeStatus1());
|
||||
resp.setInventoryCheckTimeStatus2(entity.getInventoryCheckTimeStatus2());
|
||||
resp.setInventoryCheckTimeStatus3(entity.getInventoryCheckTimeStatus3());
|
||||
|
||||
resp.setCreateTime(entity.getCreateTime());
|
||||
resp.setUpdateTime(entity.getUpdateTime());
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
// 采购管理相关方法实现
|
||||
@Override
|
||||
public IPage<EquipmentResp> procurementPage(EquipmentListReq req) {
|
||||
log.info("开始执行设备采购记录分页查询,请求参数: {}", req);
|
||||
|
||||
// 创建分页对象,处理null值
|
||||
Integer pageNum = req.getPage() != null ? req.getPage() : (req.getPageNum() != null ? req.getPageNum() : 1);
|
||||
Integer pageSize = req.getPageSize() != null ? req.getPageSize() : 10;
|
||||
Page<EquipmentEntity> page = new Page<>(pageNum, pageSize);
|
||||
|
||||
// 构建查询条件,参考设备分页查询的逻辑
|
||||
LambdaQueryWrapper<EquipmentEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 不需要手动添加 del_flag 条件,@TableLogic 注解会自动处理
|
||||
|
||||
// 添加搜索条件并记录日志
|
||||
int conditionCount = 0;
|
||||
|
||||
if (StringUtils.hasText(req.getEquipmentName())) {
|
||||
queryWrapper.like(EquipmentEntity::getEquipmentName, req.getEquipmentName());
|
||||
log.info("添加设备名称查询条件: {}", req.getEquipmentName());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getEquipmentType())) {
|
||||
queryWrapper.eq(EquipmentEntity::getEquipmentType, req.getEquipmentType());
|
||||
log.info("添加设备类型查询条件: {}", req.getEquipmentType());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getEquipmentStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getEquipmentStatus, req.getEquipmentStatus());
|
||||
log.info("添加设备状态查询条件: {}", req.getEquipmentStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getEquipmentSn())) {
|
||||
queryWrapper.like(EquipmentEntity::getEquipmentSn, req.getEquipmentSn());
|
||||
log.info("添加设备序列号查询条件: {}", req.getEquipmentSn());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getAssetCode())) {
|
||||
queryWrapper.like(EquipmentEntity::getAssetCode, req.getAssetCode());
|
||||
log.info("添加资产编号查询条件: {}", req.getAssetCode());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getBrand())) {
|
||||
queryWrapper.like(EquipmentEntity::getBrand, req.getBrand());
|
||||
log.info("添加品牌查询条件: {}", req.getBrand());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getLocationStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getLocationStatus, req.getLocationStatus());
|
||||
log.info("添加位置状态查询条件: {}", req.getLocationStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getHealthStatus())) {
|
||||
queryWrapper.eq(EquipmentEntity::getHealthStatus, req.getHealthStatus());
|
||||
log.info("添加健康状态查询条件: {}", req.getHealthStatus());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getResponsiblePerson())) {
|
||||
queryWrapper.like(EquipmentEntity::getResponsiblePerson, req.getResponsiblePerson());
|
||||
log.info("添加负责人查询条件: {}", req.getResponsiblePerson());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getPhysicalLocation())) {
|
||||
queryWrapper.like(EquipmentEntity::getPhysicalLocation, req.getPhysicalLocation());
|
||||
log.info("添加物理位置查询条件: {}", req.getPhysicalLocation());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
// 添加采购相关的搜索条件
|
||||
if (StringUtils.hasText(req.getPurchaseOrder())) {
|
||||
queryWrapper.like(EquipmentEntity::getPurchaseOrder, req.getPurchaseOrder());
|
||||
log.info("添加采购订单查询条件: {}", req.getPurchaseOrder());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getSupplierName())) {
|
||||
queryWrapper.like(EquipmentEntity::getSupplierName, req.getSupplierName());
|
||||
log.info("添加供应商查询条件: {}", req.getSupplierName());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getAccountNumber())) {
|
||||
queryWrapper.like(EquipmentEntity::getAccountNumber, req.getAccountNumber());
|
||||
log.info("添加次户号查询条件: {}", req.getAccountNumber());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getQuantity() != null) {
|
||||
queryWrapper.eq(EquipmentEntity::getQuantity, req.getQuantity());
|
||||
log.info("添加数量查询条件: {}", req.getQuantity());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getUnitPrice() != null) {
|
||||
queryWrapper.eq(EquipmentEntity::getUnitPrice, req.getUnitPrice());
|
||||
log.info("添加单价查询条件: {}", req.getUnitPrice());
|
||||
conditionCount++;
|
||||
}
|
||||
if (req.getTotalPrice() != null) {
|
||||
queryWrapper.eq(EquipmentEntity::getTotalPrice, req.getTotalPrice());
|
||||
log.info("添加总价查询条件: {}", req.getTotalPrice());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getInventoryBasis())) {
|
||||
queryWrapper.like(EquipmentEntity::getInventoryBasis, req.getInventoryBasis());
|
||||
log.info("添加盘点依据查询条件: {}", req.getInventoryBasis());
|
||||
conditionCount++;
|
||||
}
|
||||
if (StringUtils.hasText(req.getDynamicRecord())) {
|
||||
queryWrapper.like(EquipmentEntity::getDynamicRecord, req.getDynamicRecord());
|
||||
log.info("添加动态记录查询条件: {}", req.getDynamicRecord());
|
||||
conditionCount++;
|
||||
}
|
||||
|
||||
log.info("总共添加了 {} 个查询条件", conditionCount);
|
||||
|
||||
// 按采购时间倒序排列
|
||||
queryWrapper.orderByDesc(EquipmentEntity::getPurchaseTime);
|
||||
|
||||
// 执行查询
|
||||
IPage<EquipmentEntity> result = this.page(page, queryWrapper);
|
||||
|
||||
// 转换为响应对象
|
||||
List<EquipmentResp> records = result.getRecords().stream()
|
||||
.map(this::convertToResp)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 创建新的分页结果
|
||||
Page<EquipmentResp> respPage = new Page<>(result.getCurrent(), result.getSize(), result.getTotal());
|
||||
respPage.setRecords(records);
|
||||
|
||||
log.info("设备采购记录分页查询完成,总记录数: {}", result.getTotal());
|
||||
return respPage;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void saveProcurement(EquipmentReq req) {
|
||||
log.info("开始新增设备采购记录,请求参数: {}", req);
|
||||
|
||||
// 验证采购订单号唯一性
|
||||
if (StringUtils.hasText(req.getPurchaseOrder())) {
|
||||
LambdaQueryWrapper<EquipmentEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(EquipmentEntity::getPurchaseOrder, req.getPurchaseOrder());
|
||||
long count = this.count(queryWrapper);
|
||||
if (count > 0) {
|
||||
throw new ServiceException("采购订单号已存在");
|
||||
}
|
||||
}
|
||||
|
||||
// 设置采购相关的时间字段
|
||||
if (req.getPurchaseTime() == null) {
|
||||
req.setPurchaseTime(LocalDateTime.now());
|
||||
}
|
||||
|
||||
// 转换为实体并保存
|
||||
EquipmentEntity entity = convertToEntity(req);
|
||||
this.save(entity);
|
||||
|
||||
log.info("设备采购记录新增成功,设备ID: {}", entity.getEquipmentId());
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void updateProcurement(String equipmentId, EquipmentReq req) {
|
||||
log.info("开始修改设备采购记录,设备ID: {}, 请求参数: {}", equipmentId, req);
|
||||
|
||||
// 检查设备是否存在
|
||||
EquipmentEntity existingEntity = this.getById(equipmentId);
|
||||
if (existingEntity == null) {
|
||||
throw new ServiceException("设备不存在");
|
||||
}
|
||||
|
||||
// 验证采购订单号唯一性(排除当前设备)
|
||||
if (StringUtils.hasText(req.getPurchaseOrder())) {
|
||||
LambdaQueryWrapper<EquipmentEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(EquipmentEntity::getPurchaseOrder, req.getPurchaseOrder())
|
||||
.ne(EquipmentEntity::getEquipmentId, equipmentId);
|
||||
long count = this.count(queryWrapper);
|
||||
if (count > 0) {
|
||||
throw new ServiceException("采购订单号已存在");
|
||||
}
|
||||
}
|
||||
|
||||
// 转换为实体并更新
|
||||
EquipmentEntity entity = convertToEntity(req);
|
||||
entity.setEquipmentId(equipmentId);
|
||||
this.updateById(entity);
|
||||
|
||||
log.info("设备采购记录修改成功,设备ID: {}", equipmentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getProcurementStats() {
|
||||
log.info("开始获取采购统计信息");
|
||||
|
||||
// 统计采购总金额
|
||||
LambdaQueryWrapper<EquipmentEntity> priceWrapper = new LambdaQueryWrapper<>();
|
||||
priceWrapper.isNotNull(EquipmentEntity::getTotalPrice);
|
||||
List<EquipmentEntity> priceEntities = this.list(priceWrapper);
|
||||
double totalAmount = priceEntities.stream()
|
||||
.mapToDouble(entity -> entity.getTotalPrice() != null ? entity.getTotalPrice().doubleValue() : 0)
|
||||
.sum();
|
||||
|
||||
// 统计供应商数量
|
||||
LambdaQueryWrapper<EquipmentEntity> supplierWrapper = new LambdaQueryWrapper<>();
|
||||
supplierWrapper.isNotNull(EquipmentEntity::getSupplierName)
|
||||
.groupBy(EquipmentEntity::getSupplierName);
|
||||
long supplierCount = this.count(supplierWrapper);
|
||||
|
||||
// 统计采购设备数量
|
||||
LambdaQueryWrapper<EquipmentEntity> equipmentWrapper = new LambdaQueryWrapper<>();
|
||||
equipmentWrapper.isNotNull(EquipmentEntity::getPurchaseOrder);
|
||||
long equipmentCount = this.count(equipmentWrapper);
|
||||
|
||||
// 构建统计结果
|
||||
java.util.Map<String, Object> stats = new java.util.HashMap<>();
|
||||
stats.put("totalAmount", totalAmount);
|
||||
stats.put("supplierCount", supplierCount);
|
||||
stats.put("equipmentCount", equipmentCount);
|
||||
stats.put("averageAmount", equipmentCount > 0 ? totalAmount / equipmentCount : 0);
|
||||
|
||||
log.info("采购统计信息获取完成,总金额: {}, 供应商数: {}, 设备数: {}", totalAmount, supplierCount, equipmentCount);
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,10 +141,13 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
if (StrUtil.isEmpty(imageSource) || Objects.isNull(ImageSourceEnum.getByCode(imageSource))) {
|
||||
throw new ServiceException(Message.IMAGE_SOURCE_IS_NOT_EXIST);
|
||||
}
|
||||
PartResp partResp = partService.detail(partId);
|
||||
if(null == files || files.length == 0){
|
||||
throw new ServiceException(Message.IMAGE_IS_EMPTY);
|
||||
}
|
||||
PartResp partResp = partService.detail(partId);
|
||||
if (Objects.isNull(partResp)) {
|
||||
throw new ServiceException(Message.PART_ID_IS_NOT_EXIST);
|
||||
}
|
||||
List<ImageReq> list = new ArrayList<>(files.length);
|
||||
File temCategory = new File(FilePathEnum.IMAGE_TEMP.getFileAbsolutePathPrefix());
|
||||
if (!temCategory.exists()) {
|
||||
|
@ -161,7 +164,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 +188,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 +205,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,74 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Component
|
||||
public class InMemoryVerificationCodeStore {
|
||||
|
||||
// 存储邮箱验证码的map
|
||||
private final Map<String,codeInfo> emailCodeMap = new ConcurrentHashMap<>();
|
||||
|
||||
public void save(String email, String code){
|
||||
// 设置五分钟过期
|
||||
emailCodeMap.put(email,new codeInfo(code, LocalDateTime.now().plusMinutes(5)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证验证码
|
||||
* @param email
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public boolean validate(String email, String code){
|
||||
codeInfo codeInfo = emailCodeMap.get(email);
|
||||
if(codeInfo == null){
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isValid = false;
|
||||
if(code.equals(codeInfo.getCode()) && LocalDateTime.now().isBefore(codeInfo.getExpireTime())){
|
||||
isValid = true;
|
||||
}
|
||||
if(isValid){
|
||||
emailCodeMap.remove(email);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断邮箱是否可发送验证码
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
public boolean canSend(String email){
|
||||
codeInfo codeInfo = emailCodeMap.get(email);
|
||||
if(codeInfo != null && LocalDateTime.now().isBefore(codeInfo.getExpireTime())){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class codeInfo {
|
||||
// 验证码
|
||||
private String code;
|
||||
|
||||
// 过期时间
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
// 上一次发送时间
|
||||
private LocalDateTime lastSendTime;
|
||||
|
||||
public codeInfo(String code, LocalDateTime expireTime){
|
||||
this.code = code;
|
||||
this.expireTime = expireTime;
|
||||
this.lastSendTime = LocalDateTime.now();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
|
@ -99,7 +99,7 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, PartEntity> impleme
|
|||
if(StrUtil.isNotEmpty(turbine.getProjectId())){
|
||||
ProjectEntity project = projectService.getById(turbine.getProjectId());
|
||||
if(null != project){
|
||||
resp.setProjectId(resp.getProjectId());
|
||||
resp.setProjectId(project.getProjectId());
|
||||
resp.setProjectName(project.getProjectName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,16 +5,20 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.converts.Converts;
|
||||
import com.dite.znpt.domain.entity.DeptEntity;
|
||||
import com.dite.znpt.domain.entity.PostEntity;
|
||||
import com.dite.znpt.domain.vo.PostListReq;
|
||||
import com.dite.znpt.domain.vo.PostReq;
|
||||
import com.dite.znpt.domain.vo.PostResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.DeptMapper;
|
||||
import com.dite.znpt.mapper.PostMapper;
|
||||
import com.dite.znpt.service.PostService;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -25,15 +29,18 @@ import java.util.List;
|
|||
@Service
|
||||
public class PostServiceImpl extends ServiceImpl<PostMapper, PostEntity> implements PostService {
|
||||
|
||||
@Resource
|
||||
private DeptMapper deptMapper;
|
||||
|
||||
@Override
|
||||
public List<PostResp> page(String postName) {
|
||||
public List<PostResp> page(PostListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.list(postName);
|
||||
return this.list(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PostResp> list(String postName) {
|
||||
return Converts.INSTANCE.toPostResp(this.list(Wrappers.lambdaQuery(PostEntity.class).like(StrUtil.isNotBlank(postName), PostEntity::getPostName, postName)));
|
||||
public List<PostResp> list(PostListReq req) {
|
||||
return this.baseMapper.selectPostResp(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoDetailResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoImportReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoResp;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import com.dite.znpt.enums.BudgeTypeEnum;
|
||||
import com.dite.znpt.mapper.ProjectBudgetInfoMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.ProjectBudgetInfoService;
|
||||
import com.dite.znpt.service.ProjectService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -30,63 +29,98 @@ import java.util.List;
|
|||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectBudgetInfoServiceImpl extends ServiceImpl<ProjectBudgetInfoMapper, ProjectBudgetInfoEntity> implements ProjectBudgetInfoService {
|
||||
@Resource
|
||||
ProjectService projectService;
|
||||
|
||||
private final AttachInfoService attachInfoService;
|
||||
@Resource
|
||||
AttachInfoServiceImpl attachInfoService;
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目预算信息列表
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息信息
|
||||
* @return {@link List }<{@link ProjectBudgetInfoResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectBudgetInfoListResp> selectList(ProjectBudgetInfoListReq projectBudgetInfoReq) {
|
||||
PageUtil.startPage();
|
||||
List<ProjectBudgetInfoListResp> projectBudgetInfoList= this.baseMapper.queryBySelective(projectBudgetInfoReq);
|
||||
projectBudgetInfoList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return projectBudgetInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:根据项目id获取项目预算信息列表
|
||||
*
|
||||
* @param projectId 项目id
|
||||
* @return {@link List }<{@link ProjectBudgetInfoListResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectBudgetInfoResp> detailByProjectId(String projectId) {
|
||||
List<ProjectBudgetInfoResp> projectBudgetInfoList= this.baseMapper.detailByProjectId(projectId);
|
||||
projectBudgetInfoList.forEach(resp -> {
|
||||
resp.setBudgetTypeDesc(BudgeTypeEnum.getDescByCode(resp.getBudgetType()));
|
||||
});
|
||||
return projectBudgetInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目预算信息
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveData(List<ProjectBudgetInfoReq> projectBudgetInfoReq) {
|
||||
List<ProjectBudgetInfoEntity> list = new ArrayList<>();
|
||||
for (ProjectBudgetInfoReq req : projectBudgetInfoReq) {
|
||||
ProjectBudgetInfoEntity info = BeanUtil.copyProperties(req, ProjectBudgetInfoEntity.class);
|
||||
info.setBudgetId(IdUtil.simpleUUID());
|
||||
attachInfoService.updateBusinessIdByAttachIds(info.getBudgetId(), ListUtil.of(req.getAttachId()), AttachBusinessTypeEnum.PROJECT_BUDGE);
|
||||
list.add(info);
|
||||
public List<ProjectBudgetInfoListResp> list(ProjectBudgetInfoListReq req) {
|
||||
List<ProjectBudgetInfoListResp> list = this.baseMapper.queryBySelective(req);
|
||||
if (CollectionUtil.isEmpty(list)) {
|
||||
return Collections.emptyList(); // 返回不可修改的空集合
|
||||
}
|
||||
lambdaUpdate().eq(ProjectBudgetInfoEntity::getProjectId, list.get(0).getProjectId()).remove();
|
||||
baseMapper.insert(list);
|
||||
list.forEach(item -> {
|
||||
item.setProjectName(projectService.getById(item.getProjectId()).getProjectName());
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectBudgetInfoListResp> page(ProjectBudgetInfoListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.list(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveData(ProjectBudgetInfoImportReq req) {
|
||||
ProjectBudgetInfoEntity entity = BeanUtil.copyProperties(req, ProjectBudgetInfoEntity.class);
|
||||
ProjectEntity projectEntity = projectService.getById(req.getProjectId());
|
||||
switch (req.getBudgetName()) {
|
||||
case "人工成本":
|
||||
projectEntity.setUseLaborCost(projectEntity.getUseLaborCost() + req.getBudgetAmount());
|
||||
break;
|
||||
case "设备摊销":
|
||||
projectEntity.setUseEquipmentAmortization(projectEntity.getUseEquipmentAmortization() + req.getBudgetAmount());
|
||||
break;
|
||||
case "奖金预提":
|
||||
projectEntity.setUseBonusProvision(projectEntity.getUseBonusProvision() + req.getBudgetAmount());
|
||||
break;
|
||||
case "交通食宿":
|
||||
projectEntity.setUseTransAccomMeals(projectEntity.getUseTransAccomMeals() + req.getBudgetAmount());
|
||||
break;
|
||||
case "其他杂费":
|
||||
projectEntity.setUseOthersCost(projectEntity.getUseOthersCost() + req.getBudgetAmount());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
projectService.updateById(projectEntity);
|
||||
this.baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveData(ProjectBudgetInfoImportReq req, MultipartFile[] files) {
|
||||
ProjectBudgetInfoEntity entity = BeanUtil.copyProperties(req, ProjectBudgetInfoEntity.class);
|
||||
// 把附件存起来,使用已有的附件上传逻辑就行,但我看不懂,pass
|
||||
this.baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectBudgetInfoDetailResp detailByProjectId(String projectId) {
|
||||
ProjectEntity projectEntity = projectService.getById(projectId);
|
||||
ProjectBudgetInfoDetailResp resp = new ProjectBudgetInfoDetailResp();
|
||||
BeanUtil.copyProperties(projectEntity, resp);
|
||||
resp.setRestBudget(resp.getProjectBudget() - resp.getUseLaborCost() - resp.getUseEquipmentAmortization() - resp.getUseBonusProvision() - resp.getUseTransAccomMeals() - resp.getUseOthersCost());
|
||||
return resp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String budgetId) {
|
||||
ProjectBudgetInfoEntity entity = this.baseMapper.selectById(budgetId);
|
||||
ProjectEntity projectEntity = projectService.getById(entity.getProjectId());
|
||||
switch (entity.getBudgetName()) {
|
||||
case "人工成本":
|
||||
projectEntity.setUseLaborCost(projectEntity.getUseLaborCost() - entity.getBudgetAmount());
|
||||
break;
|
||||
case "设备摊销":
|
||||
projectEntity.setUseEquipmentAmortization(projectEntity.getUseEquipmentAmortization() - entity.getBudgetAmount());
|
||||
break;
|
||||
case "奖金预提":
|
||||
projectEntity.setUseBonusProvision(projectEntity.getUseBonusProvision() - entity.getBudgetAmount());
|
||||
break;
|
||||
case "交通食宿":
|
||||
projectEntity.setUseTransAccomMeals(projectEntity.getUseTransAccomMeals() - entity.getBudgetAmount());
|
||||
break;
|
||||
case "其他杂费":
|
||||
projectEntity.setUseOthersCost(projectEntity.getUseOthersCost() - entity.getBudgetAmount());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
projectService.updateById(projectEntity);
|
||||
this.baseMapper.deleteById(budgetId);
|
||||
// 删除附件
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,490 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.domain.entity.*;
|
||||
import com.dite.znpt.domain.vo.*;
|
||||
import com.dite.znpt.enums.ProjectJobCodeEnum;
|
||||
import com.dite.znpt.enums.ProjectRoleTypeEnum;
|
||||
import com.dite.znpt.enums.ProjectStatusEnum;
|
||||
import com.dite.znpt.enums.ProjectTaskStateEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.ProjectMemberMapper;
|
||||
import com.dite.znpt.service.*;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/08/05
|
||||
* @Description: 项目人员关联表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, ProjectMemberEntity> implements ProjectMemberService {
|
||||
|
||||
private final UserService userService;
|
||||
|
||||
// 添加其他服务依赖
|
||||
private final ProjectService projectService;
|
||||
private final TurbineService turbineService;
|
||||
private final ProjectTaskService projectTaskService;
|
||||
private final ProjectBudgetInfoService projectBudgetInfoService;
|
||||
private final ProjectDailyReportService projectDailyReportService;
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectList(ProjectMemberListReq req) {
|
||||
PageUtil.startPage();
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryBySelective(req);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectByProjectId(String projectId) {
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryByProjectId(projectId);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectByTurbineId(String turbineId) {
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryByTurbineId(turbineId);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectByTaskGroupId(String taskGroupId) {
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryByTaskGroupId(taskGroupId);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectByTaskId(String taskId) {
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryByTaskId(taskId);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectByUserId(String userId) {
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryByUserId(userId);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectMemberResp> selectByProjectIdAndRoleType(String projectId, String roleType) {
|
||||
List<ProjectMemberResp> list = this.baseMapper.queryByProjectIdAndRoleType(projectId, roleType);
|
||||
enrichMemberInfo(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveData(ProjectMemberReq req) {
|
||||
// 验证用户是否存在
|
||||
UserEntity user = userService.getById(req.getUserId());
|
||||
if (user == null) {
|
||||
throw new ServiceException(Message.USER_ID_NOT_EXIST_OR_ILLEGAL);
|
||||
}
|
||||
|
||||
// 检查是否已存在相同的关联
|
||||
boolean exists = lambdaQuery()
|
||||
.eq(ProjectMemberEntity::getProjectId, req.getProjectId())
|
||||
.eq(ProjectMemberEntity::getUserId, req.getUserId())
|
||||
.eq(StrUtil.isNotEmpty(req.getTurbineId()), ProjectMemberEntity::getTurbineId, req.getTurbineId())
|
||||
.eq(StrUtil.isNotEmpty(req.getTaskGroupId()), ProjectMemberEntity::getTaskGroupId, req.getTaskGroupId())
|
||||
.eq(StrUtil.isNotEmpty(req.getTaskId()), ProjectMemberEntity::getTaskId, req.getTaskId())
|
||||
.eq(ProjectMemberEntity::getRoleType, req.getRoleType())
|
||||
.exists();
|
||||
|
||||
if (exists) {
|
||||
throw new ServiceException("该用户在此项目中已存在相同角色");
|
||||
}
|
||||
|
||||
ProjectMemberEntity entity = BeanUtil.copyProperties(req, ProjectMemberEntity.class);
|
||||
if (StrUtil.isEmpty(entity.getStatus())) {
|
||||
entity.setStatus("ACTIVE");
|
||||
}
|
||||
save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateData(ProjectMemberReq req) {
|
||||
if (StrUtil.isEmpty(req.getMemberId())) {
|
||||
throw new ServiceException("关联ID不能为空");
|
||||
}
|
||||
|
||||
ProjectMemberEntity entity = getById(req.getMemberId());
|
||||
if (entity == null) {
|
||||
throw new ServiceException(Message.PROJECT_ID_IS_NOT_EXIST);
|
||||
}
|
||||
|
||||
BeanUtil.copyProperties(req, entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteById(String memberId) {
|
||||
removeById(memberId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchAddMembers(List<ProjectMemberReq> reqList) {
|
||||
if (CollUtil.isEmpty(reqList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (ProjectMemberReq req : reqList) {
|
||||
saveData(req);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteByProjectId(String projectId) {
|
||||
lambdaUpdate()
|
||||
.eq(ProjectMemberEntity::getProjectId, projectId)
|
||||
.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteByTurbineId(String turbineId) {
|
||||
lambdaUpdate()
|
||||
.eq(ProjectMemberEntity::getTurbineId, turbineId)
|
||||
.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteByTaskGroupId(String taskGroupId) {
|
||||
lambdaUpdate()
|
||||
.eq(ProjectMemberEntity::getTaskGroupId, taskGroupId)
|
||||
.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteByTaskId(String taskId) {
|
||||
lambdaUpdate()
|
||||
.eq(ProjectMemberEntity::getTaskId, taskId)
|
||||
.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* 丰富成员信息(用户信息、角色描述、岗位描述)
|
||||
*/
|
||||
private void enrichMemberInfo(List<ProjectMemberResp> list) {
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取所有用户ID
|
||||
List<String> userIds = list.stream()
|
||||
.map(ProjectMemberResp::getUserId)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询用户信息
|
||||
Map<String, UserEntity> userMap = userService.listByIds(userIds)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(UserEntity::getUserId, Function.identity()));
|
||||
|
||||
// 填充用户信息和描述
|
||||
list.forEach(member -> {
|
||||
// 填充用户信息
|
||||
UserEntity user = userMap.get(member.getUserId());
|
||||
if (user != null) {
|
||||
member.setUserName(user.getName());
|
||||
member.setUserAccount(user.getAccount());
|
||||
member.setUserAvatar(user.getAvatar());
|
||||
}
|
||||
|
||||
// 填充角色类型描述
|
||||
member.setRoleTypeDesc(ProjectRoleTypeEnum.getDescByCode(member.getRoleType()));
|
||||
|
||||
// 填充岗位代码描述
|
||||
if (StrUtil.isNotEmpty(member.getJobCode())) {
|
||||
member.setJobCodeDesc(ProjectJobCodeEnum.getDescByCode(member.getJobCode()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ========================== 项目看板相关方法实现 ==========================
|
||||
|
||||
@Override
|
||||
public ProjectKanbanStatsResp getProjectKanbanStats() {
|
||||
ProjectKanbanStatsResp resp = new ProjectKanbanStatsResp();
|
||||
|
||||
// 统计项目数量
|
||||
resp.setTotalProjectsCount(projectService.count());
|
||||
resp.setPendingProjectCount(projectService.lambdaQuery().eq(ProjectEntity::getStatus, 0).count());
|
||||
resp.setInProgressProjectCount(projectService.lambdaQuery().eq(ProjectEntity::getStatus, 1).count());
|
||||
resp.setCompletedProjectCount(projectService.lambdaQuery().eq(ProjectEntity::getStatus, 2).count());
|
||||
resp.setAuditedProjectCount(projectService.lambdaQuery().eq(ProjectEntity::getStatus, 3).count());
|
||||
resp.setAcceptedProjectCount(projectService.lambdaQuery().eq(ProjectEntity::getStatus, 4).count());
|
||||
|
||||
// 统计机组数量
|
||||
resp.setTotalTurbineCount(turbineService.count());
|
||||
resp.setPendingTurbineCount(turbineService.lambdaQuery().eq(TurbineEntity::getStatus, 0).count());
|
||||
resp.setInProgressTurbineCount(turbineService.lambdaQuery().eq(TurbineEntity::getStatus, 1).count());
|
||||
resp.setCompletedTurbineCount(turbineService.lambdaQuery().eq(TurbineEntity::getStatus, 2).count());
|
||||
resp.setAuditedTurbineCount(turbineService.lambdaQuery().eq(TurbineEntity::getStatus, 3).count());
|
||||
resp.setAcceptedTurbineCount(turbineService.lambdaQuery().eq(TurbineEntity::getStatus, 4).count());
|
||||
|
||||
// 统计任务数量
|
||||
resp.setTotalTaskCount(projectTaskService.count());
|
||||
resp.setPendingTaskCount(projectTaskService.lambdaQuery().eq(ProjectTaskEntity::getStatus, 0).count());
|
||||
resp.setInProgressTaskCount(projectTaskService.lambdaQuery().eq(ProjectTaskEntity::getStatus, 1).count());
|
||||
resp.setCompletedTaskCount(projectTaskService.lambdaQuery().eq(ProjectTaskEntity::getStatus, 2).count());
|
||||
|
||||
// 统计人员数量
|
||||
resp.setTotalMemberCount(this.count());
|
||||
resp.setProjectManagerCount(this.lambdaQuery().eq(ProjectMemberEntity::getRoleType, "PROJECT_MANAGER").count());
|
||||
resp.setSafetyOfficerCount(this.lambdaQuery().eq(ProjectMemberEntity::getRoleType, "SAFETY_OFFICER").count());
|
||||
resp.setQualityOfficerCount(this.lambdaQuery().eq(ProjectMemberEntity::getRoleType, "QUALITY_OFFICER").count());
|
||||
resp.setConstructorCount(this.lambdaQuery().eq(ProjectMemberEntity::getRoleType, "CONSTRUCTOR").count());
|
||||
resp.setTeamLeaderCount(this.lambdaQuery().eq(ProjectMemberEntity::getRoleType, "TEAM_LEADER").count());
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectKanbanDataResp getProjectKanbanData() {
|
||||
ProjectKanbanDataResp resp = new ProjectKanbanDataResp();
|
||||
|
||||
// 获取各状态的项目列表
|
||||
resp.setPendingProjects(getProjectKanbanItems(0));
|
||||
resp.setInProgressProjects(getProjectKanbanItems(1));
|
||||
resp.setCompletedProjects(getProjectKanbanItems(2));
|
||||
resp.setAuditedProjects(getProjectKanbanItems(3));
|
||||
resp.setAcceptedProjects(getProjectKanbanItems(4));
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectDetailResp getProjectDetail(String projectId) {
|
||||
// 获取项目基本信息
|
||||
ProjectEntity project = projectService.getById(projectId);
|
||||
if (project == null) {
|
||||
throw new ServiceException(Message.PROJECT_ID_IS_NOT_EXIST);
|
||||
}
|
||||
|
||||
ProjectDetailResp resp = new ProjectDetailResp();
|
||||
BeanUtil.copyProperties(project, resp);
|
||||
resp.setStatusLabel(ProjectStatusEnum.getDescByCode(resp.getStatus()));
|
||||
|
||||
// 获取项目人员信息
|
||||
List<ProjectMemberResp> projectMembers = selectByProjectId(projectId);
|
||||
resp.setProjectMembers(projectMembers);
|
||||
|
||||
// 计算团队规模
|
||||
resp.setTeamSize(projectMembers.size());
|
||||
|
||||
// 获取项目经理信息
|
||||
String managerName = projectMembers.stream()
|
||||
.filter(member -> "PROJECT_MANAGER".equals(member.getRoleType()))
|
||||
.map(ProjectMemberResp::getUserName)
|
||||
.findFirst()
|
||||
.orElse("");
|
||||
resp.setManager(managerName);
|
||||
|
||||
// 计算项目预算(从预算信息中汇总)
|
||||
List<ProjectBudgetInfoEntity> budgets = projectBudgetInfoService.lambdaQuery()
|
||||
.eq(ProjectBudgetInfoEntity::getProjectId, projectId)
|
||||
.list();
|
||||
BigDecimal totalBudget = budgets.stream()
|
||||
.map(budget -> BigDecimal.valueOf(budget.getBudgetAmount()))
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
resp.setBudget(totalBudget);
|
||||
|
||||
// 计算项目进度
|
||||
List<ProjectTaskEntity> tasks = projectTaskService.lambdaQuery()
|
||||
.eq(ProjectTaskEntity::getProjectId, projectId)
|
||||
.list();
|
||||
if (!tasks.isEmpty()) {
|
||||
long completedTasks = tasks.stream()
|
||||
.filter(task -> task.getStatus() != null && task.getStatus() == 2)
|
||||
.count();
|
||||
resp.setProgress((int) (completedTasks * 100 / tasks.size()));
|
||||
} else {
|
||||
resp.setProgress(0);
|
||||
}
|
||||
|
||||
// 计算准备进度(基于任务状态)
|
||||
if (!tasks.isEmpty()) {
|
||||
long preparedTasks = tasks.stream()
|
||||
.filter(task -> task.getStatus() != null && task.getStatus() >= 1)
|
||||
.count();
|
||||
resp.setPreparationProgress((int) (preparedTasks * 100 / tasks.size()));
|
||||
} else {
|
||||
resp.setPreparationProgress(0);
|
||||
}
|
||||
|
||||
// 获取项目机组信息
|
||||
List<TurbineEntity> turbines = turbineService.lambdaQuery()
|
||||
.eq(TurbineEntity::getProjectId, projectId)
|
||||
.list();
|
||||
resp.setTurbines(turbines.stream().map(turbine -> {
|
||||
ProjectDetailResp.TurbineInfo info = new ProjectDetailResp.TurbineInfo();
|
||||
BeanUtil.copyProperties(turbine, info);
|
||||
info.setStatusLabel(ProjectStatusEnum.getDescByCode(info.getStatus()));
|
||||
return info;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
// 获取项目任务信息
|
||||
resp.setTasks(tasks.stream().map(task -> {
|
||||
ProjectDetailResp.TaskInfo info = new ProjectDetailResp.TaskInfo();
|
||||
BeanUtil.copyProperties(task, info);
|
||||
info.setStatusLabel(ProjectTaskStateEnum.getDescByCode(info.getStatus()));
|
||||
return info;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
// 获取项目预算信息
|
||||
resp.setBudgets(budgets.stream().map(budget -> {
|
||||
ProjectDetailResp.BudgetInfo info = new ProjectDetailResp.BudgetInfo();
|
||||
BeanUtil.copyProperties(budget, info);
|
||||
return info;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
// 获取项目日报信息
|
||||
List<ProjectDailyReportEntity> dailyReports = projectDailyReportService.lambdaQuery()
|
||||
.eq(ProjectDailyReportEntity::getProjectId, projectId)
|
||||
.orderByDesc(ProjectDailyReportEntity::getReportDate)
|
||||
.last("LIMIT 10")
|
||||
.list();
|
||||
resp.setDailyReports(dailyReports.stream().map(report -> {
|
||||
ProjectDetailResp.DailyReportInfo info = new ProjectDetailResp.DailyReportInfo();
|
||||
BeanUtil.copyProperties(report, info);
|
||||
// 获取提交人姓名
|
||||
UserEntity user = userService.getById(report.getSubmitUser());
|
||||
info.setSubmitUserName(user != null ? user.getName() : "");
|
||||
return info;
|
||||
}).collect(Collectors.toList()));
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目看板项目项列表
|
||||
*/
|
||||
private List<ProjectKanbanDataResp.ProjectKanbanItem> getProjectKanbanItems(Integer status) {
|
||||
List<ProjectEntity> projects = projectService.lambdaQuery()
|
||||
.eq(ProjectEntity::getStatus, status)
|
||||
.orderByDesc(ProjectEntity::getCreateTime)
|
||||
.list();
|
||||
|
||||
return projects.stream().map(project -> {
|
||||
ProjectKanbanDataResp.ProjectKanbanItem item = new ProjectKanbanDataResp.ProjectKanbanItem();
|
||||
BeanUtil.copyProperties(project, item);
|
||||
item.setStatusLabel(ProjectStatusEnum.getDescByCode(item.getStatus()));
|
||||
|
||||
// 获取项目人员信息
|
||||
List<ProjectMemberResp> members = selectByProjectId(project.getProjectId());
|
||||
|
||||
// 按角色类型分组,并去重用户名
|
||||
Map<String, String> memberNames = members.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
ProjectMemberResp::getRoleType,
|
||||
Collectors.mapping(
|
||||
ProjectMemberResp::getUserName,
|
||||
Collectors.collectingAndThen(
|
||||
Collectors.toSet(), // 使用Set去重
|
||||
set -> String.join(",", set)
|
||||
)
|
||||
)
|
||||
));
|
||||
|
||||
item.setProjectManagerName(memberNames.get("PROJECT_MANAGER"));
|
||||
item.setSafetyOfficerName(memberNames.get("SAFETY_OFFICER"));
|
||||
item.setQualityOfficerName(memberNames.get("QUALITY_OFFICER"));
|
||||
item.setConstructionTeamLeaderName(memberNames.get("TEAM_LEADER"));
|
||||
item.setConstructorNames(memberNames.get("CONSTRUCTOR"));
|
||||
|
||||
// 设置项目经理
|
||||
item.setManager(memberNames.get("PROJECT_MANAGER"));
|
||||
|
||||
// 设置团队规模
|
||||
item.setTeamSize(members.size());
|
||||
|
||||
// 转换为团队成员列表
|
||||
List<ProjectKanbanDataResp.ProjectKanbanItem.TeamMemberResp> teamMembers = members.stream()
|
||||
.map(member -> {
|
||||
ProjectKanbanDataResp.ProjectKanbanItem.TeamMemberResp teamMember = new ProjectKanbanDataResp.ProjectKanbanItem.TeamMemberResp();
|
||||
BeanUtil.copyProperties(member, teamMember);
|
||||
return teamMember;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
item.setTeamMembers(teamMembers);
|
||||
|
||||
// 统计机组数量
|
||||
Long turbineCount = turbineService.lambdaQuery()
|
||||
.eq(TurbineEntity::getProjectId, project.getProjectId())
|
||||
.count();
|
||||
item.setTurbineCount(turbineCount);
|
||||
|
||||
// 统计任务数量
|
||||
Long taskCount = projectTaskService.lambdaQuery()
|
||||
.eq(ProjectTaskEntity::getProjectId, project.getProjectId())
|
||||
.count();
|
||||
item.setTaskCount(taskCount);
|
||||
|
||||
// 统计已完成任务数量
|
||||
Long completedTaskCount = projectTaskService.lambdaQuery()
|
||||
.eq(ProjectTaskEntity::getProjectId, project.getProjectId())
|
||||
.eq(ProjectTaskEntity::getStatus, 2)
|
||||
.count();
|
||||
item.setCompletedTaskCount(completedTaskCount);
|
||||
|
||||
// 计算项目进度百分比
|
||||
if (taskCount > 0) {
|
||||
item.setProgressPercentage((int) (completedTaskCount * 100 / taskCount));
|
||||
item.setProgress((int) (completedTaskCount * 100 / taskCount));
|
||||
} else {
|
||||
item.setProgressPercentage(0);
|
||||
item.setProgress(0);
|
||||
}
|
||||
|
||||
// 计算准备进度(基于任务状态)
|
||||
if (taskCount > 0) {
|
||||
Long preparedTasks = projectTaskService.lambdaQuery()
|
||||
.eq(ProjectTaskEntity::getProjectId, project.getProjectId())
|
||||
.ge(ProjectTaskEntity::getStatus, 1)
|
||||
.count();
|
||||
item.setPreparationProgress((int) (preparedTasks * 100 / taskCount));
|
||||
} else {
|
||||
item.setPreparationProgress(0);
|
||||
}
|
||||
|
||||
// 计算项目预算(从预算信息中汇总)
|
||||
List<ProjectBudgetInfoEntity> budgets = projectBudgetInfoService.lambdaQuery()
|
||||
.eq(ProjectBudgetInfoEntity::getProjectId, project.getProjectId())
|
||||
.list();
|
||||
BigDecimal totalBudget = budgets.stream()
|
||||
.map(budget -> BigDecimal.valueOf(budget.getBudgetAmount()))
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
item.setBudget(totalBudget);
|
||||
|
||||
return item;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@ import com.dite.znpt.domain.entity.RegulationTypeEntity;
|
|||
import com.dite.znpt.mapper.RegulationMapper;
|
||||
import com.dite.znpt.mapper.RegulationTypeMapper;
|
||||
import com.dite.znpt.service.RegulationTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -23,11 +24,8 @@ import java.time.LocalDateTime;
|
|||
@Service
|
||||
public class RegulationTypeServiceImpl extends ServiceImpl<RegulationTypeMapper, RegulationTypeEntity> implements RegulationTypeService {
|
||||
|
||||
private final RegulationMapper regulationMapper;
|
||||
|
||||
public RegulationTypeServiceImpl(RegulationMapper regulationMapper) {
|
||||
this.regulationMapper = regulationMapper;
|
||||
}
|
||||
@Autowired
|
||||
private RegulationMapper regulationMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -9,7 +9,9 @@ import com.dite.znpt.converts.Converts;
|
|||
import com.dite.znpt.domain.entity.PostEntity;
|
||||
import com.dite.znpt.domain.entity.UserEntity;
|
||||
import com.dite.znpt.domain.entity.UserPostEntity;
|
||||
import com.dite.znpt.domain.entity.UserRoleEntity;
|
||||
import com.dite.znpt.domain.vo.PostResp;
|
||||
import com.dite.znpt.domain.vo.UserResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.UserPostMapper;
|
||||
import com.dite.znpt.service.PostService;
|
||||
|
@ -88,4 +90,14 @@ public class UserPostServiceImpl extends ServiceImpl<UserPostMapper, UserPostEnt
|
|||
});
|
||||
this.saveBatch(userPostList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserResp> getUsersByPostId(String postId) {
|
||||
List<String> userIds = this.list(Wrappers.lambdaQuery(UserPostEntity.class).eq(UserPostEntity::getPostId, postId)).stream().map(UserPostEntity::getUserId).toList();
|
||||
if (CollUtil.isEmpty(userIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<UserEntity> users = userService.listByIds(userIds).stream().filter(user -> Constants.DEL_FLAG_0.equals(user.getDelFlag()) && Constants.STATUS_0.equals(user.getStatus())).toList();
|
||||
return Converts.INSTANCE.toUserResp(users);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.dite.znpt.domain.entity.RoleEntity;
|
|||
import com.dite.znpt.domain.entity.UserEntity;
|
||||
import com.dite.znpt.domain.entity.UserRoleEntity;
|
||||
import com.dite.znpt.domain.vo.RoleResp;
|
||||
import com.dite.znpt.domain.vo.UserResp;
|
||||
import com.dite.znpt.domain.vo.UserRoleReq;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.UserRoleMapper;
|
||||
|
@ -88,4 +89,14 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRoleEnt
|
|||
});
|
||||
this.saveBatch(userRoleList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserResp> getUsersByRoleId(String roleId) {
|
||||
List<String> userIds = this.list(Wrappers.lambdaQuery(UserRoleEntity.class).eq(UserRoleEntity::getRoleId, roleId)).stream().map(UserRoleEntity::getUserId).toList();
|
||||
if (CollUtil.isEmpty(userIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<UserEntity> users = userService.listByIds(userIds).stream().filter(user -> Constants.DEL_FLAG_0.equals(user.getDelFlag()) && Constants.STATUS_0.equals(user.getStatus())).toList();
|
||||
return Converts.INSTANCE.toUserResp(users);
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue