Merge branch 'master' into dite-master
This commit is contained in:
commit
8b5b31e3a1
|
@ -20,7 +20,9 @@ public class Message implements Serializable {
|
|||
public static final String IMAGE_SOURCE_IS_NOT_EXIST = "图像类型不存在";
|
||||
public static final String DEFECT_ID_IS_NOT_EXIST = "缺陷id不存在";
|
||||
public static final String PROJECT_ID_IS_NOT_EXIST = "项目id不存在";
|
||||
public static final String PROJECT_STATUS_IS_NOT_COMPLETED = "项目[{}]的状态不是已完工";
|
||||
public static final String TURBINE_ID_IS_NOT_EXIST = "机组id不存在";
|
||||
public static final String TURBINE_STATUS_IS_NOT_COMPLETED = "机组[{}]的状态不是已完工";
|
||||
public static final String PART_ID_IS_NOT_EXIST = "部件id不存在";
|
||||
public static final String USER_ID_NOT_EXIST = "用户id不存在";
|
||||
public static final String USER_ID_NOT_EXIST_OR_ILLEGAL = "用户id不存在或者不合法";
|
||||
|
@ -67,4 +69,5 @@ public class Message implements Serializable {
|
|||
public static final String SUGGESTION_ID_IS_NOT_EXIST = "维修建议id不存在";
|
||||
public static final String SUGGESTION_LEVEL_TYPE_FORBID_REPEAT = "存在缺陷级别为[{}]缺陷类型为[{}]的维修建议";
|
||||
public static final String CHECK_SCHEME_ID_IS_NOT_EXIST = "检查方案id不存在";
|
||||
public static final String INSPECTION_REPORT_ID_IS_NOT_EXIST = "检查报告id不存在";
|
||||
}
|
||||
|
|
|
@ -108,5 +108,17 @@ public interface Converts {
|
|||
CheckSchemeResp toCheckSchemeResp(CheckSchemeEntity entity);
|
||||
|
||||
CheckSchemeEntity toCheckSchemeEntity(CheckSchemeReq req);
|
||||
|
||||
InspectionReportEntity toInspectionReportEntity(InspectionReportReq req);
|
||||
|
||||
InspectionReportCheckInfo toInspectionReportCheckInfo(InspectionReportEntity entity);
|
||||
|
||||
InspectionReportReportInfo toInspectionReportReportInfo(InspectionReportEntity entity);
|
||||
|
||||
List<InspectionReportSchemeInfo> toInspectionReportSchemeInfo(List<CheckSchemeEntity> list);
|
||||
|
||||
AttendanceRecordEntity toAttendanceRecordEntity(AttendanceRecordReq req);
|
||||
|
||||
List<AttendanceRecordResp> toAttendanceRecordResp(List<AttendanceRecordEntity> list);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
package com.dite.znpt.domain.dto;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>流程定义<p>
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("流程定义")
|
||||
public class FlowProcDefDto implements Serializable {
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("流程名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("流程key")
|
||||
private String flowKey;
|
||||
|
||||
@ApiModelProperty("流程分类")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty("配置表单名称")
|
||||
private String formName;
|
||||
|
||||
@ApiModelProperty("配置表单id")
|
||||
private Long formId;
|
||||
|
||||
@ApiModelProperty("版本")
|
||||
private int version;
|
||||
|
||||
@ApiModelProperty("部署ID")
|
||||
private String deploymentId;
|
||||
|
||||
@ApiModelProperty("流程定义状态: 1:激活 , 2:中止")
|
||||
private int suspensionState;
|
||||
|
||||
@ApiModelProperty("部署时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deploymentTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/21 20:51
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("attendance_record")
|
||||
@ApiModel(value="AttendanceRecordEntity对象", description="打卡记录表")
|
||||
public class AttendanceRecordEntity extends AuditableEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 6186237408298557453L;
|
||||
|
||||
@ApiModelProperty("考勤记录id")
|
||||
@TableId(value = "record_id", type = IdType.ASSIGN_UUID)
|
||||
private String recordId;
|
||||
|
||||
@ApiModelProperty("考勤人员")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("记录类型,0-上班,1-下班,2-无效")
|
||||
private String recordType;
|
||||
|
||||
@ApiModelProperty("考勤日期")
|
||||
private LocalDate attendanceDate;
|
||||
|
||||
@ApiModelProperty("打卡时间")
|
||||
private LocalDateTime recordTime;
|
||||
|
||||
@ApiModelProperty("照片")
|
||||
private String recordImage;
|
||||
|
||||
@ApiModelProperty("打卡地点,经纬度")
|
||||
private String recordPosition;
|
||||
|
||||
@ApiModelProperty("打卡地点,中文描述")
|
||||
private String recordPositionLabel;
|
||||
}
|
|
@ -52,6 +52,6 @@ public class CheckSchemeEntity extends AuditableEntity implements Serializable {
|
|||
private String remark;
|
||||
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
@TableField("delFlag")
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.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/07/21 21:13
|
||||
* @Description: 合同表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("contract")
|
||||
@ApiModel(value="ContractEntity对象", description="合同表")
|
||||
public class ContractEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 782007452634989148L;
|
||||
|
||||
@ExcelProperty("合同id")
|
||||
@ApiModelProperty("合同id")
|
||||
@TableId(value = "contract_id", type = IdType.ASSIGN_ID)
|
||||
private String contractId;
|
||||
|
||||
@ExcelProperty("客户名称")
|
||||
@ApiModelProperty("客户名称")
|
||||
@TableField("customer")
|
||||
private String customer;
|
||||
|
||||
@ExcelProperty("合同编号")
|
||||
@ApiModelProperty("合同编号")
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
|
||||
@ExcelProperty("业务员id")
|
||||
@ApiModelProperty("业务员id")
|
||||
@TableField("salesperson_id")
|
||||
private String salespersonId;
|
||||
|
||||
@ExcelProperty("部门id")
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField("department_id")
|
||||
private String departmentId;
|
||||
|
||||
@ExcelProperty("签订日期")
|
||||
@ApiModelProperty("签订日期")
|
||||
@TableField("sign_date")
|
||||
private Date signDate;
|
||||
|
||||
@ExcelProperty("期限")
|
||||
@ApiModelProperty("期限")
|
||||
@TableField("duration")
|
||||
private String duration;
|
||||
|
||||
@ExcelProperty("类型")
|
||||
@ApiModelProperty("类型")
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty("产品或服务")
|
||||
@ApiModelProperty("产品或服务")
|
||||
@TableField("product_service")
|
||||
private String productService;
|
||||
|
||||
@ExcelProperty("付款日期/交付日期")
|
||||
@ApiModelProperty("付款日期/交付日期")
|
||||
@TableField("payment_date")
|
||||
private Date paymentDate;
|
||||
|
||||
@ExcelProperty("付款地址/交付地址")
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
@TableField("payment_address")
|
||||
private String paymentAddress;
|
||||
|
||||
@ExcelProperty("金额")
|
||||
@ApiModelProperty("金额")
|
||||
@TableField("amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty("收款账号")
|
||||
@ApiModelProperty("收款账号")
|
||||
@TableField("account_number")
|
||||
private String accountNumber;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("notes")
|
||||
private String notes;
|
||||
|
||||
@ExcelProperty("合同状态")
|
||||
@ApiModelProperty("合同状态")
|
||||
@TableField("contract_status")
|
||||
private String contractStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.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/07/21 21:13
|
||||
* @Description: 合同结算表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("contract_settlement")
|
||||
@ApiModel(value="ContractSettlementEntity对象", description="合同结算表")
|
||||
public class ContractSettlementEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -59751771276704650L;
|
||||
|
||||
@ExcelProperty("合同结算id")
|
||||
@ApiModelProperty("合同结算id")
|
||||
@TableId(value = "settlement_id", type = IdType.ASSIGN_ID)
|
||||
private String settlementId;
|
||||
|
||||
@ExcelProperty("合同id")
|
||||
@ApiModelProperty("合同id")
|
||||
@TableField("contract_id")
|
||||
private String contractId;
|
||||
|
||||
@ExcelProperty("客户/供应商名称")
|
||||
@ApiModelProperty("客户/供应商名称")
|
||||
@TableField("customer")
|
||||
private String customer;
|
||||
|
||||
@ExcelProperty("合同结算编号")
|
||||
@ApiModelProperty("合同结算编号")
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
|
||||
@ExcelProperty("业务员id")
|
||||
@ApiModelProperty("业务员id")
|
||||
@TableField("salesperson_id")
|
||||
private String salespersonId;
|
||||
|
||||
@ExcelProperty("部门id")
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField("department_id")
|
||||
private String departmentId;
|
||||
|
||||
@ExcelProperty("账期")
|
||||
@ApiModelProperty("账期")
|
||||
@TableField("payment_period")
|
||||
private Date paymentPeriod;
|
||||
|
||||
@ExcelProperty("日期")
|
||||
@ApiModelProperty("日期")
|
||||
@TableField("payment_date")
|
||||
private Date paymentDate;
|
||||
|
||||
@ExcelProperty("期限")
|
||||
@ApiModelProperty("期限")
|
||||
@TableField("duration")
|
||||
private String duration;
|
||||
|
||||
@ExcelProperty("产品或服务")
|
||||
@ApiModelProperty("产品或服务")
|
||||
@TableField("product_service")
|
||||
private String productService;
|
||||
|
||||
@ExcelProperty("金额")
|
||||
@ApiModelProperty("金额")
|
||||
@TableField("amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty("收款账号")
|
||||
@ApiModelProperty("收款账号")
|
||||
@TableField("account_number")
|
||||
private String accountNumber;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
@ApiModelProperty("备注")
|
||||
@TableField("notes")
|
||||
private String notes;
|
||||
|
||||
@ExcelProperty("合同结算状态")
|
||||
@ApiModelProperty("合同结算状态")
|
||||
@TableField("settlement_status")
|
||||
private String settlementStatus;
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
@ -23,6 +24,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
|||
@ApiModel(value="DefectEntity对象", description="缺陷记录表")
|
||||
public class DefectEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 721961595098309935L;
|
||||
|
||||
@ExcelProperty("缺陷id")
|
||||
|
|
|
@ -56,10 +56,6 @@ public class InspectionReportEntity extends AuditableEntity implements Serializa
|
|||
@TableField("check_date")
|
||||
private LocalDate checkDate;
|
||||
|
||||
@ApiModelProperty("检查位置")
|
||||
@TableField("check_position")
|
||||
private String checkPosition;
|
||||
|
||||
@ApiModelProperty("检查内容")
|
||||
@TableField("check_content")
|
||||
private String checkContent;
|
||||
|
|
|
@ -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/07/17 21:58
|
||||
* @Description: 项目预算信息表实体类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("project_budget_info")
|
||||
@ApiModel(value="ProjectBudgetInfoEntity对象", description="项目预算信息表")
|
||||
public class ProjectBudgetInfoEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 514469235298737990L;
|
||||
|
||||
@ExcelProperty("主键")
|
||||
@ApiModelProperty("主键")
|
||||
@TableId(value = "budget_id", type = IdType.ASSIGN_ID)
|
||||
private String budgetId;
|
||||
|
||||
@ExcelProperty("项目id")
|
||||
@ApiModelProperty("项目id")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
|
||||
@ExcelProperty("预算名称")
|
||||
@ApiModelProperty("预算名称")
|
||||
@TableField("budget_name")
|
||||
private String budgetName;
|
||||
|
||||
@ExcelProperty("预算类型")
|
||||
@ApiModelProperty("预算类型")
|
||||
@TableField("budget_type")
|
||||
private String budgetType;
|
||||
|
||||
@ExcelProperty("预算金额(万元)")
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
@TableField("budget_amount")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ExcelProperty("预算说明")
|
||||
@ApiModelProperty("预算说明")
|
||||
@TableField("budget_desc")
|
||||
private String budgetDesc;
|
||||
}
|
||||
|
|
@ -81,5 +81,9 @@ public class ProjectTaskEntity extends AuditableEntity implements Serializable {
|
|||
@ApiModelProperty("备注")
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,5 +33,9 @@ public class ProjectTaskGroupEntity extends AuditableEntity implements Serializa
|
|||
@ApiModelProperty("项目任务组名")
|
||||
@TableField("group_name")
|
||||
private String groupName;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
@TableField("project_id")
|
||||
private String projectId;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
@ -24,6 +25,9 @@ import java.io.Serializable;
|
|||
@ApiModel(value="RoleMenuEntity对象", description="角色和菜单关联表")
|
||||
public class RoleMenuEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -795955361477553526L;
|
||||
|
||||
@ApiModelProperty("角色id")
|
||||
@TableField("role_id")
|
||||
private String roleId;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/21 21:10
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("考勤记录请求对象")
|
||||
public class AttendanceRecordReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3567864990724491657L;
|
||||
|
||||
@NotBlank(message = "打卡照片不能为空")
|
||||
@ApiModelProperty("打卡照片")
|
||||
private String recordImage;
|
||||
|
||||
@NotBlank(message = "打卡地点不能为空")
|
||||
@ApiModelProperty("打卡地点,经纬度")
|
||||
private String recordPosition;
|
||||
|
||||
@ApiModelProperty("打卡地点,中文描述")
|
||||
private String recordPositionLabel;
|
||||
|
||||
|
||||
}
|
|
@ -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 javax.validation.constraints.NotBlank;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/21 21:11
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("考勤记录响应对象")
|
||||
public class AttendanceRecordResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4158464225924809958L;
|
||||
|
||||
|
||||
@ApiModelProperty("考勤记录id")
|
||||
private String recordId;
|
||||
|
||||
@ApiModelProperty("考勤人员id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("考勤人员")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("记录类型, 0-上班,1-下班,2-无效")
|
||||
private String recordType;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("考勤日期")
|
||||
private LocalDate attendanceDate;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("打卡时间")
|
||||
private LocalDateTime recordTime;
|
||||
|
||||
@ApiModelProperty("打卡照片")
|
||||
private String recordImage;
|
||||
|
||||
@ApiModelProperty("打卡地点,经纬度")
|
||||
private String recordPosition;
|
||||
|
||||
@ApiModelProperty("打卡地点,中文描述")
|
||||
private String recordPositionLabel;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/9 23:35
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("检查方案列表查询请求实体")
|
||||
public class CheckSchemeListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1345082408495150993L;
|
||||
|
||||
@ApiModelProperty("检查方式,枚举CheckMethodEnum")
|
||||
private List<String> checkMethod;
|
||||
}
|
|
@ -44,7 +44,6 @@ public class CheckSchemeReq implements Serializable {
|
|||
@ApiModelProperty("检查方式,枚举CheckMethodEnum")
|
||||
private String checkMethod;
|
||||
|
||||
@NotBlank(message = "备注不能为空")
|
||||
@Size(max = 500, message = "备注不能超过500个字")
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
* @Description: 合同表导入请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="Contract导入请求对象", description="合同表")
|
||||
public class ContractImportReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 416194686656143643L;
|
||||
|
||||
|
||||
@ExcelProperty(value = "客户名称")
|
||||
private String customer;
|
||||
|
||||
@ExcelProperty(value = "合同编号")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ExcelProperty(value = "业务员名称")
|
||||
private String salespersonName;
|
||||
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@ExcelProperty(value = "签订日期")
|
||||
private Date signDate;
|
||||
|
||||
@ExcelProperty(value = "期限")
|
||||
private String duration;
|
||||
|
||||
@ExcelProperty(value = "类型")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty(value = "产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ExcelProperty(value = "付款日期/交付日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ExcelProperty(value = "付款地址/交付地址")
|
||||
private String paymentAddress;
|
||||
|
||||
@ExcelProperty(value = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty(value = "收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String notes;
|
||||
|
||||
@ExcelProperty(value = "合同状态")
|
||||
private String contractStatus;
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
* @Description: 合同请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("合同列表请求实体")
|
||||
public class ContractListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 188906332887614727L;
|
||||
|
||||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("合同Id")
|
||||
private String contractId;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
private String customer;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("业务员id")
|
||||
private String salespersonId;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty("签订日期")
|
||||
private Date signDate;
|
||||
|
||||
@ApiModelProperty("期限")
|
||||
private String duration;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ApiModelProperty("付款日期/交付日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
private String paymentAddress;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String notes;
|
||||
|
||||
@ApiModelProperty("合同状态")
|
||||
private String contractStatus;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
* @Description: 合同表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="Contract请求对象", description="合同表")
|
||||
public class ContractReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -42338861509205617L;
|
||||
|
||||
@ApiModelProperty("合同id")
|
||||
private String contractId;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
private String customer;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("业务员id")
|
||||
private String salespersonId;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty("签订日期")
|
||||
private Date signDate;
|
||||
|
||||
@ApiModelProperty("期限")
|
||||
private String duration;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ApiModelProperty("付款日期/交付日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("付款地址/交付地址")
|
||||
private String paymentAddress;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String notes;
|
||||
|
||||
@ApiModelProperty("合同状态")
|
||||
private String contractStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.ContractEntity;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
* @Description: 合同响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("合同响应实体")
|
||||
public class ContractResp extends ContractEntity {
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("业务员姓名")
|
||||
private String salespersonName;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
private String salespersonDeptName;
|
||||
|
||||
@ApiModelProperty("已结算金额")
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
@ApiModelProperty("已收款金额")
|
||||
private BigDecimal receivedAmount;
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
* @Description: 合同结算表导入请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ContractSettlement导入请求对象", description="合同结算表")
|
||||
public class ContractSettlementImportReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 148613402074177824L;
|
||||
|
||||
|
||||
@ExcelProperty(value = "合同名称(不能为空,长度32以内)")
|
||||
private String contractName;
|
||||
|
||||
@ExcelProperty(value = "客户/供应商名称")
|
||||
private String customer;
|
||||
|
||||
@ExcelProperty(value = "合同结算编号")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ExcelProperty(value = "业务员名称")
|
||||
private String salespersonName;
|
||||
|
||||
@ExcelProperty(value = "部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@ExcelProperty(value = "账期")
|
||||
private Date paymentPeriod;
|
||||
|
||||
@ExcelProperty(value = "日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ExcelProperty(value = "期限")
|
||||
private String duration;
|
||||
|
||||
@ExcelProperty(value = "产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ExcelProperty(value = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty(value = "收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String notes;
|
||||
|
||||
@ExcelProperty(value = "合同结算状态")
|
||||
private String settlementStatus;
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
* @Description: 合同结算请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("合同结算列表请求实体")
|
||||
public class ContractSettlementListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -36243842073737072L;
|
||||
|
||||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("合同结算Id")
|
||||
private String settlementId;
|
||||
|
||||
@ApiModelProperty("合同id")
|
||||
private String contractId;
|
||||
|
||||
@ApiModelProperty("客户/供应商名称")
|
||||
private String customer;
|
||||
|
||||
@ApiModelProperty("合同结算编号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("业务员id")
|
||||
private String salespersonId;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty("账期")
|
||||
private Date paymentPeriod;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("期限")
|
||||
private String duration;
|
||||
|
||||
@ApiModelProperty("产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String notes;
|
||||
|
||||
@ApiModelProperty("合同结算状态")
|
||||
private String settlementStatus;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import com.dite.znpt.util.ValidationGroup;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:13
|
||||
* @Description: 合同结算表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ContractSettlement请求对象", description="合同结算表")
|
||||
public class ContractSettlementReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -44768849127704946L;
|
||||
|
||||
@ApiModelProperty("合同结算id")
|
||||
private String settlementId;
|
||||
|
||||
@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 contractId;
|
||||
|
||||
@ApiModelProperty("客户/供应商名称")
|
||||
private String customer;
|
||||
|
||||
@ApiModelProperty("合同结算编号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("业务员id")
|
||||
private String salespersonId;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String departmentId;
|
||||
|
||||
@ApiModelProperty("账期")
|
||||
private Date paymentPeriod;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
private Date paymentDate;
|
||||
|
||||
@ApiModelProperty("期限")
|
||||
private String duration;
|
||||
|
||||
@ApiModelProperty("产品或服务")
|
||||
private String productService;
|
||||
|
||||
@ApiModelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String notes;
|
||||
|
||||
@ApiModelProperty("合同结算状态")
|
||||
private String settlementStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.dite.znpt.domain.entity.ContractSettlementEntity;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
* @Description: 合同结算响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("合同结算响应实体")
|
||||
public class ContractSettlementResp extends ContractSettlementEntity {
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ 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.Serializable;
|
||||
|
||||
|
@ -12,6 +13,7 @@ import java.io.Serializable;
|
|||
* @Description: 缺陷记录请求实体
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("缺陷记录列表请求实体")
|
||||
public class DefectListReq implements Serializable {
|
||||
|
||||
|
|
|
@ -28,12 +28,27 @@ public class DefectListResp implements Serializable {
|
|||
@ApiModelProperty("部件名称")
|
||||
private String partName;
|
||||
|
||||
@ApiModelProperty("缺陷未知")
|
||||
@ApiModelProperty("缺陷类型描述")
|
||||
private String defectTypeLabel;
|
||||
|
||||
@ApiModelProperty("缺陷类型,枚举DefectTypeEnum")
|
||||
private String defectType;
|
||||
|
||||
@ApiModelProperty("危重等级描述")
|
||||
private String defectLevelLabel;
|
||||
|
||||
@ApiModelProperty("危重等级,枚举DefectLevelEnum")
|
||||
private String defectLevel;
|
||||
|
||||
@ApiModelProperty("缺陷位置")
|
||||
private String defectPosition;
|
||||
|
||||
@ApiModelProperty("说明")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("维修建议")
|
||||
private String repairIdea;
|
||||
|
||||
@ApiModelProperty("标注信息")
|
||||
private String labelInfo;
|
||||
|
||||
|
|
|
@ -24,15 +24,18 @@ public class InspectionReportCheckInfo implements Serializable {
|
|||
@ApiModelProperty("检查日期")
|
||||
private LocalDate checkDate;
|
||||
|
||||
@ApiModelProperty("检查位置")
|
||||
private String checkPosition;
|
||||
|
||||
@ApiModelProperty("检查内容")
|
||||
private String checkContent;
|
||||
|
||||
@ApiModelProperty("检查方式")
|
||||
private String checkMethod;
|
||||
|
||||
@ApiModelProperty("检查方式描述")
|
||||
private String checkMethodLabel;
|
||||
|
||||
@ApiModelProperty("检查人员id,多个人员英文逗号分隔")
|
||||
private String checkUserId;
|
||||
|
||||
@ApiModelProperty("检查人员")
|
||||
private String checkUserName;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/14/周一 15:32
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("检查报告列表请求实体")
|
||||
public class InspectionReportListReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -8122588121700840604L;
|
||||
|
||||
@ApiModelProperty("主标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("副标题")
|
||||
private String subTile;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("机组id")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("风场名字")
|
||||
private String farmName;
|
||||
|
||||
@ApiModelProperty("委托单位")
|
||||
private String client;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
* @date 2025/7/14/周一 15:32
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("检查报告列表响应实体")
|
||||
public class InspectionReportListResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7652873535955803183L;
|
||||
|
||||
@ApiModelProperty("报告id")
|
||||
private String reportId;
|
||||
|
||||
@ApiModelProperty("主标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("副标题")
|
||||
private String subTitle;
|
||||
|
||||
@ApiModelProperty("报告编制人员id")
|
||||
private String reportWriter;
|
||||
|
||||
@ApiModelProperty("报告编制人员")
|
||||
private String reportWriterName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("报告编制时间")
|
||||
private LocalDateTime reportWriteTime;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("风场名字")
|
||||
private String farmName;
|
||||
|
||||
@ApiModelProperty("委托单位")
|
||||
private String client;
|
||||
|
||||
@ApiModelProperty("机组id")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("机组名称")
|
||||
private String turbineName;
|
||||
|
||||
@ApiModelProperty("机组编码")
|
||||
private String turbineCode;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -15,8 +15,8 @@ import java.time.LocalDateTime;
|
|||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("检查报告封面信息")
|
||||
public class InspectionReportCoverInfo implements Serializable {
|
||||
@ApiModel("检查报告信息")
|
||||
public class InspectionReportReportInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2416173276374292199L;
|
||||
|
||||
|
@ -38,6 +38,7 @@ public class InspectionReportCoverInfo implements Serializable {
|
|||
@ApiModelProperty("报告编制人员")
|
||||
private String reportWriterName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("报告编制时间")
|
||||
private LocalDateTime reportWriteTime;
|
||||
|
||||
|
@ -47,6 +48,7 @@ public class InspectionReportCoverInfo implements Serializable {
|
|||
@ApiModelProperty("报告复核人员")
|
||||
private String reportReviewerName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("报告复核时间")
|
||||
private LocalDateTime reportReviewTime;
|
||||
|
||||
|
@ -56,6 +58,8 @@ public class InspectionReportCoverInfo implements Serializable {
|
|||
@ApiModelProperty("报告审核人员")
|
||||
private String reportAuditName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("报告审核时间")
|
||||
private LocalDateTime reportAuditTime;
|
||||
|
||||
}
|
|
@ -1,17 +1,16 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
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.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
|
@ -24,55 +23,68 @@ public class InspectionReportReq implements Serializable {
|
|||
@Serial
|
||||
private static final long serialVersionUID = 4937399975205847660L;
|
||||
|
||||
@ApiModelProperty("报告id")
|
||||
private String reportId;
|
||||
|
||||
@NotBlank(message = "主标题不能为空")
|
||||
@Size(max = 50, message = "主标题长度不能超过50")
|
||||
@ApiModelProperty("主标题")
|
||||
private String title;
|
||||
|
||||
@NotBlank(message = "副标题不能为空")
|
||||
@Size(max = 50, message = "副标题长度不能超过50")
|
||||
@ApiModelProperty("副标题")
|
||||
private String subTitle;
|
||||
|
||||
@ApiModelProperty("封面")
|
||||
private String coverImage;
|
||||
|
||||
@NotBlank(message = "项目id不能为空")
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@NotBlank(message = "机组id不能为空")
|
||||
@ApiModelProperty("机组id")
|
||||
private String turbineId;
|
||||
|
||||
@NotNull(message = "检查日期不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty("检查日期")
|
||||
private LocalDate checkDate;
|
||||
|
||||
@ApiModelProperty("检查位置")
|
||||
private String checkPosition;
|
||||
|
||||
@NotBlank(message = "检查内容不能为空")
|
||||
@ApiModelProperty("检查内容")
|
||||
private String checkContent;
|
||||
|
||||
@ApiModelProperty("检查方式,多个方式英文逗号分隔")
|
||||
@NotBlank(message = "检查内容不能为空")
|
||||
@ApiModelProperty("检查方式,多个方式英文逗号分隔,枚举:CheckMethodEnum")
|
||||
private String checkMethod;
|
||||
|
||||
@NotBlank(message = "检查人员不能为空")
|
||||
@ApiModelProperty("检查人员id,多个人员英文逗号分隔")
|
||||
private String checkUserId;
|
||||
|
||||
@NotBlank(message = "报告编制人员不能为空")
|
||||
@ApiModelProperty("报告编制人员id")
|
||||
private String reportWriter;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "报告编制时间不能为空")
|
||||
@ApiModelProperty("报告编制时间")
|
||||
private LocalDateTime reportWriteTime;
|
||||
private LocalDate reportWriteTime;
|
||||
|
||||
@NotBlank(message = "报告复核人员不能为空")
|
||||
@ApiModelProperty("报告复核人员id")
|
||||
private String reportReviewer;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "报告复核时间不能为空")
|
||||
@ApiModelProperty("报告复核时间")
|
||||
private LocalDateTime reportReviewTime;
|
||||
private LocalDate reportReviewTime;
|
||||
|
||||
@NotBlank(message = "报告审核人员不能为空")
|
||||
@ApiModelProperty("报告审核人员id")
|
||||
private String reportAuditor;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "报告审核时间不能为空")
|
||||
@ApiModelProperty("报告审核时间")
|
||||
private LocalDateTime reportAuditTime;
|
||||
private LocalDate reportAuditTime;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ 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;
|
||||
|
@ -14,13 +15,14 @@ import java.util.List;
|
|||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("检查报告响应实体")
|
||||
public class InspectionReportResp implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2229157312487991799L;
|
||||
|
||||
@ApiModelProperty("封面信息")
|
||||
private InspectionReportCoverInfo coverInfo;
|
||||
private InspectionReportReportInfo reportInfo;
|
||||
|
||||
@ApiModelProperty("项目信息")
|
||||
private ProjectResp projectInfo;
|
||||
|
@ -35,5 +37,5 @@ public class InspectionReportResp implements Serializable {
|
|||
private List<CheckSchemeResp> schemeInfoList;
|
||||
|
||||
@ApiModelProperty("缺陷信息")
|
||||
private List<DefectResp> defectInfoList;
|
||||
private List<DefectListResp> defectInfoList;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.io.Serializable;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
|
@ -12,6 +13,7 @@ import lombok.Data;
|
|||
* @Description: 请求实体
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel("部件列表请求实体")
|
||||
public class PartListReq implements Serializable {
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息表导入请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectBudgetInfo导入请求对象", description="项目预算信息表")
|
||||
public class ProjectBudgetInfoImportReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 580212651388155611L;
|
||||
|
||||
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ExcelProperty(value = "预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ExcelProperty(value = "预算类型")
|
||||
private String budgetType;
|
||||
|
||||
@ExcelProperty(value = "预算金额(万元)")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ExcelProperty(value = "预算说明")
|
||||
private String budgetDesc;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
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/07/17 21:58
|
||||
* @Description: 项目预算信息请求实体
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("项目预算信息列表请求实体")
|
||||
public class ProjectBudgetInfoListReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 539751666379021505L;
|
||||
|
||||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("项目预算信息Id")
|
||||
private String budgetId;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ApiModelProperty("预算类型")
|
||||
private String budgetType;
|
||||
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ApiModelProperty("预算说明")
|
||||
private String budgetDesc;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息列表响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目预算信息列表响应实体")
|
||||
public class ProjectBudgetInfoListResp extends ProjectBudgetInfoEntity {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
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/07/17 21:58
|
||||
* @Description: 项目预算信息表请求类
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ProjectBudgetInfo请求对象", description="项目预算信息表")
|
||||
public class ProjectBudgetInfoReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 778519049897573879L;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty("预算名称")
|
||||
private String budgetName;
|
||||
|
||||
@ApiModelProperty("预算类型")
|
||||
private String budgetType;
|
||||
|
||||
@ApiModelProperty("预算金额(万元)")
|
||||
private Double budgetAmount;
|
||||
|
||||
@ApiModelProperty("预算说明")
|
||||
private String budgetDesc;
|
||||
|
||||
@ApiModelProperty("附件id")
|
||||
private String attachId;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息响应实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("项目预算信息响应实体")
|
||||
public class ProjectBudgetInfoResp extends ProjectBudgetInfoEntity {
|
||||
|
||||
@ApiModelProperty("预算类型描述")
|
||||
private String budgetTypeDesc;
|
||||
}
|
||||
|
|
@ -41,5 +41,8 @@ public class ProjectListReq implements Serializable {
|
|||
@ApiModelProperty("项目结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty(value = "用户id", hidden = true)
|
||||
private String userId;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -90,4 +90,16 @@ public class ProjectListResp implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty(value = "未开始任务数")
|
||||
private Integer taskPendingCount;
|
||||
|
||||
@ApiModelProperty(value = "进行中任务数")
|
||||
private Integer taskProgressCount;
|
||||
|
||||
@ApiModelProperty(value = "已完成任务数")
|
||||
private Integer taskCompleteCount;
|
||||
|
||||
@ApiModelProperty(value = "总任务数")
|
||||
private Integer taskCount;
|
||||
}
|
||||
|
|
|
@ -29,5 +29,8 @@ public class ProjectTaskGroupListReq implements Serializable {
|
|||
@ApiModelProperty("任务名称/负责人")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
|
@ -34,5 +35,9 @@ public class ProjectTaskGroupReq implements Serializable {
|
|||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 100, message = "项目任务组名长度不能超过100字符")
|
||||
@ApiModelProperty("项目任务组名")
|
||||
private String groupName;
|
||||
|
||||
@NotNull(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目id不能为空")
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,5 +21,7 @@ public class ProjectTaskGroupResp extends ProjectTaskGroupEntity {
|
|||
|
||||
@ApiModelProperty("任务列表")
|
||||
private List<ProjectTaskResp> taskList;
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.dite.znpt.domain.vo;
|
|||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
@ -60,4 +61,7 @@ public class ProjectTaskImportReq implements Serializable {
|
|||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
}
|
||||
|
|
|
@ -65,5 +65,11 @@ public class ProjectTaskListReq implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "导出?", hidden = true)
|
||||
private Boolean isExport;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
@ApiModelProperty(value = "用户id", hidden = true)
|
||||
private String userId;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,5 +80,9 @@ public class ProjectTaskReq implements Serializable {
|
|||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@NotNull(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, message = "项目id不能为空")
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,5 +23,7 @@ public class ProjectTaskResp extends ProjectTaskEntity {
|
|||
|
||||
@ApiModelProperty("附件列表")
|
||||
private List<AttachInfoEntity> attachList;
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public class TurbineResp implements Serializable {
|
|||
@Serial
|
||||
private static final long serialVersionUID = -1403719853347580858L;
|
||||
|
||||
@ApiModelProperty("机组号")
|
||||
@ApiModelProperty("机组id")
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("项目id")
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
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 WorkbenchInfoResp {
|
||||
|
||||
@ApiModelProperty("项目数量")
|
||||
private long projectCount;
|
||||
|
||||
@ApiModelProperty("进行中任务")
|
||||
private long progressTaskCount;
|
||||
|
||||
@ApiModelProperty("待审核报告数")
|
||||
private long approvalReportCount;
|
||||
|
||||
@ApiModelProperty("发现缺陷数")
|
||||
private long findDefectCount;
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@ public enum AttachBusinessTypeEnum {
|
|||
INSURANCE_FILE("insurance", "保险文件"),
|
||||
MODEL_FILE("model", "模型文件"),
|
||||
DEFECT_MARK_PIC("defect_mark_pic", "缺陷标注图片"),
|
||||
REPORT("report", "报告"),
|
||||
PROJECT_BUDGE("project_budge", "预算文件"),
|
||||
;
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
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/5/7 21:22
|
||||
* @Description:
|
||||
*/
|
||||
@Getter
|
||||
public enum BudgeTypeEnum {
|
||||
PROCUREMENT("procurement", "采购"),
|
||||
ARTIFICIAL("artificial", "人工"),
|
||||
MANAGEMENT_FEE("managementFee", "管理费"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
BudgeTypeEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static BudgeTypeEnum getByCode(String code){
|
||||
for (BudgeTypeEnum e : BudgeTypeEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code){
|
||||
BudgeTypeEnum e = getByCode(code);
|
||||
return null == e ? null : e.desc;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(BudgeTypeEnum.values().length);
|
||||
for (BudgeTypeEnum e : BudgeTypeEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.AttendanceRecordEntity;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/21 21:19
|
||||
* @Description:
|
||||
*/
|
||||
public interface AttendanceRecordMapper extends BaseMapper<AttendanceRecordEntity> {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ContractEntity;
|
||||
import com.dite.znpt.domain.vo.ContractListReq;
|
||||
import com.dite.znpt.domain.vo.ContractResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
* @Description: 合同表数据库访问层
|
||||
*/
|
||||
public interface ContractMapper extends BaseMapper<ContractEntity> {
|
||||
List<ContractResp> queryBySelective(ContractListReq contractReq);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ContractSettlementEntity;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementListReq;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
* @Description: 合同结算表数据库访问层
|
||||
*/
|
||||
public interface ContractSettlementMapper extends BaseMapper<ContractSettlementEntity> {
|
||||
List<ContractSettlementResp> queryBySelective(ContractSettlementListReq contractSettlementReq);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
|
||||
import com.dite.znpt.domain.dto.FlowProcDefDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程定义查询
|
||||
*
|
||||
* @author Tony
|
||||
* @email
|
||||
* @date 2022/1/29 5:44 下午
|
||||
**/
|
||||
public interface FlowDeployMapper {
|
||||
|
||||
/**
|
||||
* 流程定义列表
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
List<FlowProcDefDto> selectDeployList(String name);
|
||||
}
|
|
@ -2,6 +2,12 @@ package com.dite.znpt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.InspectionReportEntity;
|
||||
import com.dite.znpt.domain.vo.InspectionReportListReq;
|
||||
import com.dite.znpt.domain.vo.InspectionReportListResp;
|
||||
import com.dite.znpt.domain.vo.InspectionReportResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -9,4 +15,7 @@ import com.dite.znpt.domain.entity.InspectionReportEntity;
|
|||
* @description
|
||||
*/
|
||||
public interface InspectionReportMapper extends BaseMapper<InspectionReportEntity> {
|
||||
|
||||
List<InspectionReportListResp> listInspectionReportListResp(@Param("req") InspectionReportListReq req);
|
||||
InspectionReportResp getInspectionReportResp(@Param("reportId") String reportId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息表数据库访问层
|
||||
*/
|
||||
public interface ProjectBudgetInfoMapper extends BaseMapper<ProjectBudgetInfoEntity> {
|
||||
List<ProjectBudgetInfoListResp> queryBySelective(ProjectBudgetInfoListReq projectBudgetInfoReq);
|
||||
List<ProjectBudgetInfoResp> detailByProjectId(String projectId);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.AttendanceRecordEntity;
|
||||
import com.dite.znpt.domain.vo.AttendanceRecordReq;
|
||||
import com.dite.znpt.domain.vo.AttendanceRecordResp;
|
||||
import io.swagger.models.auth.In;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/21 21:20
|
||||
* @Description:
|
||||
*/
|
||||
public interface AttendanceRecordService extends IService<AttendanceRecordEntity> {
|
||||
|
||||
void save(AttendanceRecordReq req);
|
||||
|
||||
List<AttendanceRecordResp> listToday(String userId);
|
||||
|
||||
List<AttendanceRecordResp> listMonth(String userId, Integer year, Integer month);
|
||||
}
|
|
@ -13,8 +13,8 @@ import java.util.List;
|
|||
* @Description:
|
||||
*/
|
||||
public interface CheckSchemeService extends IService<CheckSchemeEntity> {
|
||||
List<CheckSchemeResp> page(String checkMethod);
|
||||
List<CheckSchemeResp> list(String checkMethod);
|
||||
List<CheckSchemeResp> page(List<String> checkMethods);
|
||||
List<CheckSchemeResp> list(List<String> checkMethods);
|
||||
CheckSchemeResp detail(String checkSchemeId);
|
||||
void save(CheckSchemeReq req);
|
||||
void update(String checkSchemeId, CheckSchemeReq req);
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ContractEntity;
|
||||
import com.dite.znpt.domain.vo.ContractListReq;
|
||||
import com.dite.znpt.domain.vo.ContractResp;
|
||||
import com.dite.znpt.domain.vo.ContractReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
* @Description: 合同表服务接口
|
||||
*/
|
||||
public interface ContractService extends IService<ContractEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询合同列表
|
||||
*
|
||||
* @param contractReq 合同
|
||||
* @return {@link List }<{@link ContractResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
List<ContractResp> selectList(ContractListReq contractReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条合同
|
||||
*
|
||||
* @param contractId 合同Id
|
||||
* @return {@link ContractResp }
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
ContractResp selectById(String contractId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增合同
|
||||
*
|
||||
* @param contractReq 合同
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
void saveData(ContractReq contractReq);
|
||||
|
||||
/**
|
||||
* 功能描述:更新合同
|
||||
*
|
||||
* @param contractReq 合同
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
void updateData(ContractReq contractReq);
|
||||
|
||||
/**
|
||||
* 功能描述:删除合同
|
||||
*
|
||||
* @param contractId 合同Id
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
void deleteById(String contractId);
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ContractSettlementEntity;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementListReq;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementResp;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
* @Description: 合同结算表服务接口
|
||||
*/
|
||||
public interface ContractSettlementService extends IService<ContractSettlementEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询合同结算列表
|
||||
*
|
||||
* @param contractSettlementReq 合同结算
|
||||
* @return {@link List }<{@link ContractSettlementResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
**/
|
||||
List<ContractSettlementResp> selectList(ContractSettlementListReq contractSettlementReq);
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条合同结算
|
||||
*
|
||||
* @param settlementId 合同结算Id
|
||||
* @return {@link ContractSettlementResp }
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
**/
|
||||
ContractSettlementResp selectById(String settlementId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增合同结算
|
||||
*
|
||||
* @param contractSettlementReq 合同结算
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
**/
|
||||
void saveData(ContractSettlementReq contractSettlementReq);
|
||||
}
|
||||
|
|
@ -2,6 +2,12 @@ package com.dite.znpt.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.InspectionReportEntity;
|
||||
import com.dite.znpt.domain.vo.InspectionReportListReq;
|
||||
import com.dite.znpt.domain.vo.InspectionReportListResp;
|
||||
import com.dite.znpt.domain.vo.InspectionReportReq;
|
||||
import com.dite.znpt.domain.vo.InspectionReportResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -9,4 +15,9 @@ import com.dite.znpt.domain.entity.InspectionReportEntity;
|
|||
* @description
|
||||
*/
|
||||
public interface InspectionReportService extends IService<InspectionReportEntity> {
|
||||
List<InspectionReportListResp> page(InspectionReportListReq req);
|
||||
List<InspectionReportListResp> list(InspectionReportListReq req);
|
||||
InspectionReportResp detail(String reportId);
|
||||
void save(InspectionReportReq req);
|
||||
void update(String reportId, InspectionReportReq req);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息表服务接口
|
||||
*/
|
||||
public interface ProjectBudgetInfoService extends IService<ProjectBudgetInfoEntity> {
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目预算信息列表
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息
|
||||
* @return {@link List }<{@link ProjectBudgetInfoListResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
List<ProjectBudgetInfoListResp> selectList(ProjectBudgetInfoListReq projectBudgetInfoReq);
|
||||
|
||||
/**
|
||||
* 功能描述:根据项目id获取项目预算信息列表
|
||||
*
|
||||
* @param projectId 项目id
|
||||
* @return {@link List }<{@link ProjectBudgetInfoListResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
List<ProjectBudgetInfoResp> detailByProjectId(String projectId);
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目预算信息
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
void saveData(List<ProjectBudgetInfoReq> projectBudgetInfoReq);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.dite.znpt.domain.vo.WorkbenchInfoResp;
|
||||
|
||||
public interface WorkbenchService {
|
||||
|
||||
/**
|
||||
* 功能描述:获取工作台信息
|
||||
*
|
||||
* @return {@link WorkbenchInfoResp }
|
||||
* @author cuizhibin
|
||||
* @date 2025/07/21 21:27
|
||||
**/
|
||||
WorkbenchInfoResp getInfo();
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
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.AttendanceRecordEntity;
|
||||
import com.dite.znpt.domain.entity.UserEntity;
|
||||
import com.dite.znpt.domain.vo.AttendanceRecordReq;
|
||||
import com.dite.znpt.domain.vo.AttendanceRecordResp;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.AttendanceRecordMapper;
|
||||
import com.dite.znpt.service.AttendanceRecordService;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/7/21 21:20
|
||||
* @Description:
|
||||
*/
|
||||
@Service
|
||||
public class AttendanceRecordServiceImpl extends ServiceImpl<AttendanceRecordMapper, AttendanceRecordEntity> implements AttendanceRecordService {
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(AttendanceRecordReq req) {
|
||||
AttendanceRecordEntity entity = Converts.INSTANCE.toAttendanceRecordEntity(req);
|
||||
entity.setUserId(StpUtil.getLoginId().toString());
|
||||
List<AttendanceRecordEntity> list = this.list(Wrappers.<AttendanceRecordEntity>lambdaQuery()
|
||||
.eq(AttendanceRecordEntity::getUserId, entity.getUserId())
|
||||
.eq(AttendanceRecordEntity::getAttendanceDate, LocalDate.now())
|
||||
.orderByAsc(AttendanceRecordEntity::getCreateTime)
|
||||
);
|
||||
if(list.isEmpty()){
|
||||
entity.setRecordType("0");
|
||||
}else {
|
||||
entity.setRecordType("1");
|
||||
List<AttendanceRecordEntity> invalidRecordList = list.stream().filter(record -> "1".equals(record.getRecordType())).collect(Collectors.toList());
|
||||
invalidRecordList.forEach(record -> {
|
||||
record.setRecordType("2");
|
||||
});
|
||||
this.updateBatchById(invalidRecordList);
|
||||
}
|
||||
this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AttendanceRecordResp> listToday(String userId) {
|
||||
List<AttendanceRecordResp> list = Converts.INSTANCE.toAttendanceRecordResp(
|
||||
this.list(Wrappers.<AttendanceRecordEntity>lambdaQuery()
|
||||
.eq(AttendanceRecordEntity::getUserId, userId)
|
||||
.eq(AttendanceRecordEntity::getAttendanceDate, LocalDate.now())
|
||||
.orderByAsc(AttendanceRecordEntity::getCreateTime)
|
||||
)
|
||||
);
|
||||
UserEntity user = userService.getById(userId);
|
||||
list.forEach(resp -> {
|
||||
resp.setName(user.getName());
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AttendanceRecordResp> listMonth(String userId, Integer year, Integer month) {
|
||||
LocalDate beginDate = LocalDate.of(year, month, 1);
|
||||
LocalDate endDate = beginDate.plusMonths(1L);
|
||||
List<AttendanceRecordResp> list = Converts.INSTANCE.toAttendanceRecordResp(
|
||||
this.list(Wrappers.<AttendanceRecordEntity>lambdaQuery()
|
||||
.eq(AttendanceRecordEntity::getUserId, userId)
|
||||
.ge(AttendanceRecordEntity::getAttendanceDate, beginDate)
|
||||
.lt(AttendanceRecordEntity::getAttendanceDate, endDate)
|
||||
.orderByAsc(AttendanceRecordEntity::getCreateTime)
|
||||
)
|
||||
);
|
||||
UserEntity user = userService.getById(userId);
|
||||
list.forEach(resp -> {
|
||||
resp.setName(user.getName());
|
||||
});
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -28,14 +28,16 @@ import java.util.List;
|
|||
public class CheckSchemeServiceImpl extends ServiceImpl<CheckSchemeMapper, CheckSchemeEntity> implements CheckSchemeService {
|
||||
|
||||
@Override
|
||||
public List<CheckSchemeResp> page(String checkMethod) {
|
||||
public List<CheckSchemeResp> page(List<String> checkMethods) {
|
||||
PageUtil.startPage();
|
||||
return this.list(checkMethod);
|
||||
return this.list(checkMethods);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CheckSchemeResp> list(String checkMethod) {
|
||||
List<CheckSchemeResp> result = Converts.INSTANCE.toCheckSchemeResp(this.list(Wrappers.lambdaQuery(CheckSchemeEntity.class).eq(StrUtil.isNotBlank(checkMethod), CheckSchemeEntity::getCheckMethod, checkMethod)));
|
||||
public List<CheckSchemeResp> list(List<String> checkMethods) {
|
||||
List<CheckSchemeResp> result = Converts.INSTANCE.toCheckSchemeResp(
|
||||
this.list(Wrappers.lambdaQuery(CheckSchemeEntity.class).in(null != checkMethods && !checkMethods.isEmpty(), CheckSchemeEntity::getCheckMethod, checkMethods))
|
||||
);
|
||||
result.forEach(resp -> {
|
||||
resp.setCheckMethodLabel(CheckMethodEnum.getDescByCode(resp.getCheckMethod()));
|
||||
});
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
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.ContractEntity;
|
||||
import com.dite.znpt.domain.vo.ContractListReq;
|
||||
import com.dite.znpt.domain.vo.ContractResp;
|
||||
import com.dite.znpt.domain.vo.ContractReq;
|
||||
import com.dite.znpt.service.ContractService;
|
||||
import com.dite.znpt.mapper.ContractMapper;
|
||||
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/07/21 20:29
|
||||
* @Description: 合同表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEntity> implements ContractService {
|
||||
|
||||
/**
|
||||
* 功能描述:查询合同列表
|
||||
*
|
||||
* @param contractReq 合同信息
|
||||
* @return {@link List }<{@link ContractResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
@Override
|
||||
public List<ContractResp> selectList(ContractListReq contractReq) {
|
||||
PageUtil.startPage();
|
||||
List<ContractResp> contractList= this.baseMapper.queryBySelective(contractReq);
|
||||
contractList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return contractList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条合同
|
||||
*
|
||||
* @param contractId 合同Id
|
||||
* @return {@link ContractResp }
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
@Override
|
||||
public ContractResp selectById(String contractId) {
|
||||
ContractListReq contractReq = new ContractListReq();
|
||||
contractReq.setContractId(contractId);
|
||||
|
||||
List<ContractResp> list = selectList(contractReq);
|
||||
return CollUtil.isNotEmpty(list) ? CollUtil.getFirst(list) : new ContractResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增合同
|
||||
*
|
||||
* @param contractReq 合同
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
@Override
|
||||
public void saveData(ContractReq contractReq) {
|
||||
// todo 校验
|
||||
ContractEntity entity = BeanUtil.copyProperties(contractReq, ContractEntity.class);
|
||||
save(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:更新合同
|
||||
*
|
||||
* @param contractReq 合同
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
@Override
|
||||
public void updateData(ContractReq contractReq) {
|
||||
// todo 校验
|
||||
ContractEntity entity = BeanUtil.copyProperties(contractReq, ContractEntity.class);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:删除合同
|
||||
*
|
||||
* @param contractId 合同Id
|
||||
* @author huise23
|
||||
* @date 2025/07/21 20:29
|
||||
**/
|
||||
@Override
|
||||
public void deleteById(String contractId) {
|
||||
// todo 校验
|
||||
removeById(contractId);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
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.ContractSettlementEntity;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementListReq;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementResp;
|
||||
import com.dite.znpt.domain.vo.ContractSettlementReq;
|
||||
import com.dite.znpt.service.ContractSettlementService;
|
||||
import com.dite.znpt.mapper.ContractSettlementMapper;
|
||||
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/07/21 21:10
|
||||
* @Description: 合同结算表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ContractSettlementServiceImpl extends ServiceImpl<ContractSettlementMapper, ContractSettlementEntity> implements ContractSettlementService {
|
||||
|
||||
/**
|
||||
* 功能描述:查询合同结算列表
|
||||
*
|
||||
* @param contractSettlementReq 合同结算信息
|
||||
* @return {@link List }<{@link ContractSettlementResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
**/
|
||||
@Override
|
||||
public List<ContractSettlementResp> selectList(ContractSettlementListReq contractSettlementReq) {
|
||||
PageUtil.startPage();
|
||||
List<ContractSettlementResp> contractSettlementList= this.baseMapper.queryBySelective(contractSettlementReq);
|
||||
contractSettlementList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return contractSettlementList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:查询单条合同结算
|
||||
*
|
||||
* @param settlementId 合同结算Id
|
||||
* @return {@link ContractSettlementResp }
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
**/
|
||||
@Override
|
||||
public ContractSettlementResp selectById(String settlementId) {
|
||||
ContractSettlementListReq contractSettlementReq = new ContractSettlementListReq();
|
||||
contractSettlementReq.setSettlementId(settlementId);
|
||||
|
||||
List<ContractSettlementResp> list = selectList(contractSettlementReq);
|
||||
return CollUtil.isNotEmpty(list) ? CollUtil.getFirst(list) : new ContractSettlementResp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增合同结算
|
||||
*
|
||||
* @param contractSettlementReq 合同结算
|
||||
* @author huise23
|
||||
* @date 2025/07/21 21:10
|
||||
**/
|
||||
@Override
|
||||
public void saveData(ContractSettlementReq contractSettlementReq) {
|
||||
// todo 校验
|
||||
ContractSettlementEntity entity = BeanUtil.copyProperties(contractSettlementReq, ContractSettlementEntity.class);
|
||||
save(entity);
|
||||
}
|
||||
|
||||
}
|
|
@ -71,6 +71,8 @@ public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> i
|
|||
public List<DefectListResp> list(DefectListReq req) {
|
||||
List<DefectListResp> defectList= this.baseMapper.queryBySelective(req);
|
||||
defectList.forEach(defect -> {
|
||||
defect.setDefectTypeLabel(DefectTypeEnum.getDescByCode(defect.getDefectType()));
|
||||
defect.setDefectLevelLabel(DefectLevelEnum.getDescByCode(defect.getDefectLevel()));
|
||||
defect.setMarkInfo(JSONUtil.toBean(defect.getLabelInfo(), Detection.class));
|
||||
});
|
||||
return defectList;
|
||||
|
|
|
@ -161,6 +161,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
String path = temPathPrefix + file.getOriginalFilename();
|
||||
FileUtil.writeBytes(file.getBytes(),path);
|
||||
ImageReq imageReq = imageRespBuilder(path);
|
||||
imageReq.setImageId(IdUtil.simpleUUID());
|
||||
BeanUtil.copyProperties(imageReq, imageEntity);
|
||||
list.add(imageReq);
|
||||
imageEntity.setImagePath(FilePathEnum.IMAGE_TEMP.getFileDownPath(path));
|
||||
|
|
|
@ -1,12 +1,25 @@
|
|||
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.domain.entity.InspectionReportEntity;
|
||||
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.CheckMethodEnum;
|
||||
import com.dite.znpt.enums.ProjectStatusEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.InspectionReportMapper;
|
||||
import com.dite.znpt.service.*;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Bear.G
|
||||
|
@ -14,7 +27,112 @@ import java.io.Serializable;
|
|||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class InspectionReportServiceImpl extends ServiceImpl<InspectionReportMapper, InspectionReportEntity> implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1460849450000057636L;
|
||||
public class InspectionReportServiceImpl extends ServiceImpl<InspectionReportMapper, InspectionReportEntity> implements InspectionReportService {
|
||||
|
||||
@Resource
|
||||
private ProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private TurbineService turbineService;
|
||||
|
||||
@Resource
|
||||
private DefectService defectService;
|
||||
|
||||
@Resource
|
||||
private CheckSchemeService checkSchemeService;
|
||||
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public List<InspectionReportListResp> page(InspectionReportListReq req) {
|
||||
PageUtil.startPage();
|
||||
return this.list(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectionReportListResp> list(InspectionReportListReq req) {
|
||||
return this.baseMapper.listInspectionReportListResp(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspectionReportResp detail(String reportId) {
|
||||
InspectionReportEntity inspectionReport = this.getById(reportId);
|
||||
if(null == inspectionReport){
|
||||
throw new ServiceException(Message.INSPECTION_REPORT_ID_IS_NOT_EXIST);
|
||||
}
|
||||
InspectionReportResp result = new InspectionReportResp();
|
||||
List<String> userIds = new ArrayList<>();
|
||||
InspectionReportReportInfo reportInfo = Converts.INSTANCE.toInspectionReportReportInfo(inspectionReport);
|
||||
userIds.add(reportInfo.getReportAuditor());
|
||||
userIds.add(reportInfo.getReportWriter());
|
||||
userIds.add(reportInfo.getReportReviewer());
|
||||
ProjectResp projectInfo = projectService.detail(inspectionReport.getProjectId());
|
||||
result.setProjectInfo(projectInfo);
|
||||
TurbineInfoResp turbineInfo = turbineService.info(inspectionReport.getTurbineId());
|
||||
result.setTurbineInfo(turbineInfo);
|
||||
List<CheckSchemeResp> schemeInfoList = checkSchemeService.list(List.of(inspectionReport.getCheckMethod().split(StrUtil.COMMA)));
|
||||
result.setSchemeInfoList(schemeInfoList);
|
||||
InspectionReportCheckInfo checkInfo = Converts.INSTANCE.toInspectionReportCheckInfo(inspectionReport);
|
||||
userIds.addAll(List.of(checkInfo.getCheckUserId().split(StrUtil.COMMA)));
|
||||
Map<String, UserEntity> userIdMap = userService.listByIds(userIds).stream().collect(Collectors.toMap(UserEntity::getUserId, Function.identity()));
|
||||
if(userIdMap.containsKey(reportInfo.getReportAuditor())){
|
||||
reportInfo.setReportAuditName(userIdMap.get(reportInfo.getReportAuditor()).getName());
|
||||
}
|
||||
if(userIdMap.containsKey(reportInfo.getReportWriter())){
|
||||
reportInfo.setReportWriterName(userIdMap.get(reportInfo.getReportWriter()).getName());
|
||||
}
|
||||
if(userIdMap.containsKey(reportInfo.getReportReviewer())){
|
||||
reportInfo.setReportReviewerName(userIdMap.get(reportInfo.getReportReviewer()).getName());
|
||||
}
|
||||
result.setReportInfo(reportInfo);
|
||||
StringBuilder checkUserName = new StringBuilder();
|
||||
Arrays.stream(checkInfo.getCheckUserId().split(StrUtil.COMMA)).forEach(userId ->{
|
||||
if(userIdMap.containsKey(userId)){
|
||||
checkUserName.append(userIdMap.get(userId).getUserId()).append(StrUtil.COMMA);
|
||||
}
|
||||
});
|
||||
checkInfo.setCheckUserName(checkUserName.toString());
|
||||
checkInfo.setCheckMethodLabel(CheckMethodEnum.getDescByCode(checkInfo.getCheckMethod()));
|
||||
result.setCheckInfo(checkInfo);
|
||||
List<DefectListResp> defectInfoList = defectService.list(new DefectListReq().setTurbineId(inspectionReport.getTurbineId()));
|
||||
result.setDefectInfoList(defectInfoList);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void save(InspectionReportReq req) {
|
||||
this.save(validation(req));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void update(String reportId, InspectionReportReq req) {
|
||||
if(this.getById(reportId) == null){
|
||||
throw new ServiceException(Message.INSPECTION_REPORT_ID_IS_NOT_EXIST);
|
||||
}
|
||||
InspectionReportEntity entity = validation(req);
|
||||
entity.setReportId(reportId);
|
||||
this.updateById(entity);
|
||||
}
|
||||
|
||||
private InspectionReportEntity validation(InspectionReportReq req){
|
||||
ProjectEntity project = projectService.getById(req.getProjectId());
|
||||
if(null == project){
|
||||
throw new ServiceException(Message.PROJECT_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if(ProjectStatusEnum.COMPLETED.getCode() != project.getStatus()){
|
||||
throw new ServiceException(StrUtil.format(Message.PROJECT_STATUS_IS_NOT_COMPLETED, project.getProjectName()));
|
||||
}
|
||||
TurbineEntity turbine = turbineService.getById(req.getTurbineId());
|
||||
if(null == turbine){
|
||||
throw new ServiceException(Message.TURBINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if(ProjectStatusEnum.COMPLETED.getCode() != turbine.getStatus()){
|
||||
throw new ServiceException(StrUtil.format(Message.TURBINE_STATUS_IS_NOT_COMPLETED, turbine.getTurbineName()));
|
||||
}
|
||||
return Converts.INSTANCE.toInspectionReportEntity(req);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.ProjectBudgetInfoEntity;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoListResp;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoReq;
|
||||
import com.dite.znpt.domain.vo.ProjectBudgetInfoResp;
|
||||
import com.dite.znpt.enums.AttachBusinessTypeEnum;
|
||||
import com.dite.znpt.enums.BudgeTypeEnum;
|
||||
import com.dite.znpt.mapper.ProjectBudgetInfoMapper;
|
||||
import com.dite.znpt.service.AttachInfoService;
|
||||
import com.dite.znpt.service.ProjectBudgetInfoService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
* @Description: 项目预算信息表服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProjectBudgetInfoServiceImpl extends ServiceImpl<ProjectBudgetInfoMapper, ProjectBudgetInfoEntity> implements ProjectBudgetInfoService {
|
||||
|
||||
private final AttachInfoService attachInfoService;
|
||||
|
||||
/**
|
||||
* 功能描述:查询项目预算信息列表
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息信息
|
||||
* @return {@link List }<{@link ProjectBudgetInfoResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectBudgetInfoListResp> selectList(ProjectBudgetInfoListReq projectBudgetInfoReq) {
|
||||
PageUtil.startPage();
|
||||
List<ProjectBudgetInfoListResp> projectBudgetInfoList= this.baseMapper.queryBySelective(projectBudgetInfoReq);
|
||||
projectBudgetInfoList.forEach(resp -> {
|
||||
|
||||
});
|
||||
return projectBudgetInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:根据项目id获取项目预算信息列表
|
||||
*
|
||||
* @param projectId 项目id
|
||||
* @return {@link List }<{@link ProjectBudgetInfoListResp }>
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
@Override
|
||||
public List<ProjectBudgetInfoResp> detailByProjectId(String projectId) {
|
||||
List<ProjectBudgetInfoResp> projectBudgetInfoList= this.baseMapper.detailByProjectId(projectId);
|
||||
projectBudgetInfoList.forEach(resp -> {
|
||||
resp.setBudgetTypeDesc(BudgeTypeEnum.getDescByCode(resp.getBudgetType()));
|
||||
});
|
||||
return projectBudgetInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:新增项目预算信息
|
||||
*
|
||||
* @param projectBudgetInfoReq 项目预算信息
|
||||
* @author huise23
|
||||
* @date 2025/07/17 21:58
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveData(List<ProjectBudgetInfoReq> projectBudgetInfoReq) {
|
||||
List<ProjectBudgetInfoEntity> list = new ArrayList<>();
|
||||
for (ProjectBudgetInfoReq req : projectBudgetInfoReq) {
|
||||
ProjectBudgetInfoEntity info = BeanUtil.copyProperties(req, ProjectBudgetInfoEntity.class);
|
||||
info.setBudgetId(IdUtil.simpleUUID());
|
||||
attachInfoService.updateBusinessIdByAttachIds(info.getBudgetId(), ListUtil.of(req.getAttachId()), AttachBusinessTypeEnum.PROJECT_BUDGE);
|
||||
list.add(info);
|
||||
}
|
||||
lambdaUpdate().eq(ProjectBudgetInfoEntity::getProjectId, list.get(0).getProjectId()).remove();
|
||||
baseMapper.insert(list);
|
||||
}
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
@ -97,10 +98,18 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectEntity
|
|||
if(CollUtil.isNotEmpty(userIds)){
|
||||
Map<String, UserEntity> userIdMap = userService.listByIds(userIds).stream().collect(Collectors.toMap(k->k.getUserId(), Function.identity()));
|
||||
if(CollUtil.isNotEmpty(userIdMap)){
|
||||
StringBuilder constructorName = new StringBuilder();
|
||||
resp.setAuditorName(userIdMap.containsKey(resp.getAuditorId()) ? userIdMap.get(resp.getAuditorId()).getName() : null);
|
||||
resp.setProjectManagerName(userIdMap.containsKey(resp.getProjectManagerId()) ? userIdMap.get(resp.getProjectManagerId()).getName() : null);
|
||||
resp.setConstructionTeamLeaderName(userIdMap.containsKey(resp.getConstructionTeamLeaderId()) ? userIdMap.get(resp.getConstructionTeamLeaderId()).getName() : null);
|
||||
resp.setQualityOfficerName(userIdMap.containsKey(resp.getQualityOfficerId()) ? userIdMap.get(resp.getQualityOfficerId()).getName() : null);
|
||||
Arrays.stream(resp.getConstructorIds().split(StrUtil.COMMA)).forEach(id -> {
|
||||
if(userIdMap.containsKey(id)){
|
||||
constructorName.append(userIdMap.get(id).getName()).append(StrUtil.COMMA);
|
||||
}
|
||||
});
|
||||
constructorName.deleteCharAt(constructorName.lastIndexOf(StrUtil.COMMA));
|
||||
resp.setConstructorName(constructorName.toString());
|
||||
}
|
||||
}
|
||||
return resp;
|
||||
|
|
|
@ -52,7 +52,6 @@ public class ProjectTaskServiceImpl extends ServiceImpl<ProjectTaskMapper, Proje
|
|||
**/
|
||||
@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())) {
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.dite.znpt.domain.entity.TurbineEntity;
|
|||
import com.dite.znpt.domain.vo.*;
|
||||
import com.dite.znpt.domain.vo.job.resp.TurbineStatusResp;
|
||||
import com.dite.znpt.enums.Enums;
|
||||
import com.dite.znpt.enums.PartTypeEnum;
|
||||
import com.dite.znpt.enums.ProjectStatusEnum;
|
||||
import com.dite.znpt.exception.ServiceException;
|
||||
import com.dite.znpt.mapper.TurbineMapper;
|
||||
|
@ -119,7 +120,11 @@ public class TurbineServiceImpl extends ServiceImpl<TurbineMapper, TurbineEntity
|
|||
**/
|
||||
@Override
|
||||
public TurbineInfoResp info(String turbineId) {
|
||||
return this.baseMapper.getTurbineInfo(turbineId);
|
||||
TurbineInfoResp result = this.baseMapper.getTurbineInfo(turbineId);
|
||||
result.getPartRespList().forEach(part -> {
|
||||
part.setPartTypeLabel(PartTypeEnum.getDescByCode(part.getPartType()));
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.dite.znpt.domain.entity.DefectEntity;
|
||||
import com.dite.znpt.domain.entity.InspectionReportEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectEntity;
|
||||
import com.dite.znpt.domain.entity.ProjectTaskEntity;
|
||||
import com.dite.znpt.domain.vo.WorkbenchInfoResp;
|
||||
import com.dite.znpt.service.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class WorkbenchServiceImpl implements WorkbenchService {
|
||||
private final ProjectService projectService;
|
||||
private final ProjectTaskService projectTaskService;
|
||||
private final InspectionReportService inspectionReportService;
|
||||
private final DefectService defectService;
|
||||
|
||||
@Override
|
||||
public WorkbenchInfoResp getInfo() {
|
||||
WorkbenchInfoResp resp = new WorkbenchInfoResp();
|
||||
String userId = StpUtil.getLoginIdAsString();
|
||||
// 项目数量
|
||||
Long projectCount = projectService.lambdaQuery()
|
||||
.eq(ProjectEntity::getProjectManagerId, userId).or()
|
||||
.eq(ProjectEntity::getAuditorId, userId).or()
|
||||
.like(ProjectEntity::getConstructorIds, userId).or()
|
||||
.eq(ProjectEntity::getQualityOfficerId, userId).or()
|
||||
.eq(ProjectEntity::getConstructTeamLeaderId, userId)
|
||||
.count();
|
||||
resp.setProjectCount(projectCount);
|
||||
|
||||
// 进行中任务
|
||||
Long progressTaskCount = projectTaskService.lambdaQuery()
|
||||
.eq(ProjectTaskEntity::getMainUserId, userId).or()
|
||||
.like(ProjectTaskEntity::getUserIds, userId).count();
|
||||
resp.setProgressTaskCount(progressTaskCount);
|
||||
|
||||
// 待审核报告数
|
||||
Long approvalReportCount = inspectionReportService.lambdaQuery().eq(InspectionReportEntity::getReportAuditor, userId).count();
|
||||
resp.setApprovalReportCount(approvalReportCount);
|
||||
|
||||
// 发现缺陷数
|
||||
Long findDefectCount = defectService.lambdaQuery()
|
||||
.eq(DefectEntity::getCreateBy, userId).count();
|
||||
resp.setFindDefectCount(findDefectCount);
|
||||
return resp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
<?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.ContractMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.contract_id, a.customer, a.code, a.project_id,
|
||||
a.salesperson_id, a.department_id, a.sign_date, a.duration,
|
||||
a.type, a.product_service, a.payment_date, a.payment_address,
|
||||
a.amount, a.account_number, a.notes, a.contract_status,
|
||||
a.create_time, a.create_by, a.update_time, a.update_by
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ContractResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
u.name as salespersonName, d.dept_name as salespersonDeptName,
|
||||
p.project_name, (select sum(cs.amount) from contract_settlement cs where a.contract_id=cs.contract_id) as settlementAmount
|
||||
from contract a
|
||||
left join user u on a.salesperson_id = u.user_id
|
||||
left join dept d on a.department_id=d.dept_id
|
||||
left join project p on a.project_id=p.project_id
|
||||
<where>
|
||||
<if test="contractId != null and contractId != ''">
|
||||
and a.contract_id like concat ('%', #{contractId}, '%')
|
||||
</if>
|
||||
<if test="customer != null and customer != ''">
|
||||
and a.customer like concat ('%', #{customer}, '%')
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
and a.code like concat ('%', #{code}, '%')
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and a.project_id like concat ('%', #{projectId}, '%')
|
||||
</if>
|
||||
<if test="salespersonId != null and salespersonId != ''">
|
||||
and a.salesperson_id like concat ('%', #{salespersonId}, '%')
|
||||
</if>
|
||||
<if test="departmentId != null and departmentId != ''">
|
||||
and a.department_id like concat ('%', #{departmentId}, '%')
|
||||
</if>
|
||||
<if test="signDate != null">
|
||||
and a.sign_date = #{signDate}
|
||||
</if>
|
||||
<if test="duration != null and duration != ''">
|
||||
and a.duration like concat ('%', #{duration}, '%')
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and a.type like concat ('%', #{type}, '%')
|
||||
</if>
|
||||
<if test="productService != null and productService != ''">
|
||||
and a.product_service like concat ('%', #{productService}, '%')
|
||||
</if>
|
||||
<if test="paymentDate != null">
|
||||
and a.payment_date = #{paymentDate}
|
||||
</if>
|
||||
<if test="paymentAddress != null and paymentAddress != ''">
|
||||
and a.payment_address like concat ('%', #{paymentAddress}, '%')
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
and a.amount = #{amount}
|
||||
</if>
|
||||
<if test="accountNumber != null and accountNumber != ''">
|
||||
and a.account_number like concat ('%', #{accountNumber}, '%')
|
||||
</if>
|
||||
<if test="notes != null">
|
||||
and a.notes = #{notes}
|
||||
</if>
|
||||
<if test="contractStatus != null and contractStatus != ''">
|
||||
and a.contract_status like concat ('%', #{contractStatus}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<?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.ContractSettlementMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.settlement_id, a.contract_id, a.customer, a.code,
|
||||
a.project_id, a.salesperson_id, a.department_id, a.payment_period,
|
||||
a.payment_date, a.duration, a.product_service, a.amount,
|
||||
a.account_number, a.notes, a.settlement_status, a.create_time,
|
||||
a.create_by, a.update_time, a.update_by
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ContractSettlementResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from contract_settlement 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="settlementId != null and settlementId != ''">
|
||||
and a.settlement_id like concat ('%', #{settlementId}, '%')
|
||||
</if>
|
||||
<if test="contractId != null and contractId != ''">
|
||||
and a.contract_id like concat ('%', #{contractId}, '%')
|
||||
</if>
|
||||
<if test="customer != null and customer != ''">
|
||||
and a.customer like concat ('%', #{customer}, '%')
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
and a.code like concat ('%', #{code}, '%')
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and a.project_id like concat ('%', #{projectId}, '%')
|
||||
</if>
|
||||
<if test="salespersonId != null and salespersonId != ''">
|
||||
and a.salesperson_id like concat ('%', #{salespersonId}, '%')
|
||||
</if>
|
||||
<if test="departmentId != null and departmentId != ''">
|
||||
and a.department_id like concat ('%', #{departmentId}, '%')
|
||||
</if>
|
||||
<if test="paymentPeriod != null">
|
||||
and a.payment_period = #{paymentPeriod}
|
||||
</if>
|
||||
<if test="paymentDate != null">
|
||||
and a.payment_date = #{paymentDate}
|
||||
</if>
|
||||
<if test="duration != null and duration != ''">
|
||||
and a.duration like concat ('%', #{duration}, '%')
|
||||
</if>
|
||||
<if test="productService != null and productService != ''">
|
||||
and a.product_service like concat ('%', #{productService}, '%')
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
and a.amount = #{amount}
|
||||
</if>
|
||||
<if test="accountNumber != null and accountNumber != ''">
|
||||
and a.account_number like concat ('%', #{accountNumber}, '%')
|
||||
</if>
|
||||
<if test="notes != null">
|
||||
and a.notes = #{notes}
|
||||
</if>
|
||||
<if test="settlementStatus != null and settlementStatus != ''">
|
||||
and a.settlement_status like concat ('%', #{settlementStatus}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.DefectListResp">
|
||||
SELECT
|
||||
d.defect_id, d.defect_name, d.defect_code, p.part_name, d.defect_position, d.description
|
||||
d.defect_id, d.defect_name, d.defect_code, p.part_name, d.defect_position, d.defect_type, d.defect_level, d.description, d.repair_idea
|
||||
FROM defect d
|
||||
LEFT JOIN image i ON d.image_id = i.image_id
|
||||
LEFT JOIN image_collect ic ON ic.collect_id = i.collect_id
|
||||
|
|
|
@ -1,4 +1,34 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.InspectionReportMapper">
|
||||
|
||||
<select id="listInspectionReportListResp" resultType="com.dite.znpt.domain.vo.InspectionReportListResp">
|
||||
SELECT ir.report_id, ir.title, ir.sub_title, ir.report_writer, u.name AS reportWriterName, ir.report_write_time,
|
||||
ir.project_id, p.project_name, p.farm_name, p.`client`,
|
||||
ir.turbine_id, t.turbine_name, t.turbine_code
|
||||
FROM inspection_report ir
|
||||
LEFT JOIN user u ON ir.report_writer = u.user_id
|
||||
LEFT JOIN project p ON ir.project_id = p.project_id
|
||||
LEFT JOIN turbine t ON ir.turbine_id = t.turbine_id
|
||||
<where>
|
||||
<if test = "req.title != null and req.title != ''">
|
||||
AND ir.title LIKE concat('%', #{req.title}, '%')
|
||||
</if>
|
||||
<if test = "req.subTile != null and req.subTile != ''">
|
||||
AND ir.sub_title LIKE concat('%', #{req.subTile}, '%')
|
||||
</if>
|
||||
<if test = "req.projectId != null and req.projectId != ''">
|
||||
AND ir.project_id = #{req.projectId}
|
||||
</if>
|
||||
<if test = "req.turbineId != null and req.turbineId != ''">
|
||||
AND ir.turbine_id = #{req.turbineId}
|
||||
</if>
|
||||
<if test = "req.farmName != null and req.farmName != ''">
|
||||
AND p.farm_name LIKE concat('%', #{req.farmName}, '%')
|
||||
</if>
|
||||
<if test = "req.client != null and req.client != ''">
|
||||
AND p.client LIKE concat('%', #{req.client}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,49 @@
|
|||
<?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.ProjectBudgetInfoMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.budget_id, a.project_id, a.budget_name, a.budget_type,
|
||||
a.budget_amount, a.budget_desc, a.update_by, a.create_time,
|
||||
a.create_by, a.update_time
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectBudgetInfoListResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>, p.*
|
||||
from project_budget_info a
|
||||
left join project p on a.project_id = p.project_id
|
||||
<where>
|
||||
<if test="budgetId != null and budgetId != ''">
|
||||
and a.budget_id like concat ('%', #{budgetId}, '%')
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and a.project_id like concat ('%', #{projectId}, '%')
|
||||
</if>
|
||||
<if test="budgetName != null and budgetName != ''">
|
||||
and a.budget_name like concat ('%', #{budgetName}, '%')
|
||||
</if>
|
||||
<if test="budgetType != null and budgetType != ''">
|
||||
and a.budget_type like concat ('%', #{budgetType}, '%')
|
||||
</if>
|
||||
<if test="budgetAmount != null">
|
||||
and a.budget_amount = #{budgetAmount}
|
||||
</if>
|
||||
<if test="budgetDesc != null and budgetDesc != ''">
|
||||
and a.budget_desc like concat ('%', #{budgetDesc}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="detailByProjectId" resultType="com.dite.znpt.domain.vo.ProjectBudgetInfoResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from project_budget_info a
|
||||
<where>
|
||||
<if test="_parameter != null and _parameter != ''">
|
||||
and a.project_id like concat ('%', #{projectId}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -2,13 +2,24 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dite.znpt.mapper.ProjectMapper">
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectListResp">
|
||||
with taskProgress as (
|
||||
SELECT
|
||||
count(1) task_count,
|
||||
sum(status=0) taskPendingCount,
|
||||
sum(status=1) task_progress_count,
|
||||
sum(status=2) task_complete_count,
|
||||
project_id
|
||||
FROM project_task
|
||||
group by project_id
|
||||
)
|
||||
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.start_date, prj.end_date
|
||||
GROUP_CONCAT(DISTINCT con.name) AS constructor_name, prj.start_date, prj.end_date, tp.taskPendingCount, tp.task_progress_count, tp.task_complete_count, tp.task_count
|
||||
FROM project prj
|
||||
LEFT JOIN user pm ON pm.user_id = prj.project_manager_id
|
||||
LEFT JOIN user con ON FIND_IN_SET(con.user_id,prj.constructor_ids) > 0 AND con.del_flag = '0'
|
||||
left join taskProgress tp on prj.project_id = tp.project_id
|
||||
<where>
|
||||
<if test="projectName != null and projectName != ''">
|
||||
AND prj.project_name LIKE concat ('%', #{projectName}, '%')
|
||||
|
@ -31,10 +42,15 @@
|
|||
<if test="endDate != null">
|
||||
and prj.end_date <= #{endDate}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and (prj.auditor_id = #{userId} or prj.construct_team_leader_id = #{userId}
|
||||
or prj.project_manager_id = #{userId} or prj.quality_officer_id = #{userId}
|
||||
or prj.constructor_ids like concat('%', #{userId},'%'))
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY prj.project_id, prj.project_name, prj.farm_name, prj.status, prj.cover_url, prj.farm_address, prj.client, prj.client_contact, prj.client_phone, prj.inspection_unit,
|
||||
prj.inspection_contact, prj.inspection_phone, prj.scale, prj.turbine_model, prj.project_manager_id, pm.name, prj.constructor_ids,
|
||||
prj.start_date, prj.end_date
|
||||
prj.start_date, prj.end_date, tp.taskPendingCount, tp.task_progress_count, tp.task_complete_count, tp.task_count
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -9,15 +9,19 @@
|
|||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectTaskGroupResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>, p.project_name
|
||||
from project_task_group a
|
||||
left join project p on a.project_id=p.project_id
|
||||
<where>
|
||||
<if test="groupId != null and groupId != ''">
|
||||
and a.group_id like concat ('%', #{groupId}, '%')
|
||||
and a.group_id = #{groupId}
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
and a.group_name like concat ('%', #{groupName}, '%')
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and a.project_id=#{projectId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectTaskResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>, p.project_name
|
||||
from project_task a
|
||||
left join user u on a.main_user_id=u.user_id
|
||||
left join project p on a.project_id=p.project_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}, '%'))
|
||||
|
@ -57,6 +58,12 @@
|
|||
<if test="taskNameOrMainUser != null and taskNameOrMainUser != ''">
|
||||
and (a.task_name like concat ('%', #{taskNameOrMainUser}, '%') or u.name like concat ('%', #{taskNameOrMainUser}, '%') )
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
and a.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and (a.main_user_id = #{userId} or a.user_ids like concat('%', #{userId},'%'))
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=only-script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip
|
|
@ -0,0 +1,67 @@
|
|||
<?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 https://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>flowable</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.dite.znpt</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.53</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flowable</groupId>
|
||||
<artifactId>flowable-spring-boot-starter</artifactId>
|
||||
<version>6.8.0</version>
|
||||
<!-- 排除flowable自带的权限认证 -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.flowable</groupId>
|
||||
<artifactId>flowable-spring-security</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--el表达式计算-->
|
||||
<dependency>
|
||||
<groupId>com.googlecode.aviator</groupId>
|
||||
<artifactId>aviator</artifactId>
|
||||
<version>5.3.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,80 @@
|
|||
package com.dite.znpt.flowable.common.constant;
|
||||
|
||||
/**
|
||||
* 流程常量信息
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021/4/17 22:46
|
||||
*/
|
||||
public class ProcessConstants {
|
||||
|
||||
/**
|
||||
* 动态数据
|
||||
*/
|
||||
public static final String DYNAMIC = "dynamic";
|
||||
|
||||
/**
|
||||
* 固定任务接收
|
||||
*/
|
||||
public static final String FIXED = "fixed";
|
||||
|
||||
/**
|
||||
* 单个审批人
|
||||
*/
|
||||
public static final String ASSIGNEE = "assignee";
|
||||
|
||||
|
||||
/**
|
||||
* 候选人
|
||||
*/
|
||||
public static final String CANDIDATE_USERS = "candidateUsers";
|
||||
|
||||
|
||||
/**
|
||||
* 审批组
|
||||
*/
|
||||
public static final String CANDIDATE_GROUPS = "candidateGroups";
|
||||
|
||||
/**
|
||||
* 单个审批人
|
||||
*/
|
||||
public static final String PROCESS_APPROVAL = "approval";
|
||||
|
||||
/**
|
||||
* 会签人员
|
||||
*/
|
||||
public static final String PROCESS_MULTI_INSTANCE_USER = "userList";
|
||||
|
||||
/**
|
||||
* nameapace
|
||||
*/
|
||||
public static final String NAMASPASE = "http://flowable.org/bpmn";
|
||||
|
||||
/**
|
||||
* 会签节点
|
||||
*/
|
||||
public static final String PROCESS_MULTI_INSTANCE = "multiInstance";
|
||||
|
||||
/**
|
||||
* 自定义属性 dataType
|
||||
*/
|
||||
public static final String PROCESS_CUSTOM_DATA_TYPE = "dataType";
|
||||
|
||||
/**
|
||||
* 自定义属性 userType
|
||||
*/
|
||||
public static final String PROCESS_CUSTOM_USER_TYPE = "userType";
|
||||
|
||||
/**
|
||||
* 初始化人员
|
||||
*/
|
||||
public static final String PROCESS_INITIATOR = "INITIATOR";
|
||||
|
||||
|
||||
/**
|
||||
* 流程跳过
|
||||
*/
|
||||
public static final String FLOWABLE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.dite.znpt.flowable.common.enums;
|
||||
|
||||
/**
|
||||
* 流程意见类型
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021/4/19
|
||||
*/
|
||||
public enum FlowComment {
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
NORMAL("1", "正常意见"),
|
||||
REBACK("2", "退回意见"),
|
||||
REJECT("3", "驳回意见"),
|
||||
DELEGATE("4", "委派意见"),
|
||||
ASSIGN("5", "转办意见"),
|
||||
STOP("6", "终止流程");
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final String type;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private final String remark;
|
||||
|
||||
FlowComment(String type, String remark) {
|
||||
this.type = type;
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.flowable.common.expand.el;
|
||||
|
||||
/**
|
||||
* 扩展表达式
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2023-03-04 09:10
|
||||
*/
|
||||
public interface BaseEl {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.dite.znpt.flowable.common.expand.el;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 扩展表达式
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2023-03-04 12:10
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class FlowEl implements BaseEl {
|
||||
|
||||
public String findDeptLeader(String name){
|
||||
log.info("开始查询表达式变量值,getName");
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getName(String name){
|
||||
log.info("开始查询表达式变量值,getName");
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dite.znpt.flowable.config;
|
||||
|
||||
import org.flowable.engine.impl.db.DbIdGenerator;
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 扩展流程配置
|
||||
* @author Tony
|
||||
* @date 2022-12-26 10:24
|
||||
*/
|
||||
@Configuration
|
||||
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
|
||||
@Override
|
||||
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
|
||||
engineConfiguration.setActivityFontName("宋体");
|
||||
engineConfiguration.setLabelFontName("宋体");
|
||||
engineConfiguration.setAnnotationFontName("宋体");
|
||||
engineConfiguration.setIdGenerator(new DbIdGenerator());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package com.dite.znpt.flowable.config;//package com.ruoyi.flowable.config;
|
||||
//
|
||||
//import com.sun.prism.paint.Color;
|
||||
//import org.flowable.bpmn.model.AssociationDirection;
|
||||
//import org.flowable.image.impl.DefaultProcessDiagramCanvas;
|
||||
//
|
||||
//import java.awt.*;
|
||||
//import java.awt.geom.Line2D;
|
||||
//import java.awt.geom.RoundRectangle2D;
|
||||
//
|
||||
///**
|
||||
// * @author Tony
|
||||
// * @date 2021-04-03
|
||||
// */
|
||||
//public class MyDefaultProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
|
||||
// //设置高亮线的颜色 这里我设置成绿色
|
||||
// protected static Color HIGHLIGHT_SEQUENCEFLOW_COLOR = Color.GREEN;
|
||||
//
|
||||
// public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
|
||||
// super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
|
||||
// }
|
||||
//
|
||||
// public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType) {
|
||||
// super(width, height, minX, minY, imageType);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 画线颜色设置
|
||||
// */
|
||||
// @Override
|
||||
// public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType,
|
||||
// AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
|
||||
//
|
||||
// Paint originalPaint = g.getPaint();
|
||||
// Stroke originalStroke = g.getStroke();
|
||||
//
|
||||
// g.setPaint(CONNECTION_COLOR);
|
||||
// if (connectionType.equals("association")) {
|
||||
// g.setStroke(ASSOCIATION_STROKE);
|
||||
// } else if (highLighted) {
|
||||
// //设置线的颜色
|
||||
// g.setPaint(originalPaint);
|
||||
// g.setStroke(HIGHLIGHT_FLOW_STROKE);
|
||||
// }
|
||||
//
|
||||
// for (int i = 1; i < xPoints.length; i++) {
|
||||
// Integer sourceX = xPoints[i - 1];
|
||||
// Integer sourceY = yPoints[i - 1];
|
||||
// Integer targetX = xPoints[i];
|
||||
// Integer targetY = yPoints[i];
|
||||
// Line2D.Double line = new Line2D.Double(sourceX, sourceY, targetX, targetY);
|
||||
// g.draw(line);
|
||||
// }
|
||||
//
|
||||
// if (isDefault) {
|
||||
// Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
|
||||
// drawDefaultSequenceFlowIndicator(line, scaleFactor);
|
||||
// }
|
||||
//
|
||||
// if (conditional) {
|
||||
// Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
|
||||
// drawConditionalSequenceFlowIndicator(line, scaleFactor);
|
||||
// }
|
||||
//
|
||||
// if (associationDirection == AssociationDirection.ONE || associationDirection == AssociationDirection.BOTH) {
|
||||
// Line2D.Double line = new Line2D.Double(xPoints[xPoints.length - 2], yPoints[xPoints.length - 2], xPoints[xPoints.length - 1], yPoints[xPoints.length - 1]);
|
||||
// drawArrowHead(line, scaleFactor);
|
||||
// }
|
||||
// if (associationDirection == AssociationDirection.BOTH) {
|
||||
// Line2D.Double line = new Line2D.Double(xPoints[1], yPoints[1], xPoints[0], yPoints[0]);
|
||||
// drawArrowHead(line, scaleFactor);
|
||||
// }
|
||||
// g.setPaint(originalPaint);
|
||||
// g.setStroke(originalStroke);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 高亮节点设置
|
||||
// */
|
||||
// @Override
|
||||
// public void drawHighLight(int x, int y, int width, int height) {
|
||||
// Paint originalPaint = g.getPaint();
|
||||
// Stroke originalStroke = g.getStroke();
|
||||
// //设置高亮节点的颜色
|
||||
// g.setPaint(HIGHLIGHT_COLOR);
|
||||
// g.setStroke(THICK_TASK_BORDER_STROKE);
|
||||
//
|
||||
// RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
|
||||
// g.draw(rect);
|
||||
//
|
||||
// g.setPaint(originalPaint);
|
||||
// g.setStroke(originalStroke);
|
||||
// }
|
||||
//}
|
|
@ -0,0 +1,200 @@
|
|||
package com.dite.znpt.flowable.controller;
|
||||
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.domain.dto.FlowProcDefDto;
|
||||
import com.dite.znpt.flowable.domain.entity.SysExpression;
|
||||
import com.dite.znpt.domain.vo.RoleResp;
|
||||
import com.dite.znpt.domain.vo.UserListReq;
|
||||
import com.dite.znpt.domain.vo.UserListResp;
|
||||
import com.dite.znpt.flowable.domain.dto.FlowSaveXmlVo;
|
||||
import com.dite.znpt.flowable.service.IFlowDefinitionService;
|
||||
import com.dite.znpt.flowable.service.ISysExpressionService;
|
||||
import com.dite.znpt.service.RoleService;
|
||||
import com.dite.znpt.service.UserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作流程定义
|
||||
* </p>
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "流程定义")
|
||||
@RestController
|
||||
@RequestMapping("/flowable/definition")
|
||||
public class FlowDefinitionController {
|
||||
|
||||
@Resource
|
||||
private IFlowDefinitionService flowDefinitionService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@Resource
|
||||
private RoleService roleService;
|
||||
|
||||
@Resource
|
||||
private ISysExpressionService sysExpressionService;
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
|
||||
public Result<?> list(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum,
|
||||
@ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize,
|
||||
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
|
||||
return Result.ok(flowDefinitionService.list(name, pageNum, pageSize));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导入流程文件", notes = "上传bpmn20的xml文件")
|
||||
@PostMapping("/import")
|
||||
public Result<?> importFile(@RequestParam(required = false) String name,
|
||||
@RequestParam(required = false) String category,
|
||||
MultipartFile file) {
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = file.getInputStream();
|
||||
flowDefinitionService.importFile(name, category, in);
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败:", e);
|
||||
return Result.ok(e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("关闭输入流出错", e);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.ok("导入成功");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "读取xml文件")
|
||||
@GetMapping("/readXml/{deployId}")
|
||||
public Result<?> readXml(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId) {
|
||||
try {
|
||||
return flowDefinitionService.readXml(deployId);
|
||||
} catch (Exception e) {
|
||||
return Result.error("加载xml文件异常");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "读取图片文件")
|
||||
@GetMapping("/readImage/{deployId}")
|
||||
public void readImage(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId, HttpServletResponse response) {
|
||||
OutputStream os = null;
|
||||
BufferedImage image = null;
|
||||
try {
|
||||
image = ImageIO.read(flowDefinitionService.readImage(deployId));
|
||||
response.setContentType("image/png");
|
||||
os = response.getOutputStream();
|
||||
if (image != null) {
|
||||
ImageIO.write(image, "png", os);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (os != null) {
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "保存流程设计器内的xml文件")
|
||||
@PostMapping("/save")
|
||||
public Result<?> save(@RequestBody FlowSaveXmlVo vo) {
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = new ByteArrayInputStream(vo.getXml().getBytes(StandardCharsets.UTF_8));
|
||||
flowDefinitionService.importFile(vo.getName(), vo.getCategory(), in);
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败:", e);
|
||||
return Result.error(e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("关闭输入流出错", e);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.ok("导入成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发起流程")
|
||||
@PostMapping("/start/{procDefId}")
|
||||
public Result<?> start(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
return flowDefinitionService.startProcessInstanceById(procDefId, variables);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "激活或挂起流程定义")
|
||||
@PutMapping(value = "/updateState")
|
||||
public Result<?> updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@ApiParam(value = "流程部署ID", required = true) @RequestParam String deployId) {
|
||||
flowDefinitionService.updateState(state, deployId);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除流程")
|
||||
@DeleteMapping(value = "/{deployIds}")
|
||||
public Result<?> delete(@PathVariable String[] deployIds) {
|
||||
for (String deployId : deployIds) {
|
||||
flowDefinitionService.delete(deployId);
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "指定流程办理人员列表")
|
||||
@GetMapping("/userList")
|
||||
public Result<?> userList(UserListReq req) {
|
||||
List<UserListResp> list = userService.list(req);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "指定流程办理组列表")
|
||||
@GetMapping("/roleList")
|
||||
public Result<?> roleList(String roleName) {
|
||||
List<RoleResp> list = roleService.list(roleName);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "指定流程达式列表")
|
||||
@GetMapping("/expList")
|
||||
public Result<?> expList(SysExpression sysExpression) {
|
||||
List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.dite.znpt.flowable.controller;
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.flowable.domain.vo.FlowTaskVo;
|
||||
import com.dite.znpt.flowable.service.IFlowInstanceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>工作流流程实例管理<p>
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "工作流流程实例管理")
|
||||
@RestController
|
||||
@RequestMapping("/flowable/instance")
|
||||
public class FlowInstanceController {
|
||||
|
||||
@Autowired
|
||||
private IFlowInstanceService flowInstanceService;
|
||||
|
||||
@ApiOperation(value = "根据流程定义id启动流程实例")
|
||||
@PostMapping("/startBy/{procDefId}")
|
||||
public Result<?> startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
return flowInstanceService.startProcessInstanceById(procDefId, variables);
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "激活或挂起流程实例")
|
||||
@PostMapping(value = "/updateState")
|
||||
public Result<?> updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
|
||||
flowInstanceService.updateState(state,instanceId);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("结束流程实例")
|
||||
@PostMapping(value = "/stopProcessInstance")
|
||||
public Result<?> stopProcessInstance(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowInstanceService.stopProcessInstance(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除流程实例")
|
||||
@DeleteMapping(value = "/delete/{instanceIds}")
|
||||
public Result<?> delete(@ApiParam(value = "流程实例ID", required = true) @PathVariable String[] instanceIds,
|
||||
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
|
||||
for (String instanceId : instanceIds) {
|
||||
flowInstanceService.delete(instanceId,deleteReason);
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,267 @@
|
|||
package com.dite.znpt.flowable.controller;
|
||||
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.flowable.domain.dto.FlowTaskDto;
|
||||
import com.dite.znpt.flowable.domain.vo.FlowQueryVo;
|
||||
import com.dite.znpt.flowable.domain.vo.FlowTaskVo;
|
||||
import com.dite.znpt.flowable.service.IFlowTaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* <p>工作流任务管理<p>
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "工作流流程任务管理")
|
||||
@RestController
|
||||
@RequestMapping("/flowable/task")
|
||||
public class FlowTaskController {
|
||||
|
||||
@Autowired
|
||||
private IFlowTaskService flowTaskService;
|
||||
|
||||
@ApiOperation(value = "我发起的流程", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/myProcess")
|
||||
public Result<?> myProcess(FlowQueryVo queryVo) {
|
||||
return flowTaskService.myProcess(queryVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消申请", response = FlowTaskDto.class)
|
||||
@PostMapping(value = "/stopProcess")
|
||||
public Result<?> stopProcess(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.stopProcess(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "撤回流程", response = FlowTaskDto.class)
|
||||
@PostMapping(value = "/revokeProcess")
|
||||
public Result<?> revokeProcess(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.revokeProcess(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取待办列表", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/todoList")
|
||||
public Result<?> todoList(FlowQueryVo queryVo) {
|
||||
return flowTaskService.todoList(queryVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取已办任务", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/finishedList")
|
||||
public Result<?> finishedList(FlowQueryVo queryVo) {
|
||||
return flowTaskService.finishedList(queryVo);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "流程历史流转记录", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/flowRecord")
|
||||
public Result<?> flowRecord(String procInsId, String deployId) {
|
||||
return flowTaskService.flowRecord(procInsId, deployId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据任务ID查询挂载的表单信息")
|
||||
@GetMapping(value = "/getTaskForm")
|
||||
public Result<?> getTaskForm(String taskId) {
|
||||
return flowTaskService.getTaskForm(taskId);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "流程初始化表单", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/flowFormData")
|
||||
public Result<?> flowFormData(String deployId) {
|
||||
return flowTaskService.flowFormData(deployId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取流程变量", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/processVariables/{taskId}")
|
||||
public Result<?> processVariables(@ApiParam(value = "流程任务Id") @PathVariable(value = "taskId") String taskId) {
|
||||
return flowTaskService.processVariables(taskId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "审批任务")
|
||||
@PostMapping(value = "/complete")
|
||||
public Result<?> complete(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.complete(flowTaskVo);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/reject")
|
||||
public Result<?> taskReject(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.taskReject(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "退回任务")
|
||||
@PostMapping(value = "/return")
|
||||
public Result<?> taskReturn(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.taskReturn(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取所有可回退的节点")
|
||||
@PostMapping(value = "/returnList")
|
||||
public Result<?> findReturnTaskList(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.findReturnTaskList(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除任务")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.deleteTask(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "认领/签收任务")
|
||||
@PostMapping(value = "/claim")
|
||||
public Result<?> claim(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.claim(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消认领/签收任务")
|
||||
@PostMapping(value = "/unClaim")
|
||||
public Result<?> unClaim(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.unClaim(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "委派任务")
|
||||
@PostMapping(value = "/delegateTask")
|
||||
public Result<?> delegate(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.delegateTask(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "任务归还")
|
||||
@PostMapping(value = "/resolveTask")
|
||||
public Result<?> resolveTask(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.resolveTask(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "转办任务")
|
||||
@PostMapping(value = "/assignTask")
|
||||
public Result<?> assign(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.assignTask(flowTaskVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addMultiInstanceExecution")
|
||||
@ApiOperation(value = "多实例加签")
|
||||
public Result<?> addMultiInstanceExecution(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.addMultiInstanceExecution(flowTaskVo);
|
||||
return Result.ok("加签成功");
|
||||
}
|
||||
|
||||
@PostMapping(value = "/deleteMultiInstanceExecution")
|
||||
@ApiOperation(value = "多实例减签")
|
||||
public Result<?> deleteMultiInstanceExecution(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.deleteMultiInstanceExecution(flowTaskVo);
|
||||
return Result.ok("减签成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取下一节点")
|
||||
@PostMapping(value = "/nextFlowNode")
|
||||
public Result<?> getNextFlowNode(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.getNextFlowNode(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "流程发起时获取下一节点")
|
||||
@PostMapping(value = "/nextFlowNodeByStart")
|
||||
public Result<?> getNextFlowNodeByStart(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.getNextFlowNodeByStart(flowTaskVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成流程图
|
||||
*
|
||||
* @param processId 任务ID
|
||||
*/
|
||||
@GetMapping("/diagram/{processId}")
|
||||
public void genProcessDiagram(HttpServletResponse response,
|
||||
@PathVariable("processId") String processId) {
|
||||
InputStream inputStream = flowTaskService.diagram(processId);
|
||||
OutputStream os = null;
|
||||
BufferedImage image = null;
|
||||
try {
|
||||
image = ImageIO.read(inputStream);
|
||||
response.setContentType("image/png");
|
||||
os = response.getOutputStream();
|
||||
if (image != null) {
|
||||
ImageIO.write(image, "png", os);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (os != null) {
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流程执行节点
|
||||
*
|
||||
* @param procInsId 流程实例编号
|
||||
* @param procInsId 任务执行编号
|
||||
*/
|
||||
@GetMapping("/flowViewer/{procInsId}/{executionId}")
|
||||
public Result<?> getFlowViewer(@PathVariable("procInsId") String procInsId,
|
||||
@PathVariable("executionId") String executionId) {
|
||||
return flowTaskService.getFlowViewer(procInsId, executionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程节点信息
|
||||
*
|
||||
* @param procInsId 流程实例id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/flowXmlAndNode")
|
||||
public Result<?> flowXmlAndNode(@RequestParam(value = "procInsId", required = false) String procInsId,
|
||||
@RequestParam(value = "deployId", required = false) String deployId) {
|
||||
return flowTaskService.flowXmlAndNode(procInsId, deployId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程节点表单
|
||||
*
|
||||
* @param taskId 流程任务编号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/flowTaskForm")
|
||||
public Result<?> flowTaskForm(@RequestParam(value = "taskId", required = false) String taskId) throws Exception {
|
||||
return flowTaskService.flowTaskForm(taskId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 流程节点信息
|
||||
*
|
||||
* @param procInsId 流程实例编号
|
||||
* @param elementId 流程节点编号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/flowTaskInfo")
|
||||
public Result<?> flowTaskInfo(@RequestParam(value = "procInsId") String procInsId,
|
||||
@RequestParam(value = "elementId") String elementId){
|
||||
return flowTaskService.flowTaskInfo(procInsId,elementId);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package com.dite.znpt.flowable.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.dite.znpt.domain.PageResult;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.flowable.domain.entity.SysExpression;
|
||||
import com.dite.znpt.flowable.service.ISysExpressionService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 流程达式Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-12-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/expression")
|
||||
public class SysExpressionController
|
||||
{
|
||||
@Autowired
|
||||
private ISysExpressionService sysExpressionService;
|
||||
|
||||
/**
|
||||
* 查询流程达式列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public PageResult list(SysExpression sysExpression)
|
||||
{
|
||||
PageUtil.startPage();
|
||||
List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
|
||||
return PageResult.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出流程达式列表
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysExpression sysExpression){
|
||||
//TODO
|
||||
// List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
|
||||
// ExcelUtil<SysExpression> util = new ExcelUtil<SysExpression>(SysExpression.class);
|
||||
// util.exportExcel(response, list, "流程达式数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流程达式详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result<?> getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return Result.ok(sysExpressionService.selectSysExpressionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流程达式
|
||||
*/
|
||||
@PostMapping
|
||||
public Result<?> add(@RequestBody SysExpression sysExpression)
|
||||
{
|
||||
return Result.ok(sysExpressionService.insertSysExpression(sysExpression));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流程达式
|
||||
*/
|
||||
@PutMapping
|
||||
public Result<?> edit(@RequestBody SysExpression sysExpression)
|
||||
{
|
||||
return Result.ok(sysExpressionService.updateSysExpression(sysExpression));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程达式
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result<?> remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return Result.ok(sysExpressionService.deleteSysExpressionByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.dite.znpt.flowable.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.dite.znpt.domain.PageResult;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.flowable.domain.entity.SysDeployForm;
|
||||
import com.dite.znpt.flowable.domain.entity.SysForm;
|
||||
import com.dite.znpt.flowable.service.ISysDeployFormService;
|
||||
import com.dite.znpt.flowable.service.ISysFormService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 流程表单Controller
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/flowable/form")
|
||||
public class SysFormController {
|
||||
@Autowired
|
||||
private ISysFormService SysFormService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeployFormService sysDeployFormService;
|
||||
|
||||
/**
|
||||
* 查询流程表单列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public PageResult list(SysForm sysForm) {
|
||||
PageUtil.startPage();
|
||||
List<SysForm> list = SysFormService.selectSysFormList(sysForm);
|
||||
return PageResult.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/formList")
|
||||
public Result<?> formList(SysForm sysForm) {
|
||||
List<SysForm> list = SysFormService.selectSysFormList(sysForm);
|
||||
return Result.ok(list);
|
||||
}
|
||||
/**
|
||||
* 导出流程表单列表
|
||||
*/
|
||||
@GetMapping("/export")
|
||||
public void export(SysForm sysForm) {
|
||||
// TODO
|
||||
// List<SysForm> list = SysFormService.selectSysFormList(sysForm);
|
||||
// ExcelUtil<SysForm> util = new ExcelUtil<SysForm>(SysForm.class);
|
||||
// util.exportExcel(list, "form");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流程表单详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{formId}")
|
||||
public Result<?> getInfo(@PathVariable("formId") Long formId) {
|
||||
return Result.ok(SysFormService.selectSysFormById(formId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流程表单
|
||||
*/
|
||||
@PostMapping
|
||||
public Result<?> add(@RequestBody SysForm sysForm) {
|
||||
return Result.ok(SysFormService.insertSysForm(sysForm));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流程表单
|
||||
*/
|
||||
@PutMapping
|
||||
public Result<?> edit(@RequestBody SysForm sysForm) {
|
||||
return Result.ok(SysFormService.updateSysForm(sysForm));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程表单
|
||||
*/
|
||||
@DeleteMapping("/{formIds}")
|
||||
public Result<?> remove(@PathVariable Long[] formIds) {
|
||||
return Result.ok(SysFormService.deleteSysFormByIds(formIds));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 挂载流程表单
|
||||
*/
|
||||
@PostMapping("/addDeployForm")
|
||||
public Result<?> addDeployForm(@RequestBody SysDeployForm sysDeployForm) {
|
||||
return Result.ok(sysDeployFormService.insertSysDeployForm(sysDeployForm));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package com.dite.znpt.flowable.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.dite.znpt.domain.PageResult;
|
||||
import com.dite.znpt.domain.Result;
|
||||
import com.dite.znpt.flowable.domain.entity.SysListener;
|
||||
import com.dite.znpt.flowable.service.ISysListenerService;
|
||||
import com.dite.znpt.util.PageUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 流程监听Controller
|
||||
*
|
||||
* @author Tony
|
||||
* @date 2022-12-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/listener")
|
||||
public class SysListenerController
|
||||
{
|
||||
@Autowired
|
||||
private ISysListenerService sysListenerService;
|
||||
|
||||
/**
|
||||
* 查询流程监听列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public PageResult list(SysListener sysListener)
|
||||
{
|
||||
PageUtil.startPage();
|
||||
List<SysListener> list = sysListenerService.selectSysListenerList(sysListener);
|
||||
return PageResult.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出流程监听列表
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysListener sysListener)
|
||||
{
|
||||
//TODO
|
||||
// List<SysListener> list = sysListenerService.selectSysListenerList(sysListener);
|
||||
// ExcelUtil<SysListener> util = new ExcelUtil<SysListener>(SysListener.class);
|
||||
// util.exportExcel(response, list, "流程监听数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流程监听详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result<?> getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return Result.ok(sysListenerService.selectSysListenerById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流程监听
|
||||
*/
|
||||
@PostMapping
|
||||
public Result<?> add(@RequestBody SysListener sysListener)
|
||||
{
|
||||
return Result.ok(sysListenerService.insertSysListener(sysListener));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流程监听
|
||||
*/
|
||||
@PutMapping
|
||||
public Result<?> edit(@RequestBody SysListener sysListener)
|
||||
{
|
||||
return Result.ok(sysListenerService.updateSysListener(sysListener));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程监听
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result<?> remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return Result.ok(sysListenerService.deleteSysListenerByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.dite.znpt.flowable.domain.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Tony
|
||||
* @date 2021/3/28 15:50
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class FlowCommentDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 意见类别 0 正常意见 1 退回意见 2 驳回意见
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 意见内容
|
||||
*/
|
||||
private String comment;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue