Compare commits
11 Commits
5f49a0ecc2
...
e73257514b
Author | SHA1 | Date |
---|---|---|
|
e73257514b | |
|
a0c5fdcb5f | |
|
a01f765e8d | |
|
b28515f8d7 | |
|
06b8996a60 | |
|
f63e40a79a | |
|
d691db5eee | |
|
87af4928ee | |
|
1e2432c51e | |
|
941b5de453 | |
|
7306aaccd2 |
29
core/pom.xml
29
core/pom.xml
|
@ -78,19 +78,6 @@
|
|||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成器 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>3.5.11</version>
|
||||
</dependency>
|
||||
<!-- 模板引擎 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里数据库连接池 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
@ -103,12 +90,6 @@
|
|||
<artifactId>spring-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
|
@ -137,7 +118,7 @@
|
|||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson</artifactId>
|
||||
<version>3.16.0</version>
|
||||
<version>3.22.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -149,7 +130,7 @@
|
|||
<dependency>
|
||||
<groupId>com.drewnoakes</groupId>
|
||||
<artifactId>metadata-extractor</artifactId>
|
||||
<version>2.15.0</version>
|
||||
<version>2.18.0</version>
|
||||
</dependency>
|
||||
<!-- mapstruct驱动包 -->
|
||||
<dependency>
|
||||
|
@ -168,12 +149,6 @@
|
|||
<version>1.3.0-91</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.sip</groupId>
|
||||
<artifactId>jain-sip-ri</artifactId>
|
||||
<version>1.3.0-91</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -86,4 +86,15 @@ public class Constants {
|
|||
* 1:代表隐藏
|
||||
*/
|
||||
public static final String VISIBLE_1 = "1";
|
||||
|
||||
|
||||
/**
|
||||
* 0:代表发布
|
||||
*/
|
||||
public static final String STATUS_PUBLISH = "0";
|
||||
|
||||
/**
|
||||
* 1:代表未发布
|
||||
*/
|
||||
public static final String STATUS_UNPUBLISH = "1";
|
||||
}
|
||||
|
|
|
@ -13,13 +13,14 @@ public class Message implements Serializable {
|
|||
private static final long serialVersionUID = 4010434089386946123L;
|
||||
|
||||
public static final String IMAGE_IS_EMPTY = "图像信息为空";
|
||||
public static final String ATTACH_INFO_IS_NOT_EXIST = "附件信息id不存在";
|
||||
public static final String ATTACH_FILE_IS_NOT_EXIST = "不存在{}的附件文件";
|
||||
public static final String IMAGE_PATH_IS_NOT_EXIST = "图像地址不存在";
|
||||
public static final String IMAGE_ID_IS_NOT_EXIST = "图像id不存在";
|
||||
public static final String DEFECT_ID_IS_NOT_EXIST = "缺陷id不存在";
|
||||
public static final String PROJECT_ID_IS_NOT_EXIST = "项目id不存在";
|
||||
public static final String TURBINE_ID_IS_NOT_EXIST = "机组id不存在";
|
||||
public static final String PART_ID_IS_NOT_EXIST = "部件id不存在";
|
||||
public static final String IMAGE_SOURCE_ID_NOT_EXIST_OR_ILLEGAL = "部件id不存在或者不合法";
|
||||
public static final String USER_ID_NOT_EXIST = "用户id不存在";
|
||||
public static final String USER_ID_NOT_EXIST_OR_ILLEGAL = "用户id不存在或者不合法";
|
||||
public static final String ACCOUNT_EXIST = "用户账号已经存在,请重新输入";
|
||||
|
@ -39,4 +40,24 @@ public class Message implements Serializable {
|
|||
public static final String CERTIFICATION_TYPE_ILLEGAL = "证书类型不合法";
|
||||
public static final String CERTIFICATION_CODE_EXIST = "证书编码已存在";
|
||||
public static final String CERTIFICATION_ID_NOT_EXIST = "证书id不存在";
|
||||
public static final String INSURANCE_TYPE_NAME_IS_EXIST = "保险类型名称已存在";
|
||||
public static final String INSURANCE_TYPE_ID_IS_NOT_EXIST = "保险类型id不存在";
|
||||
public static final String INSURANCE_COMPANY_NAME_IS_EXIST = "保险公司名称已存在";
|
||||
public static final String INSURANCE_COMPANY_ID_IS_NOT_EXIST = "保险公司id不存在";
|
||||
public static final String INSURANCE_INFO_ID_IS_NOT_EXIST = "保险信息id不存在";
|
||||
public static final String INSURANCE_FILE_IS_NOT_EXIST = "保险文不存在";
|
||||
public static final String TASK_ID_GROUP_ID_ALL_EMPTY = "任务id和任务组id不可同时为空";
|
||||
public static final String TASK_STATUS_NOT_PENDING = "任务状态不是未开始";
|
||||
public static final String TASK_STATUS_NOT_IN_PROGRESS = "任务状态不是进行中";
|
||||
public static final String TASK_IN_CYCLE = "父级任务存在循环依赖:";
|
||||
public static final String TASK_GROUP_ID_NOT_EXIST = "任务组id不存在";
|
||||
public static final String WORK_TIME_START_CAN_NOT_BEFORE_WORK_TIME_END = "下班时间不能早于上班时间";
|
||||
public static final String REST_TIME_START_CAN_NOT_BEFORE_REST_TIME_END = "休息结束时间不能早于休息开始时间";
|
||||
public static final String REST_TIME_START_MUST_BETWEEN_WORK_TIME = "休息开始时间必须是在上班时间范围内";
|
||||
public static final String REST_TIME_END_MUST_BETWEEN_WORK_TIME = "休息结束时间必须是在上班时间范围内";
|
||||
public static final String EARLY_TIME_LIMIT_CAN_NOT_BEFORE_EARLY_TIME_OFFSET = "早退临界时间不能小于早退豁免时间";
|
||||
public static final String LATE_TIME_LIMIT_CAN_NOT_BEFORE_LATE_TIME_OFFSET = "迟到临界时间不能小于迟到豁免时间";
|
||||
public static final String WORK_SHIFT_NAME_EXIST = "班次名称已经存在";
|
||||
public static final String WORK_SHIFT_NOT_EXIST = "班次不存在";
|
||||
public static final String WORK_SHIFT_IS_NOT_UNPUBLISH = "班次的状态不是未发布";
|
||||
}
|
||||
|
|
|
@ -71,5 +71,31 @@ public interface Converts {
|
|||
|
||||
List<CertificationResp> toCertificationResp(List<CertificationEntity> list);
|
||||
|
||||
List<InsuranceTypeResp> toInsuranceTypeResp(List<InsuranceTypeEntity> list);
|
||||
|
||||
InsuranceTypeResp toInsuranceTypeResp(InsuranceTypeEntity entity);
|
||||
|
||||
InsuranceTypeEntity toInsuranceTypeEntity(InsuranceTypeReq req);
|
||||
|
||||
List<InsuranceCompanyResp> toInsuranceCompanyResp(List<InsuranceCompanyEntity> list);
|
||||
|
||||
InsuranceCompanyResp toInsuranceCompanyResp(InsuranceCompanyEntity entity);
|
||||
|
||||
InsuranceCompanyEntity toInsuranceCompanyEntity(InsuranceCompanyReq req);
|
||||
|
||||
List<InsuranceInfoResp> toInsuranceInfoResp(List<InsuranceInfoEntity> list);
|
||||
List<InsuranceAttachResp> toInsuranceAttachResp(List<InsuranceInfoEntity> list);
|
||||
|
||||
InsuranceInfoResp toInsuranceInfoResp(InsuranceInfoEntity entity);
|
||||
|
||||
InsuranceInfoEntity toInsuranceInfoEntity(InsuranceInfoReq req);
|
||||
|
||||
AttachInfoResp toAttacheInfoResp(AttachInfoEntity entity);
|
||||
|
||||
List<WorkShiftListResp> toWorkShiftListResp(List<WorkShiftEntity> list);
|
||||
|
||||
WorkShiftResp toWorkShiftResp(WorkShiftEntity entity);
|
||||
|
||||
WorkShiftEntity toWorkShiftEntity(WorkShiftReq req);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,11 @@ public class Result<T> implements Serializable {
|
|||
}
|
||||
|
||||
public static <T> Result<T> error(String code, String msg) {
|
||||
return new Result<T>(HttpStatus.INTERNAL_SERVER_ERROR, null, Integer.parseInt(code), msg);
|
||||
return error(code, msg, null);
|
||||
}
|
||||
|
||||
public static <T> Result<T> error(String code, String msg, T data) {
|
||||
return new Result<T>(HttpStatus.INTERNAL_SERVER_ERROR, data, Integer.parseInt(code), msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/27 16:18
|
||||
* @Description: 附件信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("attach_info")
|
||||
@ApiModel(value="AttachInfoEntity对象", description="附件信息表")
|
||||
public class AttachInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -74430400890258372L;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
@TableId(value = "attach_id", type = IdType.ASSIGN_ID)
|
||||
private String attachId;
|
||||
|
||||
@ApiModelProperty("业务id")
|
||||
@TableField("business_id")
|
||||
private String businessId;
|
||||
|
||||
@ApiModelProperty("附件路径")
|
||||
@TableField("attach_path")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("业务类型,字典attach_business_type")
|
||||
@TableField("business_type")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
@TableField("file_type")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("dict")
|
||||
@ApiModel(value="DictEntity对象", description="字典表")
|
||||
public class DictEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -52191875430786367L;
|
||||
|
||||
@ExcelProperty("字典id")
|
||||
@ApiModelProperty("字典id")
|
||||
@TableId(value = "dict_id", type = IdType.ASSIGN_ID)
|
||||
private String dictId;
|
||||
|
||||
@ExcelProperty("字典类型")
|
||||
@ApiModelProperty("字典类型")
|
||||
@TableField("dict_type")
|
||||
private String dictType;
|
||||
|
||||
@ExcelProperty("字典名称")
|
||||
@ApiModelProperty("字典名称")
|
||||
@TableField("dict_name")
|
||||
private String dictName;
|
||||
|
||||
@ExcelProperty("父级id")
|
||||
@ApiModelProperty("父级id")
|
||||
@TableField("parent_id")
|
||||
private Long parentId;
|
||||
|
||||
@ExcelProperty("字典排序")
|
||||
@ApiModelProperty("字典排序")
|
||||
@TableField("sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
@ExcelProperty("是否字典终值")
|
||||
@ApiModelProperty("是否字典终值")
|
||||
@TableField("final_state")
|
||||
private Integer finalState;
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 文件信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("file_info")
|
||||
@ApiModel(value="FileInfoEntity对象", description="文件信息表")
|
||||
public class FileInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -14287111699285655L;
|
||||
|
||||
@ExcelProperty("文件id")
|
||||
@ApiModelProperty("文件id")
|
||||
@TableId(value = "file_id", type = IdType.ASSIGN_UUID)
|
||||
private Long fileId;
|
||||
|
||||
@ExcelProperty("业务id")
|
||||
@ApiModelProperty("业务id")
|
||||
@TableField("business_id")
|
||||
private String businessId;
|
||||
|
||||
@ExcelProperty("minio相对路径")
|
||||
@ApiModelProperty("minio相对路径")
|
||||
@TableField("minio_path")
|
||||
private String minioPath;
|
||||
|
||||
@ExcelProperty("业务类型,字典file_business_type")
|
||||
@ApiModelProperty("业务类型,字典file_business_type")
|
||||
@TableField("business_type")
|
||||
private String businessType;
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
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: gaoxiong
|
||||
* @Date: 2025/6/24 23:15
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("insurance_company")
|
||||
@ApiModel(value="InsuranceCompanyEntity对象", description="保险公司信息")
|
||||
public class InsuranceCompanyEntity extends AuditableEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6335457810854776901L;
|
||||
|
||||
@ApiModelProperty("公司id")
|
||||
@TableId(value = "insurance_company_id", type = IdType.ASSIGN_UUID)
|
||||
private String insuranceCompanyId;
|
||||
|
||||
@ApiModelProperty("公司名称")
|
||||
@TableField("insurance_company_name")
|
||||
private String insuranceCompanyName;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@TableField("contact")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("联系人电话")
|
||||
@TableField("contact_phone")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty("状态:0-合作中,1-终止合作")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 ,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
|
@ -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.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:15
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("insurance_info")
|
||||
@ApiModel(value="InsuranceInfoEntity对象", description="保险信息")
|
||||
public class InsuranceInfoEntity extends AuditableEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 465741795038101117L;
|
||||
|
||||
@ApiModelProperty("保险信息id")
|
||||
@TableId(value = "insurance_info_id", type = IdType.ASSIGN_UUID)
|
||||
private String insuranceInfoId;
|
||||
|
||||
@ApiModelProperty("员工id")
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("员工姓名")
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("员工工号")
|
||||
@TableField("user_code")
|
||||
private String userCode;
|
||||
|
||||
@ApiModelProperty("保险公司id")
|
||||
@TableField("insurance_company_id")
|
||||
private String insuranceCompanyId;
|
||||
|
||||
@ApiModelProperty("保险公司")
|
||||
@TableField("insurance_company_name")
|
||||
private String insuranceCompanyName;
|
||||
|
||||
@ApiModelProperty("保险类型id")
|
||||
@TableField("insurance_type_id")
|
||||
private String insuranceTypeId;
|
||||
|
||||
@ApiModelProperty("保险类型")
|
||||
@TableField("insurance_type_name")
|
||||
private String insuranceTypeName;
|
||||
|
||||
@ApiModelProperty("保险单号")
|
||||
@TableField("insurance_bill_code")
|
||||
private String insuranceBillCode;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
@TableField("attach_info_id")
|
||||
private String attachInfoId;
|
||||
|
||||
@ApiModelProperty("生效日期")
|
||||
@TableField("effective_date")
|
||||
private LocalDate effectiveDate;
|
||||
|
||||
@ApiModelProperty("到期日期")
|
||||
@TableField("expire_date")
|
||||
private LocalDate expireDate;
|
||||
|
||||
@ApiModelProperty("保费")
|
||||
@TableField("insurance_premium")
|
||||
private BigDecimal insurancePremium;
|
||||
|
||||
@ApiModelProperty("保额")
|
||||
@TableField("insurance_amount")
|
||||
private BigDecimal insuranceAmount;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
@TableField("insurance_status")
|
||||
private String insuranceStatus;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 ,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
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: gaoxiong
|
||||
* @Date: 2025/6/24 23:15
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("insurance_type")
|
||||
@ApiModel(value="InsuranceTypeEntity对象", description="保险类型")
|
||||
public class InsuranceTypeEntity extends AuditableEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3027186714895190416L;
|
||||
|
||||
@ApiModelProperty("保险类型id")
|
||||
@TableId(value = "insurance_type_id", type = IdType.ASSIGN_UUID)
|
||||
private String insuranceTypeId;
|
||||
|
||||
@ApiModelProperty("保险类型名称")
|
||||
@TableField("insurance_type_name")
|
||||
private String insuranceTypeName;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 ,1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
|
@ -48,10 +48,15 @@ public class MenuEntity extends AuditableEntity implements Serializable {
|
|||
@TableField("order_num")
|
||||
private Integer orderNum;
|
||||
|
||||
@ExcelProperty("请求地址")
|
||||
@ApiModelProperty("请求地址")
|
||||
@TableField("url")
|
||||
private String url;
|
||||
@ExcelProperty("组件地址")
|
||||
@ApiModelProperty("组件地址")
|
||||
@TableField("component")
|
||||
private String component;
|
||||
|
||||
@ExcelProperty("路由地址")
|
||||
@ApiModelProperty("路由地址")
|
||||
@TableField("path")
|
||||
private String path;
|
||||
|
||||
@ExcelProperty("菜单类型(M目录 C菜单 F按钮)")
|
||||
@ApiModelProperty("菜单类型(M目录 C菜单 F按钮)")
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
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.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;
|
||||
|
@ -105,23 +108,28 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("技术方案图片,多个用逗号隔开")
|
||||
@JsonIgnore
|
||||
@TableField("technical_image")
|
||||
@Deprecated
|
||||
private String technicalImage;
|
||||
|
||||
@ApiModelProperty("技术方案内容")
|
||||
@TableField("technical_content")
|
||||
@Deprecated
|
||||
private String technicalContent;
|
||||
|
||||
@ApiModelProperty("安全措施图片,多个用逗号隔开")
|
||||
@JsonIgnore
|
||||
@TableField("safety_image")
|
||||
@Deprecated
|
||||
private String safetyImage;
|
||||
|
||||
@ApiModelProperty("安全措施内容")
|
||||
@TableField("safety_content")
|
||||
@Deprecated
|
||||
private String safetyContent;
|
||||
|
||||
@ApiModelProperty("交底内容")
|
||||
@TableField("disclose_content")
|
||||
@Deprecated
|
||||
private String discloseContent;
|
||||
|
||||
@ApiModelProperty("状态:0待施工,1施工中,2已完工,3已审核,4已验收")
|
||||
|
@ -130,14 +138,23 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
|||
|
||||
@ApiModelProperty("项目工作类型 可能有多项,逗号分隔")
|
||||
@TableField("work_type")
|
||||
@Deprecated
|
||||
private String workType;
|
||||
|
||||
@ApiModelProperty("项目工作岗位 可能有多项,json对象保存")
|
||||
@TableField("job")
|
||||
@Deprecated
|
||||
private String job;
|
||||
|
||||
@ApiModelProperty(value = "项目安全风险点", example = "1", notes = "项目安全风险点 可能有多项,逗号分隔")
|
||||
@TableField("safety_risk_point")
|
||||
@Deprecated
|
||||
private String safetyRiskPoint;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 21:48
|
||||
* @Description: 项目任务信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("project_task")
|
||||
@ApiModel(value="ProjectTaskEntity对象", description="项目任务信息表")
|
||||
public class ProjectTaskEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 445818156838153502L;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
@TableId(value = "task_id", type = IdType.ASSIGN_ID)
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("上级任务id")
|
||||
@TableField("parent_task_id")
|
||||
private String parentTaskId;
|
||||
|
||||
@ApiModelProperty("任务组id")
|
||||
@TableField("task_group_id")
|
||||
private String taskGroupId;
|
||||
|
||||
@ApiModelProperty("项目任务名称")
|
||||
@TableField("task_name")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("项目任务编号")
|
||||
@TableField("task_code")
|
||||
private String taskCode;
|
||||
|
||||
@ApiModelProperty("任务负责人id")
|
||||
@TableField("main_user_id")
|
||||
private String mainUserId;
|
||||
|
||||
@ApiModelProperty("任务参与人id,逗号分隔")
|
||||
@TableField("user_ids")
|
||||
private String userIds;
|
||||
|
||||
@ApiModelProperty("计划开始时间")
|
||||
@TableField("plan_start_date")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@ApiModelProperty("计划结束时间")
|
||||
@TableField("plan_end_date")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@ApiModelProperty("实际开始时间")
|
||||
@TableField("actual_start_date")
|
||||
private LocalDate actualStartDate;
|
||||
|
||||
@ApiModelProperty("实际结束时间")
|
||||
@TableField("actual_end_date")
|
||||
private LocalDate actualEndDate;
|
||||
|
||||
@ApiModelProperty("任务状态,0未开始,1进行中,2已结束")
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("是否逾期,默认未逾期")
|
||||
@TableField("overdue_status")
|
||||
private Integer overdueStatus;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/24 17:06
|
||||
* @Description: 项目任务组信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("project_task_group")
|
||||
@ApiModel(value="ProjectTaskGroupEntity对象", description="项目任务组信息表")
|
||||
public class ProjectTaskGroupEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -86904406809616523L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(value = "group_id", type = IdType.ASSIGN_ID)
|
||||
private String groupId;
|
||||
|
||||
@ApiModelProperty("项目任务组名")
|
||||
@TableField("group_name")
|
||||
private String groupName;
|
||||
}
|
||||
|
|
@ -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.LocalTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:08
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("work_shift")
|
||||
@ApiModel(value="WorkShitEntity对象", description="班次信息")
|
||||
public class WorkShiftEntity extends AuditableEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1912356282767651959L;
|
||||
|
||||
@ApiModelProperty("班次id")
|
||||
@TableId(value = "work_shift_id", type = IdType.ASSIGN_UUID)
|
||||
private String workShiftId;
|
||||
|
||||
@ApiModelProperty("班次名称")
|
||||
@TableField("work_shift_name")
|
||||
private String workShiftName;
|
||||
|
||||
@ApiModelProperty("上班时间")
|
||||
@TableField("work_time_start")
|
||||
private LocalTime workTimeStart;
|
||||
|
||||
@ApiModelProperty("迟到豁免时间,单位分钟")
|
||||
@TableField("late_time_offset")
|
||||
private Integer lateTimeOffset;
|
||||
|
||||
@ApiModelProperty("迟到时间临界值,单位分钟")
|
||||
@TableField("late_time_limit")
|
||||
private Integer lateTimeLimit;
|
||||
|
||||
@ApiModelProperty("下班时间")
|
||||
@TableField("work_time_end")
|
||||
private LocalTime workTimeEnd;
|
||||
|
||||
@ApiModelProperty("早退豁免时间,单位分钟")
|
||||
@TableField("early_time_offset")
|
||||
private Integer earlyTimeOffset;
|
||||
|
||||
@ApiModelProperty("早退时间临界值,单位分钟")
|
||||
@TableField("early_time_limit")
|
||||
private Integer earlyTimeLimit;
|
||||
|
||||
@ApiModelProperty("休息时间开始")
|
||||
@TableField("rest_time_start")
|
||||
private LocalTime restTimeStart;
|
||||
|
||||
@ApiModelProperty("休息时间结束")
|
||||
@TableField("rest_time_end")
|
||||
private LocalTime restTimeEnd;
|
||||
|
||||
@ApiModelProperty("工作时间长")
|
||||
@TableField("work_time")
|
||||
private Integer workTime;
|
||||
|
||||
@ApiModelProperty("状态,0-已发布,1-未发布")
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
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 huise23
|
||||
* @date 2025/06/25 21:59
|
||||
* @Description: 附件信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="AttachInfo请求对象", description="附件信息表")
|
||||
public class AttachInfoReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -59837569061686176L;
|
||||
|
||||
@ApiModelProperty("自定义路径")
|
||||
private String userDefinedPath;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -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 lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 21:59
|
||||
* @Description: 附件信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="AttachInfo响应对象", description="附件信息表")
|
||||
public class AttachInfoResp implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -59837569061686176L;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
private String attachId;
|
||||
|
||||
@ApiModelProperty("业务id")
|
||||
private String businessId;
|
||||
|
||||
@ApiModelProperty("附件路径")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
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 huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("字典列表请求实体")
|
||||
public class DictListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 243104747131701229L;
|
||||
|
||||
@ApiModelProperty("字典Id")
|
||||
private String dictId;
|
||||
|
||||
@ApiModelProperty("字典类型")
|
||||
private String dictType;
|
||||
|
||||
@ApiModelProperty("字典名称")
|
||||
private String dictName;
|
||||
|
||||
@ApiModelProperty("父级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("字典排序")
|
||||
private Integer sortOrder;
|
||||
|
||||
@ApiModelProperty("是否字典终值")
|
||||
private Integer finalState;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
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.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="Dict请求对象", description="字典表")
|
||||
public class DictReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 104440023555693334L;
|
||||
|
||||
@ApiModelProperty("字典id")
|
||||
private String dictId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "字典类型不能为空")
|
||||
@Size(max = 20, groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "字典类型长度不能超过20")
|
||||
@ApiModelProperty("字典类型")
|
||||
private String dictType;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "字典名称不能为空")
|
||||
@Size(max = 50, groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "字典名称长度不能超过50")
|
||||
@ApiModelProperty("字典名称")
|
||||
private String dictName;
|
||||
|
||||
@ApiModelProperty("父级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("字典排序")
|
||||
private Integer sortOrder;
|
||||
|
||||
@ApiModelProperty("是否字典终值")
|
||||
private Integer finalState;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.domain.entity.DictEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("字典响应实体")
|
||||
public class DictResp extends DictEntity {
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 文件信息请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文件信息列表请求实体")
|
||||
public class FileInfoListReq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 574018420246881535L;
|
||||
|
||||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("文件信息Id")
|
||||
private Long fileId;
|
||||
|
||||
@ApiModelProperty("业务id")
|
||||
private String businessId;
|
||||
|
||||
@ApiModelProperty("minio相对路径")
|
||||
private String minioPath;
|
||||
|
||||
@ApiModelProperty("业务类型,字典file_business_type")
|
||||
private String businessType;
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.FileInfoEntity;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 文件信息响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("文件信息响应实体")
|
||||
public class FileInfoResp extends FileInfoEntity {
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:46
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险附件响应实体")
|
||||
public class InsuranceAttachResp implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4902944535128070359L;
|
||||
|
||||
@ApiModelProperty("保险信息id")
|
||||
private String insuranceInfoId;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("用户编码")
|
||||
private String userCode;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
private String attachInfoId;
|
||||
|
||||
@ApiModelProperty("附件路径")
|
||||
private String attachPath;
|
||||
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:39
|
||||
* @description
|
||||
*/
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险公司列表查询条件")
|
||||
public class InsuranceCompanyListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3926269785176954672L;
|
||||
|
||||
@ApiModelProperty("保险公司名称")
|
||||
private String insuranceCompanyName;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("联系人电话")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty("状态,0-合作中,1-终止合作")
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:44
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险公司请求实体")
|
||||
public class InsuranceCompanyReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5949181233497299673L;
|
||||
|
||||
@NotBlank(message = "保险公司不能为空")
|
||||
@Size(max = 50, message = "保险公司不能超过50个字符")
|
||||
@ApiModelProperty("保险公司")
|
||||
private String insuranceCompanyName;
|
||||
|
||||
@NotBlank(message = "联系人不能为空")
|
||||
@Size(max = 20, message = "联系人不能超过20个字符")
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@NotBlank(message = "联系电话不能为空")
|
||||
@Pattern(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, regexp ="^$|1\\d{10}$", message = "联系电话格式不正确")
|
||||
@ApiModelProperty("联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty("状态,0-合作中,1-终止合作")
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:46
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险公司响应实体")
|
||||
public class InsuranceCompanyResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7275887907802349727L;
|
||||
|
||||
@ApiModelProperty("保险公司id")
|
||||
private String insuranceCompanyId;
|
||||
|
||||
@ApiModelProperty("保险公司名称")
|
||||
private String insuranceCompanyName;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("联系人电话")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty("状态,0-合作中,1-终止合作")
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:44
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险信息查询条件")
|
||||
public class InsuranceInfoListReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -47047804822030641L;
|
||||
|
||||
@ApiModelProperty("员工姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("员工编号")
|
||||
private String userCode;
|
||||
|
||||
@ApiModelProperty("保险类型id")
|
||||
private String insuranceTypeId;
|
||||
|
||||
@ApiModelProperty("保险公司id")
|
||||
private String insuranceCompanyId;
|
||||
|
||||
@ApiModelProperty("状态,枚举:InsuranceStatusEnum")
|
||||
private String insuranceStatus;
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
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 lombok.experimental.Accessors;
|
||||
|
||||
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.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:44
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险信息请求实体")
|
||||
public class InsuranceInfoReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3352397101804468290L;
|
||||
|
||||
@NotBlank(message = "用户id不能为空")
|
||||
@ApiModelProperty("用户id")
|
||||
private String userId;
|
||||
|
||||
@NotBlank(message = "保险类型id不能为空")
|
||||
@ApiModelProperty("保险类型id")
|
||||
private String insuranceTypeId;
|
||||
|
||||
@NotBlank(message = "保险公司id不能为空")
|
||||
@ApiModelProperty("保险公司id")
|
||||
private String insuranceCompanyId;
|
||||
|
||||
@NotBlank(message = "保单号不能为空")
|
||||
@ApiModelProperty("保单号")
|
||||
private String insuranceBillCode;
|
||||
|
||||
@NotBlank(message = "保单号不能为空")
|
||||
@ApiModelProperty("附件id,调用/attach-info{businessType}方法获取,businessType传值insurance_file,userDefinedPath传值规则:userid + '/' + insuranceBillCode")
|
||||
private String attachInfoId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "生效日期不能为空")
|
||||
@ApiModelProperty("生效日期")
|
||||
private LocalDate effectiveDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "失效日期不能为空")
|
||||
@ApiModelProperty("失效日期")
|
||||
private LocalDate expireDate;
|
||||
|
||||
@NotNull(message = "保险金额不能为空")
|
||||
@ApiModelProperty("保险金额,单位元,精确到分")
|
||||
private BigDecimal insuranceAmount;
|
||||
|
||||
@NotNull(message = "保险保费不能为空")
|
||||
@ApiModelProperty("保险保费,单位元,精确到分")
|
||||
private BigDecimal insurancePremium;
|
||||
|
||||
@Size(max = 200, message = "备注不能超过200个字符")
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:46
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险信息响应实体")
|
||||
public class InsuranceInfoResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 4703855943894592615L;
|
||||
|
||||
@ApiModelProperty("保险信息id")
|
||||
private String insuranceInfoId;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("用户编码")
|
||||
private String userCode;
|
||||
|
||||
@ApiModelProperty("保险类型id")
|
||||
private String insuranceTypeId;
|
||||
|
||||
@ApiModelProperty("保险类型名称")
|
||||
private String insuranceTypeName;
|
||||
|
||||
@ApiModelProperty("保险公司id")
|
||||
private String insuranceCompanyId;
|
||||
|
||||
@ApiModelProperty("保险公司名称")
|
||||
private String insuranceCompanyName;
|
||||
|
||||
@ApiModelProperty("保单号")
|
||||
private String insuranceBillCode;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
private String attachInfoId;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private AttachInfoResp attachInfoResp;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("生效日期")
|
||||
private LocalDate effectiveDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("失效日期")
|
||||
private LocalDate expireDate;
|
||||
|
||||
@ApiModelProperty("保险金额")
|
||||
private BigDecimal insuranceAmount;
|
||||
|
||||
@ApiModelProperty("保险保费")
|
||||
private BigDecimal insurancePremium;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remarks;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:44
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险类型请求实体")
|
||||
public class InsuranceTypeReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -47047804822030641L;
|
||||
|
||||
@NotBlank(message = "保险类型名称不能为空")
|
||||
@Size(max = 50, message = "保险类型名称不能超过50个字符")
|
||||
@ApiModelProperty("保险类型名称")
|
||||
private String insuranceTypeName;
|
||||
|
||||
@Size(max = 200, message = "描述信息不能超过200个字符")
|
||||
@ApiModelProperty("描述信息")
|
||||
private String description;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/6/24 23:46
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("保险类型响应实体")
|
||||
public class InsuranceTypeResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2745493272695038596L;
|
||||
|
||||
@ApiModelProperty("保险类型id")
|
||||
private String insuranceTypeId;
|
||||
|
||||
@ApiModelProperty("保险类型名称")
|
||||
private String insuranceTypeName;
|
||||
|
||||
@ApiModelProperty("描述信息")
|
||||
private String description;
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
@ -32,9 +34,14 @@ public class MenuReq implements Serializable {
|
|||
@ApiModelProperty("显示顺序")
|
||||
private Integer orderNum;
|
||||
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 100, message = "请求地址不能超过100个字符")
|
||||
@ApiModelProperty("请求地址")
|
||||
private String url;
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 200, message = "路由地址不能超过200个字符")
|
||||
@ApiModelProperty("路由地址")
|
||||
private String path;
|
||||
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 200, message = "组件地址不能超过200个字符")
|
||||
@ExcelProperty("组件地址")
|
||||
@ApiModelProperty("组件地址")
|
||||
private String component;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "菜单类型不能为空")
|
||||
@ApiModelProperty("菜单类型")
|
||||
|
|
|
@ -30,8 +30,11 @@ public class MenuResp implements Serializable {
|
|||
@ApiModelProperty("显示顺序")
|
||||
private String orderNum;
|
||||
|
||||
@ApiModelProperty("请求地址")
|
||||
private String url;
|
||||
@ApiModelProperty("路由地址")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("组件地址")
|
||||
private String component;
|
||||
|
||||
@ApiModelProperty("菜单类型")
|
||||
private String menuType;
|
||||
|
|
|
@ -35,13 +35,11 @@ public class ProjectListReq implements Serializable {
|
|||
@ApiModelProperty("项目状态,枚举:ProjectStatusEnum")
|
||||
private String status;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("创建日期-起")
|
||||
private String createDateBegin;
|
||||
@ApiModelProperty("项目开始日期")
|
||||
private LocalDate startDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("创建日期-讫")
|
||||
private String createDateEnd;
|
||||
@ApiModelProperty("项目结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import lombok.Data;
|
|||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
@ -81,8 +82,9 @@ public class ProjectListResp implements Serializable {
|
|||
@ApiModelProperty("施工人员")
|
||||
private String constructorName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
@ -9,6 +10,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
|
@ -22,6 +24,10 @@ public class ProjectReq implements Serializable {
|
|||
@Serial
|
||||
private static final long serialVersionUID = 740685592879189406L;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Update.class}, message = "项目id不能为空")
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目名称不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 50, message = "项目名称长度不能超过50字符")
|
||||
@ApiModelProperty("项目名称")
|
||||
|
@ -88,30 +94,12 @@ public class ProjectReq implements Serializable {
|
|||
@ApiModelProperty("施工组长id")
|
||||
private String constructionTeamLeaderId;
|
||||
|
||||
@ApiModelProperty(value = "技术方案图片", notes = "多项英文逗号隔开")
|
||||
private String technicalImage;
|
||||
|
||||
@ApiModelProperty("技术方案内容")
|
||||
private String technicalContent;
|
||||
|
||||
@ApiModelProperty(value = "安全措施图片", notes = "多项英文逗号隔开")
|
||||
private String safetyImage;
|
||||
|
||||
@ApiModelProperty("安全措施内容")
|
||||
private String safetyContent;
|
||||
|
||||
@ApiModelProperty("交底内容")
|
||||
private String discloseContent;
|
||||
|
||||
@ApiModelProperty("状态:0待施工,1施工中,2已完工,3已审核,4已验收")
|
||||
private int status;
|
||||
|
||||
@ApiModelProperty(value = "项目工作类型", notes = "多项英文逗号隔开")
|
||||
private String workType;
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty(value = "项目工作岗位", notes = "多项英文逗号隔开,json对象保存")
|
||||
private String job;
|
||||
|
||||
@ApiModelProperty(value = "项目安全风险点", notes = "多项英文逗号隔开")
|
||||
private String safetyRiskPoint;
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.dite.znpt.domain.entity.ProjectEntity;
|
|||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
|
@ -26,10 +27,6 @@ public class ProjectResp extends ProjectReq implements Serializable {
|
|||
@Serial
|
||||
private static final long serialVersionUID = -1883901559600186726L;
|
||||
|
||||
@ExcelProperty("项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("施工人员")
|
||||
private String constructorName;
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/24 17:06
|
||||
* @Description: 项目任务组信息请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("项目任务组信息列表请求实体")
|
||||
public class ProjectTaskGroupListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -99072074587210624L;
|
||||
|
||||
@ApiModelProperty("项目任务组信息Id")
|
||||
private String groupId;
|
||||
|
||||
@ApiModelProperty("项目任务组名")
|
||||
private String groupName;
|
||||
|
||||
@ApiModelProperty("任务名称/负责人")
|
||||
private String keyword;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
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.Size;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:18
|
||||
* @Description: 项目任务组信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("project_task_group")
|
||||
@ApiModel(value="ProjectTaskGroup请求对象", description="项目任务组信息表")
|
||||
public class ProjectTaskGroupReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -57817993612481804L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private String groupId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目任务组名不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 100, message = "项目任务组名长度不能超过100字符")
|
||||
@ApiModelProperty("项目任务组名")
|
||||
private String groupName;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskGroupEntity;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/24 16:44
|
||||
* @Description: 项目任务组信息响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目任务组信息响应实体")
|
||||
public class ProjectTaskGroupResp extends ProjectTaskGroupEntity {
|
||||
|
||||
@ApiModelProperty("任务列表")
|
||||
private List<ProjectTaskResp> taskList;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
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;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/27 14:21
|
||||
* @Description: 项目任务信息表导入请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectTask导入请求对象", description="项目任务信息表")
|
||||
public class ProjectTaskImportReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -86440098932860558L;
|
||||
|
||||
|
||||
@ExcelProperty(value = "上级任务名称")
|
||||
private String parentTaskName;
|
||||
|
||||
@ExcelProperty(value = "任务组名称(不能为空,长度32以内)")
|
||||
private String taskGroupName;
|
||||
|
||||
@ExcelProperty(value = "项目任务名称(不能为空,长度100以内)")
|
||||
private String taskName;
|
||||
|
||||
@ExcelProperty(value = "项目任务编号(不能为空,长度100以内)")
|
||||
private String taskCode;
|
||||
|
||||
@ExcelProperty(value = "任务负责人名称(不能为空,长度100以内)")
|
||||
private String mainUserName;
|
||||
|
||||
@ExcelProperty(value = "任务参与人名称,逗号分隔")
|
||||
private String userName;
|
||||
|
||||
@ExcelProperty(value = "计划开始时间(不能为空)")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@ExcelProperty(value = "计划结束时间(不能为空)")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@ExcelProperty(value = "实际开始时间")
|
||||
private LocalDate actualStartDate;
|
||||
|
||||
@ExcelProperty(value = "实际结束时间")
|
||||
private LocalDate actualEndDate;
|
||||
|
||||
@ExcelProperty(value = "任务状态,0未开始,1进行中,2已结束")
|
||||
private Integer status;
|
||||
|
||||
@ExcelProperty(value = "是否逾期,默认未逾期")
|
||||
private Integer overdueStatus;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:31
|
||||
* @Description: 项目任务信息请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("项目任务信息列表请求实体")
|
||||
public class ProjectTaskListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 971346092554199471L;
|
||||
|
||||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("项目任务信息Id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务组id")
|
||||
private String taskGroupId;
|
||||
|
||||
@ApiModelProperty("项目任务名称")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("项目任务编号")
|
||||
private String taskCode;
|
||||
|
||||
@ApiModelProperty("任务负责人id")
|
||||
private String mainUserId;
|
||||
|
||||
@ApiModelProperty("任务参与人id,逗号分隔")
|
||||
private String userIds;
|
||||
|
||||
@ApiModelProperty("计划开始时间")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@ApiModelProperty("计划结束时间")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@ApiModelProperty("实际开始时间")
|
||||
private LocalDate actualStartDate;
|
||||
|
||||
@ApiModelProperty("实际结束时间")
|
||||
private LocalDate actualEndDate;
|
||||
|
||||
@ApiModelProperty("任务状态,0未开始,1进行中,2已结束")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("是否逾期,默认未逾期")
|
||||
private Integer overdueStatus;
|
||||
|
||||
@ApiModelProperty("任务名称/负责人名称")
|
||||
private String taskNameOrMainUser;
|
||||
|
||||
@ApiModelProperty(value = "导出?", hidden = true)
|
||||
private Boolean isExport;
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
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;
|
||||
import java.util.List;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 21:48
|
||||
* @Description: 项目任务信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectTask请求对象", description="项目任务信息表")
|
||||
public class ProjectTaskReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 899180318567127648L;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("上级任务id")
|
||||
private String parentTaskId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "任务组id不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 32, message = "任务组id长度不能超过32字符")
|
||||
@ApiModelProperty("任务组id")
|
||||
private String taskGroupId;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目任务名称不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 100, message = "项目任务名称长度不能超过100字符")
|
||||
@ApiModelProperty("项目任务名称")
|
||||
private String taskName;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目任务编号不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 100, message = "项目任务编号长度不能超过100字符")
|
||||
@ApiModelProperty("项目任务编号")
|
||||
private String taskCode;
|
||||
|
||||
@NotBlank(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "任务负责人id不能为空")
|
||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 100, message = "任务负责人id长度不能超过100字符")
|
||||
@ApiModelProperty("任务负责人id")
|
||||
private String mainUserId;
|
||||
|
||||
@ApiModelProperty("任务参与人id,逗号分隔")
|
||||
private String userIds;
|
||||
|
||||
@NotNull(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "计划开始时间不能为空")
|
||||
@ApiModelProperty("计划开始时间")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@NotNull(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "计划结束时间不能为空")
|
||||
@ApiModelProperty("计划结束时间")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@ApiModelProperty("实际开始时间")
|
||||
private LocalDate actualStartDate;
|
||||
|
||||
@ApiModelProperty("实际结束时间")
|
||||
private LocalDate actualEndDate;
|
||||
|
||||
@ApiModelProperty("任务状态,0未开始,1进行中,2已结束")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("是否逾期,默认未逾期")
|
||||
private Integer overdueStatus;
|
||||
|
||||
@ApiModelProperty("附件列表")
|
||||
private List<String> attachFileIds;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskEntity;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 21:48
|
||||
* @Description: 项目任务信息响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目任务信息响应实体")
|
||||
public class ProjectTaskResp extends ProjectTaskEntity {
|
||||
|
||||
@ApiModelProperty("附件列表")
|
||||
private List<AttachInfoEntity> attachList;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:31
|
||||
* @Description: 项目任务信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectTask开始/结束任务请求对象", description="项目任务信息表")
|
||||
public class ProjectTaskStartReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 862660085007390976L;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务组id")
|
||||
private String taskGroupId;
|
||||
}
|
||||
|
|
@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -13,7 +15,10 @@ import java.util.List;
|
|||
*/
|
||||
@Data
|
||||
@ApiModel("用户信息")
|
||||
public class UserInfo {
|
||||
public class UserInfo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1433874497843073028L;
|
||||
|
||||
@ApiModelProperty("用户信息")
|
||||
private UserListResp user;
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
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.time.LocalTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:39
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("班次信息列表响应实体")
|
||||
public class WorkShiftListResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 530703326351692657L;
|
||||
|
||||
@ApiModelProperty("班次id")
|
||||
private String workShiftId;
|
||||
|
||||
@ApiModelProperty("班次名称")
|
||||
private String workShiftName;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("上班时间")
|
||||
private LocalTime workTimeStart;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("下班时间")
|
||||
private LocalTime workTimeEnd;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("状态描述")
|
||||
private String statusLabel;
|
||||
|
||||
@ApiModelProperty("创建人id")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty("创建人名称")
|
||||
private String createUserName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
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.NotNull;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:39
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("班次信息请求实体")
|
||||
public class WorkShiftReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3008068678585003135L;
|
||||
|
||||
@NotBlank(message = "班次名称不能为空")
|
||||
@ApiModelProperty("班次名称")
|
||||
private String workShiftName;
|
||||
|
||||
@NotNull(message = "上班时间不能为空")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("上班时间")
|
||||
private LocalTime workTimeStart;
|
||||
|
||||
@ApiModelProperty("迟到豁免时间,单位分钟")
|
||||
private Integer lateTimeOffset;
|
||||
|
||||
@ApiModelProperty("迟到时间临界值,单位分钟")
|
||||
private Integer lateTimeLimit;
|
||||
|
||||
@NotNull(message = "下班时间不能为空")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("下班时间")
|
||||
private LocalTime workTimeEnd;
|
||||
|
||||
@ApiModelProperty("早退豁免时间,单位分钟")
|
||||
private Integer earlyTimeOffset;
|
||||
|
||||
@ApiModelProperty("早退时间临界值,单位分钟")
|
||||
private Integer earlyTimeLimit;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("休息时间开始")
|
||||
private LocalTime restTimeStart;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("休息时间结束")
|
||||
private LocalTime restTimeEnd;
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
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.LocalTime;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:39
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("班次信息响应实体")
|
||||
public class WorkShiftResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7000086760170568103L;
|
||||
|
||||
@ApiModelProperty("班次id")
|
||||
private String workShiftId;
|
||||
|
||||
@ApiModelProperty("班次名称")
|
||||
private String workShiftName;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("上班时间")
|
||||
private LocalTime workTimeStart;
|
||||
|
||||
@ApiModelProperty("迟到豁免时间,单位分钟")
|
||||
private Integer lateTimeOffset;
|
||||
|
||||
@ApiModelProperty("迟到时间临界值,单位分钟")
|
||||
private Integer lateTimeLimit;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("下班时间")
|
||||
private LocalTime workTimeEnd;
|
||||
|
||||
@ApiModelProperty("早退豁免时间,单位分钟")
|
||||
private Integer earlyTimeOffset;
|
||||
|
||||
@ApiModelProperty("早退时间临界值,单位分钟")
|
||||
private Integer earlyTimeLimit;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("休息时间开始")
|
||||
private LocalTime restTimeStart;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@ApiModelProperty("休息时间结束")
|
||||
private LocalTime restTimeEnd;
|
||||
|
||||
@ApiModelProperty("工作时间长")
|
||||
private Integer workTime;
|
||||
|
||||
@ApiModelProperty("状态,0-已发布,1-未发布")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("状态,0-已发布,1-未发布")
|
||||
private String statusLabel;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:25
|
||||
* @Description:
|
||||
*/
|
||||
@Getter
|
||||
public enum AttachBusinessTypeEnum {
|
||||
PROJECT_TASK("PROJECT_TASK", "项目任务"),
|
||||
INSURANCE_FILE("insurance", "保险文件"),
|
||||
;
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
AttachBusinessTypeEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static AttachBusinessTypeEnum getByCode(String code){
|
||||
for (AttachBusinessTypeEnum e : AttachBusinessTypeEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code){
|
||||
AttachBusinessTypeEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(AttachBusinessTypeEnum.values().length);
|
||||
for (AttachBusinessTypeEnum e : AttachBusinessTypeEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -14,7 +14,8 @@ public enum FilePathEnum {
|
|||
IMAGE_TEMP("/static/image/temp/", "image-temp"),
|
||||
VIDEO("/static/video/", "video"),
|
||||
AUDIO("/static/audio/", "audio"),
|
||||
;
|
||||
ATTACH("/static/attach/", "attach"),
|
||||
INSURANCE("/static/insurance/", "insurance");
|
||||
|
||||
@Getter
|
||||
private final String urlPath;
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 10:49
|
||||
* @description
|
||||
*/
|
||||
@Getter
|
||||
public enum InsuranceStatusEnum {
|
||||
|
||||
EFFECTIVE("EFFECTIVE","有效"),
|
||||
EXPIRED("EXPIRED","过期");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
InsuranceStatusEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static InsuranceStatusEnum getByCode(String code){
|
||||
for (InsuranceStatusEnum e : InsuranceStatusEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code){
|
||||
InsuranceStatusEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(InsuranceStatusEnum.values().length);
|
||||
for (InsuranceStatusEnum e : InsuranceStatusEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
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: gaoxiong
|
||||
* @Date: 2025/4/29 21:32
|
||||
* @Description:
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectTaskStateEnum {
|
||||
PENDING(0, "未开始"),
|
||||
IN_PROGRESS(1, "进行中"),
|
||||
COMPLETED(2, "已完工");
|
||||
|
||||
private final int code;
|
||||
private final String desc;
|
||||
|
||||
public static ProjectTaskStateEnum getByCode(int code){
|
||||
for (ProjectTaskStateEnum e : ProjectTaskStateEnum.values() ) {
|
||||
if(e.code == code){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(int code){
|
||||
ProjectTaskStateEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(ProjectTaskStateEnum.values().length);
|
||||
for (ProjectTaskStateEnum e : ProjectTaskStateEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(String.valueOf(e.code), e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.CombinedDictEntity;
|
||||
import com.dite.znpt.domain.vo.CombinedDictListReq;
|
||||
import com.dite.znpt.domain.vo.CombinedDictResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 字典表数据库访问层
|
||||
*/
|
||||
public interface CombinedDictMapper extends BaseMapper<CombinedDictEntity> {
|
||||
List<CombinedDictResp> queryBySelective(CombinedDictListReq combinedDictReq);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.DictEntity;
|
||||
import com.dite.znpt.domain.vo.DictListReq;
|
||||
import com.dite.znpt.domain.vo.DictResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典表数据库访问层
|
||||
*/
|
||||
public interface DictMapper extends BaseMapper<DictEntity> {
|
||||
List<DictResp> queryBySelective(DictListReq dictReq);
|
||||
}
|
||||
|
|
@ -1,19 +1,13 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.FileInfoEntity;
|
||||
import com.dite.znpt.domain.vo.FileInfoListReq;
|
||||
import com.dite.znpt.domain.vo.FileInfoResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 文件信息表数据库访问层
|
||||
* @Description: 附件信息表数据库访问层
|
||||
*/
|
||||
public interface FileInfoMapper extends BaseMapper<FileInfoEntity> {
|
||||
List<FileInfoResp> queryBySelective(FileInfoListReq fileInfoReq);
|
||||
public interface FileInfoMapper extends BaseMapper<AttachInfoEntity> {
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.InsuranceCompanyEntity;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:30
|
||||
* @description
|
||||
*/
|
||||
public interface InsuranceCompanyMapper extends BaseMapper<InsuranceCompanyEntity> {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.InsuranceInfoEntity;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:29
|
||||
* @description
|
||||
*/
|
||||
public interface InsuranceInfoMapper extends BaseMapper<InsuranceInfoEntity> {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.InsuranceTypeEntity;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:29
|
||||
* @description
|
||||
*/
|
||||
public interface InsuranceTypeMapper extends BaseMapper<InsuranceTypeEntity> {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskGroupEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskGroupListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskGroupResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/24 16:44
|
||||
* @Description: 项目任务组信息表数据库访问层
|
||||
*/
|
||||
public interface ProjectTaskGroupMapper extends BaseMapper<ProjectTaskGroupEntity> {
|
||||
List<ProjectTaskGroupResp> queryBySelective(ProjectTaskGroupListReq projectTaskGroupReq);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/24 16:44
|
||||
* @Description: 项目任务信息表数据库访问层
|
||||
*/
|
||||
public interface ProjectTaskMapper extends BaseMapper<ProjectTaskEntity> {
|
||||
List<ProjectTaskResp> queryBySelective(ProjectTaskListReq projectTaskReq);
|
||||
|
||||
List<ProjectTaskEntity> listAllParents(String taskId);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.WorkShiftEntity;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:26
|
||||
* @description
|
||||
*/
|
||||
public interface WorkShiftMapper extends BaseMapper<WorkShiftEntity> {
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.vo.AttachInfoReq;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.rmi.ServerException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 附件信息表服务接口
|
||||
*/
|
||||
public interface AttachInfoService extends IService<AttachInfoEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询附件信息列表
|
||||
*
|
||||
* @return {@link List }<{@link AttachInfoEntity }>
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
List<AttachInfoEntity> listByBusinessIds(List<String> businessIds, String businessType);
|
||||
|
||||
/**
|
||||
* 功能描述:新增附件信息
|
||||
*
|
||||
* @param businessType 业务类型
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
List<String> saveData(String businessType, AttachInfoReq infoReq, MultipartFile[] files);
|
||||
|
||||
|
||||
void download(String attachId, HttpServletResponse response) throws Exception;
|
||||
/**
|
||||
* 功能描述:删除附件信息
|
||||
*
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void deleteByBusinessId(String businessId, AttachBusinessTypeEnum typeEnum);
|
||||
|
||||
void deleteByAttachInfoId(String attachIdInfoId);
|
||||
|
||||
/**
|
||||
* 功能描述:删除附件信息
|
||||
*
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void deleteByBusinessIds(List<String> businessIds, AttachBusinessTypeEnum typeEnum);
|
||||
|
||||
/**
|
||||
* 功能描述:更新附件关联的业务id
|
||||
*
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void updateBusinessIdByAttachIds(String businessId, List<String> attachIds, AttachBusinessTypeEnum typeEnum);
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.CombinedDictEntity;
|
||||
import com.dite.znpt.domain.vo.CombinedDictListReq;
|
||||
import com.dite.znpt.domain.vo.CombinedDictResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 字典表服务接口
|
||||
*/
|
||||
public interface CombinedDictService extends IService<CombinedDictEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询字典列表
|
||||
*
|
||||
* @param combinedDictReq 字典
|
||||
* @return {@link List }<{@link CombinedDictEntity }>
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
List<CombinedDictResp> selectList(CombinedDictListReq combinedDictReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @return {@link CombinedDictResp }
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
CombinedDictResp selectById(String dictId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增字典
|
||||
*
|
||||
* @param combinedDict 字典
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void saveData(CombinedDictEntity combinedDict);
|
||||
|
||||
/**
|
||||
* 功能描述:更新字典
|
||||
*
|
||||
* @param combinedDict 字典
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void updateData(CombinedDictEntity combinedDict);
|
||||
|
||||
/**
|
||||
* 功能描述:删除字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void deleteById(String dictId);
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.DictEntity;
|
||||
import com.dite.znpt.domain.vo.DictListReq;
|
||||
import com.dite.znpt.domain.vo.DictReq;
|
||||
import com.dite.znpt.domain.vo.DictResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典表服务接口
|
||||
*/
|
||||
public interface DictService extends IService<DictEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询字典列表
|
||||
*
|
||||
* @param dictReq 字典
|
||||
* @return {@link List }<{@link DictResp }>
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
List<DictResp> selectList(DictListReq dictReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @return {@link DictResp }
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
DictResp selectById(String dictId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增字典
|
||||
*
|
||||
* @param dictReq 字典
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
void saveData(DictReq dictReq);
|
||||
|
||||
/**
|
||||
* 功能描述:更新字典
|
||||
*
|
||||
* @param dictReq 字典
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
void updateData(DictReq dictReq);
|
||||
|
||||
/**
|
||||
* 功能描述:删除字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
void deleteById(String dictId);
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.FileInfoEntity;
|
||||
import com.dite.znpt.domain.vo.FileInfoListReq;
|
||||
import com.dite.znpt.domain.vo.FileInfoResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 文件信息表服务接口
|
||||
*/
|
||||
public interface FileInfoService extends IService<FileInfoEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询文件信息列表
|
||||
*
|
||||
* @param fileInfoReq 文件信息
|
||||
* @return {@link List }<{@link FileInfoEntity }>
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
List<FileInfoResp> selectList(FileInfoListReq fileInfoReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条文件信息
|
||||
*
|
||||
* @param fileId 文件信息Id
|
||||
* @return {@link FileInfoResp }
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
FileInfoResp selectById(Long fileId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增文件信息
|
||||
*
|
||||
* @param fileInfo 文件信息
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void saveData(FileInfoEntity fileInfo);
|
||||
|
||||
/**
|
||||
* 功能描述:更新文件信息
|
||||
*
|
||||
* @param fileInfo 文件信息
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void updateData(FileInfoEntity fileInfo);
|
||||
|
||||
/**
|
||||
* 功能描述:删除文件信息
|
||||
*
|
||||
* @param fileId 文件信息Id
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
void deleteById(Long fileId);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.InsuranceCompanyEntity;
|
||||
import com.dite.znpt.domain.vo.InsuranceCompanyListReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceCompanyReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceCompanyResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:28
|
||||
* @description
|
||||
*/
|
||||
public interface InsuranceCompanyService extends IService<InsuranceCompanyEntity> {
|
||||
List<InsuranceCompanyResp> page(InsuranceCompanyListReq req);
|
||||
List<InsuranceCompanyResp> list(InsuranceCompanyListReq req);
|
||||
InsuranceCompanyResp detail(String insuranceCompanyId);
|
||||
void save(InsuranceCompanyReq req);
|
||||
void update(String insuranceCompanyId, InsuranceCompanyReq req);
|
||||
void deleteById(String insuranceCompanyId);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.InsuranceInfoEntity;
|
||||
import com.dite.znpt.domain.vo.InsuranceAttachResp;
|
||||
import com.dite.znpt.domain.vo.InsuranceInfoListReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceInfoReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceInfoResp;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:28
|
||||
* @description
|
||||
*/
|
||||
public interface InsuranceInfoService extends IService<InsuranceInfoEntity> {
|
||||
List<InsuranceInfoResp> page(InsuranceInfoListReq req);
|
||||
List<InsuranceInfoResp> list(InsuranceInfoListReq req);
|
||||
List<InsuranceAttachResp> pageAttach(InsuranceInfoListReq req);
|
||||
List<InsuranceAttachResp> listAttach(InsuranceInfoListReq req);
|
||||
InsuranceInfoResp detail(String insuranceInfoId);
|
||||
void save(InsuranceInfoReq req);
|
||||
void update(String insuranceInfoId, InsuranceInfoReq req);
|
||||
void deleteById(String insuranceInfoId);
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.InsuranceTypeEntity;
|
||||
import com.dite.znpt.domain.vo.InsuranceTypeReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceTypeResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:28
|
||||
* @description
|
||||
*/
|
||||
public interface InsuranceTypeService extends IService<InsuranceTypeEntity> {
|
||||
|
||||
List<InsuranceTypeResp> page(String insuranceTypeName);
|
||||
List<InsuranceTypeResp> list(String insuranceTypeName);
|
||||
InsuranceTypeResp detail(String insuranceTypeId);
|
||||
void save(InsuranceTypeReq req);
|
||||
void update(String insuranceTypeId, InsuranceTypeReq req);
|
||||
void deleteById(String insuranceTypeId);
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskGroupEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskGroupListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskGroupResp;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskGroupReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
* @Description: 项目任务组信息表服务接口
|
||||
*/
|
||||
public interface ProjectTaskGroupService extends IService<ProjectTaskGroupEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目任务组信息列表
|
||||
*
|
||||
* @param projectTaskGroupReq 项目任务组信息
|
||||
* @return {@link List }<{@link ProjectTaskGroupResp }>
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
List<ProjectTaskGroupResp> selectList(ProjectTaskGroupListReq projectTaskGroupReq);
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目任务组信息
|
||||
*
|
||||
* @param projectTaskGroupReq 项目任务组信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void saveData(ProjectTaskGroupReq projectTaskGroupReq);
|
||||
|
||||
/**
|
||||
* 功能描述:更新项目任务组信息
|
||||
*
|
||||
* @param projectTaskGroupReq 项目任务组信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void updateData(ProjectTaskGroupReq projectTaskGroupReq);
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目任务组信息
|
||||
*
|
||||
* @param groupId 项目任务组信息Id
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void deleteById(String groupId);
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskResp;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskStartReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
* @Description: 项目任务信息表服务接口
|
||||
*/
|
||||
public interface ProjectTaskService extends IService<ProjectTaskEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目任务信息列表
|
||||
*
|
||||
* @param projectTaskReq 项目任务信息
|
||||
* @return {@link List }<{@link ProjectTaskResp }>
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
List<ProjectTaskResp> selectList(ProjectTaskListReq projectTaskReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条项目任务信息
|
||||
*
|
||||
* @param taskId 项目任务信息Id
|
||||
* @return {@link ProjectTaskResp }
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
ProjectTaskResp selectById(String taskId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目任务信息
|
||||
*
|
||||
* @param projectTaskReq 项目任务信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void saveData(ProjectTaskReq projectTaskReq);
|
||||
|
||||
/**
|
||||
* 功能描述:更新项目任务信息
|
||||
*
|
||||
* @param projectTaskReq 项目任务信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void updateData(ProjectTaskReq projectTaskReq);
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目任务信息
|
||||
*
|
||||
* @param taskId 项目任务信息Id
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void deleteById(String taskId);
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目任务信息
|
||||
*
|
||||
* @param groupId 项目任务组信息Id
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
void deleteByGroupId(String groupId);
|
||||
|
||||
/**
|
||||
* 功能描述:开始任务/任务组开始任务
|
||||
*
|
||||
* @param taskStartReq 任务启动请求类
|
||||
* @author cuizhibin
|
||||
* @date 2025/06/25 21:16
|
||||
**/
|
||||
void startTask(ProjectTaskStartReq taskStartReq);
|
||||
|
||||
/**
|
||||
* 功能描述:结束任务/任务组结束任务
|
||||
*
|
||||
* @param taskStartReq 任务启动请求类
|
||||
* @author cuizhibin
|
||||
* @date 2025/06/25 21:16
|
||||
**/
|
||||
void endTask(ProjectTaskStartReq taskStartReq);
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.WorkShiftEntity;
|
||||
import com.dite.znpt.domain.vo.WorkShiftListResp;
|
||||
import com.dite.znpt.domain.vo.WorkShiftReq;
|
||||
import com.dite.znpt.domain.vo.WorkShiftResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:27
|
||||
* @description
|
||||
*/
|
||||
public interface WorkShiftService extends IService<WorkShiftEntity> {
|
||||
|
||||
List<WorkShiftListResp> page(String workShitName);
|
||||
|
||||
List<WorkShiftListResp> list(String workShitName);
|
||||
|
||||
WorkShiftResp detail(String workShiftId);
|
||||
|
||||
void save(WorkShiftReq req);
|
||||
|
||||
void update(String workShiftId, WorkShiftReq req);
|
||||
|
||||
void publish(String workShiftId);
|
||||
|
||||
void delete(String workShiftId);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
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.domain.entity.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.InsuranceInfoEntity;
|
||||
import com.dite.znpt.domain.vo.AttachInfoReq;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import com.dite.znpt.enums.FilePathEnum;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.mapper.FileInfoMapper;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Service;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.rmi.ServerException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 附件信息表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AttachInfoServiceImpl extends ServiceImpl<FileInfoMapper, AttachInfoEntity> implements AttachInfoService {
|
||||
|
||||
/**
|
||||
* 功能描述:查询附件信息列表
|
||||
*
|
||||
* @param businessIds 业务ids
|
||||
* @param businessType 业务类型
|
||||
* @return {@link List }<{@link AttachInfoEntity }>
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public List<AttachInfoEntity> listByBusinessIds(List<String> businessIds, String businessType) {
|
||||
return lambdaQuery().in(AttachInfoEntity::getBusinessId, businessIds)
|
||||
.eq(StrUtil.isNotEmpty(businessType), AttachInfoEntity::getBusinessType, businessType)
|
||||
.list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:保存数据
|
||||
*
|
||||
* @param businessType 业务类型
|
||||
* @return {@link AttachInfoEntity }
|
||||
* @author cuizhibin
|
||||
* @date 2025/06/26 08:53
|
||||
**/
|
||||
@Override
|
||||
public List<String> saveData(String businessType, AttachInfoReq infoReq, MultipartFile[] files) {
|
||||
String temPathPrefix = FilePathEnum.ATTACH.getFileAbsolutePath().concat(businessType).concat(FileUtil.FILE_SEPARATOR);
|
||||
if(StrUtil.isNotBlank(infoReq.getUserDefinedPath())){
|
||||
temPathPrefix = temPathPrefix.concat(infoReq.getUserDefinedPath()).concat(FileUtil.FILE_SEPARATOR);
|
||||
}
|
||||
temPathPrefix = temPathPrefix.concat(DateUtil.today()).concat(FileUtil.FILE_SEPARATOR);
|
||||
if (!FileUtil.exist(temPathPrefix)) {
|
||||
FileUtil.mkdir(temPathPrefix);
|
||||
}
|
||||
List<AttachInfoEntity> list = new ArrayList<>();
|
||||
for (MultipartFile file : files) {
|
||||
if (!file.isEmpty()) {
|
||||
try {
|
||||
String path = temPathPrefix + file.getOriginalFilename();
|
||||
FileUtil.writeBytes(file.getBytes(),path);
|
||||
AttachInfoEntity attachInfo = AttachInfoEntity.builder()
|
||||
.attachPath(FilePathEnum.ATTACH.getImageDownPath(path))
|
||||
.businessType(businessType)
|
||||
.fileType(infoReq.getFileType())
|
||||
.remark(infoReq.getRemark())
|
||||
.build();
|
||||
list.add(attachInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
baseMapper.insert(list);
|
||||
return list.stream().map(AttachInfoEntity::getAttachId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(String attachId, HttpServletResponse response) throws Exception {
|
||||
AttachInfoEntity attachInfo = this.getById(attachId);
|
||||
if(null == attachInfo || !Constants.DEL_FLAG_0.equals(attachInfo.getDelFlag())){
|
||||
throw new ServerException(Message.ATTACH_INFO_IS_NOT_EXIST);
|
||||
}
|
||||
String filePath = FilePathEnum.ATTACH.getFileAbsolutePath().concat(StrUtil.removePrefix(attachInfo.getAttachPath(), FilePathEnum.ATTACH.getUrlPath()));
|
||||
File file = new File(filePath);
|
||||
// 检查文件是否存在
|
||||
if (!file.exists()) {
|
||||
throw new ServerException(StrUtil.format(Message.ATTACH_FILE_IS_NOT_EXIST, attachInfo.getAttachPath()));
|
||||
}
|
||||
// 设置响应头
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + URLEncoder.encode(file.getName()));
|
||||
response.setContentLengthLong(file.length());
|
||||
// 打开文件输入流并写入响应输出流
|
||||
try (FileInputStream fileInputStream = new FileInputStream(file);
|
||||
OutputStream outputStream = response.getOutputStream()) {
|
||||
byte[] buffer = new byte[1024]; // 缓冲区大小
|
||||
int bytesRead;
|
||||
// 读取文件并写入输出流
|
||||
while ((bytesRead = fileInputStream.read(buffer)) != -1) {
|
||||
outputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
outputStream.flush();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
response.sendError(500, "文件下载失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除附件信息
|
||||
*
|
||||
* @param businessId 业务id
|
||||
* @param typeEnum 业务类型
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void deleteByBusinessId(String businessId, AttachBusinessTypeEnum typeEnum) {
|
||||
deleteByBusinessIds(ListUtil.toList(businessId), typeEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByAttachInfoId(String attachIdInfoId) {
|
||||
this.update(Wrappers.lambdaUpdate(AttachInfoEntity.class).eq(AttachInfoEntity::getAttachId, attachIdInfoId).set(AttachInfoEntity::getDelFlag, Constants.DEL_FLAG_1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByBusinessIds(List<String> businessIds, AttachBusinessTypeEnum typeEnum) {
|
||||
lambdaUpdate().in(AttachInfoEntity::getBusinessId, businessIds)
|
||||
.eq(AttachInfoEntity::getBusinessType, typeEnum.getCode())
|
||||
.set(AttachInfoEntity::getDelFlag, Constants.DEL_FLAG_1).update();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新附件关联的业务id
|
||||
*
|
||||
* @param businessId
|
||||
* @param attachIds
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateBusinessIdByAttachIds(String businessId, List<String> attachIds, AttachBusinessTypeEnum typeEnum) {
|
||||
baseMapper.delete(Wrappers.<AttachInfoEntity>lambdaUpdate().eq(AttachInfoEntity::getBusinessId, businessId)
|
||||
.eq(AttachInfoEntity::getBusinessType, typeEnum.getCode()));
|
||||
if (CollUtil.isEmpty(attachIds)) {
|
||||
return;
|
||||
}
|
||||
lambdaUpdate().in(AttachInfoEntity::getAttachId, attachIds)
|
||||
.eq(AttachInfoEntity::getBusinessType, typeEnum.getCode())
|
||||
.set(AttachInfoEntity::getBusinessId, businessId).update();
|
||||
}
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.CombinedDictEntity;
|
||||
import com.dite.znpt.domain.vo.CombinedDictListReq;
|
||||
import com.dite.znpt.domain.vo.CombinedDictResp;
|
||||
import com.dite.znpt.service.CombinedDictService;
|
||||
import com.dite.znpt.mapper.CombinedDictMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 字典表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CombinedDictServiceImpl extends ServiceImpl<CombinedDictMapper, CombinedDictEntity> implements CombinedDictService {
|
||||
|
||||
/**
|
||||
* 功能描述:查询字典列表
|
||||
*
|
||||
* @param combinedDictReq 字典信息
|
||||
* @return {@link List }<{@link CombinedDictResp }>
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public List<CombinedDictResp> selectList(CombinedDictListReq combinedDictReq) {
|
||||
PageUtil.startPage();
|
||||
List<CombinedDictResp> combinedDictList= this.baseMapper.queryBySelective(combinedDictReq);
|
||||
combinedDictList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return combinedDictList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @return {@link CombinedDictResp }
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public CombinedDictResp selectById(String dictId) {
|
||||
CombinedDictListReq combinedDictReq = new CombinedDictListReq();
|
||||
combinedDictReq.setDictId(dictId);
|
||||
|
||||
List<CombinedDictResp> list = selectList(combinedDictReq);
|
||||
return CollUtil.isNotEmpty(list) ? CollUtil.getFirst(list) : new CombinedDictResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增字典
|
||||
*
|
||||
* @param combinedDict 字典
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void saveData(CombinedDictEntity combinedDict) {
|
||||
// todo 校验
|
||||
save(combinedDict);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新字典
|
||||
*
|
||||
* @param combinedDict 字典
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void updateData(CombinedDictEntity combinedDict) {
|
||||
// todo 校验
|
||||
updateById(combinedDict);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void deleteById(String dictId) {
|
||||
// todo 校验
|
||||
removeById(dictId);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.DictEntity;
|
||||
import com.dite.znpt.domain.vo.DictListReq;
|
||||
import com.dite.znpt.domain.vo.DictReq;
|
||||
import com.dite.znpt.domain.vo.DictResp;
|
||||
import com.dite.znpt.mapper.DictMapper;
|
||||
import com.dite.znpt.service.DictService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
* @Description: 字典表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DictServiceImpl extends ServiceImpl<DictMapper, DictEntity> implements DictService {
|
||||
|
||||
/**
|
||||
* 功能描述:查询字典列表
|
||||
*
|
||||
* @param dictReq 字典信息
|
||||
* @return {@link List }<{@link DictResp }>
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
@Override
|
||||
public List<DictResp> selectList(DictListReq dictReq) {
|
||||
PageUtil.startPage();
|
||||
List<DictResp> dictList= this.baseMapper.queryBySelective(dictReq);
|
||||
dictList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return dictList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @return {@link DictResp }
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
@Override
|
||||
public DictResp selectById(String dictId) {
|
||||
DictListReq dictReq = new DictListReq();
|
||||
dictReq.setDictId(dictId);
|
||||
|
||||
List<DictResp> list = selectList(dictReq);
|
||||
return list.isEmpty() ? CollUtil.getFirst(list) : new DictResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增字典
|
||||
*
|
||||
* @param dictReq 字典
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
@Override
|
||||
public void saveData(DictReq dictReq) {
|
||||
// todo 校验
|
||||
DictEntity entity = BeanUtil.copyProperties(dictReq, DictEntity.class);
|
||||
save(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新字典
|
||||
*
|
||||
* @param dictReq 字典
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
@Override
|
||||
public void updateData(DictReq dictReq) {
|
||||
// todo 校验
|
||||
DictEntity entity = BeanUtil.copyProperties(dictReq, DictEntity.class);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除字典
|
||||
*
|
||||
* @param dictId 字典Id
|
||||
* @author huise23
|
||||
* @date 2025/06/30 11:38
|
||||
**/
|
||||
@Override
|
||||
public void deleteById(String dictId) {
|
||||
// todo 校验
|
||||
removeById(dictId);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.FileInfoEntity;
|
||||
import com.dite.znpt.domain.vo.FileInfoListReq;
|
||||
import com.dite.znpt.domain.vo.FileInfoResp;
|
||||
import com.dite.znpt.service.FileInfoService;
|
||||
import com.dite.znpt.mapper.FileInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
* @Description: 文件信息表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfoEntity> implements FileInfoService {
|
||||
|
||||
/**
|
||||
* 功能描述:查询文件信息列表
|
||||
*
|
||||
* @param fileInfoReq 文件信息信息
|
||||
* @return {@link List }<{@link FileInfoResp }>
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public List<FileInfoResp> selectList(FileInfoListReq fileInfoReq) {
|
||||
PageUtil.startPage();
|
||||
List<FileInfoResp> fileInfoList= this.baseMapper.queryBySelective(fileInfoReq);
|
||||
fileInfoList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return fileInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条文件信息
|
||||
*
|
||||
* @param fileId 文件信息Id
|
||||
* @return {@link FileInfoResp }
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public FileInfoResp selectById(Long fileId) {
|
||||
FileInfoListReq fileInfoReq = new FileInfoListReq();
|
||||
fileInfoReq.setFileId(fileId);
|
||||
|
||||
List<FileInfoResp> list = selectList(fileInfoReq);
|
||||
return CollUtil.isNotEmpty(list) ? CollUtil.getFirst(list) : new FileInfoResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增文件信息
|
||||
*
|
||||
* @param fileInfo 文件信息
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void saveData(FileInfoEntity fileInfo) {
|
||||
// todo 校验
|
||||
save(fileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新文件信息
|
||||
*
|
||||
* @param fileInfo 文件信息
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void updateData(FileInfoEntity fileInfo) {
|
||||
// todo 校验
|
||||
updateById(fileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除文件信息
|
||||
*
|
||||
* @param fileId 文件信息Id
|
||||
* @author huise23
|
||||
* @date 2025/04/11 23:17
|
||||
**/
|
||||
@Override
|
||||
public void deleteById(Long fileId) {
|
||||
// todo 校验
|
||||
removeById(fileId);
|
||||
}
|
||||
|
||||
}
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.ImageCollectEntity;
|
||||
|
@ -17,7 +16,6 @@ import com.dite.znpt.mapper.ImageCollectMapper;
|
|||
import com.dite.znpt.service.ImageCollectService;
|
||||
import com.dite.znpt.service.ImageService;
|
||||
import com.dite.znpt.service.PartService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
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.InsuranceCompanyEntity;
|
||||
import com.dite.znpt.domain.vo.InsuranceCompanyListReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceCompanyReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceCompanyResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.InsuranceCompanyMapper;
|
||||
import com.dite.znpt.service.InsuranceCompanyService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:34
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class InsuranceCompanyServiceImpl extends ServiceImpl<InsuranceCompanyMapper, InsuranceCompanyEntity> implements InsuranceCompanyService {
|
||||
@Override
|
||||
public List<InsuranceCompanyResp> page(InsuranceCompanyListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.list(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InsuranceCompanyResp> list(InsuranceCompanyListReq req) {
|
||||
return Converts.INSTANCE.toInsuranceCompanyResp(this.list(
|
||||
Wrappers.lambdaQuery(InsuranceCompanyEntity.class)
|
||||
.eq(InsuranceCompanyEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
.like(StrUtil.isNotBlank(req.getInsuranceCompanyName()), InsuranceCompanyEntity::getInsuranceCompanyName, req.getInsuranceCompanyName())
|
||||
.like(StrUtil.isNotBlank(req.getContact()), InsuranceCompanyEntity::getContact, req.getContact())
|
||||
.like(StrUtil.isNotBlank(req.getContactPhone()), InsuranceCompanyEntity::getContactPhone, req.getContactPhone())
|
||||
.eq(StrUtil.isNotBlank(req.getStatus()), InsuranceCompanyEntity::getStatus, req.getStatus())
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public InsuranceCompanyResp detail(String insuranceCompanyId) {
|
||||
InsuranceCompanyEntity entity = this.getById(insuranceCompanyId);
|
||||
if(null == entity || !entity.getDelFlag().equals(Constants.DEL_FLAG_0)){
|
||||
throw new ServiceException(Message.INSURANCE_COMPANY_ID_IS_NOT_EXIST);
|
||||
}
|
||||
return Converts.INSTANCE.toInsuranceCompanyResp(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(InsuranceCompanyReq req) {
|
||||
this.getOneOpt(
|
||||
Wrappers.lambdaQuery(InsuranceCompanyEntity.class)
|
||||
.eq(InsuranceCompanyEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
.eq(InsuranceCompanyEntity::getInsuranceCompanyName, req.getInsuranceCompanyName())
|
||||
).ifPresent(insuranceCompany -> {throw new ServiceException(Message.INSURANCE_COMPANY_NAME_IS_EXIST);});
|
||||
this.save(Converts.INSTANCE.toInsuranceCompanyEntity(req));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String insuranceCompanyId, InsuranceCompanyReq req) {
|
||||
InsuranceCompanyEntity insuranceCompany = this.getById(insuranceCompanyId);
|
||||
if(null == insuranceCompany || !insuranceCompany.getDelFlag().equals(Constants.DEL_FLAG_0)){
|
||||
throw new ServiceException(Message.INSURANCE_COMPANY_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if(!req.getInsuranceCompanyName().equals(insuranceCompany.getInsuranceCompanyName())){
|
||||
this.getOneOpt(
|
||||
Wrappers.lambdaQuery(InsuranceCompanyEntity.class)
|
||||
.eq(InsuranceCompanyEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
.eq(InsuranceCompanyEntity::getInsuranceCompanyName, req.getInsuranceCompanyName())
|
||||
).ifPresent(company -> {throw new ServiceException(Message.INSURANCE_COMPANY_NAME_IS_EXIST);});
|
||||
}
|
||||
InsuranceCompanyEntity entity = Converts.INSTANCE.toInsuranceCompanyEntity(req);
|
||||
entity.setInsuranceCompanyId(insuranceCompanyId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void deleteById(String insuranceCompanyId) {
|
||||
InsuranceCompanyEntity entity = this.getById(insuranceCompanyId);
|
||||
if(null == entity || !entity.getDelFlag().equals(Constants.DEL_FLAG_0)){
|
||||
throw new ServiceException(Message.INSURANCE_COMPANY_ID_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setDelFlag(Constants.DEL_FLAG_1);
|
||||
this.updateById(entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,200 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.*;
|
||||
import com.dite.znpt.domain.vo.*;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import com.dite.znpt.enums.FilePathEnum;
|
||||
import com.dite.znpt.enums.InsuranceStatusEnum;
|
||||
import com.dite.znpt.enums.UserStatusEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.InsuranceInfoMapper;
|
||||
import com.dite.znpt.service.*;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:32
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class InsuranceInfoServiceImpl extends ServiceImpl<InsuranceInfoMapper, InsuranceInfoEntity> implements InsuranceInfoService {
|
||||
|
||||
@Resource
|
||||
private InsuranceCompanyService insuranceCompanyService;
|
||||
|
||||
@Resource
|
||||
private InsuranceTypeService insuranceTypeService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Resource
|
||||
private AttachInfoService attacheInfoService;
|
||||
|
||||
@Override
|
||||
public List<InsuranceInfoResp> page(InsuranceInfoListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.list(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InsuranceInfoResp> list(InsuranceInfoListReq req) {
|
||||
List<InsuranceInfoResp> result = Converts.INSTANCE.toInsuranceInfoResp(
|
||||
this.list(Wrappers.lambdaQuery(InsuranceInfoEntity.class)
|
||||
.like(StrUtil.isNotBlank(req.getName()), InsuranceInfoEntity::getName, req.getName())
|
||||
.like(StrUtil.isNotBlank(req.getUserCode()), InsuranceInfoEntity::getUserCode, req.getUserCode())
|
||||
.eq(StrUtil.isNotBlank(req.getInsuranceTypeId()), InsuranceInfoEntity::getInsuranceTypeId, req.getInsuranceCompanyId())
|
||||
.eq(StrUtil.isNotBlank(req.getInsuranceCompanyId()), InsuranceInfoEntity::getInsuranceCompanyId, req.getInsuranceCompanyId())
|
||||
.eq(StrUtil.isNotBlank(req.getInsuranceStatus()), InsuranceInfoEntity::getInsuranceStatus, req.getInsuranceStatus())
|
||||
));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InsuranceAttachResp> pageAttach(InsuranceInfoListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.listAttach(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InsuranceAttachResp> listAttach(InsuranceInfoListReq req) {
|
||||
List<InsuranceAttachResp> result = Converts.INSTANCE.toInsuranceAttachResp(
|
||||
this.list(Wrappers.lambdaQuery(InsuranceInfoEntity.class)
|
||||
.like(StrUtil.isNotBlank(req.getName()), InsuranceInfoEntity::getName, req.getName())
|
||||
.like(StrUtil.isNotBlank(req.getUserCode()), InsuranceInfoEntity::getUserCode, req.getUserCode())
|
||||
.eq(StrUtil.isNotBlank(req.getInsuranceTypeId()), InsuranceInfoEntity::getInsuranceTypeId, req.getInsuranceCompanyId())
|
||||
.eq(StrUtil.isNotBlank(req.getInsuranceCompanyId()), InsuranceInfoEntity::getInsuranceCompanyId, req.getInsuranceCompanyId())
|
||||
.eq(StrUtil.isNotBlank(req.getInsuranceStatus()), InsuranceInfoEntity::getInsuranceStatus, req.getInsuranceStatus())
|
||||
)
|
||||
);
|
||||
|
||||
List<String> attachInfoIds = result.stream().map(InsuranceAttachResp::getAttachInfoId).filter(StrUtil::isNotBlank).toList();
|
||||
if(CollUtil.isNotEmpty(attachInfoIds)){
|
||||
Map<String, AttachInfoEntity> attachIdMap = attacheInfoService.list(
|
||||
Wrappers.lambdaQuery(AttachInfoEntity.class).in(AttachInfoEntity::getAttachId, attachInfoIds).eq(AttachInfoEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
).stream().collect(Collectors.toMap(AttachInfoEntity::getAttachId, Function.identity()));
|
||||
result.forEach(resp -> {
|
||||
if(StrUtil.isNotBlank(resp.getAttachInfoId()) && attachIdMap.containsKey(resp.getAttachInfoId())){
|
||||
resp.setAttachPath(attachIdMap.get(resp.getAttachInfoId()).getAttachPath());
|
||||
resp.setCreateTime(attachIdMap.get(resp.getAttachInfoId()).getCreateTime());
|
||||
resp.setFileType(attachIdMap.get(resp.getAttachInfoId()).getFileType());
|
||||
resp.setRemark(attachIdMap.get(resp.getAttachInfoId()).getRemark());
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InsuranceInfoResp detail(String insuranceInfoId) {
|
||||
InsuranceInfoEntity insuranceInfoEntity = this.getById(insuranceInfoId);
|
||||
if(null == insuranceInfoEntity || !Constants.DEL_FLAG_0.equals(insuranceInfoEntity.getDelFlag())){
|
||||
throw new ServiceException(Message.INSURANCE_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
InsuranceInfoResp result = Converts.INSTANCE.toInsuranceInfoResp(insuranceInfoEntity);
|
||||
if(StrUtil.isNotBlank(insuranceInfoEntity.getAttachInfoId())){
|
||||
AttachInfoEntity attachInfoEntity = attacheInfoService.getById(insuranceInfoEntity.getAttachInfoId());
|
||||
result.setAttachInfoResp(Converts.INSTANCE.toAttacheInfoResp(attachInfoEntity));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(InsuranceInfoReq req) {
|
||||
InsuranceInfoEntity entity = validation(Converts.INSTANCE.toInsuranceInfoEntity(req));
|
||||
this.save(entity);
|
||||
if(StrUtil.isNotBlank(entity.getAttachInfoId())){
|
||||
attacheInfoService.updateBusinessIdByAttachIds(entity.getInsuranceInfoId(), Arrays.asList(entity.getAttachInfoId()), AttachBusinessTypeEnum.INSURANCE_FILE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String insuranceInfoId, InsuranceInfoReq req) {
|
||||
InsuranceInfoEntity insuranceInfoEntity = this.getById(insuranceInfoId);
|
||||
if(null == insuranceInfoEntity || !Constants.DEL_FLAG_0.equals(insuranceInfoEntity.getDelFlag())){
|
||||
throw new ServiceException(Message.INSURANCE_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
InsuranceInfoEntity entity = Converts.INSTANCE.toInsuranceInfoEntity(req);
|
||||
entity.setInsuranceInfoId(insuranceInfoId);
|
||||
this.updateById(validation(entity));
|
||||
if(StrUtil.isNotBlank(entity.getAttachInfoId())){
|
||||
attacheInfoService.updateBusinessIdByAttachIds(entity.getInsuranceInfoId(), Arrays.asList(entity.getAttachInfoId()), AttachBusinessTypeEnum.INSURANCE_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private InsuranceInfoEntity validation(InsuranceInfoEntity entity) {
|
||||
UserEntity user = userService.getById(entity.getUserId());
|
||||
if(null == user || !Constants.STATUS_0.equals(user.getStatus())
|
||||
|| !Constants.DEL_FLAG_0.equals(user.getDelFlag())
|
||||
|| !UserStatusEnum.EMPLOYED.getCode().equals(user.getUserStatus())){
|
||||
throw new ServiceException(Message.USER_ID_NOT_EXIST_OR_ILLEGAL);
|
||||
}
|
||||
entity.setName(user.getName());
|
||||
entity.setUserCode(user.getUserCode());
|
||||
InsuranceCompanyEntity company = insuranceCompanyService.getById(entity.getInsuranceCompanyId());
|
||||
if(null == company ||!Constants.DEL_FLAG_0.equals(company.getDelFlag())){
|
||||
throw new ServiceException(Message.INSURANCE_COMPANY_ID_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setInsuranceCompanyName(company.getInsuranceCompanyName());
|
||||
InsuranceTypeEntity type = insuranceTypeService.getById(entity.getInsuranceTypeId());
|
||||
if(null == type || !Constants.DEL_FLAG_0.equals(type.getDelFlag())){
|
||||
throw new ServiceException(Message.INSURANCE_TYPE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setInsuranceTypeName(type.getInsuranceTypeName());
|
||||
entity.setInsuranceStatus(entity.getExpireDate().isBefore(LocalDate.now()) ? InsuranceStatusEnum.EXPIRED.getCode() : InsuranceStatusEnum.EFFECTIVE.getCode());
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void deleteById(String insuranceInfoId) {
|
||||
InsuranceInfoEntity entity = this.getById(insuranceInfoId);
|
||||
if(null == entity || !Constants.DEL_FLAG_0.equals(entity.getDelFlag())){
|
||||
throw new ServiceException(Message.INSURANCE_INFO_ID_IS_NOT_EXIST);
|
||||
}
|
||||
entity.setDelFlag(Constants.DEL_FLAG_1);
|
||||
attacheInfoService.deleteByAttachInfoId(entity.getAttachInfoId());
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Scheduled(cron = "0 15 0 * * ?")
|
||||
public void updateInsuranceStatus(){
|
||||
List<InsuranceInfoEntity> list = this.list(
|
||||
Wrappers.lambdaQuery(InsuranceInfoEntity.class)
|
||||
.eq(InsuranceInfoEntity::getInsuranceStatus, InsuranceStatusEnum.EFFECTIVE.getCode())
|
||||
.lt(InsuranceInfoEntity::getExpireDate, LocalDate.now())
|
||||
);
|
||||
list.forEach(entity -> {
|
||||
entity.setInsuranceStatus(InsuranceStatusEnum.EXPIRED.getCode());
|
||||
});
|
||||
this.updateBatchById(list);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
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.InsuranceTypeEntity;
|
||||
import com.dite.znpt.domain.vo.InsuranceTypeReq;
|
||||
import com.dite.znpt.domain.vo.InsuranceTypeResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.InsuranceTypeMapper;
|
||||
import com.dite.znpt.service.InsuranceTypeService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/26/周四 9:32
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class InsuranceTypeServiceImpl extends ServiceImpl<InsuranceTypeMapper, InsuranceTypeEntity> implements InsuranceTypeService {
|
||||
|
||||
@Override
|
||||
public List<InsuranceTypeResp> page(String insuranceTypeName) {
|
||||
PageUtil.startPage();
|
||||
return this.list(insuranceTypeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InsuranceTypeResp> list(String insuranceTypeName) {
|
||||
return Converts.INSTANCE.toInsuranceTypeResp(
|
||||
this.list(Wrappers.lambdaQuery(InsuranceTypeEntity.class)
|
||||
.eq(InsuranceTypeEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
.like(StrUtil.isNotBlank(insuranceTypeName), InsuranceTypeEntity::getInsuranceTypeName, insuranceTypeName))
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InsuranceTypeResp detail(String insuranceTypeId) {
|
||||
InsuranceTypeEntity entity = this.getById(insuranceTypeId);
|
||||
if(null == entity || !entity.getDelFlag().equals(Constants.DEL_FLAG_0)){
|
||||
throw new ServiceException(Message.INSURANCE_TYPE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
return Converts.INSTANCE.toInsuranceTypeResp(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(InsuranceTypeReq req) {
|
||||
this.getOneOpt(
|
||||
Wrappers.lambdaQuery(InsuranceTypeEntity.class)
|
||||
.eq(InsuranceTypeEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
.eq(InsuranceTypeEntity::getInsuranceTypeName, req.getInsuranceTypeName())
|
||||
).ifPresent( insuranceTypeEntity -> {throw new ServiceException(Message.INSURANCE_TYPE_NAME_IS_EXIST);});
|
||||
this.save(Converts.INSTANCE.toInsuranceTypeEntity(req));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String insuranceTypeId, InsuranceTypeReq req) {
|
||||
InsuranceTypeEntity insurance = this.getById(insuranceTypeId);
|
||||
if(null == insurance || !insurance.getDelFlag().equals(Constants.DEL_FLAG_0)){
|
||||
throw new ServiceException(Message.INSURANCE_TYPE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if(!insurance.getInsuranceTypeName().equals(req.getInsuranceTypeName())){
|
||||
this.getOneOpt(
|
||||
Wrappers.lambdaQuery(InsuranceTypeEntity.class)
|
||||
.eq(InsuranceTypeEntity::getDelFlag, Constants.DEL_FLAG_0)
|
||||
.eq(InsuranceTypeEntity::getInsuranceTypeName, req.getInsuranceTypeName())
|
||||
).ifPresent( insuranceTypeEntity -> {throw new ServiceException(Message.INSURANCE_TYPE_NAME_IS_EXIST);});
|
||||
}
|
||||
InsuranceTypeEntity entity = Converts.INSTANCE.toInsuranceTypeEntity(req);
|
||||
entity.setInsuranceTypeId(insuranceTypeId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void deleteById(String insuranceTypeId) {
|
||||
InsuranceTypeEntity insurance = this.getById(insuranceTypeId);
|
||||
if(null == insurance || !insurance.getDelFlag().equals(Constants.DEL_FLAG_0)){
|
||||
throw new ServiceException(Message.INSURANCE_TYPE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
insurance.setDelFlag(Constants.DEL_FLAG_1);
|
||||
this.updateById(insurance);
|
||||
}
|
||||
}
|
|
@ -46,9 +46,13 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, MenuEntity> impleme
|
|||
tree.setId(treeNode.getMenuId());
|
||||
tree.setParentId(treeNode.getParentId());
|
||||
tree.setName(treeNode.getMenuName());
|
||||
tree.setWeight(treeNode.getOrderNum());
|
||||
tree.putExtra("menuType",treeNode.getMenuType());
|
||||
tree.putExtra("visible",treeNode.getVisible());
|
||||
tree.putExtra("orderNum",treeNode.getOrderNum());
|
||||
tree.putExtra("path",treeNode.getPath());
|
||||
tree.putExtra("component",treeNode.getComponent());
|
||||
tree.putExtra("perms",treeNode.getPerms());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskGroupEntity;
|
||||
import com.dite.znpt.domain.vo.*;
|
||||
import com.dite.znpt.service.ProjectTaskGroupService;
|
||||
import com.dite.znpt.mapper.ProjectTaskGroupMapper;
|
||||
import com.dite.znpt.service.ProjectTaskService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
* @Description: 项目任务组信息表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectTaskGroupServiceImpl extends ServiceImpl<ProjectTaskGroupMapper, ProjectTaskGroupEntity> implements ProjectTaskGroupService {
|
||||
|
||||
private final ProjectTaskService projectTaskService;
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目任务组信息列表
|
||||
*
|
||||
* @param projectTaskGroupReq 项目任务组信息信息
|
||||
* @return {@link List }<{@link ProjectTaskGroupResp }>
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectTaskGroupResp> selectList(ProjectTaskGroupListReq projectTaskGroupReq) {
|
||||
PageUtil.startPage();
|
||||
List<ProjectTaskGroupResp> projectTaskGroupList= this.baseMapper.queryBySelective(projectTaskGroupReq);
|
||||
ProjectTaskListReq listReq = new ProjectTaskListReq();
|
||||
listReq.setTaskNameOrMainUser(projectTaskGroupReq.getKeyword());
|
||||
Map<String, List<ProjectTaskResp>> taskMap = projectTaskService.selectList(listReq).stream().collect(Collectors.groupingBy(ProjectTaskResp::getTaskGroupId));
|
||||
projectTaskGroupList.forEach(resp -> {
|
||||
resp.setTaskList(taskMap.get(resp.getGroupId()));
|
||||
});
|
||||
return projectTaskGroupList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目任务组信息
|
||||
*
|
||||
* @param projectTaskGroupReq 项目任务组信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
public void saveData(ProjectTaskGroupReq projectTaskGroupReq) {
|
||||
// todo 校验
|
||||
ProjectTaskGroupEntity entity = BeanUtil.copyProperties(projectTaskGroupReq, ProjectTaskGroupEntity.class);
|
||||
save(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新项目任务组信息
|
||||
*
|
||||
* @param projectTaskGroupReq 项目任务组信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
public void updateData(ProjectTaskGroupReq projectTaskGroupReq) {
|
||||
// todo 校验
|
||||
ProjectTaskGroupEntity entity = BeanUtil.copyProperties(projectTaskGroupReq, ProjectTaskGroupEntity.class);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目任务组信息
|
||||
*
|
||||
* @param groupId 项目任务组信息Id
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteById(String groupId) {
|
||||
// todo 校验
|
||||
removeById(groupId);
|
||||
projectTaskService.deleteByGroupId(groupId);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,271 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.text.StrBuilder;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
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.AttachInfoEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskResp;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskReq;
|
||||
import com.dite.znpt.domain.vo.ProjectTaskStartReq;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import com.dite.znpt.enums.ProjectTaskStateEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.ProjectTaskGroupMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.ProjectTaskService;
|
||||
import com.dite.znpt.mapper.ProjectTaskMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
* @Description: 项目任务信息表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectTaskServiceImpl extends ServiceImpl<ProjectTaskMapper, ProjectTaskEntity> implements ProjectTaskService {
|
||||
|
||||
private final AttachInfoService attachInfoService;
|
||||
private final ProjectTaskGroupMapper projectTaskGroupMapper;
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目任务信息列表
|
||||
*
|
||||
* @param projectTaskReq 项目任务信息信息
|
||||
* @return {@link List }<{@link ProjectTaskResp }>
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectTaskResp> selectList(ProjectTaskListReq projectTaskReq) {
|
||||
PageUtil.startPage();
|
||||
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)
|
||||
.stream().collect(Collectors.groupingBy(AttachInfoEntity::getBusinessId));
|
||||
} else {
|
||||
attachMap = new HashMap<>();
|
||||
}
|
||||
projectTaskList.forEach(resp -> {
|
||||
resp.setAttachList(attachMap.get(resp.getTaskId()));
|
||||
});
|
||||
return projectTaskList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条项目任务信息
|
||||
*
|
||||
* @param taskId 项目任务信息Id
|
||||
* @return {@link ProjectTaskResp }
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
public ProjectTaskResp selectById(String taskId) {
|
||||
ProjectTaskListReq projectTaskReq = new ProjectTaskListReq();
|
||||
projectTaskReq.setTaskId(taskId);
|
||||
|
||||
List<ProjectTaskResp> list = selectList(projectTaskReq);
|
||||
return list.isEmpty() ? CollUtil.getFirst(list) : new ProjectTaskResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目任务信息
|
||||
*
|
||||
* @param projectTaskReq 项目任务信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveData(ProjectTaskReq projectTaskReq) {
|
||||
ProjectTaskEntity entity = BeanUtil.copyProperties(projectTaskReq, ProjectTaskEntity.class);
|
||||
checkTask(projectTaskReq);
|
||||
save(entity);
|
||||
attachInfoService.updateBusinessIdByAttachIds(entity.getTaskId(), projectTaskReq.getAttachFileIds(), AttachBusinessTypeEnum.PROJECT_TASK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新项目任务信息
|
||||
*
|
||||
* @param projectTaskReq 项目任务信息
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateData(ProjectTaskReq projectTaskReq) {
|
||||
ProjectTaskEntity entity = BeanUtil.copyProperties(projectTaskReq, ProjectTaskEntity.class);
|
||||
checkTask(projectTaskReq);
|
||||
updateById(entity);
|
||||
attachInfoService.updateBusinessIdByAttachIds(projectTaskReq.getTaskId(), projectTaskReq.getAttachFileIds(), AttachBusinessTypeEnum.PROJECT_TASK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:检查任务
|
||||
*
|
||||
* @param taskReq 任务请求类
|
||||
* @author cuizhibin
|
||||
* @date 2025/06/27 10:53
|
||||
**/
|
||||
private void checkTask(ProjectTaskReq taskReq) {
|
||||
if (Objects.isNull(projectTaskGroupMapper.selectById(taskReq.getTaskGroupId()))) {
|
||||
throw new ServiceException(Message.TASK_GROUP_ID_NOT_EXIST);
|
||||
}
|
||||
if (StrUtil.isEmpty(taskReq.getParentTaskId())) {
|
||||
return;
|
||||
}
|
||||
Map<String, ProjectTaskEntity> taskMap = baseMapper.listAllParents(taskReq.getParentTaskId()).stream().collect(Collectors.toMap(ProjectTaskEntity::getTaskId, Function.identity()));
|
||||
// 判断是否有循环父级
|
||||
if (StrUtil.isNotEmpty(taskReq.getTaskId())) {
|
||||
if (taskMap.containsKey(taskReq.getTaskId())) {
|
||||
String parentTaskId = taskReq.getParentTaskId();
|
||||
List<String> strList = ListUtil.toList(taskReq.getTaskName());
|
||||
do {
|
||||
ProjectTaskEntity task = taskMap.get(parentTaskId);
|
||||
parentTaskId = task.getParentTaskId();
|
||||
if (StrUtil.isEmpty(parentTaskId)) {
|
||||
break;
|
||||
}
|
||||
strList.add(task.getTaskName());
|
||||
} while (StrUtil.isNotEmpty(parentTaskId));
|
||||
throw new ServiceException(Message.TASK_IN_CYCLE + CollUtil.join(strList, "--"));
|
||||
}
|
||||
}
|
||||
// 更新父级任务的计划起始/结束时间
|
||||
String parentTaskId = taskReq.getParentTaskId();
|
||||
LocalDate planStartDate = taskReq.getPlanStartDate();
|
||||
LocalDate planEndDate = taskReq.getPlanEndDate();
|
||||
Set<ProjectTaskEntity> updateTaskSet = new HashSet<>();
|
||||
do {
|
||||
ProjectTaskEntity task = taskMap.get(parentTaskId);
|
||||
parentTaskId = task.getParentTaskId();
|
||||
if (task.getPlanStartDate().isAfter(planStartDate)) {
|
||||
task.setPlanStartDate(planStartDate);
|
||||
updateTaskSet.add(task);
|
||||
} else {
|
||||
planStartDate = task.getPlanStartDate();
|
||||
}
|
||||
if (task.getPlanEndDate().isBefore(planEndDate)) {
|
||||
task.setPlanEndDate(planEndDate);
|
||||
updateTaskSet.add(task);
|
||||
} else {
|
||||
planEndDate = task.getPlanEndDate();
|
||||
}
|
||||
} while (StrUtil.isNotEmpty(parentTaskId));
|
||||
baseMapper.updateById(updateTaskSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目任务信息
|
||||
*
|
||||
* @param taskId 项目任务信息Id
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteById(String taskId) {
|
||||
removeById(taskId);
|
||||
attachInfoService.deleteByBusinessId(taskId, AttachBusinessTypeEnum.PROJECT_TASK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除项目任务信息
|
||||
*
|
||||
* @param groupId 项目任务组信息Id
|
||||
* @author huise23
|
||||
* @date 2025/06/25 17:21
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteByGroupId(String groupId) {
|
||||
List<String> list = lambdaQuery().eq(ProjectTaskEntity::getTaskGroupId, groupId).list().stream().map(ProjectTaskEntity::getTaskId).toList();
|
||||
attachInfoService.deleteByBusinessIds(list, AttachBusinessTypeEnum.PROJECT_TASK);
|
||||
baseMapper.deleteByIds(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:开始任务/任务组开始任务
|
||||
*
|
||||
* @param taskStartReq 任务启动请求类
|
||||
* @author cuizhibin
|
||||
* @date 2025/06/25 21:16
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void startTask(ProjectTaskStartReq taskStartReq) {
|
||||
if (StrUtil.isBlank(taskStartReq.getTaskId()) && StrUtil.isBlank(taskStartReq.getTaskGroupId())) {
|
||||
throw new ServiceException(Message.TASK_ID_GROUP_ID_ALL_EMPTY);
|
||||
}
|
||||
List<ProjectTaskEntity> list;
|
||||
if (StrUtil.isNotBlank(taskStartReq.getTaskGroupId())) {
|
||||
list = lambdaQuery().eq(ProjectTaskEntity::getTaskGroupId, taskStartReq.getTaskGroupId())
|
||||
.eq(ProjectTaskEntity::getStatus, ProjectTaskStateEnum.PENDING.getCode())
|
||||
.list();
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
list = List.of(getById(taskStartReq.getTaskId()));
|
||||
if (!list.get(0).getStatus().equals(ProjectTaskStateEnum.PENDING.getCode())) {
|
||||
throw new ServiceException(Message.TASK_STATUS_NOT_PENDING);
|
||||
}
|
||||
}
|
||||
list.forEach(entity -> {
|
||||
entity.setStatus(ProjectTaskStateEnum.IN_PROGRESS.getCode());
|
||||
entity.setActualStartDate(LocalDate.now());
|
||||
});
|
||||
baseMapper.updateById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:结束任务/任务组结束任务
|
||||
*
|
||||
* @param taskStartReq 任务启动请求类
|
||||
* @author cuizhibin
|
||||
* @date 2025/06/25 21:16
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void endTask(ProjectTaskStartReq taskStartReq) {
|
||||
if (StrUtil.isBlank(taskStartReq.getTaskId()) && StrUtil.isBlank(taskStartReq.getTaskGroupId())) {
|
||||
throw new ServiceException(Message.TASK_ID_GROUP_ID_ALL_EMPTY);
|
||||
}
|
||||
List<ProjectTaskEntity> list;
|
||||
if (StrUtil.isNotBlank(taskStartReq.getTaskGroupId())) {
|
||||
list = lambdaQuery().eq(ProjectTaskEntity::getTaskGroupId, taskStartReq.getTaskGroupId())
|
||||
.eq(ProjectTaskEntity::getStatus, ProjectTaskStateEnum.IN_PROGRESS.getCode())
|
||||
.list();
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
list = List.of(getById(taskStartReq.getTaskId()));
|
||||
if (!list.get(0).getStatus().equals(ProjectTaskStateEnum.IN_PROGRESS.getCode())) {
|
||||
throw new ServiceException(Message.TASK_STATUS_NOT_IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
list.forEach(entity -> {
|
||||
entity.setStatus(ProjectTaskStateEnum.COMPLETED.getCode());
|
||||
entity.setActualStartDate(LocalDate.now());
|
||||
});
|
||||
baseMapper.updateById(list);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
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.UserEntity;
|
||||
import com.dite.znpt.domain.entity.WorkShiftEntity;
|
||||
import com.dite.znpt.domain.vo.WorkShiftListResp;
|
||||
import com.dite.znpt.domain.vo.WorkShiftReq;
|
||||
import com.dite.znpt.domain.vo.WorkShiftResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.WorkShiftMapper;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import com.dite.znpt.service.WorkShiftService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/6/30/周一 10:28
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class WorkShitServiceImpl extends ServiceImpl<WorkShiftMapper, WorkShiftEntity> implements WorkShiftService {
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public List<WorkShiftListResp> page(String workShitName) {
|
||||
PageUtil.startPage();
|
||||
return this.list(workShitName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WorkShiftListResp> list(String workShitName) {
|
||||
List<WorkShiftEntity> list = this.list(Wrappers.lambdaQuery(WorkShiftEntity.class).eq(WorkShiftEntity::getDelFlag, Constants.DEL_FLAG_0).like(StrUtil.isNotBlank(workShitName), WorkShiftEntity::getWorkShiftName, workShitName));
|
||||
List<String> userIds = list.stream().map(WorkShiftEntity::getCreateBy).toList();
|
||||
Map<String, UserEntity> userIdMap = !userIds.isEmpty() ? userService.listByIds(userIds).stream().collect(Collectors.toMap(UserEntity::getUserId, Function.identity())): new HashMap<>();
|
||||
List<WorkShiftListResp> result = Converts.INSTANCE.toWorkShiftListResp(list);
|
||||
result.forEach(workShiftListResp -> {
|
||||
workShiftListResp.setStatusLabel(Constants.STATUS_UNPUBLISH.equals(workShiftListResp.getStatus()) ? "未发布" : "已发布");
|
||||
if(userIdMap.containsKey(workShiftListResp.getCreateBy())){
|
||||
workShiftListResp.setCreateUserName(userIdMap.get(workShiftListResp.getCreateBy()).getName());
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorkShiftResp detail(String workShiftId) {
|
||||
WorkShiftEntity workShift = this.getById(workShiftId);
|
||||
if(workShift == null || !Constants.DEL_FLAG_0.equals(workShift.getDelFlag())){
|
||||
throw new ServiceException(Message.WORK_SHIFT_NOT_EXIST);
|
||||
}
|
||||
WorkShiftResp workShiftResp = Converts.INSTANCE.toWorkShiftResp(workShift);
|
||||
workShiftResp.setStatusLabel(Constants.STATUS_UNPUBLISH.equals(workShiftResp.getStatus()) ? "未发布" : "已发布");
|
||||
return workShiftResp;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(WorkShiftReq req) {
|
||||
List<WorkShiftEntity> list = this.list(Wrappers.lambdaQuery(WorkShiftEntity.class).eq(WorkShiftEntity::getDelFlag, Constants.DEL_FLAG_0).eq(WorkShiftEntity::getWorkShiftName, req.getWorkShiftName()));
|
||||
if(!list.isEmpty()){
|
||||
throw new ServiceException(Message.WORK_SHIFT_NAME_EXIST);
|
||||
}
|
||||
WorkShiftEntity entity = validation(req);
|
||||
entity.setStatus(Constants.STATUS_UNPUBLISH);
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
private WorkShiftEntity validation(WorkShiftReq req) {
|
||||
if(req.getWorkTimeEnd().isBefore(req.getWorkTimeStart())){
|
||||
throw new ServiceException(Message.WORK_TIME_START_CAN_NOT_BEFORE_WORK_TIME_END);
|
||||
}
|
||||
int workTime = req.getWorkTimeEnd().toSecondOfDay() - req.getWorkTimeStart().toSecondOfDay() ;
|
||||
if(req.getRestTimeEnd() != null && req.getRestTimeStart()!= null){
|
||||
if(req.getRestTimeEnd().isBefore(req.getRestTimeStart())){
|
||||
throw new ServiceException(Message.REST_TIME_START_CAN_NOT_BEFORE_REST_TIME_END);
|
||||
}
|
||||
if(!(req.getRestTimeStart().isAfter(req.getWorkTimeStart()) && req.getRestTimeStart().isBefore(req.getWorkTimeEnd()))){
|
||||
throw new ServiceException(Message.REST_TIME_START_MUST_BETWEEN_WORK_TIME);
|
||||
}
|
||||
if(!(req.getRestTimeEnd().isAfter(req.getWorkTimeStart()) && req.getRestTimeEnd().isBefore(req.getWorkTimeEnd()))){
|
||||
throw new ServiceException(Message.REST_TIME_END_MUST_BETWEEN_WORK_TIME);
|
||||
}
|
||||
workTime = workTime - (req.getRestTimeEnd().toSecondOfDay() - req.getRestTimeStart().toSecondOfDay());
|
||||
}else {
|
||||
req.setRestTimeEnd(null);
|
||||
req.setRestTimeEnd(null);
|
||||
}
|
||||
if(req.getEarlyTimeLimit() != null && req.getEarlyTimeOffset()!= null && req.getEarlyTimeLimit() <= req.getEarlyTimeOffset()){
|
||||
throw new ServiceException(Message.EARLY_TIME_LIMIT_CAN_NOT_BEFORE_EARLY_TIME_OFFSET);
|
||||
}
|
||||
if(req.getLateTimeLimit() != null && req.getLateTimeOffset() != null && req.getLateTimeLimit() <= req.getLateTimeOffset()){
|
||||
throw new ServiceException(Message.LATE_TIME_LIMIT_CAN_NOT_BEFORE_LATE_TIME_OFFSET);
|
||||
}
|
||||
|
||||
WorkShiftEntity entity = Converts.INSTANCE.toWorkShiftEntity(req);
|
||||
entity.setWorkTime(workTime/60);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String workShiftId, WorkShiftReq req) {
|
||||
WorkShiftEntity workShift = this.getById(workShiftId);
|
||||
if(workShift == null || !Constants.DEL_FLAG_0.equals(workShift.getDelFlag())){
|
||||
throw new ServiceException(Message.WORK_SHIFT_NOT_EXIST);
|
||||
}
|
||||
List<WorkShiftEntity> list = this.list(Wrappers.lambdaQuery(WorkShiftEntity.class).eq(WorkShiftEntity::getDelFlag, Constants.DEL_FLAG_0).eq(WorkShiftEntity::getWorkShiftName, req.getWorkShiftName()));
|
||||
if(!req.getWorkShiftName().equals(workShift.getWorkShiftName()) && !list.isEmpty()){
|
||||
throw new ServiceException(Message.WORK_SHIFT_NAME_EXIST);
|
||||
}
|
||||
WorkShiftEntity entity = validation(req);
|
||||
entity.setWorkShiftId(workShiftId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void publish(String workShiftId) {
|
||||
WorkShiftEntity workShift = this.getById(workShiftId);
|
||||
if(workShift == null || !Constants.DEL_FLAG_0.equals(workShift.getDelFlag())){
|
||||
throw new ServiceException(Message.WORK_SHIFT_NOT_EXIST);
|
||||
}
|
||||
if(!Constants.STATUS_UNPUBLISH.equals(workShift.getStatus())){
|
||||
throw new ServiceException(Message.WORK_SHIFT_IS_NOT_UNPUBLISH);
|
||||
}
|
||||
workShift.setStatus(Constants.STATUS_PUBLISH);
|
||||
this.updateById(workShift);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void delete(String workShiftId) {
|
||||
WorkShiftEntity workShift = this.getById(workShiftId);
|
||||
if(workShift == null || !Constants.DEL_FLAG_0.equals(workShift.getDelFlag())){
|
||||
throw new ServiceException(Message.WORK_SHIFT_NOT_EXIST);
|
||||
}
|
||||
workShift.setDelFlag(Constants.DEL_FLAG_1);
|
||||
this.updateById(workShift);
|
||||
}
|
||||
}
|
|
@ -1,39 +1,37 @@
|
|||
<?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.CombinedDictMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.dict_id, a.dict_type, a.dict_name, a.parent_id,
|
||||
a.sort_order, a.final_state
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.CombinedDictResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from combined_dict a
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||||
</if>
|
||||
<if test="dictId != null and dictId != ''">
|
||||
and a.dict_id like concat ('%', #{dictId}, '%')
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
and a.dict_type like concat ('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
and a.dict_name like concat ('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
and a.parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="sortOrder != null">
|
||||
and a.sort_order = #{sortOrder}
|
||||
</if>
|
||||
<if test="finalState != null">
|
||||
and a.final_state = #{finalState}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
<?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.DictMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.dict_id, a.dict_type, a.dict_name, a.parent_id,
|
||||
a.sort_order, a.final_state, a.create_time, a.create_by,
|
||||
a.update_time, a.update_by
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.DictResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from dict a
|
||||
<where>
|
||||
<if test="dictId != null and dictId != ''">
|
||||
and a.dict_id like concat ('%', #{dictId}, '%')
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
and a.dict_type like concat ('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
and a.dict_name like concat ('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
and a.parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="sortOrder != null">
|
||||
and a.sort_order = #{sortOrder}
|
||||
</if>
|
||||
<if test="finalState != null">
|
||||
and a.final_state = #{finalState}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.FileInfoMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.file_id, a.business_id, a.minio_path, a.business_type
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.FileInfoResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from file_info a
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||||
</if>
|
||||
<if test="fileId != null">
|
||||
and a.file_id = #{fileId}
|
||||
</if>
|
||||
<if test="businessId != null and businessId != ''">
|
||||
and a.business_id like concat ('%', #{businessId}, '%')
|
||||
</if>
|
||||
<if test="minioPath != null and minioPath != ''">
|
||||
and a.minio_path like concat ('%', #{minioPath}, '%')
|
||||
</if>
|
||||
<if test="businessType != null and businessType != ''">
|
||||
and a.business_type like concat ('%', #{businessType}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
SELECT
|
||||
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 AS project_manager_name, prj.constructor_ids,
|
||||
GROUP_CONCAT(DISTINCT con.name) AS constructor_name, prj.create_time
|
||||
GROUP_CONCAT(DISTINCT con.name) AS constructor_name, prj.start_date, prj.end_date
|
||||
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'
|
||||
|
@ -25,13 +25,16 @@
|
|||
<if test="status != null and status != ''">
|
||||
AND prj.status = #{status}
|
||||
</if>
|
||||
<if test="createDateBegin != null and createDateBegin !='' and createDateEnd != null and createDateEnd != '' ">
|
||||
AND prj.create_time BETWEEN #{createDateBegin} AND #{createDateEnd}
|
||||
<if test="startDate != null">
|
||||
and prj.start_date >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
and prj.end_date <= #{endDate}
|
||||
</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.create_time
|
||||
prj.start_date, prj.end_date
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.ProjectTaskGroupMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.group_id, a.group_name, a.update_by, a.create_time,
|
||||
a.create_by, a.update_time
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectTaskGroupResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from project_task_group a
|
||||
<where>
|
||||
<if test="groupId != null and groupId != ''">
|
||||
and a.group_id like concat ('%', #{groupId}, '%')
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
and a.group_name like concat ('%', #{groupName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<?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.ProjectTaskMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.task_id, a.task_group_id, a.task_name, a.task_code,
|
||||
a.main_user_id, a.user_ids, a.plan_start_date, a.plan_end_date,
|
||||
a.actual_start_date, a.actual_end_date, a.status, a.overdue_status,
|
||||
a.update_by, a.create_time, a.create_by, a.update_time
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectTaskResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from project_task a
|
||||
left join user u on a.main_user_id=u.user_id
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
and (a.task_name like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.task_code like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||||
</if>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
and a.task_id like concat ('%', #{taskId}, '%')
|
||||
</if>
|
||||
<if test="taskGroupId != null and taskGroupId != ''">
|
||||
and a.task_group_id like concat ('%', #{taskGroupId}, '%')
|
||||
</if>
|
||||
<if test="taskName != null and taskName != ''">
|
||||
and a.task_name like concat ('%', #{taskName}, '%')
|
||||
</if>
|
||||
<if test="taskCode != null and taskCode != ''">
|
||||
and a.task_code like concat ('%', #{taskCode}, '%')
|
||||
</if>
|
||||
<if test="mainUserId != null and mainUserId != ''">
|
||||
and a.main_user_id like concat ('%', #{mainUserId}, '%')
|
||||
</if>
|
||||
<if test="userIds != null and userIds != ''">
|
||||
and a.user_ids like concat ('%', #{userIds}, '%')
|
||||
</if>
|
||||
<if test="planStartDate != null">
|
||||
and a.plan_start_date = #{planStartDate}
|
||||
</if>
|
||||
<if test="planEndDate != null">
|
||||
and a.plan_end_date = #{planEndDate}
|
||||
</if>
|
||||
<if test="actualStartDate != null">
|
||||
and a.actual_start_date = #{actualStartDate}
|
||||
</if>
|
||||
<if test="actualEndDate != null">
|
||||
and a.actual_end_date = #{actualEndDate}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and a.status = #{status}
|
||||
</if>
|
||||
<if test="overdueStatus != null">
|
||||
and a.overdue_status = #{overdueStatus}
|
||||
</if>
|
||||
<if test="taskNameOrMainUser != null and taskNameOrMainUser != ''">
|
||||
and (a.task_name like concat ('%', #{taskNameOrMainUser}, '%') or u.name like concat ('%', #{taskNameOrMainUser}, '%') )
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="listAllParents" resultType="com.dite.znpt.domain.entity.ProjectTaskEntity">
|
||||
WITH RECURSIVE task_tree AS (
|
||||
SELECT *
|
||||
FROM project_task pt
|
||||
WHERE task_id = #{taskId} -- 起始父级任务ID
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT t.*
|
||||
FROM project_task t
|
||||
INNER JOIN task_tree tt ON t.task_id = tt.parent_task_id
|
||||
) select * from task_tree
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?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.WorkShiftMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.dite.znpt</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>data-bus</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.dite.znpt</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,90 +0,0 @@
|
|||
package com.dite.znpt.data.bus.config;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.dite.znpt.data.bus.entity.CommonMessage;
|
||||
import com.dite.znpt.data.bus.enums.MQTypeEnum;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.core.*;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.amqp.rabbit.core.RabbitAdmin;
|
||||
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MQConfig {
|
||||
@Autowired
|
||||
private ConnectionFactory connectionFactory;
|
||||
|
||||
@Bean
|
||||
public RabbitAdmin rabbitAdmin() {
|
||||
RabbitAdmin admin = new RabbitAdmin(connectionFactory);
|
||||
admin.setAutoStartup(true);
|
||||
return admin;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TopicExchange topicExchange() {
|
||||
return new TopicExchange("data.topic.exchange");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Declarables declarables(TopicExchange exchange) {
|
||||
List<Declarable> declarables = new ArrayList<>();
|
||||
declarables.add(exchange);
|
||||
|
||||
for (MQTypeEnum typeEnum : MQTypeEnum.values()) {
|
||||
String queueName = typeEnum.getType() + ".queue";
|
||||
Queue queue = new Queue(queueName, true);
|
||||
declarables.add(queue);
|
||||
Binding binding = BindingBuilder.bind(queue)
|
||||
.to(exchange)
|
||||
.with(typeEnum.getType() + ".*");
|
||||
declarables.add(binding);
|
||||
}
|
||||
|
||||
return new Declarables(declarables);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public List<SimpleMessageListenerContainer> registerListeners(Declarables declarables) {
|
||||
List<SimpleMessageListenerContainer> messageListeners = new ArrayList<>();
|
||||
for (MQTypeEnum typeEnum : MQTypeEnum.values()) {
|
||||
String queueName = typeEnum.getType() + ".queue";
|
||||
|
||||
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
|
||||
container.setConnectionFactory(connectionFactory);
|
||||
container.setQueueNames(queueName);
|
||||
container.setMessageListener(message -> {
|
||||
String body = new String(message.getBody());
|
||||
log.debug("队列: " + queueName + " 收到消息: " + body);
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
CommonMessage<?> msg = objectMapper.readValue(body,
|
||||
objectMapper.getTypeFactory().constructParametricType(CommonMessage.class, typeEnum.getDto()));
|
||||
MQHandle<?> handle = SpringUtil.getBean(typeEnum.getImpl());
|
||||
handleMessageWithType(handle, msg);
|
||||
} catch (Exception e) {
|
||||
log.error("mq队列处理出错", e);
|
||||
}
|
||||
});
|
||||
messageListeners.add(container);
|
||||
// 启动监听
|
||||
container.start();
|
||||
}
|
||||
log.info("mq监听启动完成");
|
||||
return messageListeners;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> void handleMessageWithType(MQHandle<T> handler, CommonMessage<?> message) {
|
||||
handler.handle((CommonMessage<T>) message);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package com.dite.znpt.data.bus.config;
|
||||
|
||||
import com.dite.znpt.data.bus.entity.CommonMessage;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
/**
|
||||
* @author cuizhibin
|
||||
* @date 2025/04/22 17:03
|
||||
* @description mq处理接口
|
||||
*/
|
||||
public interface MQHandle<T> {
|
||||
|
||||
/**
|
||||
* 功能描述:mq处理类
|
||||
*
|
||||
* @param msg 消息
|
||||
* @author cuizhibin
|
||||
* @date 2025/04/22 17:03
|
||||
**/
|
||||
void handle(CommonMessage<T> msg);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package com.dite.znpt.data.bus.entity;
|
||||
|
||||
import com.dite.znpt.data.bus.enums.MQOperationEnum;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CommonMessage<T> {
|
||||
private MQOperationEnum operation;
|
||||
private T payload;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.dite.znpt.data.bus.entity.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ProjectDTO {
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package com.dite.znpt.data.bus.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum MQOperationEnum {
|
||||
ADD("add", "新增"),
|
||||
UPDATE("update", "修改"),
|
||||
DEL("del", "删除"),
|
||||
;
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
MQOperationEnum(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static MQOperationEnum fromCode(String code) {
|
||||
for (MQOperationEnum s : values()) {
|
||||
if (s.code.equals(code)) return s;
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown code: " + code);
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package com.dite.znpt.data.bus.enums;
|
||||
|
||||
import com.dite.znpt.data.bus.config.MQHandle;
|
||||
import com.dite.znpt.data.bus.entity.req.ProjectDTO;
|
||||
import com.dite.znpt.data.bus.handles.ProjectHandleImpl;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author cuizhibin
|
||||
* @date 2025/04/22 17:05
|
||||
* @description mq类型枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum MQTypeEnum {
|
||||
PROJECT("project", "项目", ProjectHandleImpl.class, ProjectDTO.class),
|
||||
CREW("crew", "机组", ProjectHandleImpl.class, ProjectDTO.class),
|
||||
PARTS("parts", "部件", ProjectHandleImpl.class, ProjectDTO.class),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String desc;
|
||||
private final Class<? extends MQHandle<?>> impl;
|
||||
private final Class<?> dto;
|
||||
|
||||
MQTypeEnum(String type, String desc, Class<? extends MQHandle<?>> impl, Class<?> dto) {
|
||||
this.type = type;
|
||||
this.desc = desc;
|
||||
this.impl = impl;
|
||||
this.dto = dto;
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package com.dite.znpt.data.bus.handles;
|
||||
|
||||
import com.dite.znpt.data.bus.config.MQHandle;
|
||||
import com.dite.znpt.data.bus.entity.CommonMessage;
|
||||
import com.dite.znpt.data.bus.entity.req.ProjectDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author cuizhibin
|
||||
* @date 2025/04/22 17:11
|
||||
* @description 项目处理
|
||||
*/
|
||||
@Service
|
||||
public class ProjectHandleImpl implements MQHandle<ProjectDTO> {
|
||||
/**
|
||||
* 功能描述:mq处理类
|
||||
*
|
||||
* @param msg 消息
|
||||
* @author cuizhibin
|
||||
* @date 2025/04/22 17:03
|
||||
**/
|
||||
@Override
|
||||
public void handle(CommonMessage<ProjectDTO> msg) {
|
||||
|
||||
}
|
||||
}
|
3
pom.xml
3
pom.xml
|
@ -14,7 +14,6 @@
|
|||
<module>core</module>
|
||||
<module>sip</module>
|
||||
<module>web</module>
|
||||
<module>data-bus</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -32,7 +31,7 @@
|
|||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.22</version>
|
||||
<version>5.8.24</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue