Merge remote-tracking branch 'upstream/master'
# Conflicts: # core/src/main/java/com/dite/znpt/domain/vo/ProjectBudgetInfoImportReq.java # core/src/main/java/com/dite/znpt/service/impl/UserServiceImpl.java # core/src/main/resources/mapper/ProjectMapper.xml # core/src/main/resources/mapper/UserMapper.xml # pom.xml # web/src/main/java/com/dite/znpt/web/controller/VideoController.java
This commit is contained in:
commit
67d943af61
|
@ -7,6 +7,7 @@ import com.dite.znpt.domain.vo.PartResp;
|
|||
import com.dite.znpt.enums.FilePathEnum;
|
||||
import com.dite.znpt.service.ImageService;
|
||||
import com.dite.znpt.service.PartService;
|
||||
import com.dite.znpt.service.job.AutoExpirationJobService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
@ -26,6 +27,7 @@ public class Schedule {
|
|||
private final ImageService imageService;
|
||||
private final PartService partService;
|
||||
private final ExtUtilConfig extUtilConfig;
|
||||
private final AutoExpirationJobService autoExpirationJobService;
|
||||
|
||||
/**
|
||||
* 功能描述:图像预处理,持续运行
|
||||
|
@ -47,7 +49,7 @@ public class Schedule {
|
|||
List<ImageEntity> successList = new ArrayList<>();
|
||||
for (ImageEntity image : list) {
|
||||
PartResp partResp = partRespMap.get(image.getPartId());
|
||||
FilePathEnum pathEnum = image.getImagePath().contains("temp") ? FilePathEnum.IMAGE_TEMP : FilePathEnum.IMAGE;
|
||||
FilePathEnum pathEnum = FilePathEnum.getFilePathEnum(image.getImagePath());
|
||||
String inputFile = pathEnum.getFileAbsolutePath(image.getImagePath());
|
||||
String outputDir = FilePathEnum.IMAGE.getFileAbsolutePathPrefix()
|
||||
.concat("已调整")
|
||||
|
@ -67,4 +69,16 @@ public class Schedule {
|
|||
}
|
||||
imageService.updateBatchById(successList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:自动到期检测,每天凌晨2点执行
|
||||
*
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
**/
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
public void autoExpirationCheck() {
|
||||
log.info("开始执行自动到期检测定时任务...");
|
||||
autoExpirationJobService.executeAutoExpirationJob();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ public class SwaggerConfig {
|
|||
.enable(true)//开启Swagger文档
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.dite"))
|
||||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
||||
.paths(PathSelectors.any())
|
||||
.build()
|
||||
.globalRequestParameters(parameters);
|
||||
|
|
|
@ -2,10 +2,14 @@ package com.dite.znpt.config;
|
|||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.dite.znpt.enums.FilePathEnum;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.StringHttpMessageConverter;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -28,6 +32,14 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置HTTP消息转换器,确保UTF-8编码
|
||||
*/
|
||||
@Override
|
||||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void addInterceptors(InterceptorRegistry registry) {
|
||||
// // 注册 Sa-Token 拦截器,定义详细认证规则
|
||||
|
|
|
@ -79,4 +79,10 @@ public class Message implements Serializable {
|
|||
public static final String EQUIPMENT_USE_RECORD_STATUS_ERROR = "设备使用记录状态不合法";
|
||||
public static final String EQUIPMENT_IS_USED = "设备已被使用";
|
||||
public static final String EQUIPMENT_IS_RETURN = "设备已归还";
|
||||
public static final String DAILY_REPORT_EXISTS = "当日已提交日报";
|
||||
public static final String BIDDING_INFO_ID_IS_NOT_EXIST = "招标信息id不存在";
|
||||
public static final String TENDER_INFO_ID_IS_NOT_EXIST = "投标信息id不存在";
|
||||
public static final String TENDER_INFO_IS_EXIST = "招标[{}]已存中投信息存在";
|
||||
public static final String OUTBID_INFO_ID_IS_NOT_EXIST = "中标信息id不存在";
|
||||
public static final String OUTBID_INFO_IS_EXIST = "招标[{}]已存中标信息存在";
|
||||
}
|
||||
|
|
|
@ -126,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
package com.dite.znpt.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 统一定义顶层Entity实体审计 基类
|
||||
|
@ -41,11 +37,6 @@ public class AuditableEntity implements Serializable {
|
|||
@ApiModelProperty(value = "修改人id", hidden = true)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "id集合", example = "[]", notes = "id集合")
|
||||
@TableField(exist = false)
|
||||
private List<String> idList;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "当前页", example = "1", notes = "0")
|
||||
@TableField(exist = false)
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.dite.znpt.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* 制度确认DTO
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RegulationConfirmDTO {
|
||||
|
||||
private Boolean agreeTerms = true; // 是否同意条款,默认为true
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.dite.znpt.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
* @Description: 制度类型请求DTO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "RegulationTypeRequest", description = "制度类型请求")
|
||||
public class RegulationTypeRequest {
|
||||
|
||||
@ApiModelProperty("类型名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty("排序顺序")
|
||||
private Integer sortOrder;
|
||||
|
||||
@ApiModelProperty("是否启用")
|
||||
private String isEnabled;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
|
@ -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,84 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 自动到期检测配置实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("auto_expiration_config")
|
||||
@ApiModel(value="AutoExpirationConfigEntity对象", description="自动到期检测配置")
|
||||
public class AutoExpirationConfigEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("配置ID")
|
||||
@TableId(value = "config_id", type = IdType.ASSIGN_UUID)
|
||||
private String configId;
|
||||
|
||||
@ApiModelProperty("表名")
|
||||
@TableField("table_name")
|
||||
private String tableName;
|
||||
|
||||
@ApiModelProperty("表描述")
|
||||
@TableField("table_desc")
|
||||
private String tableDesc;
|
||||
|
||||
@ApiModelProperty("主键字段")
|
||||
@TableField("primary_key_field")
|
||||
private String primaryKeyField;
|
||||
|
||||
@ApiModelProperty("到期时间字段")
|
||||
@TableField("expire_date_field")
|
||||
private String expireDateField;
|
||||
|
||||
@ApiModelProperty("关联用户字段")
|
||||
@TableField("user_id_field")
|
||||
private String userIdField;
|
||||
|
||||
@ApiModelProperty("用户姓名字段")
|
||||
@TableField("user_name_field")
|
||||
private String userNameField;
|
||||
|
||||
@ApiModelProperty("业务名称字段")
|
||||
@TableField("business_name_field")
|
||||
private String businessNameField;
|
||||
|
||||
@ApiModelProperty("提前提醒天数")
|
||||
@TableField("remind_days")
|
||||
private Integer remindDays;
|
||||
|
||||
@ApiModelProperty("是否启用(0-禁用,1-启用)")
|
||||
@TableField("enabled")
|
||||
private String enabled;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 保存前处理
|
||||
*/
|
||||
public void preSave() {
|
||||
// 可以在这里添加保存前的逻辑处理
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
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 System
|
||||
* @date 2025/1/1
|
||||
* @description 到期检测结果实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("expiration_result")
|
||||
@ApiModel(value="ExpirationResultEntity对象", description="到期检测结果")
|
||||
public class ExpirationResultEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("结果ID")
|
||||
@TableId(value = "result_id", type = IdType.ASSIGN_UUID)
|
||||
private String resultId;
|
||||
|
||||
@ApiModelProperty("配置ID")
|
||||
@TableField("config_id")
|
||||
private String configId;
|
||||
|
||||
@ApiModelProperty("表名")
|
||||
@TableField("table_name")
|
||||
private String tableName;
|
||||
|
||||
@ApiModelProperty("业务ID")
|
||||
@TableField("business_id")
|
||||
private String businessId;
|
||||
|
||||
@ApiModelProperty("业务名称")
|
||||
@TableField("business_name")
|
||||
private String businessName;
|
||||
|
||||
@ApiModelProperty("关联用户ID")
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("关联用户姓名")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("到期日期")
|
||||
@TableField("expire_date")
|
||||
private LocalDate expireDate;
|
||||
|
||||
@ApiModelProperty("剩余天数")
|
||||
@TableField("remaining_days")
|
||||
private Integer remainingDays;
|
||||
|
||||
@ApiModelProperty("状态(0-正常,1-即将到期,2-已到期)")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("检测时间")
|
||||
@TableField("check_time")
|
||||
private java.time.LocalDateTime checkTime;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 保存前处理
|
||||
*/
|
||||
public void preSave() {
|
||||
// 可以在这里添加保存前的逻辑处理
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 15:44
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("outbid_info")
|
||||
@ApiModel(value="OutbidInfoEntity对象", description="中标通知信息表")
|
||||
public class OutbidInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6941283868242292970L;
|
||||
|
||||
@ApiModelProperty("中标通知信息id")
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String outbidInfoId;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("中标金额,单位元,精确到分")
|
||||
private BigDecimal outbidAmount;
|
||||
|
||||
@ApiModelProperty("工期,单位天")
|
||||
private Integer duration;
|
||||
|
||||
@ApiModelProperty("中标通知日期")
|
||||
private LocalDateTime outbidNotifyDate;
|
||||
|
||||
@ApiModelProperty("中标通知文件")
|
||||
private String outbidNoticeFileId;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private String delFlag;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
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;
|
||||
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 huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("project_daily_report")
|
||||
@ApiModel(value="ProjectDailyReportEntity对象", description="项目日报信息表")
|
||||
public class ProjectDailyReportEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -88597301057742621L;
|
||||
|
||||
@ExcelProperty("主键")
|
||||
@ApiModelProperty("主键")
|
||||
@TableId(value = "report_id", type = IdType.ASSIGN_ID)
|
||||
private String reportId;
|
||||
|
||||
@ExcelProperty("项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
|
||||
@ExcelProperty("日报日期")
|
||||
@ApiModelProperty("日报日期")
|
||||
@TableField("report_date")
|
||||
private LocalDate reportDate;
|
||||
|
||||
@ExcelProperty("日报提交人")
|
||||
@ApiModelProperty("日报提交人")
|
||||
@TableField("submit_user")
|
||||
private String submitUser;
|
||||
}
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
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.LocalDate;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
|
@ -100,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("技术方案图片,多个用逗号隔开")
|
||||
|
@ -168,7 +176,7 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private LocalDate startDate;
|
||||
|
||||
// 施工人员,安全经理,项目经理,商务,财务,高级管理员,项目远程顾问外部协作者,质量经理、现场经理及工作组长。
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度确认实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("regulation_confirmation")
|
||||
@ApiModel(value="RegulationConfirmationEntity对象", description="制度确认")
|
||||
public class RegulationConfirmationEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("确认ID")
|
||||
@ApiModelProperty("确认ID")
|
||||
@TableId(value = "confirmation_id", type = IdType.ASSIGN_UUID)
|
||||
private String confirmationId;
|
||||
|
||||
@ExcelProperty("制度ID")
|
||||
@ApiModelProperty("制度ID")
|
||||
@TableField("regulation_id")
|
||||
private String regulationId;
|
||||
|
||||
@ExcelProperty("确认人ID")
|
||||
@ApiModelProperty("确认人ID")
|
||||
@TableField("confirmer_id")
|
||||
private String confirmerId;
|
||||
|
||||
@ExcelProperty("确认人姓名")
|
||||
@ApiModelProperty("确认人姓名")
|
||||
@TableField("confirmer_name")
|
||||
private String confirmerName;
|
||||
|
||||
@ExcelProperty("确认人部门")
|
||||
@ApiModelProperty("确认人部门")
|
||||
@TableField("confirmer_dept")
|
||||
private String confirmerDept;
|
||||
|
||||
@ExcelProperty("确认状态")
|
||||
@ApiModelProperty("确认状态:CONFIRMED-已确认")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty("确认时间")
|
||||
@ApiModelProperty("确认时间")
|
||||
@TableField("confirm_time")
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
@ExcelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度草案实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("regulation_draft")
|
||||
@ApiModel(value="RegulationDraftEntity对象", description="制度草案")
|
||||
public class RegulationDraftEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("草案ID")
|
||||
@ApiModelProperty("草案ID")
|
||||
@TableId(value = "draft_id", type = IdType.ASSIGN_UUID)
|
||||
private String draftId;
|
||||
|
||||
@ExcelProperty("制度标题")
|
||||
@ApiModelProperty("制度标题")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ExcelProperty("制度内容")
|
||||
@ApiModelProperty("制度内容")
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@ExcelProperty("制度类型")
|
||||
@ApiModelProperty("制度类型")
|
||||
@TableField("regulation_type")
|
||||
private String regulationType;
|
||||
|
||||
@ExcelProperty("草案状态")
|
||||
@ApiModelProperty("草案状态:DRAFT-草稿,REVIEWING-审核中,APPROVED-已通过,REJECTED-已拒绝")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty("创建人ID")
|
||||
@ApiModelProperty("创建人ID")
|
||||
@TableField("creator_id")
|
||||
private String creatorId;
|
||||
|
||||
@ExcelProperty("创建人姓名")
|
||||
@ApiModelProperty("创建人姓名")
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
@ExcelProperty("审核人ID")
|
||||
@ApiModelProperty("审核人ID")
|
||||
@TableField("reviewer_id")
|
||||
private String reviewerId;
|
||||
|
||||
@ExcelProperty("审核人姓名")
|
||||
@ApiModelProperty("审核人姓名")
|
||||
@TableField("reviewer_name")
|
||||
private String reviewerName;
|
||||
|
||||
@ExcelProperty("审核时间")
|
||||
@ApiModelProperty("审核时间")
|
||||
@TableField("review_time")
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
@ExcelProperty("审核意见")
|
||||
@ApiModelProperty("审核意见")
|
||||
@TableField("review_comment")
|
||||
private String reviewComment;
|
||||
|
||||
@ExcelProperty("适用范围")
|
||||
@ApiModelProperty("适用范围")
|
||||
@TableField("scope")
|
||||
private String scope;
|
||||
|
||||
@ExcelProperty("制度级别")
|
||||
@ApiModelProperty("制度级别:HIGH-高级,MEDIUM-中级,LOW-低级")
|
||||
@TableField("level")
|
||||
private String level;
|
||||
|
||||
@ExcelProperty("版本号")
|
||||
@ApiModelProperty("版本号")
|
||||
@TableField("version")
|
||||
private String version;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度规范仓库实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("regulation")
|
||||
@ApiModel(value="RegulationEntity对象", description="制度规范仓库")
|
||||
public class RegulationEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("制度ID")
|
||||
@ApiModelProperty("制度ID")
|
||||
@TableId(value = "regulation_id", type = IdType.ASSIGN_UUID)
|
||||
private String regulationId;
|
||||
|
||||
@ExcelProperty("制度标题")
|
||||
@ApiModelProperty("制度标题")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ExcelProperty("制度内容")
|
||||
@ApiModelProperty("制度内容")
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@ExcelProperty("制度类型")
|
||||
@ApiModelProperty("制度类型")
|
||||
@TableField("regulation_type")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty("制度状态")
|
||||
@ApiModelProperty("制度状态:DRAFT-草案,APPROVED-已公示,PUBLISHED-已发布,ARCHIVED-已归档")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty("发布时间")
|
||||
@ApiModelProperty("发布时间")
|
||||
@TableField("publish_time")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
@ExcelProperty("生效时间")
|
||||
@ApiModelProperty("生效时间")
|
||||
@TableField("effective_time")
|
||||
private LocalDateTime effectiveTime;
|
||||
|
||||
@ExcelProperty("失效时间")
|
||||
@ApiModelProperty("失效时间")
|
||||
@TableField("expire_time")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
@ExcelProperty("适用范围")
|
||||
@ApiModelProperty("适用范围")
|
||||
@TableField("scope")
|
||||
private String scope;
|
||||
|
||||
@ExcelProperty("制度级别")
|
||||
@ApiModelProperty("制度级别:HIGH-高级,MEDIUM-中级,LOW-低级")
|
||||
@TableField("level")
|
||||
private String level;
|
||||
|
||||
@ExcelProperty("版本号")
|
||||
@ApiModelProperty("版本号")
|
||||
@TableField("version")
|
||||
private String version;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("当前用户确认状态:pending-待确认,confirmed-已确认")
|
||||
private String confirmStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createByName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("制度类型")
|
||||
private String regulationType;
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度提案实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("regulation_proposal")
|
||||
@ApiModel(value="RegulationProposalEntity对象", description="制度提案")
|
||||
public class RegulationProposalEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("提案ID")
|
||||
@ApiModelProperty("提案ID")
|
||||
@TableId(value = "proposal_id", type = IdType.ASSIGN_UUID)
|
||||
private String proposalId;
|
||||
|
||||
@ExcelProperty("提案标题")
|
||||
@ApiModelProperty("提案标题")
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@ExcelProperty("提案内容")
|
||||
@ApiModelProperty("提案内容")
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@ExcelProperty("提案类型")
|
||||
@ApiModelProperty("提案类型")
|
||||
@TableField("proposal_type")
|
||||
private String proposalType;
|
||||
|
||||
@ExcelProperty("提案状态")
|
||||
@ApiModelProperty("提案状态:SUBMITTED-已提交,DISCUSSING-讨论中,APPROVED-已通过,REJECTED-已拒绝,CONVERTED-已转为草案")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty("提案人ID")
|
||||
@ApiModelProperty("提案人ID")
|
||||
@TableField("proposer_id")
|
||||
private String proposerId;
|
||||
|
||||
@ExcelProperty("提案人姓名")
|
||||
@ApiModelProperty("提案人姓名")
|
||||
@TableField("proposer_name")
|
||||
private String proposerName;
|
||||
|
||||
@ExcelProperty("提案人部门")
|
||||
@ApiModelProperty("提案人部门")
|
||||
@TableField("proposer_dept")
|
||||
private String proposerDept;
|
||||
|
||||
@ExcelProperty("讨论组ID")
|
||||
@ApiModelProperty("讨论组ID")
|
||||
@TableField("discussion_group_id")
|
||||
private String discussionGroupId;
|
||||
|
||||
@ExcelProperty("讨论组名称")
|
||||
@ApiModelProperty("讨论组名称")
|
||||
@TableField("discussion_group_name")
|
||||
private String discussionGroupName;
|
||||
|
||||
@ExcelProperty("讨论开始时间")
|
||||
@ApiModelProperty("讨论开始时间")
|
||||
@TableField("discussion_start_time")
|
||||
private LocalDateTime discussionStartTime;
|
||||
|
||||
@ExcelProperty("讨论结束时间")
|
||||
@ApiModelProperty("讨论结束时间")
|
||||
@TableField("discussion_end_time")
|
||||
private LocalDateTime discussionEndTime;
|
||||
|
||||
@ExcelProperty("讨论状态")
|
||||
@ApiModelProperty("讨论状态:NOT_STARTED-未开始,DISCUSSING-讨论中,FINISHED-已结束")
|
||||
@TableField("discussion_status")
|
||||
private String discussionStatus;
|
||||
|
||||
@ExcelProperty("支持人数")
|
||||
@ApiModelProperty("支持人数")
|
||||
@TableField("support_count")
|
||||
private Integer supportCount;
|
||||
|
||||
@ExcelProperty("反对人数")
|
||||
@ApiModelProperty("反对人数")
|
||||
@TableField("oppose_count")
|
||||
private Integer opposeCount;
|
||||
|
||||
@ExcelProperty("总参与人数")
|
||||
@ApiModelProperty("总参与人数")
|
||||
@TableField("total_participants")
|
||||
private Integer totalParticipants;
|
||||
|
||||
@ExcelProperty("审核人ID")
|
||||
@ApiModelProperty("审核人ID")
|
||||
@TableField("reviewer_id")
|
||||
private String reviewerId;
|
||||
|
||||
@ExcelProperty("审核人姓名")
|
||||
@ApiModelProperty("审核人姓名")
|
||||
@TableField("reviewer_name")
|
||||
private String reviewerName;
|
||||
|
||||
@ExcelProperty("审核时间")
|
||||
@ApiModelProperty("审核时间")
|
||||
@TableField("review_time")
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
@ExcelProperty("审核意见")
|
||||
@ApiModelProperty("审核意见")
|
||||
@TableField("review_comment")
|
||||
private String reviewComment;
|
||||
|
||||
@ExcelProperty("转为草案ID")
|
||||
@ApiModelProperty("转为草案ID")
|
||||
@TableField("converted_draft_id")
|
||||
private String convertedDraftId;
|
||||
|
||||
@ExcelProperty("适用范围")
|
||||
@ApiModelProperty("适用范围")
|
||||
@TableField("scope")
|
||||
private String scope;
|
||||
|
||||
@ExcelProperty("制度级别")
|
||||
@ApiModelProperty("制度级别:HIGH-高级,MEDIUM-中级,LOW-低级")
|
||||
@TableField("level")
|
||||
private String level;
|
||||
|
||||
@ExcelProperty("紧急程度")
|
||||
@ApiModelProperty("紧急程度:HIGH-高,MEDIUM-中,LOW-低")
|
||||
@TableField("urgency_level")
|
||||
private String urgencyLevel;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
* @Description: 制度类型实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("regulation_type")
|
||||
@ApiModel(value="RegulationTypeEntity对象", description="制度类型")
|
||||
public class RegulationTypeEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("类型ID")
|
||||
@ApiModelProperty("类型ID")
|
||||
@TableId(value = "type_id", type = IdType.ASSIGN_UUID)
|
||||
private String typeId;
|
||||
|
||||
@ExcelProperty("类型名称")
|
||||
@ApiModelProperty("类型名称")
|
||||
@TableField("type_name")
|
||||
private String typeName;
|
||||
|
||||
@ExcelProperty("是否启用")
|
||||
@ApiModelProperty("是否启用(1-启用,0-禁用)")
|
||||
@TableField("is_enabled")
|
||||
private String isEnabled;
|
||||
|
||||
@ExcelProperty("排序顺序")
|
||||
@ApiModelProperty("排序顺序")
|
||||
@TableField("sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@ApiModelProperty("删除标志(0代表存在,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createrName;
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 15:47
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tender_info")
|
||||
@ApiModel(value="TenderInfoEntity对象", description="投标信息表")
|
||||
public class TenderInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5677009089047831619L;
|
||||
|
||||
@ApiModelProperty("投标信息id")
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String tenderInfoId;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("投标金额")
|
||||
private BigDecimal tenderAmount;
|
||||
|
||||
@ApiModelProperty("项目地址")
|
||||
private String projectAddress;
|
||||
|
||||
@ApiModelProperty("项目类型")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty("项目描述")
|
||||
private String projectDescription;
|
||||
|
||||
@ApiModelProperty("投标负责人")
|
||||
private String tenderManager;
|
||||
|
||||
@ApiModelProperty("投标负责人手机号")
|
||||
private String tenderManagerPhone;
|
||||
|
||||
@ApiModelProperty("投标文件")
|
||||
private String tenderFileId;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private String delFlag;
|
||||
}
|
|
@ -24,6 +24,9 @@ public class AttachInfoReq implements Serializable {
|
|||
@ApiModelProperty("自定义路径")
|
||||
private String userDefinedPath;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@ public class AttachInfoResp implements Serializable {
|
|||
@ApiModelProperty("附件路径")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:18
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("招标信息请求实体")
|
||||
public class BiddingInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6967025339487392364L;
|
||||
@ColumnWidth(40)
|
||||
@ExcelProperty(index = 0, value = "招标项目")
|
||||
@ApiModelProperty("招标项目")
|
||||
@Size(max = 50, message = "招标项目不能超过50个字符")
|
||||
private String biddingProject;
|
||||
|
||||
@ColumnWidth(40)
|
||||
@ExcelProperty(index = 1, value = "招标公司")
|
||||
@ApiModelProperty("招标公司")
|
||||
@Size(max = 50, message = "招标公司不能超过50个字符")
|
||||
private String biddingCompany;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(index = 2, value = "招标金额\n(单位元,精确到分)")
|
||||
@ApiModelProperty("招标金额")
|
||||
private BigDecimal biddingAmount;
|
||||
|
||||
@ColumnWidth(30)
|
||||
@ExcelProperty(index = 3, value = "招标截止时间\n(yyyy-MM-dd HH:mm:ss)")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("招标截止时间")
|
||||
private LocalDateTime biddingDeadline;
|
||||
|
||||
@ColumnWidth(30)
|
||||
@ExcelProperty(index = 4, value = "信息录入时间\n(yyyy-MM-dd HH:mm:ss)")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("信息录入时间")
|
||||
private LocalDateTime infoEntryTime;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty(index = 5, value = "信息来源")
|
||||
@ApiModelProperty("信息来源")
|
||||
@NotBlank(message = "信息来源不能为空")
|
||||
@Size(max = 50, message = "信息来源不能超过50个字符")
|
||||
private String source;
|
||||
|
||||
@ColumnWidth(60)
|
||||
@ExcelProperty(index = 6, value = "信息来源网址")
|
||||
@ApiModelProperty("信息来源网址")
|
||||
@NotBlank(message = "信息来源网址不能为空")
|
||||
@Size(max = 100, message = "信息来源网址不能超过100个字符")
|
||||
private String sourceWebsite;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:17
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("招标信息响应实体")
|
||||
public class BiddingInfoResp extends BiddingInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2750666223381829115L;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("招标文件地址")
|
||||
private String attachPath;
|
||||
|
||||
|
||||
}
|
|
@ -1,14 +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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
|
@ -57,6 +57,9 @@ public class ContractListReq implements Serializable {
|
|||
@ApiModelProperty("付款日期/交付日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("履约时间期限")
|
||||
private Date performanceDeadline;
|
||||
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
private String paymentAddress;
|
||||
|
||||
|
@ -72,5 +75,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ public class ImageListReq implements Serializable {
|
|||
@ApiModelProperty("部件id")
|
||||
private String partId;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("图像类型")
|
||||
private String[] imageTypes;
|
||||
|
||||
|
|
|
@ -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,39 @@
|
|||
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;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("项目日报信息列表请求实体")
|
||||
public class ProjectDailyReportListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 913060537944500760L;
|
||||
|
||||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("项目日报信息Id")
|
||||
private String reportId;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("日报日期")
|
||||
private LocalDate reportDate;
|
||||
|
||||
@ApiModelProperty("日报提交人")
|
||||
private String submitUser;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
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.time.LocalDate;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectDailyReport请求对象", description="项目日报信息表")
|
||||
public class ProjectDailyReportReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -35936236241363317L;
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private String reportId;
|
||||
|
||||
@NotNull(message = "项目id不能为空")
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@NotNull(message = "日报日期不能为空")
|
||||
@ApiModelProperty("日报日期")
|
||||
private LocalDate reportDate;
|
||||
|
||||
@NotBlank(message = "日报提交人不能为空")
|
||||
@Size(max = 32, message = "日报提交人长度不能超过32字符")
|
||||
@ApiModelProperty("日报提交人")
|
||||
private String submitUser;
|
||||
|
||||
@NotBlank(message = "日报附件id不能为空")
|
||||
@ApiModelProperty("日报附件id")
|
||||
private String reportAttachId;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectDailyReportEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目日报信息响应实体")
|
||||
public class ProjectDailyReportResp extends ProjectDailyReportEntity {
|
||||
|
||||
@ApiModelProperty("日报附件")
|
||||
private AttachInfoEntity reportAttach;
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
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 String createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private String updateTime;
|
||||
|
||||
// 项目人员信息(从新关联表获取)
|
||||
@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 String budgetType;
|
||||
|
||||
@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,107 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
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 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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:23
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("投标信息请求实体")
|
||||
public class TenderInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5653933337345116548L;
|
||||
|
||||
@ApiModelProperty("招标信息id")
|
||||
@NotBlank(message = "招标信息id不能为空")
|
||||
private String biddingInfoId;
|
||||
|
||||
@ApiModelProperty("投标金额")
|
||||
private BigDecimal tenderAmount;
|
||||
|
||||
@ApiModelProperty("项目地址")
|
||||
@Size(max = 500, message = "项目地址不能超过500个字符")
|
||||
private String projectAddress;
|
||||
|
||||
@ApiModelProperty("项目类型,枚举:ProjectTypeEnum")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty("招标负责人")
|
||||
@Size(min = 32, max = 32, message = "招标负责人长度必须为32个字符")
|
||||
private String tenderManager;
|
||||
|
||||
@Size(min = 11, max = 11, message = "招标负责人联系方式长度必须为11个字符")
|
||||
@ApiModelProperty("招标负责人联系方式")
|
||||
private String tenderManagerPhone;
|
||||
|
||||
@ApiModelProperty("投标文件")
|
||||
private String tenderFileId;
|
||||
|
||||
@Size(max = 500, message = "项目描述不能超过500个字符")
|
||||
@ApiModelProperty("项目描述")
|
||||
private String projectDescription;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:50
|
||||
* @description
|
||||
*/
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:49
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("投标信息响应实体")
|
||||
public class TenderInfoResp extends TenderInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -8445413467535624096L;
|
||||
|
||||
@ApiModelProperty("投标标信息ID")
|
||||
private String tenderInfoId;
|
||||
|
||||
@ApiModelProperty("招标项目")
|
||||
private String biddingProject;
|
||||
|
||||
@ApiModelProperty("招标公司")
|
||||
private String biddingCompany;
|
||||
|
||||
@ApiModelProperty("文件名称")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty("投标文件地址")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("投标负责人姓名")
|
||||
private String tenderManagerName;
|
||||
|
||||
}
|
|
@ -19,7 +19,7 @@ public class UserResp extends UserReq implements Serializable{
|
|||
@Serial
|
||||
private static final long serialVersionUID = -2831232930040845716L;
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
@ApiModelProperty("用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("所属部门")
|
||||
|
@ -39,6 +39,8 @@ public class UserResp extends UserReq implements Serializable{
|
|||
|
||||
@ApiModelProperty("在职状态描述")
|
||||
private String userStatusLabel;
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@ public enum AttachBusinessTypeEnum {
|
|||
DEFECT_MARK_PIC("defect_mark_pic", "缺陷标注图片"),
|
||||
REPORT("report", "报告"),
|
||||
PROJECT_BUDGE("project_budge", "预算文件"),
|
||||
PROJECT_DAILY_REPORT("project_daily_report", "项目日报文件"),
|
||||
BIDDING_INFO("bidding_info", "招标信息"),
|
||||
TENDER_INFO("tender_info", "投标信息"),
|
||||
OUTBID_INFO("outbid_info", "中标信息"),
|
||||
;
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
|
|
@ -55,4 +55,23 @@ public enum FilePathEnum {
|
|||
return StrUtil.replace(urlPath.concat(relativePath), FileUtil.FILE_SEPARATOR, StrUtil.SLASH);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:根据文件路径前缀获取文件路径ENUM
|
||||
*
|
||||
* @param fileDownPath 文件路径
|
||||
* @return {@link FilePathEnum }
|
||||
* @author cuizhibin
|
||||
* @date 2025/07/27 16:00
|
||||
**/
|
||||
public static FilePathEnum getFilePathEnum(String fileDownPath) {
|
||||
if (StrUtil.startWith(fileDownPath, FilePathEnum.IMAGE_TEMP.getUrlPath())) {
|
||||
return FilePathEnum.IMAGE_TEMP;
|
||||
}
|
||||
for (FilePathEnum pathEnum : FilePathEnum.values()) {
|
||||
if (StrUtil.startWith(fileDownPath, FilePathEnum.IMAGE_TEMP.getUrlPath())) {
|
||||
return pathEnum;
|
||||
}
|
||||
}
|
||||
return FilePathEnum.ATTACH;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,14 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.AutoExpirationConfigEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 自动到期检测配置Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface AutoExpirationConfigMapper extends BaseMapper<AutoExpirationConfigEntity> {
|
||||
}
|
|
@ -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,14 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ExpirationResultEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 到期检测结果Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface ExpirationResultMapper extends BaseMapper<ExpirationResultEntity> {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.OutbidInfoEntity;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:11
|
||||
* @description
|
||||
*/
|
||||
public interface OutbidInfoMapper extends BaseMapper<OutbidInfoEntity> {
|
||||
List<OutbidInfoResp> listOutbidInfoResp(@Param("projectName") String projectName);
|
||||
|
||||
OutbidInfoResp getOutbidInfoResp(@Param("outbidInfoId") String outbidInfoId);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ProjectDailyReportEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息表数据库访问层
|
||||
*/
|
||||
public interface ProjectDailyReportMapper extends BaseMapper<ProjectDailyReportEntity> {
|
||||
List<ProjectDailyReportResp> queryBySelective(ProjectDailyReportListReq projectDailyReportReq);
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.RegulationConfirmationEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度确认Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface RegulationConfirmationMapper extends BaseMapper<RegulationConfirmationEntity> {
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.dite.znpt.domain.entity.RegulationEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度规范仓库Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface RegulationMapper extends BaseMapper<RegulationEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询制度列表(包含创建人姓名)
|
||||
* @param page 分页参数
|
||||
* @param status 状态
|
||||
* @param type 类型
|
||||
* @param title 提案标题
|
||||
* @param proposer 提案人
|
||||
* @param confirmStatus 确认状态
|
||||
* @param userId 当前用户ID
|
||||
* @return 分页结果
|
||||
*/
|
||||
Page<RegulationEntity> selectRegulationListWithCreator(Page<RegulationEntity> page,
|
||||
@Param("status") String status,
|
||||
@Param("type") String type,
|
||||
@Param("title") String title,
|
||||
@Param("proposer") String proposer,
|
||||
@Param("confirmStatus") String confirmStatus,
|
||||
@Param("userId") String userId);
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.dite.znpt.domain.entity.RegulationTypeEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 制度类型Mapper接口
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
*/
|
||||
@Mapper
|
||||
public interface RegulationTypeMapper extends BaseMapper<RegulationTypeEntity> {
|
||||
|
||||
/**
|
||||
* 分页查询制度类型列表(包含创建人姓名)
|
||||
* @param page 分页参数
|
||||
* @param typeName 类型名称
|
||||
* @param status 是否启用(1-启用,0-禁用)
|
||||
* @param remark 备注
|
||||
* @return 分页结果
|
||||
*/
|
||||
Page<RegulationTypeEntity> selectRegulationTypeListWithCreator(Page<RegulationTypeEntity> page,
|
||||
@Param("typeName") String typeName,
|
||||
@Param("status") String status,
|
||||
@Param("remark") String remark);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -23,7 +23,7 @@ public interface AttachInfoService extends IService<AttachInfoEntity> {
|
|||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
List<AttachInfoEntity> listByBusinessIds(List<String> businessIds, String businessType);
|
||||
List<AttachInfoEntity> listByBusinessIds(List<String> businessIds, AttachBusinessTypeEnum businessType);
|
||||
|
||||
/**
|
||||
* 功能描述:新增附件信息
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.AutoExpirationConfigEntity;
|
||||
import com.dite.znpt.domain.entity.ExpirationResultEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 自动到期检测服务接口
|
||||
*/
|
||||
public interface AutoExpirationService extends IService<AutoExpirationConfigEntity> {
|
||||
|
||||
/**
|
||||
* 执行自动到期检测
|
||||
*/
|
||||
void executeAutoExpirationCheck();
|
||||
|
||||
/**
|
||||
* 获取到期检测结果
|
||||
* @param status 状态筛选
|
||||
* @return 检测结果列表
|
||||
*/
|
||||
List<ExpirationResultEntity> getExpirationResults(String status);
|
||||
|
||||
/**
|
||||
* 获取统计信息
|
||||
* @return 统计信息
|
||||
*/
|
||||
Map<String, Object> getStatistics();
|
||||
|
||||
/**
|
||||
* 手动检测指定表
|
||||
* @param tableName 表名
|
||||
*/
|
||||
void checkTableExpiration(String tableName);
|
||||
|
||||
/**
|
||||
* 检查表是否已配置到期检测
|
||||
* @param tableName 表名
|
||||
* @return 配置信息,如果未配置返回null
|
||||
*/
|
||||
AutoExpirationConfigEntity getTableConfig(String tableName);
|
||||
|
||||
/**
|
||||
* 批量检查多个表的配置状态
|
||||
* @param tableNames 表名列表
|
||||
* @return 配置状态映射
|
||||
*/
|
||||
Map<String, Boolean> getTablesConfigStatus(List<String> tableNames);
|
||||
|
||||
/**
|
||||
* 智能配置表检测
|
||||
* @param tableName 表名
|
||||
* @return 配置结果
|
||||
*/
|
||||
AutoExpirationConfigEntity autoConfigureTable(String tableName);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.BiddingInfoEntity;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoReq;
|
||||
import com.dite.znpt.domain.vo.BiddingInfoResp;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:06
|
||||
* @description
|
||||
*/
|
||||
public interface BiddingInfoService extends IService<BiddingInfoEntity> {
|
||||
|
||||
List<BiddingInfoResp> page(String projectName);
|
||||
List<BiddingInfoResp> list(String projectName);
|
||||
void save(BiddingInfoReq req);
|
||||
void update(String biddingInfoId, BiddingInfoReq req);
|
||||
void uploadBiddingInfoFile(String biddingInfoId, String biddingFileId);
|
||||
void apply(String biddingInfoId);
|
||||
Result<?> importData(List<BiddingInfoReq> dataList, BindingResult bindingResult);
|
||||
}
|
|
@ -25,7 +25,7 @@ public interface ImageService extends IService<ImageEntity> {
|
|||
|
||||
List<ImageReq> batchUploadDefectImage(String partId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files);
|
||||
|
||||
List<ImageReq> uploadProjectBatch(String projectId, String imageSource, MultipartFile[] files);
|
||||
List<ImageReq> uploadProjectBatch(String projectId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files);
|
||||
|
||||
List<String> batchUploadCommonImage(String imageSource, ImageWorkReq imageWorkReq, MultipartFile[] file) throws IOException;
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.OutbidInfoEntity;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoReq;
|
||||
import com.dite.znpt.domain.vo.OutbidInfoResp;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/28/周一 16:11
|
||||
* @description
|
||||
*/
|
||||
public interface OutbidInfoService extends IService<OutbidInfoEntity> {
|
||||
|
||||
List<OutbidInfoResp> page(String projectName);
|
||||
List<OutbidInfoResp> list(String projectName);
|
||||
OutbidInfoResp detail(String outbidInfoId);
|
||||
void save(OutbidInfoReq req);
|
||||
void update(String outbidInfoId, OutbidInfoReq req);
|
||||
void deleteById(String outbidInfoId);
|
||||
void downLoadOutbidNoticeFile(String outbidFileId, HttpServletResponse response) throws Exception;
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ProjectDailyReportEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportReq;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息表服务接口
|
||||
*/
|
||||
public interface ProjectDailyReportService extends IService<ProjectDailyReportEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目日报信息列表
|
||||
*
|
||||
* @param projectDailyReportReq 项目日报信息
|
||||
* @return {@link List }<{@link ProjectDailyReportResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
List<ProjectDailyReportResp> selectList(ProjectDailyReportListReq projectDailyReportReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条项目日报信息
|
||||
*
|
||||
* @param reportId 项目日报信息Id
|
||||
* @return {@link ProjectDailyReportResp }
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
ProjectDailyReportResp selectById(String reportId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目日报信息
|
||||
*
|
||||
* @param projectDailyReportReq 项目日报信息
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
void saveData(ProjectDailyReportReq projectDailyReportReq);
|
||||
|
||||
/**
|
||||
* 功能描述:更新项目日报信息
|
||||
*
|
||||
* @param projectDailyReportReq 项目日报信息
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
void updateData(ProjectDailyReportReq projectDailyReportReq);
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目日报信息
|
||||
*
|
||||
* @param reportId 项目日报信息Id
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
void deleteById(String reportId);
|
||||
|
||||
/**
|
||||
* 功能描述:我今天
|
||||
*
|
||||
* @return {@link ProjectDailyReportResp }
|
||||
* @author cuizhibin
|
||||
* @date 2025/07/27 19:53
|
||||
**/
|
||||
ProjectDailyReportResp myToday(String projectId);
|
||||
}
|
||||
|
|
@ -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,14 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.RegulationConfirmationEntity;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度确认Service接口
|
||||
*/
|
||||
public interface RegulationConfirmationService extends IService<RegulationConfirmationEntity> {
|
||||
// 继承自IService的方法已经足够使用
|
||||
// 包括:save, update, remove, list, page, lambdaQuery等
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.RegulationEntity;
|
||||
import com.dite.znpt.domain.Result;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
* @Description: 制度规范仓库Service接口
|
||||
*/
|
||||
public interface RegulationService extends IService<RegulationEntity> {
|
||||
|
||||
/**
|
||||
* 获取制度列表
|
||||
* @param page 页码
|
||||
* @param pageSize 页大小
|
||||
* @param status 状态
|
||||
* @param type 类型
|
||||
* @param title 提案标题
|
||||
* @param proposer 提案人
|
||||
* @param confirmStatus 确认状态
|
||||
* @return 结果
|
||||
*/
|
||||
Result getRegulationList(Integer page, Integer pageSize, String status, String type, String title, String proposer, String confirmStatus);
|
||||
|
||||
/**
|
||||
* 创建制度提案
|
||||
* @param regulation 制度信息
|
||||
* @return 结果
|
||||
*/
|
||||
Result createRegulationProposal(RegulationEntity regulation);
|
||||
|
||||
/**
|
||||
* 更新制度提案
|
||||
* @param regulation 制度信息
|
||||
* @return 结果
|
||||
*/
|
||||
Result updateRegulationProposal(RegulationEntity regulation);
|
||||
|
||||
/**
|
||||
* 删除制度提案
|
||||
* @param regulationId 制度ID
|
||||
* @return 结果
|
||||
*/
|
||||
Result deleteRegulationProposal(String regulationId);
|
||||
|
||||
/**
|
||||
* 获取制度详情
|
||||
* @param regulationId 制度ID
|
||||
* @return 结果
|
||||
*/
|
||||
Result getRegulationDetail(String regulationId);
|
||||
|
||||
/**
|
||||
* 确认制度知晓
|
||||
* @param regulationId 制度ID
|
||||
* @return 结果
|
||||
*/
|
||||
Result confirmRegulation(String regulationId);
|
||||
|
||||
/**
|
||||
* 公示制度
|
||||
* @param regulationId 制度ID
|
||||
* @return 结果
|
||||
*/
|
||||
Result approveRegulation(String regulationId);
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.RegulationTypeEntity;
|
||||
import com.dite.znpt.domain.Result;
|
||||
|
||||
/**
|
||||
* 制度类型Service接口
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
*/
|
||||
public interface RegulationTypeService extends IService<RegulationTypeEntity> {
|
||||
|
||||
/**
|
||||
* 获取制度类型列表
|
||||
* @param page 页码
|
||||
* @param size 页大小
|
||||
* @param typeName 类型名称
|
||||
* @param status 是否启用(1-启用,0-禁用)
|
||||
* @param remark 备注
|
||||
* @return 结果
|
||||
*/
|
||||
Result getRegulationTypes(Integer page, Integer size, String typeName, String status, String remark);
|
||||
|
||||
/**
|
||||
* 创建制度类型
|
||||
* @param regulationType 制度类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
Result createRegulationType(RegulationTypeEntity regulationType);
|
||||
|
||||
/**
|
||||
* 更新制度类型
|
||||
* @param regulationType 制度类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
Result updateRegulationType(RegulationTypeEntity regulationType);
|
||||
|
||||
/**
|
||||
* 删除制度类型
|
||||
* @param typeId 类型ID
|
||||
* @return 结果
|
||||
*/
|
||||
Result deleteRegulationType(String typeId);
|
||||
}
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.dite.znpt.domain.entity.RoleMenuEntity;
|
||||
import com.dite.znpt.domain.vo.RoleMenuReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -12,6 +11,5 @@ import java.util.List;
|
|||
* @description
|
||||
*/
|
||||
public interface RoleMenuService extends IService<RoleMenuEntity> {
|
||||
|
||||
void bindRoleMenu(RoleMenuReq req);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
|
@ -30,6 +30,7 @@ import java.net.URLEncoder;
|
|||
import java.rmi.ServerException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
@ -51,9 +52,9 @@ public class AttachInfoServiceImpl extends ServiceImpl<FileInfoMapper, AttachInf
|
|||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public List<AttachInfoEntity> listByBusinessIds(List<String> businessIds, String businessType) {
|
||||
public List<AttachInfoEntity> listByBusinessIds(List<String> businessIds, AttachBusinessTypeEnum businessType) {
|
||||
return lambdaQuery().in(AttachInfoEntity::getBusinessId, businessIds)
|
||||
.eq(StrUtil.isNotEmpty(businessType), AttachInfoEntity::getBusinessType, businessType)
|
||||
.eq(Objects.nonNull(businessType), AttachInfoEntity::getBusinessType, businessType.getCode())
|
||||
.list();
|
||||
}
|
||||
|
||||
|
@ -81,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,341 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.AutoExpirationConfigEntity;
|
||||
import com.dite.znpt.domain.entity.ExpirationResultEntity;
|
||||
import com.dite.znpt.mapper.AutoExpirationConfigMapper;
|
||||
import com.dite.znpt.mapper.ExpirationResultMapper;
|
||||
import com.dite.znpt.service.AutoExpirationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 自动到期检测服务实现类
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AutoExpirationServiceImpl extends ServiceImpl<AutoExpirationConfigMapper, AutoExpirationConfigEntity> implements AutoExpirationService {
|
||||
|
||||
@Autowired
|
||||
private ExpirationResultMapper expirationResultMapper;
|
||||
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public void executeAutoExpirationCheck() {
|
||||
log.info("开始执行自动到期检测...");
|
||||
|
||||
// 获取所有启用的配置
|
||||
List<AutoExpirationConfigEntity> configs = lambdaQuery()
|
||||
.eq(AutoExpirationConfigEntity::getEnabled, "1")
|
||||
.eq(AutoExpirationConfigEntity::getDelFlag, "0")
|
||||
.list();
|
||||
|
||||
if (CollUtil.isEmpty(configs)) {
|
||||
log.info("没有找到启用的到期检测配置");
|
||||
return;
|
||||
}
|
||||
|
||||
// 清空之前的检测结果
|
||||
expirationResultMapper.delete(null);
|
||||
|
||||
// 逐个检测每个配置的表
|
||||
for (AutoExpirationConfigEntity config : configs) {
|
||||
try {
|
||||
checkTableExpiration(config);
|
||||
} catch (Exception e) {
|
||||
log.error("检测表 {} 时发生错误: {}", config.getTableName(), e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
log.info("自动到期检测完成,共检测 {} 个表", configs.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExpirationResultEntity> getExpirationResults(String status) {
|
||||
LambdaQueryWrapper<ExpirationResultEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ExpirationResultEntity::getDelFlag, "0");
|
||||
|
||||
if (StrUtil.isNotBlank(status)) {
|
||||
wrapper.eq(ExpirationResultEntity::getStatus, status);
|
||||
}
|
||||
|
||||
wrapper.orderByDesc(ExpirationResultEntity::getExpireDate);
|
||||
|
||||
return expirationResultMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getStatistics() {
|
||||
Map<String, Object> statistics = new HashMap<>();
|
||||
|
||||
// 统计各状态的数量
|
||||
List<ExpirationResultEntity> allResults = expirationResultMapper.selectList(null);
|
||||
|
||||
long normalCount = allResults.stream()
|
||||
.filter(r -> "0".equals(r.getStatus()))
|
||||
.count();
|
||||
long expiringCount = allResults.stream()
|
||||
.filter(r -> "1".equals(r.getStatus()))
|
||||
.count();
|
||||
long expiredCount = allResults.stream()
|
||||
.filter(r -> "2".equals(r.getStatus()))
|
||||
.count();
|
||||
|
||||
statistics.put("total", allResults.size());
|
||||
statistics.put("normal", normalCount);
|
||||
statistics.put("expiring", expiringCount);
|
||||
statistics.put("expired", expiredCount);
|
||||
|
||||
return statistics;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkTableExpiration(String tableName) {
|
||||
AutoExpirationConfigEntity config = lambdaQuery()
|
||||
.eq(AutoExpirationConfigEntity::getTableName, tableName)
|
||||
.eq(AutoExpirationConfigEntity::getEnabled, "1")
|
||||
.one();
|
||||
|
||||
if (config == null) {
|
||||
throw new RuntimeException("未找到表 " + tableName + " 的配置信息");
|
||||
}
|
||||
|
||||
checkTableExpiration(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测指定配置的表
|
||||
*/
|
||||
private void checkTableExpiration(AutoExpirationConfigEntity config) {
|
||||
log.info("开始检测表: {}", config.getTableName());
|
||||
|
||||
// 构建查询SQL
|
||||
String sql = buildQuerySql(config);
|
||||
|
||||
try {
|
||||
List<Map<String, Object>> results = jdbcTemplate.queryForList(sql);
|
||||
|
||||
for (Map<String, Object> row : results) {
|
||||
processExpirationResult(config, row);
|
||||
}
|
||||
|
||||
log.info("表 {} 检测完成,共处理 {} 条记录", config.getTableName(), results.size());
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("检测表 {} 时发生错误: {}", config.getTableName(), e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询SQL
|
||||
*/
|
||||
private String buildQuerySql(AutoExpirationConfigEntity config) {
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT ");
|
||||
sql.append(config.getPrimaryKeyField()).append(" as business_id, ");
|
||||
sql.append(config.getExpireDateField()).append(" as expire_date ");
|
||||
|
||||
if (StrUtil.isNotBlank(config.getUserIdField())) {
|
||||
sql.append(", ").append(config.getUserIdField()).append(" as user_id ");
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getUserNameField())) {
|
||||
sql.append(", ").append(config.getUserNameField()).append(" as user_name ");
|
||||
}
|
||||
if (StrUtil.isNotBlank(config.getBusinessNameField())) {
|
||||
sql.append(", ").append(config.getBusinessNameField()).append(" as business_name ");
|
||||
}
|
||||
|
||||
sql.append(" FROM ").append(config.getTableName());
|
||||
sql.append(" WHERE ").append(config.getExpireDateField()).append(" IS NOT NULL");
|
||||
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理到期检测结果
|
||||
*/
|
||||
private void processExpirationResult(AutoExpirationConfigEntity config, Map<String, Object> row) {
|
||||
try {
|
||||
ExpirationResultEntity result = new ExpirationResultEntity();
|
||||
result.preSave();
|
||||
|
||||
result.setConfigId(config.getConfigId());
|
||||
result.setTableName(config.getTableName());
|
||||
result.setBusinessId(String.valueOf(row.get("business_id")));
|
||||
result.setBusinessName(String.valueOf(row.get("business_name")));
|
||||
result.setUserId(String.valueOf(row.get("user_id")));
|
||||
result.setUserName(String.valueOf(row.get("user_name")));
|
||||
|
||||
// 处理到期日期
|
||||
Object expireDateObj = row.get("expire_date");
|
||||
if (expireDateObj != null) {
|
||||
LocalDate expireDate = parseDate(expireDateObj);
|
||||
result.setExpireDate(expireDate);
|
||||
|
||||
// 计算剩余天数和状态
|
||||
LocalDate today = LocalDate.now();
|
||||
long remainingDays = ChronoUnit.DAYS.between(today, expireDate);
|
||||
result.setRemainingDays((int) remainingDays);
|
||||
|
||||
// 设置状态
|
||||
if (remainingDays < 0) {
|
||||
result.setStatus("2"); // 已到期
|
||||
} else if (remainingDays <= config.getRemindDays()) {
|
||||
result.setStatus("1"); // 即将到期
|
||||
} else {
|
||||
result.setStatus("0"); // 正常
|
||||
}
|
||||
}
|
||||
|
||||
result.setCheckTime(LocalDateTime.now());
|
||||
result.setDelFlag("0");
|
||||
|
||||
expirationResultMapper.insert(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("处理检测结果时发生错误: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析日期
|
||||
*/
|
||||
private LocalDate parseDate(Object dateObj) {
|
||||
if (dateObj instanceof LocalDate) {
|
||||
return (LocalDate) dateObj;
|
||||
} else if (dateObj instanceof java.sql.Date) {
|
||||
return ((java.sql.Date) dateObj).toLocalDate();
|
||||
} else if (dateObj instanceof java.util.Date) {
|
||||
// 使用 DateUtil.toLocalDateTime 然后转换为 LocalDate
|
||||
return DateUtil.toLocalDateTime((java.util.Date) dateObj).toLocalDate();
|
||||
} else {
|
||||
return LocalDate.parse(dateObj.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AutoExpirationConfigEntity getTableConfig(String tableName) {
|
||||
return lambdaQuery()
|
||||
.eq(AutoExpirationConfigEntity::getTableName, tableName)
|
||||
.eq(AutoExpirationConfigEntity::getEnabled, "1")
|
||||
.eq(AutoExpirationConfigEntity::getDelFlag, "0")
|
||||
.one();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Boolean> getTablesConfigStatus(List<String> tableNames) {
|
||||
Map<String, Boolean> statusMap = new HashMap<>();
|
||||
|
||||
if (CollUtil.isEmpty(tableNames)) {
|
||||
return statusMap;
|
||||
}
|
||||
|
||||
// 查询所有已配置的表
|
||||
List<AutoExpirationConfigEntity> configs = lambdaQuery()
|
||||
.in(AutoExpirationConfigEntity::getTableName, tableNames)
|
||||
.eq(AutoExpirationConfigEntity::getEnabled, "1")
|
||||
.eq(AutoExpirationConfigEntity::getDelFlag, "0")
|
||||
.list();
|
||||
|
||||
// 构建已配置的表名集合
|
||||
Set<String> configuredTables = configs.stream()
|
||||
.map(AutoExpirationConfigEntity::getTableName)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 为每个表设置配置状态
|
||||
for (String tableName : tableNames) {
|
||||
statusMap.put(tableName, configuredTables.contains(tableName));
|
||||
}
|
||||
|
||||
return statusMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AutoExpirationConfigEntity autoConfigureTable(String tableName) {
|
||||
// 检查是否已配置
|
||||
AutoExpirationConfigEntity existingConfig = getTableConfig(tableName);
|
||||
if (existingConfig != null) {
|
||||
log.info("表 {} 已存在配置", tableName);
|
||||
return existingConfig;
|
||||
}
|
||||
|
||||
// 根据表名生成默认配置
|
||||
AutoExpirationConfigEntity config = generateDefaultConfig(tableName);
|
||||
|
||||
try {
|
||||
config.preSave();
|
||||
save(config);
|
||||
log.info("为表 {} 自动创建配置", tableName);
|
||||
return config;
|
||||
} catch (Exception e) {
|
||||
log.error("自动配置表 {} 失败: {}", tableName, e.getMessage(), e);
|
||||
throw new RuntimeException("自动配置失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据表名生成默认配置
|
||||
*/
|
||||
private AutoExpirationConfigEntity generateDefaultConfig(String tableName) {
|
||||
AutoExpirationConfigEntity config = new AutoExpirationConfigEntity();
|
||||
config.setConfigId("config-" + System.currentTimeMillis());
|
||||
config.setTableName(tableName);
|
||||
config.setEnabled("1");
|
||||
config.setDelFlag("0");
|
||||
config.setRemindDays(30);
|
||||
config.setRemark("自动配置的到期检测");
|
||||
|
||||
// 根据表名设置默认字段
|
||||
switch (tableName) {
|
||||
case "certification":
|
||||
config.setTableDesc("证书到期检测");
|
||||
config.setPrimaryKeyField("certification_id");
|
||||
config.setExpireDateField("validity_date_end");
|
||||
config.setUserIdField("user_id");
|
||||
config.setBusinessNameField("certification_name");
|
||||
break;
|
||||
case "insurance_info":
|
||||
config.setTableDesc("保险到期检测");
|
||||
config.setPrimaryKeyField("insurance_id");
|
||||
config.setExpireDateField("expire_date");
|
||||
config.setUserIdField("user_id");
|
||||
config.setBusinessNameField("insurance_name");
|
||||
break;
|
||||
case "regulation":
|
||||
config.setTableDesc("规章制度到期检测");
|
||||
config.setPrimaryKeyField("regulation_id");
|
||||
config.setExpireDateField("expire_date");
|
||||
config.setUserIdField("create_by");
|
||||
config.setBusinessNameField("regulation_name");
|
||||
break;
|
||||
default:
|
||||
// 通用配置
|
||||
config.setTableDesc(tableName + "到期检测");
|
||||
config.setPrimaryKeyField("id");
|
||||
config.setExpireDateField("expire_date");
|
||||
config.setUserIdField("user_id");
|
||||
config.setBusinessNameField("name");
|
||||
break;
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
|
@ -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()+"条数据");
|
||||
}
|
||||
}
|
|
@ -198,7 +198,7 @@ public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> i
|
|||
}
|
||||
image.setImageType(ImageTypeEnum.DEFECT.getCode());
|
||||
imageService.updateById(image);
|
||||
FilePathEnum pathEnum = image.getImagePath().contains("temp") ? FilePathEnum.IMAGE_TEMP : FilePathEnum.IMAGE;
|
||||
FilePathEnum pathEnum = FilePathEnum.getFilePathEnum(image.getImagePath());
|
||||
String inputPath = pathEnum.getFileAbsolutePath(image.getImagePath());
|
||||
// 写入attach同层级文件夹下
|
||||
String attachPath = FilePathEnum.ATTACH.getUrlPath() + StrUtil.removePrefix(image.getImagePath(), pathEnum.getUrlPath());
|
||||
|
|
|
@ -8,8 +8,8 @@ import com.dite.znpt.converts.Converts;
|
|||
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||
import com.dite.znpt.domain.entity.ImageEntity;
|
||||
import com.dite.znpt.domain.vo.ImageCollectReq;
|
||||
import com.dite.znpt.domain.vo.ImageReq;
|
||||
import com.dite.znpt.enums.FilePathEnum;
|
||||
import com.dite.znpt.enums.ImageSourceEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.ImageCollectMapper;
|
||||
import com.dite.znpt.service.ImageCollectService;
|
||||
|
@ -20,9 +20,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
|
@ -49,21 +50,21 @@ public class ImageCollectServiceImpl extends ServiceImpl<ImageCollectMapper, Ima
|
|||
}
|
||||
ImageCollectEntity imageCollect = Converts.INSTANCE.toImageCollectEntity(req);
|
||||
this.save(imageCollect);
|
||||
String dateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
List<ImageEntity> imageList = Converts.INSTANCE.toImageEntity(req.getImageList());
|
||||
String permPathPrefix = FilePathEnum.IMAGE.getFileAbsolutePathPrefix().concat(ImageSourceEnum.COLLECT.getCode()).concat(FileUtil.FILE_SEPARATOR).concat(partId).concat(FileUtil.FILE_SEPARATOR).concat(dateStr).concat(FileUtil.FILE_SEPARATOR);
|
||||
Map<String, ImageReq> imageMap = req.getImageList().stream().collect(Collectors.toMap(ImageReq::getImageId, Function.identity(), (a,b) -> b));
|
||||
List<ImageEntity> imageList = imageService.listByIds(imageMap.keySet());
|
||||
imageList.forEach(image -> {
|
||||
image.setPartId(partId);
|
||||
image.setCollectId(imageCollect.getCollectId());
|
||||
image.setImageType(req.getImageType());
|
||||
image.setImageTypeLabel(req.getImageTypeLabel());
|
||||
String path = permPathPrefix + image.getImageName();
|
||||
String fileAbsolutePath = FilePathEnum.IMAGE_TEMP.getFileAbsolutePath(image.getImagePath());
|
||||
File file = FileUtil.file(fileAbsolutePath);
|
||||
if (file.exists()) {
|
||||
FileUtil.copy(file, FileUtil.file(path), true);
|
||||
image.setImagePath(FilePathEnum.IMAGE.getFileDownPath(path));
|
||||
FileUtil.del(file);
|
||||
if (FilePathEnum.getFilePathEnum(image.getImagePath()).equals(FilePathEnum.IMAGE_TEMP)) {
|
||||
String newImagePath = image.getImagePath().replace(FilePathEnum.IMAGE_TEMP.getUrlPath(), FilePathEnum.IMAGE.getUrlPath());
|
||||
String oldFileAbsolutePath = FilePathEnum.IMAGE_TEMP.getFileAbsolutePath(image.getImagePath());
|
||||
File oldFile = FileUtil.file(oldFileAbsolutePath);
|
||||
if (oldFile.exists()) {
|
||||
FileUtil.move(oldFile, FileUtil.file(newImagePath), true);
|
||||
image.setImagePath(newImagePath);
|
||||
}
|
||||
}
|
||||
});
|
||||
imageService.saveOrUpdateBatch(imageList);
|
||||
|
|
|
@ -64,6 +64,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
private PartService partService;
|
||||
@Autowired
|
||||
private AudioFileInfoService audioFileInfoService;
|
||||
@Autowired
|
||||
private ProjectService projectService;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
@ -140,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()) {
|
||||
|
@ -160,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());
|
||||
|
@ -184,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);
|
||||
}
|
||||
|
@ -201,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 {
|
||||
|
@ -296,7 +300,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
if(CollUtil.isEmpty(imageList)){
|
||||
imageCollectService.removeById(image.getCollectId());
|
||||
}
|
||||
FilePathEnum pathEnum = image.getImagePath().contains("temp") ? FilePathEnum.IMAGE_TEMP : FilePathEnum.IMAGE;
|
||||
FilePathEnum pathEnum = FilePathEnum.getFilePathEnum(image.getImagePath());
|
||||
FileUtil.del(pathEnum.getFileAbsolutePath(image.getImagePath()));
|
||||
FileUtil.del(FilePathEnum.IMAGE.getFileAbsolutePath(image.getPreImagePath()));
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.constant.Message;
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectDailyReportEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportReq;
|
||||
import com.dite.znpt.domain.vo.ProjectDailyReportResp;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.ProjectDailyReportMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.ProjectDailyReportService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
* @Description: 项目日报信息表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectDailyReportServiceImpl extends ServiceImpl<ProjectDailyReportMapper, ProjectDailyReportEntity> implements ProjectDailyReportService {
|
||||
|
||||
private final AttachInfoService attachInfoService;
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目日报信息列表
|
||||
*
|
||||
* @param projectDailyReportReq 项目日报信息信息
|
||||
* @return {@link List }<{@link ProjectDailyReportResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectDailyReportResp> selectList(ProjectDailyReportListReq projectDailyReportReq) {
|
||||
PageUtil.startPage();
|
||||
List<ProjectDailyReportResp> respList= this.baseMapper.queryBySelective(projectDailyReportReq);
|
||||
if (CollUtil.isNotEmpty(respList)) {
|
||||
List<String> reportIds = respList.stream().map(ProjectDailyReportResp::getReportId).toList();
|
||||
Map<String, AttachInfoEntity> attachMap = attachInfoService.listByBusinessIds(reportIds, AttachBusinessTypeEnum.PROJECT_DAILY_REPORT)
|
||||
.stream().collect(Collectors.toMap(AttachInfoEntity::getBusinessId, Function.identity()));
|
||||
respList.forEach(resp -> {
|
||||
resp.setReportAttach(attachMap.get(resp.getReportId()));
|
||||
});
|
||||
}
|
||||
return respList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条项目日报信息
|
||||
*
|
||||
* @param reportId 项目日报信息Id
|
||||
* @return {@link ProjectDailyReportResp }
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
@Override
|
||||
public ProjectDailyReportResp selectById(String reportId) {
|
||||
ProjectDailyReportListReq projectDailyReportReq = new ProjectDailyReportListReq();
|
||||
projectDailyReportReq.setReportId(reportId);
|
||||
|
||||
List<ProjectDailyReportResp> list = selectList(projectDailyReportReq);
|
||||
return CollUtil.isNotEmpty(list) ? CollUtil.getFirst(list) : new ProjectDailyReportResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目日报信息
|
||||
*
|
||||
* @param projectDailyReportReq 项目日报信息
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
@Override
|
||||
public void saveData(ProjectDailyReportReq projectDailyReportReq) {
|
||||
ProjectDailyReportResp myToday = myToday(projectDailyReportReq.getProjectId());
|
||||
if (Objects.nonNull(myToday)) {
|
||||
throw new ServiceException(Message.DAILY_REPORT_EXISTS);
|
||||
}
|
||||
ProjectDailyReportEntity entity = BeanUtil.copyProperties(projectDailyReportReq, ProjectDailyReportEntity.class);
|
||||
save(entity);
|
||||
attachInfoService.updateBusinessIdByAttachIds(entity.getReportId(), ListUtil.of(projectDailyReportReq.getReportAttachId()), AttachBusinessTypeEnum.PROJECT_DAILY_REPORT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新项目日报信息
|
||||
*
|
||||
* @param projectDailyReportReq 项目日报信息
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
@Override
|
||||
public void updateData(ProjectDailyReportReq projectDailyReportReq) {
|
||||
ProjectDailyReportEntity entity = BeanUtil.copyProperties(projectDailyReportReq, ProjectDailyReportEntity.class);
|
||||
updateById(entity);
|
||||
attachInfoService.updateBusinessIdByAttachIds(entity.getReportId(), ListUtil.of(projectDailyReportReq.getReportAttachId()), AttachBusinessTypeEnum.PROJECT_DAILY_REPORT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目日报信息
|
||||
*
|
||||
* @param reportId 项目日报信息Id
|
||||
* @author huise23
|
||||
* @date 2025/07/27 19:51
|
||||
**/
|
||||
@Override
|
||||
public void deleteById(String reportId) {
|
||||
removeById(reportId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectDailyReportResp myToday(String projectId) {
|
||||
ProjectDailyReportListReq req = new ProjectDailyReportListReq();
|
||||
req.setProjectId(projectId);
|
||||
req.setSubmitUser(StpUtil.getLoginIdAsString());
|
||||
req.setReportDate(LocalDate.now());
|
||||
List<ProjectDailyReportResp> list = selectList(req);
|
||||
if (CollUtil.isNotEmpty(list)){
|
||||
return CollUtil.getFirst(list);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,413 @@
|
|||
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.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()));
|
||||
|
||||
// 获取项目人员信息
|
||||
resp.setProjectMembers(selectByProjectId(projectId));
|
||||
|
||||
// 获取项目机组信息
|
||||
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()));
|
||||
|
||||
// 获取项目任务信息
|
||||
List<ProjectTaskEntity> tasks = projectTaskService.lambdaQuery()
|
||||
.eq(ProjectTaskEntity::getProjectId, projectId)
|
||||
.list();
|
||||
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()));
|
||||
|
||||
// 获取项目预算信息
|
||||
List<ProjectBudgetInfoEntity> budgets = projectBudgetInfoService.lambdaQuery()
|
||||
.eq(ProjectBudgetInfoEntity::getProjectId, projectId)
|
||||
.list();
|
||||
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"));
|
||||
|
||||
// 统计机组数量
|
||||
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));
|
||||
} else {
|
||||
item.setProgressPercentage(0);
|
||||
}
|
||||
|
||||
return item;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
}
|
|
@ -5,20 +5,20 @@ import cn.hutool.core.util.StrUtil;
|
|||
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.UserEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectEntity;
|
||||
import com.dite.znpt.domain.entity.UserEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectListResp;
|
||||
import com.dite.znpt.domain.vo.ProjectReq;
|
||||
import com.dite.znpt.domain.vo.ProjectResp;
|
||||
import com.dite.znpt.enums.ProjectStatusEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import com.dite.znpt.service.ProjectService;
|
||||
import com.dite.znpt.mapper.ProjectMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.service.ProjectService;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -59,6 +59,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectEntity
|
|||
List<ProjectListResp> list= this.baseMapper.queryBySelective(req);
|
||||
list.forEach(resp -> {
|
||||
resp.setStatusLabel(ProjectStatusEnum.getDescByCode(resp.getStatus()));
|
||||
// 判断人员类型
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import com.dite.znpt.mapper.ProjectTaskGroupMapper;
|
|||
import com.dite.znpt.mapper.ProjectTaskMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.ProjectTaskService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -55,7 +54,7 @@ public class ProjectTaskServiceImpl extends ServiceImpl<ProjectTaskMapper, Proje
|
|||
List<ProjectTaskResp> projectTaskList = this.baseMapper.queryBySelective(projectTaskReq);
|
||||
Map<String, List<AttachInfoEntity>> attachMap;
|
||||
if (!BooleanUtil.isTrue(projectTaskReq.getIsExport())) {
|
||||
attachMap = attachInfoService.listByBusinessIds(projectTaskList.stream().map(ProjectTaskResp::getTaskId).collect(Collectors.toList()), null)
|
||||
attachMap = attachInfoService.listByBusinessIds(projectTaskList.stream().map(ProjectTaskResp::getTaskId).collect(Collectors.toList()), AttachBusinessTypeEnum.PROJECT_TASK)
|
||||
.stream().collect(Collectors.groupingBy(AttachInfoEntity::getBusinessId));
|
||||
} else {
|
||||
attachMap = new HashMap<>();
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.RegulationConfirmationEntity;
|
||||
import com.dite.znpt.mapper.RegulationConfirmationMapper;
|
||||
import com.dite.znpt.service.RegulationConfirmationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/28
|
||||
* @Description: 制度确认服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class RegulationConfirmationServiceImpl extends ServiceImpl<RegulationConfirmationMapper, RegulationConfirmationEntity> implements RegulationConfirmationService {
|
||||
// 继承自ServiceImpl的方法已经足够使用
|
||||
// 包括:save, update, remove, list, page, lambdaQuery等
|
||||
}
|
|
@ -0,0 +1,275 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.RegulationEntity;
|
||||
import com.dite.znpt.domain.entity.RegulationConfirmationEntity;
|
||||
import com.dite.znpt.domain.vo.UserResp;
|
||||
import com.dite.znpt.mapper.RegulationMapper;
|
||||
import com.dite.znpt.service.RegulationService;
|
||||
import com.dite.znpt.service.RegulationConfirmationService;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
* @Description: 制度规范仓库Service实现类
|
||||
*/
|
||||
@Service
|
||||
public class RegulationServiceImpl extends ServiceImpl<RegulationMapper, RegulationEntity> implements RegulationService {
|
||||
|
||||
private final RegulationConfirmationService regulationConfirmationService;
|
||||
private final UserService userService;
|
||||
|
||||
public RegulationServiceImpl(RegulationConfirmationService regulationConfirmationService, UserService userService) {
|
||||
this.regulationConfirmationService = regulationConfirmationService;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 每天凌晨1点自动将公示期(10天)已到的已公示制度变为已发布
|
||||
*/
|
||||
@Scheduled(cron = "0 0 1 * * ?")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void autoPublishApprovedRegulations() {
|
||||
LocalDateTime tenDaysAgo = LocalDateTime.now().minusDays(10);
|
||||
|
||||
// 查询需要自动发布的制度(状态为APPROVED且更新时间超过10天)
|
||||
LambdaQueryWrapper<RegulationEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(RegulationEntity::getStatus, "APPROVED");
|
||||
wrapper.le(RegulationEntity::getUpdateTime, tenDaysAgo);
|
||||
wrapper.eq(RegulationEntity::getDelFlag, "0");
|
||||
|
||||
java.util.List<RegulationEntity> approvedRegulations = this.list(wrapper);
|
||||
|
||||
for (RegulationEntity regulation : approvedRegulations) {
|
||||
// 更新制度状态和发布信息
|
||||
regulation.setStatus("PUBLISHED");
|
||||
regulation.setPublishTime(LocalDateTime.now());
|
||||
regulation.setEffectiveTime(LocalDateTime.now()); // 设置生效时间为当前时间
|
||||
regulation.setUpdateTime(LocalDateTime.now());
|
||||
regulation.setUpdateBy("系统自动发布");
|
||||
|
||||
this.updateById(regulation);
|
||||
}
|
||||
|
||||
if (!approvedRegulations.isEmpty()) {
|
||||
System.out.println("自动发布完成,共发布 " + approvedRegulations.size() + " 个制度");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Result getRegulationList(Integer page, Integer pageSize, String status, String type, String title, String proposer, String confirmStatus) {
|
||||
try {
|
||||
Page<RegulationEntity> pageParam = new Page<>(page, pageSize);
|
||||
String userId = StpUtil.getLoginIdAsString();
|
||||
|
||||
// 使用关联查询获取创建人姓名和确认状态
|
||||
Page<RegulationEntity> result = this.baseMapper.selectRegulationListWithCreator(pageParam, status, type, title, proposer, confirmStatus, userId);
|
||||
|
||||
return Result.ok(result);
|
||||
} catch (Exception e) {
|
||||
return Result.error("获取制度列表失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result createRegulationProposal(RegulationEntity regulation) {
|
||||
try {
|
||||
regulation.setRegulationId(java.util.UUID.randomUUID().toString());
|
||||
regulation.setStatus("DRAFT");
|
||||
regulation.setCreateTime(LocalDateTime.now());
|
||||
|
||||
String userId = StpUtil.getLoginIdAsString();
|
||||
regulation.setCreateBy(userId);
|
||||
regulation.setUpdateTime(LocalDateTime.now());
|
||||
regulation.setUpdateBy(userId);
|
||||
regulation.setDelFlag("0");
|
||||
|
||||
this.save(regulation);
|
||||
return Result.okM("制度提案创建成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度提案创建失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result updateRegulationProposal(RegulationEntity regulation) {
|
||||
try {
|
||||
RegulationEntity existing = this.getById(regulation.getRegulationId());
|
||||
if (existing == null) {
|
||||
return Result.error("制度提案不存在");
|
||||
}
|
||||
|
||||
// 只能更新DRAFT状态的提案
|
||||
if (!"DRAFT".equals(existing.getStatus())) {
|
||||
return Result.error("只能更新草稿状态的制度提案");
|
||||
}
|
||||
|
||||
// 只能由创建人更新
|
||||
if (!existing.getCreateBy().equals(StpUtil.getLoginIdAsString())) {
|
||||
return Result.error("只能更新自己创建的制度提案");
|
||||
}
|
||||
|
||||
String userId = StpUtil.getLoginIdAsString();
|
||||
|
||||
regulation.setUpdateTime(LocalDateTime.now());
|
||||
regulation.setUpdateBy(userId);
|
||||
regulation.setStatus("DRAFT"); // 确保状态保持为DRAFT
|
||||
|
||||
this.updateById(regulation);
|
||||
return Result.okM("制度提案更新成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度提案更新失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result deleteRegulationProposal(String regulationId) {
|
||||
try {
|
||||
RegulationEntity regulation = this.getById(regulationId);
|
||||
if (regulation == null) {
|
||||
return Result.error("制度提案不存在");
|
||||
}
|
||||
|
||||
// 只能删除DRAFT状态的提案
|
||||
if (!"DRAFT".equals(regulation.getStatus())) {
|
||||
return Result.error("只能删除草稿状态的制度提案");
|
||||
}
|
||||
|
||||
// 只能由创建人删除
|
||||
if (!regulation.getCreateBy().equals(StpUtil.getLoginIdAsString())) {
|
||||
return Result.error("只能删除自己创建的制度提案");
|
||||
}
|
||||
|
||||
// 软删除
|
||||
regulation.setDelFlag("1");
|
||||
regulation.setUpdateTime(LocalDateTime.now());
|
||||
regulation.setUpdateBy(StpUtil.getLoginIdAsString());
|
||||
|
||||
this.updateById(regulation);
|
||||
return Result.okM("制度提案删除成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度提案删除失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Result getRegulationDetail(String regulationId) {
|
||||
try {
|
||||
RegulationEntity regulation = this.getById(regulationId);
|
||||
if (regulation == null) {
|
||||
return Result.error("制度不存在");
|
||||
}
|
||||
|
||||
// 获取创建人姓名
|
||||
if (regulation.getCreateBy() != null && !regulation.getCreateBy().isEmpty()) {
|
||||
try {
|
||||
UserResp user = userService.detail(regulation.getCreateBy());
|
||||
if (user != null) {
|
||||
regulation.setCreateByName(user.getName());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 如果查询失败,使用用户ID作为备选
|
||||
regulation.setCreateByName(regulation.getCreateBy());
|
||||
}
|
||||
}
|
||||
|
||||
// 设置制度类型名称
|
||||
if (regulation.getType() != null && !regulation.getType().isEmpty()) {
|
||||
regulation.setRegulationType(regulation.getType());
|
||||
}
|
||||
|
||||
return Result.ok(regulation);
|
||||
} catch (Exception e) {
|
||||
return Result.error("获取制度详情失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result confirmRegulation(String regulationId) {
|
||||
try {
|
||||
RegulationEntity regulation = this.getById(regulationId);
|
||||
if (regulation == null) {
|
||||
return Result.error("制度不存在");
|
||||
}
|
||||
|
||||
// 检查是否已经确认过
|
||||
RegulationConfirmationEntity existingConfirmation = regulationConfirmationService.lambdaQuery()
|
||||
.eq(RegulationConfirmationEntity::getRegulationId, regulationId)
|
||||
.eq(RegulationConfirmationEntity::getConfirmerId, StpUtil.getLoginIdAsString())
|
||||
.eq(RegulationConfirmationEntity::getDelFlag, "0")
|
||||
.one();
|
||||
|
||||
if (existingConfirmation != null) {
|
||||
return Result.error("您已经确认过该制度");
|
||||
}
|
||||
|
||||
// 创建确认记录
|
||||
RegulationConfirmationEntity confirmation = new RegulationConfirmationEntity();
|
||||
confirmation.setConfirmationId(java.util.UUID.randomUUID().toString());
|
||||
confirmation.setRegulationId(regulationId);
|
||||
confirmation.setConfirmerId(StpUtil.getLoginIdAsString());
|
||||
|
||||
UserResp user = userService.detail(StpUtil.getLoginIdAsString());
|
||||
if (user != null) {
|
||||
confirmation.setConfirmerName(user.getName());
|
||||
confirmation.setConfirmerDept(user.getDeptName());
|
||||
}
|
||||
|
||||
confirmation.setStatus("CONFIRMED");
|
||||
confirmation.setConfirmTime(LocalDateTime.now());
|
||||
confirmation.setDelFlag("0");
|
||||
|
||||
regulationConfirmationService.save(confirmation);
|
||||
return Result.okM("制度确认成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度确认失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result approveRegulation(String regulationId) {
|
||||
try {
|
||||
RegulationEntity regulation = this.getById(regulationId);
|
||||
if (regulation == null) {
|
||||
return Result.error("制度不存在");
|
||||
}
|
||||
|
||||
// 检查制度状态,只有DRAFT状态的制度才能公示
|
||||
if (!"DRAFT".equals(regulation.getStatus())) {
|
||||
return Result.error("只能公示草稿状态的制度");
|
||||
}
|
||||
|
||||
// 检查权限,只有创建人才能公示
|
||||
if (!regulation.getCreateBy().equals(StpUtil.getLoginIdAsString())) {
|
||||
return Result.error("只能公示自己创建的制度");
|
||||
}
|
||||
|
||||
// 更新制度状态为已公示
|
||||
regulation.setStatus("APPROVED");
|
||||
regulation.setUpdateTime(LocalDateTime.now());
|
||||
regulation.setUpdateBy(StpUtil.getLoginIdAsString());
|
||||
|
||||
this.updateById(regulation);
|
||||
return Result.okM("制度公示成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度公示失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.entity.RegulationEntity;
|
||||
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;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 制度类型Service实现类
|
||||
* @author wangna
|
||||
* @date 2025/07/29
|
||||
*/
|
||||
@Service
|
||||
public class RegulationTypeServiceImpl extends ServiceImpl<RegulationTypeMapper, RegulationTypeEntity> implements RegulationTypeService {
|
||||
|
||||
@Autowired
|
||||
private RegulationMapper regulationMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Result getRegulationTypes(Integer page, Integer size, String typeName, String status, String remark) {
|
||||
try {
|
||||
Page<RegulationTypeEntity> pageParam = new Page<>(page, size);
|
||||
|
||||
// 使用连表查询获取创建人姓名
|
||||
Page<RegulationTypeEntity> result = this.baseMapper.selectRegulationTypeListWithCreator(pageParam, typeName, status, remark);
|
||||
|
||||
return Result.ok(result);
|
||||
} catch (Exception e) {
|
||||
return Result.error("获取制度类型列表失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result createRegulationType(RegulationTypeEntity regulationType) {
|
||||
try {
|
||||
regulationType.setTypeId(java.util.UUID.randomUUID().toString());
|
||||
regulationType.setCreateTime(LocalDateTime.now());
|
||||
String userId = StpUtil.getLoginIdAsString();
|
||||
regulationType.setCreateBy(userId);
|
||||
regulationType.setUpdateTime(LocalDateTime.now());
|
||||
regulationType.setUpdateBy(userId);
|
||||
regulationType.setDelFlag("0");
|
||||
|
||||
// 如果没有设置排序顺序,设置为当前最大值+1
|
||||
if (regulationType.getSortOrder() == null) {
|
||||
Integer maxSortOrder = this.lambdaQuery()
|
||||
.eq(RegulationTypeEntity::getDelFlag, "0")
|
||||
.orderByDesc(RegulationTypeEntity::getSortOrder)
|
||||
.last("LIMIT 1")
|
||||
.oneOpt()
|
||||
.map(RegulationTypeEntity::getSortOrder)
|
||||
.orElse(0);
|
||||
regulationType.setSortOrder(maxSortOrder + 1);
|
||||
}
|
||||
|
||||
this.save(regulationType);
|
||||
return Result.okM("制度类型创建成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度类型创建失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result updateRegulationType(RegulationTypeEntity regulationType) {
|
||||
try {
|
||||
RegulationTypeEntity existing = this.getById(regulationType.getTypeId());
|
||||
if (existing == null) {
|
||||
return Result.error("制度类型不存在");
|
||||
}
|
||||
|
||||
regulationType.setUpdateTime(LocalDateTime.now());
|
||||
regulationType.setUpdateBy(cn.dev33.satoken.stp.StpUtil.getLoginIdAsString());
|
||||
|
||||
this.updateById(regulationType);
|
||||
return Result.okM("制度类型更新成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度类型更新失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result deleteRegulationType(String typeId) {
|
||||
try {
|
||||
RegulationTypeEntity regulationType = this.getById(typeId);
|
||||
if (regulationType == null) {
|
||||
return Result.error("制度类型不存在");
|
||||
}
|
||||
|
||||
// 检查是否有制度使用此类型
|
||||
String typeName = regulationType.getTypeName();
|
||||
|
||||
// 检查制度表中是否有使用此类型的记录(包括所有状态)
|
||||
long regulationCount = regulationMapper.selectCount(
|
||||
new LambdaQueryWrapper<RegulationEntity>()
|
||||
.eq(RegulationEntity::getType, typeName)
|
||||
.eq(RegulationEntity::getDelFlag, "0")
|
||||
);
|
||||
// 如果有制度使用此类型,则不允许删除
|
||||
if (regulationCount > 0) {
|
||||
return Result.error("该制度类型正在被使用,无法删除。请先删除或修改使用该类型的制度。");
|
||||
}
|
||||
|
||||
regulationType.setDelFlag("1");
|
||||
this.updateById(regulationType);
|
||||
return Result.okM("制度类型删除成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error("制度类型删除失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -88,9 +88,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
|
|||
@Override
|
||||
public List<UserListResp> list(UserListReq req) {
|
||||
return this.baseMapper.queryBySelective(req).stream().map(resp -> {
|
||||
resp.setUserTypeLabel(UserTypeEnum.getDescByCode(resp.getUserType()));
|
||||
resp.setUserStatusLabel(UserStatusEnum.getDescByCode(resp.getUserStatus()));
|
||||
return resp;
|
||||
resp.setUserTypeLabel(UserTypeEnum.getDescByCode(resp.getUserType()));
|
||||
resp.setUserStatusLabel(UserStatusEnum.getDescByCode(resp.getUserStatus()));
|
||||
return resp;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
@ -107,6 +107,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
|
|||
UserEntity entity = this.getById(userId);
|
||||
UserResp userResp= Converts.INSTANCE.toUserResp(entity);
|
||||
if(StrUtil.isNotBlank(userResp.getDeptId())){
|
||||
userResp.setName(entity.getName());
|
||||
userResp.setDeptName(deptService.getById(userResp.getDeptId()).getDeptName());
|
||||
}
|
||||
userResp.setUserTypeLabel(UserTypeEnum.getDescByCode(userResp.getUserType()));
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package com.dite.znpt.service.job;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 自动到期检测定时任务服务接口
|
||||
*/
|
||||
public interface AutoExpirationJobService {
|
||||
|
||||
/**
|
||||
* 执行自动到期检测任务
|
||||
*/
|
||||
void executeAutoExpirationJob();
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.dite.znpt.service.job.impl;
|
||||
|
||||
import com.dite.znpt.service.AutoExpirationService;
|
||||
import com.dite.znpt.service.job.AutoExpirationJobService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author System
|
||||
* @date 2025/1/1
|
||||
* @description 自动到期检测定时任务服务实现类
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class AutoExpirationJobServiceImpl implements AutoExpirationJobService {
|
||||
|
||||
@Autowired
|
||||
private AutoExpirationService autoExpirationService;
|
||||
|
||||
@Override
|
||||
public void executeAutoExpirationJob() {
|
||||
log.info("开始执行自动到期检测定时任务...");
|
||||
try {
|
||||
autoExpirationService.executeAutoExpirationCheck();
|
||||
log.info("自动到期检测定时任务执行完成");
|
||||
} catch (Exception e) {
|
||||
log.error("自动到期检测定时任务执行失败: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.BiddingInfoMapper">
|
||||
|
||||
<select id="listBiddingInfoResp" resultType="com.dite.znpt.domain.vo.BiddingInfoResp">
|
||||
SELECT bi.bidding_info_id, bi.bidding_project, bi.bidding_company, bi.bidding_amount, bi.bidding_deadline, bi.info_entry_time, bi.source, bi.source_website, ai.file_name, ai.attach_path
|
||||
FROM bidding_info bi
|
||||
LEFT JOIN attach_info ai ON bi.bidding_file_id = ai.attach_id
|
||||
<where>
|
||||
<if test="projectName != null and projectName != ''">
|
||||
AND bi.bidding_project LIKE concat ('%', #{projectName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -53,6 +53,9 @@
|
|||
<if test="paymentDate != null">
|
||||
and a.payment_date = #{paymentDate}
|
||||
</if>
|
||||
<if test="performanceDeadline != null">
|
||||
and a.performance_deadline = #{performanceDeadline}
|
||||
</if>
|
||||
<if test="paymentAddress != null and paymentAddress != ''">
|
||||
and a.payment_address like concat ('%', #{paymentAddress}, '%')
|
||||
</if>
|
||||
|
@ -68,6 +71,9 @@
|
|||
<if test="contractStatus != null and contractStatus != ''">
|
||||
and a.contract_status like concat ('%', #{contractStatus}, '%')
|
||||
</if>
|
||||
<if test="contractText != null">
|
||||
and a.contract_text like concat ('%', #{contractText}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
i.image_id, i.image_name, i.part_id, p.part_name, i.image_resolution, i.focal_distance, i.shooting_time, i.camera_manufacturer,
|
||||
i.camera_model, i.GPS, ic.weather, ic.humidness, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature, ic.wind_level,
|
||||
ic.shooting_method, ic.shooting_distance,ic.collector_name, i.image_type, i.image_path, ic.image_source, i.review_state, i.image_type_label,
|
||||
i.pre_image_path, i.project_id, i.pre_treatment
|
||||
i.pre_image_path, i.project_id, i.pre_treatment, i.create_time, i.create_by
|
||||
FROM image i
|
||||
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
||||
LEFT JOIN part p ON i.part_id = p.part_id
|
||||
|
@ -20,6 +20,9 @@
|
|||
<if test="partId != null and partId != ''">
|
||||
AND p.part_id = #{partId}
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND i.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="imageTypes != null and imageTypes.length > 0">
|
||||
AND i.image_type in <foreach collection="imageTypes" item="imageType" open="(" close=")" separator=",">#{imageType}</foreach>
|
||||
</if>
|
||||
|
@ -27,6 +30,7 @@
|
|||
and i.review_state = #{reviewState}
|
||||
</if>
|
||||
</where>
|
||||
order by i.create_time desc
|
||||
</select>
|
||||
|
||||
<resultMap id="imageRespMap" type="com.dite.znpt.domain.vo.ImageResp">
|
||||
|
@ -75,7 +79,7 @@
|
|||
i.focal_distance35, i.x_resolution, i.y_resolution, i.resolution_units, i.shooting_time, i.camera_manufacturer, i.camera_model,
|
||||
i.latitude, i.latitude, i.altitude, ic.collect_id, ic.weather, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature,
|
||||
ic.wind_level, ic.shooting_method, ic.shooting_distance, ic.collector_name, ic.image_source, i.review_state, i.image_type, i.image_type_label,
|
||||
i.pre_treatment, i.project_id
|
||||
i.pre_treatment, i.project_id, i.create_time
|
||||
FROM image i
|
||||
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
||||
WHERE i.image_id = #{imageId}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.OutbidInfoMapper">
|
||||
|
||||
<select id="listOutbidInfoResp" resultType="com.dite.znpt.domain.vo.OutbidInfoResp">
|
||||
SELECT oi.outbid_info_id, oi.bidding_info_id, bi.bidding_project, bi.bidding_company, oi.outbid_amount, oi.outbid_notify_date, oi.outbid_notice_file_id, oi.status, ai.file_name, ai.attach_path
|
||||
FROM outbid_info oi
|
||||
LEFT JOIN bidding_info bi ON oi.bidding_info_id = bi.bidding_info_id
|
||||
LEFT JOIN attach_info ai ON oi.outbid_notice_file_id = ai.attach_id
|
||||
<where>
|
||||
oi.del_flag = '0'
|
||||
<if test="projectName != null and project != ''">
|
||||
AND bi.bidding_project LIKE concat ('%', #{projectName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getOutbidInfoResp" resultType="com.dite.znpt.domain.vo.OutbidInfoResp">
|
||||
SELECT oi.outbid_info_id, oi.bidding_info_id, bi.bidding_project, bi.bidding_company, oi.outbid_amount, oi.outbid_notify_date, oi.outbid_notice_file_id, oi.status, ai.file_name, ai.attach_path
|
||||
FROM outbid_info oi
|
||||
LEFT JOIN bidding_info bi ON oi.bidding_info_id = bi.bidding_info_id
|
||||
LEFT JOIN attach_info ai ON oi.outbid_notice_file_id = ai.attach_id
|
||||
WHERE oi.outbid_info_id = #{outbidInfoId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.ProjectDailyReportMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.report_id, a.project_id, a.report_date, a.submit_user,
|
||||
a.update_by, a.create_time, a.create_by, a.update_time
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectDailyReportResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from project_daily_report a
|
||||
<where>
|
||||
<if test="reportId != null and reportId != ''">
|
||||
and a.report_id like concat ('%', #{reportId}, '%')
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and a.project_id like concat ('%', #{projectId}, '%')
|
||||
</if>
|
||||
<if test="reportDate != null">
|
||||
and a.report_date = #{reportDate}
|
||||
</if>
|
||||
<if test="submitUser != null and submitUser != ''">
|
||||
and a.submit_user like concat ('%', #{submitUser}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -2,23 +2,27 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.ProjectMapper">
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectListResp">
|
||||
with taskProgress as (
|
||||
SELECT
|
||||
count(1) task_count,
|
||||
sum(status=0) taskPendingCount,
|
||||
sum(status=1) task_progress_count,
|
||||
sum(status=2) task_complete_count,
|
||||
project_id
|
||||
FROM project_task
|
||||
group by project_id
|
||||
with taskProgress as (SELECT count(1) task_count,
|
||||
sum(status = 0) taskPendingCount,
|
||||
sum(status = 1) task_progress_count,
|
||||
sum(status = 2) task_complete_count,
|
||||
project_id
|
||||
FROM project_task
|
||||
group by project_id),
|
||||
constructor as (
|
||||
select project_id, GROUP_CONCAT(DISTINCT con.name) AS constructor_name
|
||||
FROM project prj
|
||||
LEFT JOIN user con ON FIND_IN_SET(con.user_id,prj.constructor_ids) > 0 AND con.del_flag = '0'
|
||||
GROUP BY prj.project_id
|
||||
)
|
||||
SELECT
|
||||
prj.project_id, prj.project_origin, prj.project_budget, prj.project_name, prj.farm_name, prj.status, prj.cover_url, prj.farm_address, prj.client, prj.client_contact, prj.client_phone, prj.inspection_unit,
|
||||
prj.inspection_contact, prj.inspection_phone, prj.scale, prj.turbine_model, prj.project_manager_id, pm.name AS project_manager_name, prj.constructor_ids,
|
||||
GROUP_CONCAT(DISTINCT con.name) AS constructor_name, prj.start_date, prj.end_date, tp.taskPendingCount, tp.task_progress_count, tp.task_complete_count, tp.task_count
|
||||
prj.start_date, prj.end_date, con.constructor_name, tp.taskPendingCount, tp.task_progress_count, tp.task_complete_count, tp.task_count, prj.auditor_id,
|
||||
prj.construct_team_leader_id, prj.quality_officer_id
|
||||
FROM project prj
|
||||
LEFT JOIN user pm ON pm.user_id = prj.project_manager_id
|
||||
LEFT JOIN user con ON FIND_IN_SET(con.user_id,prj.constructor_ids) > 0 AND con.del_flag = '0'
|
||||
LEFT JOIN constructor con on prj.project_id = con.project_id
|
||||
left join taskProgress tp on prj.project_id = tp.project_id
|
||||
<where>
|
||||
<if test="projectName != null and projectName != ''">
|
||||
|
@ -48,9 +52,6 @@
|
|||
or prj.constructor_ids like concat('%', #{userId},'%'))
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY prj.project_id, prj.project_name, prj.farm_name, prj.status, prj.cover_url, prj.farm_address, prj.client, prj.client_contact, prj.client_phone, prj.inspection_unit,
|
||||
prj.inspection_contact, prj.inspection_phone, prj.scale, prj.turbine_model, prj.project_manager_id, pm.name, prj.constructor_ids,
|
||||
prj.start_date, prj.end_date, tp.taskPendingCount, tp.task_progress_count, tp.task_complete_count, tp.task_count
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -0,0 +1,314 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.ProjectMemberMapper">
|
||||
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap id="BaseResultMap" type="com.dite.znpt.domain.vo.ProjectMemberResp">
|
||||
<id column="member_id" property="memberId" jdbcType="VARCHAR"/>
|
||||
<result column="project_id" property="projectId" jdbcType="VARCHAR"/>
|
||||
<result column="project_name" property="projectName" jdbcType="VARCHAR"/>
|
||||
<result column="turbine_id" property="turbineId" jdbcType="VARCHAR"/>
|
||||
<result column="turbine_name" property="turbineName" jdbcType="VARCHAR"/>
|
||||
<result column="task_group_id" property="taskGroupId" jdbcType="VARCHAR"/>
|
||||
<result column="task_group_name" property="taskGroupName" jdbcType="VARCHAR"/>
|
||||
<result column="task_id" property="taskId" jdbcType="VARCHAR"/>
|
||||
<result column="task_name" property="taskName" jdbcType="VARCHAR"/>
|
||||
<result column="user_id" property="userId" jdbcType="VARCHAR"/>
|
||||
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
|
||||
<result column="user_account" property="userAccount" jdbcType="VARCHAR"/>
|
||||
<result column="user_avatar" property="userAvatar" jdbcType="VARCHAR"/>
|
||||
<result column="role_type" property="roleType" jdbcType="VARCHAR"/>
|
||||
<result column="role_type_desc" property="roleTypeDesc" jdbcType="VARCHAR"/>
|
||||
<result column="job_code" property="jobCode" jdbcType="VARCHAR"/>
|
||||
<result column="job_code_desc" property="jobCodeDesc" jdbcType="VARCHAR"/>
|
||||
<result column="job_desc" property="jobDesc" jdbcType="VARCHAR"/>
|
||||
<result column="join_date" property="joinDate" jdbcType="DATE"/>
|
||||
<result column="leave_date" property="leaveDate" jdbcType="DATE"/>
|
||||
<result column="status" property="status" jdbcType="VARCHAR"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 根据条件查询项目人员列表 -->
|
||||
<select id="queryBySelective" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
<where>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND pm.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="turbineId != null and turbineId != ''">
|
||||
AND pm.turbine_id = #{turbineId}
|
||||
</if>
|
||||
<if test="taskGroupId != null and taskGroupId != ''">
|
||||
AND pm.task_group_id = #{taskGroupId}
|
||||
</if>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
AND pm.task_id = #{taskId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
AND pm.user_id = #{userId}
|
||||
</if>
|
||||
<if test="roleType != null and roleType != ''">
|
||||
AND pm.role_type = #{roleType}
|
||||
</if>
|
||||
<if test="jobCode != null and jobCode != ''">
|
||||
AND pm.job_code = #{jobCode}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND pm.status = #{status}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.name LIKE CONCAT('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="userAccount != null and userAccount != ''">
|
||||
AND u.account LIKE CONCAT('%', #{userAccount}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据项目ID查询项目人员列表 -->
|
||||
<select id="queryByProjectId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
WHERE pm.project_id = #{projectId}
|
||||
AND pm.status = 'ACTIVE'
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据机组ID查询机组人员列表 -->
|
||||
<select id="queryByTurbineId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
WHERE pm.turbine_id = #{turbineId}
|
||||
AND pm.status = 'ACTIVE'
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据任务组ID查询任务组人员列表 -->
|
||||
<select id="queryByTaskGroupId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
WHERE pm.task_group_id = #{taskGroupId}
|
||||
AND pm.status = 'ACTIVE'
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据任务ID查询任务人员列表 -->
|
||||
<select id="queryByTaskId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
WHERE pm.task_id = #{taskId}
|
||||
AND pm.status = 'ACTIVE'
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID查询用户参与的项目列表 -->
|
||||
<select id="queryByUserId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
WHERE pm.user_id = #{userId}
|
||||
AND pm.status = 'ACTIVE'
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据项目ID和角色类型查询人员列表 -->
|
||||
<select id="queryByProjectIdAndRoleType" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pm.member_id,
|
||||
pm.project_id,
|
||||
p.project_name,
|
||||
pm.turbine_id,
|
||||
t.turbine_name,
|
||||
pm.task_group_id,
|
||||
ptg.group_name as task_group_name,
|
||||
pm.task_id,
|
||||
pt.task_name,
|
||||
pm.user_id,
|
||||
u.name as user_name,
|
||||
u.account as user_account,
|
||||
u.avatar as user_avatar,
|
||||
pm.role_type,
|
||||
pm.role_type as role_type_desc,
|
||||
pm.job_code,
|
||||
pm.job_code as job_code_desc,
|
||||
pm.job_desc,
|
||||
pm.join_date,
|
||||
pm.leave_date,
|
||||
pm.status,
|
||||
pm.remark
|
||||
FROM project_member pm
|
||||
LEFT JOIN project p ON pm.project_id COLLATE utf8mb4_general_ci = p.project_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN turbine t ON pm.turbine_id COLLATE utf8mb4_general_ci = t.turbine_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task_group ptg ON pm.task_group_id COLLATE utf8mb4_general_ci = ptg.group_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN project_task pt ON pm.task_id COLLATE utf8mb4_general_ci = pt.task_id COLLATE utf8mb4_general_ci
|
||||
LEFT JOIN user u ON pm.user_id COLLATE utf8mb4_general_ci = u.user_id COLLATE utf8mb4_general_ci
|
||||
WHERE pm.project_id = #{projectId}
|
||||
AND pm.role_type = #{roleType}
|
||||
AND pm.status = 'ACTIVE'
|
||||
ORDER BY pm.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue