Commit f9dc5305 by 林永健

Merge branch 'v5.5.0' of http://192.168.3.233:8090/dj/rpc-riskmanage into v5.5.0

2 parents f9ab8df4 293bf5fd
Showing 52 changed files with 1469 additions and 355 deletions
package cn.com.glsx.dj.riskmanage.dto.beisen; package cn.com.glsx.dj.riskmanage.dto.beisen;
import io.swagger.annotations.ApiModelProperty; import cn.com.glsx.dj.riskmanage.model.BeiSenOrganization;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data @Data
public class OrganizationListResponseDTO implements Serializable { public class OrganizationListResponseDTO extends BeiSenOrganization {
private static final long serialVersionUID = 1L;
/**
* 组织单元OId
*/
@ApiModelProperty(notes = "组织单元OId(部门id)")
private Integer oId;
/**
* 部门机构名称
*/
@ApiModelProperty(notes = "部门机构名称")
private String name;
/**
* 组织单元编码
*/
@ApiModelProperty(notes = "组织单元编码")
private String code;
/**
* 组织层级实体对象GUID
*/
@ApiModelProperty(notes = "组织层级实体对象GUID")
private String level;
/**
* 状态:0停用、1启用
*/
@ApiModelProperty(notes = "状态:0停用、1启用")
private Boolean status;
/**
* 设立日期
*/
@ApiModelProperty(notes = "设立日期")
private Date establishDate;
/**
* 生效日期
*/
@ApiModelProperty(notes = "生效日期")
private Date startDate;
/**
* 失效日期
*/
@ApiModelProperty(notes = "失效日期")
private Date stopDate;
/**
* 变更日期
*/
@ApiModelProperty(notes = "变更日期")
private Date changeDate;
/**
* 行政维度上级组织OId
*/
@ApiModelProperty(notes = "行政维度上级组织OId")
private Integer pOidOrgAdmin;
/**
* 业务维度上级组织OId
*/
@ApiModelProperty(notes = "业务维度上级组织OId")
private Integer pOidOrgReserve2;
/**
* 产品维度组织OId
*/
@ApiModelProperty(notes = "产品维度组织OId")
private Integer pOidOrgReserve3;
/**
* 是否当前生效
*/
@ApiModelProperty(notes = "是否当前生效")
private Boolean isCurrentRecord;
/**
* 部门负责人员工UserID
*/
@ApiModelProperty(notes = "部门负责人员工UserID")
private Integer personInCharge;
/**
* 业务修改人
*/
@ApiModelProperty(notes = "业务修改人")
private Integer businessModifiedBy;
/**
* 业务修改时间
*/
@ApiModelProperty(notes = "业务修改时间")
private Date businessModifiedTime;
/**
* 组织类型实体对象GUID
*/
@ApiModelProperty(notes = "组织类型实体对象GUID")
private String oIdOrganizationType;
/**
* 行政维度_层级
*/
@ApiModelProperty(notes = "行政维度_层级")
private Integer pOidOrgAdminTreeLevel;
/**
* 业务维度_层级
*/
@ApiModelProperty(notes = "业务维度_层级")
private Integer pOidOrgReserve2TreeLevel;
/**
* 一级组织OId
*/
@ApiModelProperty(notes = "一级组织OId")
private Integer firstLevelOrganization;
/**
* 二级组织OId
*/
@ApiModelProperty(notes = "二级组织OId")
private Integer secondLevelOrganization;
/**
* 三级组织OId
*/
@ApiModelProperty(notes = "三级组织OId")
private Integer thirdLevelOrganization;
/**
* 四级组织OId
*/
@ApiModelProperty(notes = "四级组织OId")
private Integer fourthLevelOrganization;
/**
* 五级组织OId
*/
@ApiModelProperty(notes = "五级组织OId")
private Integer fifthLevelOrganization;
/**
* 六级组织OId
*/
@ApiModelProperty(notes = "六级组织OId")
private Integer sixthLevelOrganization;
/**
* 排序编码
*/
@ApiModelProperty(notes = "排序编码")
private Integer orderCode;
/**
* 是否虚拟组织
*/
@ApiModelProperty(notes = "是否虚拟组织")
private Boolean isVirtualOrg;
/**
* 业务对象实体主键GUID
*/
@ApiModelProperty(notes = "业务对象实体主键GUID")
private String objectId;
/**
* 创建人员工UserID
*/
@ApiModelProperty(notes = "创建人员工UserID")
private Integer createdBy;
/**
* 创建时间
*/
@ApiModelProperty(notes = "创建时间")
private Date createdTime;
/**
* 修改人员工UserID
*/
@ApiModelProperty(notes = "修改人员工UserID")
private Integer modifiedBy;
/**
* 修改时间
*/
@ApiModelProperty(notes = "修改时间")
private Date modifiedTime;
/**
* 是否删除
*/
@ApiModelProperty(notes = "是否删除")
private Boolean stdIsDeleted;
} }
...@@ -10,7 +10,7 @@ import java.math.BigDecimal; ...@@ -10,7 +10,7 @@ import java.math.BigDecimal;
public class CourseDetailPageInfo implements Serializable { public class CourseDetailPageInfo implements Serializable {
@ApiModelProperty(notes = "员工id") @ApiModelProperty(notes = "员工id")
private String userId; private Integer userId;
@ApiModelProperty(notes = "员工名称") @ApiModelProperty(notes = "员工名称")
private String userName; private String userName;
...@@ -23,7 +23,7 @@ public class CourseDetailPageInfo implements Serializable { ...@@ -23,7 +23,7 @@ public class CourseDetailPageInfo implements Serializable {
@ApiModelProperty(notes = "职务名称") @ApiModelProperty(notes = "职务名称")
private String positionName; private String positionName;
@ApiModelProperty(notes = "员工状态:1-待入职, 2-试用, 3-正式,4-调出, 5-待调入, 6-退休,8-离职,12-非正式") @ApiModelProperty(notes = "员工状态:0:离职 1:在职")
private Integer empStatus; private Integer empStatus;
@ApiModelProperty(notes = "学习状态:10 - 未学习,20 - 未完成,30 - 待考核,40 - 未通过,50 - 已完成,60 - 待签署") @ApiModelProperty(notes = "学习状态:10 - 未学习,20 - 未完成,30 - 待考核,40 - 未通过,50 - 已完成,60 - 待签署")
......
...@@ -5,6 +5,7 @@ import lombok.Data; ...@@ -5,6 +5,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
@Data @Data
public class CourseDetailSearchDTO implements Serializable { public class CourseDetailSearchDTO implements Serializable {
...@@ -20,7 +21,7 @@ public class CourseDetailSearchDTO implements Serializable { ...@@ -20,7 +21,7 @@ public class CourseDetailSearchDTO implements Serializable {
@ApiModelProperty(notes = "部门id") @ApiModelProperty(notes = "部门id")
private Integer organizationV2Id; private Integer organizationV2Id;
@ApiModelProperty(notes = "员工状态:1-待入职, 2-试用, 3-正式,4-调出, 5-待调入, 6-退休,8-离职,12-非正式") @ApiModelProperty(notes = "员工状态:0:离职 1:在职")
private Integer empStatus; private Integer empStatus;
@ApiModelProperty(notes = "学习状态:10 - 未学习,20 - 未完成,30 - 待考核,40 - 未通过,50 - 已完成,60 - 待签署") @ApiModelProperty(notes = "学习状态:10 - 未学习,20 - 未完成,30 - 待考核,40 - 未通过,50 - 已完成,60 - 待签署")
...@@ -40,4 +41,7 @@ public class CourseDetailSearchDTO implements Serializable { ...@@ -40,4 +41,7 @@ public class CourseDetailSearchDTO implements Serializable {
//导出长度限制 //导出长度限制
private Integer exportLimit; private Integer exportLimit;
@ApiModelProperty(notes = "员工id列表")
private List<Integer> userIds;
} }
...@@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; ...@@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
@Data @Data
public class CourseSearchDTO implements Serializable { public class CourseSearchDTO implements Serializable {
...@@ -16,6 +17,9 @@ public class CourseSearchDTO implements Serializable { ...@@ -16,6 +17,9 @@ public class CourseSearchDTO implements Serializable {
@ApiModelProperty(notes = "课程分类id") @ApiModelProperty(notes = "课程分类id")
private Integer courseCategoryId; private Integer courseCategoryId;
@ApiModelProperty(notes = "课程id列表")
private List<String> courseIds;
@ApiModelProperty(notes = "课程类型:10-视频,80-音频,20-混合,30-文档,40-H5,70-URL,120-图文") @ApiModelProperty(notes = "课程类型:10-视频,80-音频,20-混合,30-文档,40-H5,70-URL,120-图文")
private String courseFileType; private String courseFileType;
@ApiModelProperty(notes = "课程状态:10-转换中, 20-转换失败, 30-未发布, 40-已发布, 50-已下架") @ApiModelProperty(notes = "课程状态:10-转换中, 20-转换失败, 30-未发布, 40-已发布, 50-已下架")
...@@ -53,4 +57,8 @@ public class CourseSearchDTO implements Serializable { ...@@ -53,4 +57,8 @@ public class CourseSearchDTO implements Serializable {
@ApiModelProperty(notes = "修习标识:1-必修,2-选修") @ApiModelProperty(notes = "修习标识:1-必修,2-选修")
private Integer planCourseType; private Integer planCourseType;
private Integer userId;
private Integer rankLimit;
} }
...@@ -18,7 +18,7 @@ public class ExaminationDetailInfo implements Serializable { ...@@ -18,7 +18,7 @@ public class ExaminationDetailInfo implements Serializable {
@ApiModelProperty(notes = "考试标题") @ApiModelProperty(notes = "考试标题")
private String title; private String title;
@ApiModelProperty(notes = "考试时长") @ApiModelProperty(notes = "考试时长,分钟")
private Integer duration; private Integer duration;
@ApiModelProperty(notes = "考试题目数量") @ApiModelProperty(notes = "考试题目数量")
...@@ -27,12 +27,15 @@ public class ExaminationDetailInfo implements Serializable { ...@@ -27,12 +27,15 @@ public class ExaminationDetailInfo implements Serializable {
@ApiModelProperty(notes = "考试总次数") @ApiModelProperty(notes = "考试总次数")
private Integer examTimes; private Integer examTimes;
@ApiModelProperty(notes = "已使用次数")
private Integer useCount;
@ApiModelProperty(notes = "剩余次数") @ApiModelProperty(notes = "剩余次数")
private Integer remainingTimes; private Integer remainingTimes;
@ApiModelProperty(notes = "及格状态:10-及格,20-不及格") @ApiModelProperty(notes = "通过状态:1-通过,2-不通过")
private String examResult; private Integer examResult;
@ApiModelProperty(notes = "最高分数") @ApiModelProperty(notes = "最高分数")
private BigDecimal maxTotalScore; private BigDecimal maxTotalScore;
......
...@@ -4,16 +4,24 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -4,16 +4,24 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
@Data @Data
public class ExaminationSearchDTO implements Serializable { public class ExaminationSearchDTO implements Serializable {
@ApiModelProperty(notes = "用户id") @ApiModelProperty(notes = "用户id")
private String userId; private Integer userId;
@ApiModelProperty(notes = "用户手机号") @ApiModelProperty(notes = "用户手机号")
private String staffPhone; private String staffPhone;
@ApiModelProperty(notes = "及格状态:10-及格,20-不及格") @ApiModelProperty(notes = "通过状态:1-通过,2-不通过")
private String examResult; private Integer examResult;
private BigDecimal passScore;
/**
* 考试来源 40:培训项目 30:独立考试 20:在线课程 10:学习计划 50:岗位学习 60:导师安排 70:在线做课
*/
private String source;
} }
package cn.com.glsx.dj.riskmanage.dto.learningcenter;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 学习中心-开始测评弹窗 数据对象
* @author yangwei
* @version 1.0
* @since 2025/12/01 14:21
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class LearningCenterLevelExamDTO implements Serializable {
private static final long serialVersionUID = -3642780570488004954L;
/** 北森用户id */
private String userId;
/** 当前登录的手机号 */
@NotBlank(message = "手机号不能为空")
private String staffPhone;
}
package cn.com.glsx.dj.riskmanage.dto.learningcenter;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson;
import lombok.Data;
import java.io.Serializable;
/**
* 学员等级考试数据对象
* @author yangwei
* @version 1.0
* @since 2025/12/01 15:28
*/
@Data
public class LearningCenterLevelExamPersonDTO implements Serializable {
private static final long serialVersionUID = -317737762800907270L;
/**
* 用户等级考试id
*/
private Integer id;
/**
* 考试id
*/
private Integer examId;
/**
* 北森人员标识
*/
private Integer personId;
/**
* 北森人员名称
*/
private String personName;
/**
* 所属等级id
*/
private Integer levelId;
/**
* 所属等级名称
*/
private String levelName;
/**
* 等级考试是否已完成,0未完成 1已完成
*/
private Byte isCompleted;
/**
* 培训计划id
*/
private Integer planId;
/**
* 开单权限 (0:不启用, 1:启用)
*/
private Byte orderPermissionStatus;
/**
* 开单权限类型 (1:锁定开单权限, 完成培训计划后开放 2:开单权限已开放, 限时锁定)
*/
private Byte orderPermissionType;
/**
* 限时锁定参数
*/
private Integer limitTimeParam;
/**
* 白名单 (北森员工标识, 以英文逗号分隔)
*/
private String whiteList;
/**
* 北森考试标识
*/
private String beisenExamId;
/**
* 北森考试名称
*/
private String beisenExamName;
/**
* 考试时间
*/
private Integer examTime;
/**
* 培训计划信息
*/
private LearningCenterTrainingPlanPerson trainingPlanPerson;
}
package cn.com.glsx.dj.riskmanage.dto.learningcenter;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 学习中心-开始测评弹窗响应对象
* @author yangwei
* @version 1.0
* @since 2025/11/26 15:32
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class LearningCenterLevelExamRespDTO implements Serializable {
private static final long serialVersionUID = -7395962103823889618L;
/** 考试名称 */
private String title;
/** 考试id */
private String examId;
/** 北森用户id */
private String userId;
/** 当前登录的手机号 */
private String staffPhone;
}
...@@ -63,23 +63,10 @@ public class LevelExamPageListRequestDTO implements Serializable { ...@@ -63,23 +63,10 @@ public class LevelExamPageListRequestDTO implements Serializable {
/** /**
* 创建时间排序 (0:升序, 1:降序) * 排序方式:0-创建时间升序,1-创建时间降序,2-提交人数升序,3-提交人数降序,4-生效时间升序,5-生效时间降序
*/ */
@ApiModelProperty(notes = "创建时间排序 (0:升序, 1:降序)") @ApiModelProperty(notes = "排序方式:0-创建时间升序,1-创建时间降序,2-提交人数升序,3-提交人数降序,4-生效时间升序,5-生效时间降序")
private Integer createdDateSort; private Integer orderByType;
/**
* 提交人数排序 (0:升序, 1:降序)
*/
@ApiModelProperty(notes = "提交人数排序 (0:升序, 1:降序)")
private Integer submittedCountSort;
/**
* 生效时间排序 (0:升序, 1:降序)
*/
@ApiModelProperty(notes = "生效时间排序 (0:升序, 1:降序)")
private Integer effectiveDateSort;
/** /**
......
...@@ -3,12 +3,14 @@ package cn.com.glsx.dj.riskmanage.dto.learningcenter; ...@@ -3,12 +3,14 @@ package cn.com.glsx.dj.riskmanage.dto.learningcenter;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@Data @Data
public class LevelExamPersonDTO { public class LevelExamPersonDTO implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
......
...@@ -16,4 +16,6 @@ public class StudyDurationDetail implements Serializable { ...@@ -16,4 +16,6 @@ public class StudyDurationDetail implements Serializable {
@ApiModelProperty(notes = "学习时长") @ApiModelProperty(notes = "学习时长")
private BigDecimal duration; private BigDecimal duration;
private Integer userId;
} }
...@@ -16,6 +16,6 @@ public class TrainingPlanCourseDetailDTO { ...@@ -16,6 +16,6 @@ public class TrainingPlanCourseDetailDTO {
* 课程详情-课程详细信息 * 课程详情-课程详细信息
*/ */
@ApiModelProperty(notes = "课程详情-课程详细信息") @ApiModelProperty(notes = "课程详情-课程详细信息")
private Object courseDetail; private CoursePageInfo courseDetail;
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.riskmanage.dto.learningcenter; package cn.com.glsx.dj.riskmanage.dto.learningcenter;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlan;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
@Data @Data
public class TrainingPlanDTO implements Serializable { public class TrainingPlanDTO extends LearningCenterTrainingPlan implements Serializable {
private static final long serialVersionUID = -1795510151751099552L; private static final long serialVersionUID = -1795510151751099552L;
/** /**
* 主键id
*/
private Integer id;
/**
* 应用场景 (1:等级考试)
*/
private Byte sceneType;
/**
* 计划名称
*/
private String planName;
/**
* 考试id
*/
private Integer examId;
/**
* 考试名称
*/
private String examName;
/**
* 开单权限 (0:不启用, 1:启用)
*/
private Byte orderPermissionStatus;
/**
* 开单权限类型 (1:锁定开单权限, 完成培训计划后开放 2:开单权限已开放, 限时锁定)
*/
private Byte orderPermissionType;
/**
* 限时锁定参数
*/
private Integer limitTimeParam;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdDate;
/**
* 修改人
*/
private String updatedBy;
/**
* 修改时间
*/
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
private String deletedFlag;
/**
* 白名单 (北森员工标识, 以英文逗号分隔)
*/
private String whiteList;
/**
* 状态,0草稿、1生效、2失效
*/
private Byte status;
/**
* 课程数量 * 课程数量
*/ */
@ApiModelProperty(notes = "课程数量")
private Integer courseNum; private Integer courseNum;
/** /**
* 计划阶段人数 * 计划阶段人数
*/ */
@ApiModelProperty(notes = "计划阶段人数")
private Integer personNum; private Integer personNum;
@ApiModelProperty(notes = "创建时间开始时间")
private String startTime;
@ApiModelProperty(notes = "创建时间结束时间")
private String endTime;
} }
...@@ -105,7 +105,7 @@ public class TrainingPlanDetailDTO { ...@@ -105,7 +105,7 @@ public class TrainingPlanDetailDTO {
private String deletedFlag; private String deletedFlag;
@ApiModelProperty(notes = "课程,map结构,Map<考试等级id, Map<必|选修, 课程信息>>,1:必修, 2:选修") @ApiModelProperty(notes = "课程,map结构,Map<考试等级id, Map<必|选修, 课程信息>>,1:必修, 2:选修")
private Map<Integer, Map<Integer, List<TrainingPlanCourseDetailDTO>>> courseMap; private Map<Integer, Map<Byte, List<TrainingPlanCourseDetailDTO>>> courseMap;
@ApiModelProperty(notes = "白名单名称列表") @ApiModelProperty(notes = "白名单名称列表")
private List<String> whiteNameList; private List<String> whiteNameList;
......
package cn.com.glsx.dj.riskmanage.dto.learningcenter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 培训计划人员-分页查询请求
*/
@Data
public class TrainingPlanPersonPageDTO implements Serializable {
private static final long serialVersionUID = -1872940429855314420L;
/** 培训计划ID */
@ApiModelProperty(notes = "培训计划ID", required = true)
private Integer planId;
/** 员工姓名(模糊) */
@ApiModelProperty(notes = "员工姓名(支持模糊搜索)")
private String personName;
/** 手机号码(模糊) */
@ApiModelProperty(notes = "手机号码(支持模糊搜索)")
private String phoneNumber;
/** 所属部门(下拉单选,来自列表字段) */
@ApiModelProperty(notes = "所属部门(下拉单选)")
private Integer departId;
@ApiModelProperty(notes = "部门名称")
private String departName;
/** 职务(下拉单选,来自列表字段) */
@ApiModelProperty(notes = "职务(下拉单选)Id")
private String jobId;
@ApiModelProperty(notes = "职务名称")
private String jobName;
/** 人员状态(下拉单选,来自列表字段) */
@ApiModelProperty(notes = "人员状态(下拉单选)在职状态 0否 1是")
private Integer personStatus;
/** 开单权限(0:已锁定, 1:已解锁,下拉单选) */
@ApiModelProperty(notes = "开单权限(0:已锁定, 1:已解锁)")
private Byte openOrderStatus;
/** 入职日期-开始(yyyy-MM-dd) */
@ApiModelProperty(notes = "入职日期开始(yyyy-MM-dd)")
private Date entryStartDate;
/** 入职日期-结束(yyyy-MM-dd) */
@ApiModelProperty(notes = "入职日期结束(yyyy-MM-dd)")
private Date entryEndDate;
@ApiModelProperty(notes = "入职日期")
private Date entryDate;
/** 排序字段:entryDate */
@ApiModelProperty(notes = "排序字段:entryDate")
private String sortField;
/** 排序方向:asc 或 desc(默认desc) */
@ApiModelProperty(notes = "排序方向:asc 或 desc(默认desc)")
private String sortOrder;
@ApiModelProperty(notes = "北森用户Id集合")
private List<Integer> personIds;
@ApiModelProperty(notes = "北森用户Id")
private Integer personId;
/** 已完成课程数量(支持排序) */
@ApiModelProperty(notes = "已完成课程数量(支持排序)")
private Integer completedCourseCount;
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
import org.apache.commons.lang3.StringUtils;
/**
* @ApiModelProperty(notes = "课程类型:10-视频,80-音频,20-混合,30-文档,40-H5,70-URL,120-图文")
*/
public enum BeisenCourseFileTypeEnum {
VIDEO("10", "视频"),
AUDIO("80", "音频"),
MIXED("20", "混合"),
DOCUMENT("30", "文档"),
H5("40", "H5"),
URL("70", "URL"),
IMAGE_TEXT("120", "图文");
private final String code;
private final String desc;
BeisenCourseFileTypeEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
// 根据code获取枚举值
public static String getDescByCode(String code) {
if (StringUtils.isBlank(code)) {
return null;
}
for (BeisenCourseFileTypeEnum item : values()) {
if (item.getCode().equals(code)) {
return item.getDesc();
}
}
return null;
}
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
import org.apache.commons.lang3.StringUtils;
/**
* 课程状态:10-转换中, 20-转换失败, 30-未发布, 40-已发布, 50-已下架
*/
public enum BeisenCourseStatusEnum {
CONVERTING("10", "转换中"),
CONVERT_FAILED("20", "转换失败"),
UNRELEASED("30", "未发布"),
RELEASED("40", "已发布"),
SOLD_OUT("50", "已下架");
private final String code;
private final String desc;
BeisenCourseStatusEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
/**
* 根据状态码获取状态描述
* @param code 状态码
* @return 状态描述
*/
public static String getDescByCode(String code) {
if (StringUtils.isBlank(code)) {
return null;
}
for (BeisenCourseStatusEnum e : values()) {
if (e.getCode().equals(code)) {
return e.getDesc();
}
}
return null;
}
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
/**
* 考试来源 40:培训项目 30:独立考试 20:在线课程 10:学习计划 50:岗位学习 60:导师安排 70:在线做课
*/
public enum BeisenExamSourceEnum {
TRAINING_PROJECT("40", "培训项目"),
INDEPENDENT_EXAM("30", "独立考试"),
ONLINE_COURSE("20", "在线课程"),
LEARNING_PLAN("10", "学习计划"),
POST_LEARNING("50", "岗位学习"),
TUTOR_ARRANGEMENT("60", "导师安排"),
ONLINE_DOING_CLASS("70", "在线做课");
private final String code;
private final String name;
BeisenExamSourceEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 课程类型
* @author yangwei
* @version 1.0
* @since 2025/12/01 16:11
*/
@Getter
@AllArgsConstructor
public enum CourseTypeEnum {
REQUIRED((byte) 1, "必修"),
OPTIONAL((byte) 2, "选修");
private final Byte type;
private final String desc;
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 是否标志位枚举
* @author yangwei
* @version 1.0
* @since 2025/12/01 16:11
*/
@Getter
@AllArgsConstructor
public enum FlagEnum {
NO(0, "否"),
YES(1, "是");
private final Integer code;
private final String desc;
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
import org.apache.commons.lang3.StringUtils;
/**
* 学习状态:10 - 未学习,20 - 未完成,30 - 待考核,40 - 未通过,50 - 已完成,60 - 待签署
*/
public enum LearnStatusEnum {
UNLEARNED("10", "未学习"),
UNFINISHED("20", "未完成"),
TO_BE_ASSESSMENT("30", "待考核"),
UNPASSED("40", "未通过"),
FINISHED("50", "已完成"),
TO_BE_SIGNED("60", "待签署");
private final String code;
private final String info;
LearnStatusEnum(String code, String info) {
this.code = code;
this.info = info;
}
public String getCode() {
return code;
}
public String getInfo() {
return info;
}
//根据code获取info
public static String getInfoByCode(String code) {
if (StringUtils.isBlank(code)) {
return null;
}
for (LearnStatusEnum learnStatusEnum : LearnStatusEnum.values()) {
if (learnStatusEnum.getCode().equals(code)) {
return learnStatusEnum.getInfo();
}
}
return null;
}
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2025/12/1
**/
public enum TrainingPlanCourseTypeEnum {
REQUIRED((byte) 1, "必修"),
OPTIONAL((byte) 2, "选修");
private byte value;
private String desc;
TrainingPlanCourseTypeEnum(byte value, String desc) {
this.value = value;
this.desc = desc;
}
public byte getValue() {
return value;
}
public String getDesc() {
return desc;
}
public static TrainingPlanCourseTypeEnum getByValue(byte value) {
for (TrainingPlanCourseTypeEnum item : values()) {
if (item.value == value) {
return item;
}
}
return null;
}
public static TrainingPlanCourseTypeEnum getByDesc(String desc) {
for (TrainingPlanCourseTypeEnum item : values()) {
if (item.desc.equals(desc)) {
return item;
}
}
return null;
}
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2025/12/1
**/
public enum TrainingPlanOrderPermissionStatusEnum {
NOT_ENABLED((byte) 0, "不启用"),
ENABLED((byte) 1, "启用"),
;
private byte value;
private String desc;
TrainingPlanOrderPermissionStatusEnum(byte value, String desc) {
this.value = value;
this.desc = desc;
}
public byte getValue() {
return value;
}
public String getDesc() {
return desc;
}
public static String getDescByValue(byte value) {
for (TrainingPlanOrderPermissionStatusEnum item : values()) {
if (item.getValue() == value) {
return item.getDesc();
}
}
return null;
}
public static byte getValueByDesc(String desc) {
for (TrainingPlanOrderPermissionStatusEnum item : values()) {
if (item.getDesc().equals(desc)) {
return item.getValue();
}
}
return -1;
}
}
package cn.com.glsx.dj.riskmanage.enums.learningcenter;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2025/12/1
**/
public enum TrainingPlanStatusEnum {
DRAFT((byte) 0, "草稿"),
EFFECTIVE((byte) 1, "生效"),
INVALID((byte) 2, "失效");
private byte value;
private String desc;
TrainingPlanStatusEnum(byte value, String desc) {
this.value = value;
this.desc = desc;
}
public byte getValue() {
return value;
}
public String getDesc() {
return desc;
}
public static String getDescByValue(byte value) {
for (TrainingPlanStatusEnum item : TrainingPlanStatusEnum.values()) {
if (item.getValue() == value) {
return item.getDesc();
}
}
return null;
}
public static byte getValueByDesc(String desc) {
for (TrainingPlanStatusEnum item : TrainingPlanStatusEnum.values()) {
if (item.getDesc().equals(desc)) {
return item.getValue();
}
}
return -1;
}
}
package cn.com.glsx.dj.riskmanage.remote; package cn.com.glsx.dj.riskmanage.remote;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanPersonPageDTO;
import cn.com.glsx.framework.core.annotation.*; import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import java.util.List;
@ApiService(value = "学习中心,培训计划人员", owner = "linchong") @ApiService(value = "学习中心,培训计划人员", owner = "linchong")
public interface LearningCenterTrainingPlanPersonRemote { public interface LearningCenterTrainingPlanPersonRemote {
@ApiMethod("根据培训计划ID和开单权限查询人员ID集合") @ApiMethod("根据培训计划ID和开单权限查询人员ID集合")
@ApiParams({
@ApiParam(name = "planId", notes = "培训计划ID", dataType = ApiParam.DataTypeEnum.INTEGER, required = true),
@ApiParam(name = "openOrderStatus", notes = "开单权限(0:已锁定, 1:已解锁)", dataType = ApiParam.DataTypeEnum.BYTE)
})
@ApiResponse("人员ID集合") @ApiResponse("人员ID集合")
RpcResponse<List<Integer>> queryPersonIdsByPlanAndStatus(Integer planId, Byte openOrderStatus); RpcResponse<RpcPagination<TrainingPlanPersonPageDTO>> pageList(RpcPagination<TrainingPlanPersonPageDTO> pagination);
@ApiMethod("解锁开单权限") @ApiMethod("解锁开单权限")
@ApiParams({ @ApiParams({
......
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.riskmanage.remote; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.riskmanage.remote;
import cn.com.glsx.dj.riskmanage.dto.beisen.BeiSenEmployeeDTO; import cn.com.glsx.dj.riskmanage.dto.beisen.BeiSenEmployeeDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanDetailDTO;
import cn.com.glsx.framework.core.annotation.*; import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
...@@ -18,4 +19,18 @@ public interface LearningCenterTrainingPlanRemote { ...@@ -18,4 +19,18 @@ public interface LearningCenterTrainingPlanRemote {
@ApiParam(name = "pagination", notes = "分页信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true) @ApiParam(name = "pagination", notes = "分页信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("分页查询") @ApiResponse("分页查询")
RpcResponse<RpcPagination<BeiSenEmployeeDTO>> beiSenEmployeePage(RpcPagination<BeiSenEmployeeDTO> pagination); RpcResponse<RpcPagination<BeiSenEmployeeDTO>> beiSenEmployeePage(RpcPagination<BeiSenEmployeeDTO> pagination);
@ApiMethod("新增培训计划")
@ApiParam(name = "dto", notes = "新增培训计划信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("培训计划id")
RpcResponse<Integer> addTrainingPlan(TrainingPlanDetailDTO request);
@ApiMethod("培训计划-失效|生效")
@ApiParam(name = "dto", notes = "培训计划信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
RpcResponse<String> trainingPlanStatusToggle(TrainingPlanDetailDTO request);
@ApiMethod("查询培训计划详情")
@ApiParam(name = "id", notes = "培训计划id", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
@ApiResponse("培训计划详情")
RpcResponse<TrainingPlanDetailDTO> trainingPlanDetail(Integer id);
} }
package cn.com.glsx.dj.riskmanage.remote.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamRespDTO;
import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam;
import cn.com.glsx.framework.core.annotation.ApiResponse;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import io.swagger.annotations.ApiOperation;
/**
* pad端学习中心远程调用
* @author yangwei
* @version 1.0
* @since 2025/12/01 14:19
*/
@ApiService(value = "pad端学习中心远程调用", owner = "yangwei")
public interface PadLearningCenterRemote {
@ApiOperation("学习中心-开始测评弹窗")
@ApiMethod("学习中心-开始测评弹窗")
@ApiParam(name = "request", notes = "开始测评请求对象", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("成功")
RpcResponse<LearningCenterLevelExamRespDTO> learningCenterLevelExam(LearningCenterLevelExamDTO request);
}
...@@ -30,7 +30,7 @@ public class PlatformMerchantsDubboConfig extends DubboConfig{ ...@@ -30,7 +30,7 @@ public class PlatformMerchantsDubboConfig extends DubboConfig{
@Bean @Bean
public MerchantStaffRemote merchantStaffRemote() { public MerchantStaffRemote merchantStaffRemote() {
return factory.builder(MerchantStaffRemote.class).check(check).timeout(timeout).build(); return factory.builder(MerchantStaffRemote.class).version("2.0.0").check(check).timeout(timeout).build();
} }
} }
...@@ -8,6 +8,8 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper; ...@@ -8,6 +8,8 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseDetailPageInfo; import cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseDetailPageInfo;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseDetailSearchDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseDetailSearchDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.CoursePageInfo;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO;
import cn.com.glsx.dj.riskmanage.model.course.BeiSenCourseStaff; import cn.com.glsx.dj.riskmanage.model.course.BeiSenCourseStaff;
@Mapper @Mapper
...@@ -18,4 +20,6 @@ public interface BeiSenCourseStaffMapper extends OreMapper<BeiSenCourseStaff> { ...@@ -18,4 +20,6 @@ public interface BeiSenCourseStaffMapper extends OreMapper<BeiSenCourseStaff> {
List<BeiSenCourseStaff> selectByIds(@Param("ids") List<String> ids); List<BeiSenCourseStaff> selectByIds(@Param("ids") List<String> ids);
int insertListWithId(@Param("list") List<BeiSenCourseStaff> list); int insertListWithId(@Param("list") List<BeiSenCourseStaff> list);
List<CoursePageInfo> listRecommendedCoursePageInfo(CourseSearchDTO condition);
} }
...@@ -2,6 +2,8 @@ package cn.com.glsx.dj.riskmanage.mapper.beisen; ...@@ -2,6 +2,8 @@ package cn.com.glsx.dj.riskmanage.mapper.beisen;
import java.util.List; import java.util.List;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.ExaminationDetailInfo;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.ExaminationSearchDTO;
import cn.com.glsx.dj.riskmanage.model.examination.BeiSenExaminationTrainees; import cn.com.glsx.dj.riskmanage.model.examination.BeiSenExaminationTrainees;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -12,4 +14,9 @@ public interface BeiSenExaminationTraineesMapper extends OreMapper<BeiSenExamina ...@@ -12,4 +14,9 @@ public interface BeiSenExaminationTraineesMapper extends OreMapper<BeiSenExamina
List<BeiSenExaminationTrainees> selectByIds(@Param("ids") List<String> ids); List<BeiSenExaminationTrainees> selectByIds(@Param("ids") List<String> ids);
int insertListWithId(@Param("list") List<BeiSenExaminationTrainees> list); int insertListWithId(@Param("list") List<BeiSenExaminationTrainees> list);
List<ExaminationDetailInfo> listExaminationDetail(ExaminationSearchDTO request);
Integer countExaminationDetail(ExaminationSearchDTO request);
} }
...@@ -17,4 +17,7 @@ public interface BeiSenJobPostMapper extends OreMapper<BeiSenJobPost> { ...@@ -17,4 +17,7 @@ public interface BeiSenJobPostMapper extends OreMapper<BeiSenJobPost> {
int insertListWithId(@Param("list") List<BeiSenJobPost> list); int insertListWithId(@Param("list") List<BeiSenJobPost> list);
List<BeiSenJobPostDTO> beiSenJobPostPage(BeiSenJobPostDTO condition); List<BeiSenJobPostDTO> beiSenJobPostPage(BeiSenJobPostDTO condition);
List<BeiSenJobPost> selectJobPostByOId(@Param("ids") List<String> ids);
} }
...@@ -2,6 +2,8 @@ package cn.com.glsx.dj.riskmanage.mapper.beisen; ...@@ -2,6 +2,8 @@ package cn.com.glsx.dj.riskmanage.mapper.beisen;
import java.util.List; import java.util.List;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.StudyDurationDetail;
import cn.com.glsx.dj.riskmanage.model.course.BeiSenLearnStaffProgressDaily; import cn.com.glsx.dj.riskmanage.model.course.BeiSenLearnStaffProgressDaily;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -21,4 +23,11 @@ public interface BeiSenLearnStaffProgressDailyMapper extends OreMapper<BeiSenLea ...@@ -21,4 +23,11 @@ public interface BeiSenLearnStaffProgressDailyMapper extends OreMapper<BeiSenLea
List<BeiSenLearnStaffProgressDaily> selectByIds(@Param("ids") List<String> ids); List<BeiSenLearnStaffProgressDaily> selectByIds(@Param("ids") List<String> ids);
int insertListWithId(@Param("list") List<BeiSenLearnStaffProgressDaily> list); int insertListWithId(@Param("list") List<BeiSenLearnStaffProgressDaily> list);
/**
* 统计学习时长排名
* @param request
* @return
*/
List<StudyDurationDetail> listStudyDurationRank(CourseSearchDTO request);
} }
package cn.com.glsx.dj.riskmanage.mapper.learningcenter; package cn.com.glsx.dj.riskmanage.mapper.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamPersonDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPersonDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPersonDTO;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterLevelExamPerson; import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterLevelExamPerson;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -24,4 +25,6 @@ public interface LearningCenterLevelExamPersonMapper extends OreMapper<LearningC ...@@ -24,4 +25,6 @@ public interface LearningCenterLevelExamPersonMapper extends OreMapper<LearningC
* 超时未完成自动锁住开单权限 * 超时未完成自动锁住开单权限
*/ */
void autoLockOpenOrder(); void autoLockOpenOrder();
List<LearningCenterLevelExamPersonDTO> findLevelExamPerson(Integer userId);
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.riskmanage.remote.learningcenter; package cn.com.glsx.dj.riskmanage.remote.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanPersonPageDTO;
import cn.com.glsx.dj.riskmanage.remote.LearningCenterTrainingPlanPersonRemote; import cn.com.glsx.dj.riskmanage.remote.LearningCenterTrainingPlanPersonRemote;
import cn.com.glsx.dj.riskmanage.service.learningcenter.LearningCenterTrainingPlanPersonService; import cn.com.glsx.dj.riskmanage.service.learningcenter.LearningCenterTrainingPlanPersonService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService; import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@Slf4j @Slf4j
@DubboService(retries = 0, timeout = 30000) @DubboService(retries = 0, timeout = 30000)
public class LearningCenterTrainingPlanPersonRemoteImpl implements LearningCenterTrainingPlanPersonRemote { public class LearningCenterTrainingPlanPersonRemoteImpl implements LearningCenterTrainingPlanPersonRemote {
...@@ -18,9 +18,9 @@ public class LearningCenterTrainingPlanPersonRemoteImpl implements LearningCente ...@@ -18,9 +18,9 @@ public class LearningCenterTrainingPlanPersonRemoteImpl implements LearningCente
private LearningCenterTrainingPlanPersonService learningCenterTrainingPlanPersonService; private LearningCenterTrainingPlanPersonService learningCenterTrainingPlanPersonService;
@Override @Override
public RpcResponse<List<Integer>> queryPersonIdsByPlanAndStatus(Integer planId, Byte openOrderStatus) { public RpcResponse<RpcPagination<TrainingPlanPersonPageDTO>> pageList(RpcPagination<TrainingPlanPersonPageDTO> pagination){
try { try {
return RpcResponse.success(learningCenterTrainingPlanPersonService.queryPersonIdsByPlanAndStatus(planId, openOrderStatus)); return RpcResponse.success(RpcPagination.copyPage(learningCenterTrainingPlanPersonService.pageList(pagination)));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
return RpcResponse.error(e); return RpcResponse.error(e);
......
package cn.com.glsx.dj.riskmanage.remote.learningcenter; package cn.com.glsx.dj.riskmanage.remote.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.beisen.BeiSenEmployeeDTO; import cn.com.glsx.dj.riskmanage.dto.beisen.BeiSenEmployeeDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LevelExamPersonDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanDTO; import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanDetailDTO;
import cn.com.glsx.dj.riskmanage.remote.LearningCenterTrainingPlanRemote; import cn.com.glsx.dj.riskmanage.remote.LearningCenterTrainingPlanRemote;
import cn.com.glsx.dj.riskmanage.service.learningcenter.LearningCenterTrainingPlanService; import cn.com.glsx.dj.riskmanage.service.learningcenter.LearningCenterTrainingPlanService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
...@@ -17,12 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -17,12 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired;
@DubboService(retries = 0, timeout = 30000) @DubboService(retries = 0, timeout = 30000)
public class LearningCenterTrainingPlanRemoteImpl implements LearningCenterTrainingPlanRemote { public class LearningCenterTrainingPlanRemoteImpl implements LearningCenterTrainingPlanRemote {
@Autowired @Autowired
private LearningCenterTrainingPlanService learningCenterTrainingPlanService; private LearningCenterTrainingPlanService trainingPlanService;
@Override @Override
public RpcResponse<RpcPagination<TrainingPlanDTO>> listWithPage(RpcPagination<TrainingPlanDTO> pagination) { public RpcResponse<RpcPagination<TrainingPlanDTO>> listWithPage(RpcPagination<TrainingPlanDTO> pagination) {
try { try {
return RpcResponse.success(RpcPagination.copyPage(learningCenterTrainingPlanService.listWithPage(pagination))); return RpcResponse.success(RpcPagination.copyPage(trainingPlanService.listWithPage(pagination)));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
return RpcResponse.error(e); return RpcResponse.error(e);
...@@ -32,7 +32,7 @@ public class LearningCenterTrainingPlanRemoteImpl implements LearningCenterTrain ...@@ -32,7 +32,7 @@ public class LearningCenterTrainingPlanRemoteImpl implements LearningCenterTrain
@Override @Override
public RpcResponse<RpcPagination<BeiSenEmployeeDTO>> beiSenEmployeePage(RpcPagination<BeiSenEmployeeDTO> pagination) { public RpcResponse<RpcPagination<BeiSenEmployeeDTO>> beiSenEmployeePage(RpcPagination<BeiSenEmployeeDTO> pagination) {
try { try {
Page<BeiSenEmployeeDTO> page = learningCenterTrainingPlanService.beiSenEmployeePage(pagination); Page<BeiSenEmployeeDTO> page = trainingPlanService.beiSenEmployeePage(pagination);
return RpcResponse.success(RpcPagination.copyPage(page)); return RpcResponse.success(RpcPagination.copyPage(page));
}catch(RpcServiceException e){ }catch(RpcServiceException e){
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
...@@ -42,4 +42,46 @@ public class LearningCenterTrainingPlanRemoteImpl implements LearningCenterTrain ...@@ -42,4 +42,46 @@ public class LearningCenterTrainingPlanRemoteImpl implements LearningCenterTrain
return RpcResponse.error(e); return RpcResponse.error(e);
} }
} }
@Override
public RpcResponse<Integer> addTrainingPlan(TrainingPlanDetailDTO request) {
try {
Integer id = trainingPlanService.addTrainingPlan(request);
return RpcResponse.success(id);
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<String> trainingPlanStatusToggle(TrainingPlanDetailDTO request) {
try {
trainingPlanService.trainingPlanStatusToggle(request);
return RpcResponse.success("success");
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<TrainingPlanDetailDTO> trainingPlanDetail(Integer id) {
try {
TrainingPlanDetailDTO detail = trainingPlanService.trainingPlanDetail(id);
return RpcResponse.success(detail);
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}catch(Exception e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}
}
} }
package cn.com.glsx.dj.riskmanage.remote.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamRespDTO;
import cn.com.glsx.dj.riskmanage.service.learningcenter.PadLearningCenterService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
/**
* pad端学习中心远程调用
* @author yangwei
* @version 1.0
* @since 2025/12/01 14:33
*/
@Slf4j
@DubboService
@RequiredArgsConstructor
public class PadLearningCenterRemoteImpl implements PadLearningCenterRemote {
private final PadLearningCenterService padLearningCenterService;
/**
* 学习中心-开始测评弹窗
* @author yangwei
* @since 2025/12/1 14:35
* @param request 请求对象
* @return cn.com.glsx.framework.core.beans.rpc.RpcResponse<cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamRespDTO> 响应对象
*/
@Override
public RpcResponse<LearningCenterLevelExamRespDTO> learningCenterLevelExam(LearningCenterLevelExamDTO request) {
try {
return RpcResponse.success(padLearningCenterService.learningCenterLevelExam(request));
} catch (RpcServiceException e) {
log.error("学习中心-开始测评弹窗接口调用异常!", e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("学习中心-开始测评弹窗接口调用异常!", e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.riskmanage.service.learningcenter; package cn.com.glsx.dj.riskmanage.service.learningcenter;
import cn.com.glsx.dj.riskmanage.config.KafkaTopicConfig; import cn.com.glsx.dj.riskmanage.config.KafkaTopicConfig;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamPersonDTO;
import cn.com.glsx.dj.riskmanage.mapper.beisen.BeiSenExaminationTraineesMapper; import cn.com.glsx.dj.riskmanage.mapper.beisen.BeiSenExaminationTraineesMapper;
import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterLevelExamLevelMapper; import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterLevelExamLevelMapper;
import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterLevelExamMapper; import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterLevelExamMapper;
...@@ -104,4 +105,15 @@ public class LearningCenterLevelExamPersonService { ...@@ -104,4 +105,15 @@ public class LearningCenterLevelExamPersonService {
public void autoLockOpenOrder() { public void autoLockOpenOrder() {
levelExamPersonMapper.autoLockOpenOrder(); levelExamPersonMapper.autoLockOpenOrder();
} }
/**
* 查询等级考试数据
* @author yangwei
* @since 2025/12/1 15:32
* @param userId 北森用户id
* @return java.util.List<cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamPersonDTO>
*/
public List<LearningCenterLevelExamPersonDTO> findLevelExamPerson(Integer userId) {
return levelExamPersonMapper.findLevelExamPerson(userId);
}
} }
package cn.com.glsx.dj.riskmanage.service.learningcenter;
import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanCourseMapper;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanCourse;
import cn.com.glsx.dj.system.model.UserRole;
import cn.com.glsx.scrm.equity.enums.DeleteFlagEnum;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import java.util.List;
/**
* 培训计划-课程 业务类
* @author yangwei
* @version 1.0
* @since 2025/12/01 15:42
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class LearningCenterTrainingPlanCourseService {
private final LearningCenterTrainingPlanCourseMapper learningCenterTrainingPlanCourseMapper;
/**
* 查询培训计划-课程列表
* @author yangwei
* @since 2025/12/1 15:46
* @param trainingPlanCourses 培训计划-课程列表
* @return java.util.List<cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanCourse>
*/
public List<LearningCenterTrainingPlanCourse> findTransPlanCourseList(List<LearningCenterTrainingPlanCourse> trainingPlanCourses) {
Example example = new Example(LearningCenterTrainingPlanCourse.class);
example.createCriteria()
.andEqualTo("deletedFlag", DeleteFlagEnum.N.getValue());
for (LearningCenterTrainingPlanCourse trainingPlanCourse : trainingPlanCourses) {
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("planId", trainingPlanCourse.getPlanId())
.andEqualTo("examLevelId", trainingPlanCourse.getExamLevelId());
example.or(criteria);
}
return learningCenterTrainingPlanCourseMapper.selectByExample(example);
}
}
package cn.com.glsx.dj.riskmanage.service.learningcenter; package cn.com.glsx.dj.riskmanage.service.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanPersonPageDTO;
import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanPersonMapper; import cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanPersonMapper;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson; import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum; import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.RpcAssert; import cn.com.glsx.framework.core.util.RpcAssert;
import cn.com.glsx.scrm.equity.enums.DeleteFlagEnum;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import java.util.List; import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Slf4j @Slf4j
...@@ -19,22 +30,84 @@ import java.util.stream.Collectors; ...@@ -19,22 +30,84 @@ import java.util.stream.Collectors;
public class LearningCenterTrainingPlanPersonService { public class LearningCenterTrainingPlanPersonService {
private final LearningCenterTrainingPlanPersonMapper learningCenterTrainingPlanPersonMapper; private final LearningCenterTrainingPlanPersonMapper learningCenterTrainingPlanPersonMapper;
private final MerchantStaffRemote merchantStaffRemote;
/** /**
* 根据培训计划ID和开单权限查询人员ID集合 * 根据培训计划ID和开单权限查询人员ID集合
*/ */
public List<Integer> queryPersonIdsByPlanAndStatus(Integer planId, Byte openOrderStatus) { public Page<TrainingPlanPersonPageDTO> pageList(RpcPagination<TrainingPlanPersonPageDTO> pagination) {
RpcAssert.assertNotNull(planId, DefaultErrorEnum.PARAMETER_NULL, "planId not be null"); TrainingPlanPersonPageDTO condition = pagination.getCondition();
RpcAssert.assertNotNull(condition.getPlanId(), DefaultErrorEnum.PARAMETER_NULL, "planId not be null");
try { try {
Example example = new Example(LearningCenterTrainingPlanPerson.class); Example example = new Example(LearningCenterTrainingPlanPerson.class);
Example.Criteria criteria = example.createCriteria(); Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("planId", planId); criteria.andEqualTo("planId", condition.getPlanId());
criteria.andEqualTo("deletedFlag", "N"); criteria.andEqualTo("deletedFlag", "N");
if (openOrderStatus != null) { if (condition.getOpenOrderStatus() != null) {
criteria.andEqualTo("openOrderStatus", openOrderStatus); criteria.andEqualTo("openOrderStatus", condition.getOpenOrderStatus());
} }
List<LearningCenterTrainingPlanPerson> persons = learningCenterTrainingPlanPersonMapper.selectByExample(example); List<LearningCenterTrainingPlanPerson> persons = learningCenterTrainingPlanPersonMapper.selectByExample(example);
return persons.stream().map(LearningCenterTrainingPlanPerson::getPersonId).collect(Collectors.toList()); List<Integer> userIdList = persons.stream().map(LearningCenterTrainingPlanPerson::getPersonId).collect(Collectors.toList());
BeiSenEmployeeListRequestDTO requestDTO = new BeiSenEmployeeListRequestDTO();
requestDTO.setUserIds(userIdList);
requestDTO.setEmployeeName(condition.getPersonName());
requestDTO.setMobilePhone(condition.getPhoneNumber());
requestDTO.setOIdDepartmentIds(Collections.singletonList(condition.getDepartId()));
requestDTO.setOIdJobPostIds(Collections.singletonList(condition.getJobId()));
requestDTO.setStatus(condition.getPersonStatus());
requestDTO.setEntryStartDate(condition.getEntryStartDate());
requestDTO.setSortField(condition.getSortField());
requestDTO.setSortOrder(condition.getSortOrder());
RpcPagination rpcPagination = new RpcPagination();
rpcPagination.setPageNum(pagination.getPageNum());
rpcPagination.setPageSize(pagination.getPageSize());
rpcPagination.setCondition(rpcPagination);
RpcResponse<RpcPagination<BeiSenEmployeeListResonseDTO>> rpcResponse = merchantStaffRemote.getBeisenUserWithConditions(rpcPagination);
// 检查响应结果
if (!rpcResponse.isSuccess() || rpcResponse.getResult() == null) {
log.warn("query beisen user failed, planId: {}", condition.getPlanId());
return new Page<>(pagination.getPageNum(), pagination.getPageSize());
}
RpcPagination<BeiSenEmployeeListResonseDTO> beisenPage = rpcResponse.getResult();
// 创建 Page 对象
Page<TrainingPlanPersonPageDTO> page = new Page<>(pagination.getPageNum(), pagination.getPageSize());
page.setTotal(beisenPage.getTotal());
// 构建人员ID与开单权限的映射关系
Map<Integer, LearningCenterTrainingPlanPerson> personOpenOrderStatusMap = persons.stream()
.collect(Collectors.toMap(LearningCenterTrainingPlanPerson::getPersonId, Function.identity()));
// 转换数据并填充开单权限
List<TrainingPlanPersonPageDTO> resultList = new ArrayList<>();
if (beisenPage.getList() != null && !beisenPage.getList().isEmpty()) {
for (BeiSenEmployeeListResonseDTO employeeDTO : beisenPage.getList()) {
TrainingPlanPersonPageDTO dto = new TrainingPlanPersonPageDTO();
dto.setPlanId(condition.getPlanId());
dto.setPersonId(employeeDTO.getUserID());
dto.setPersonName(employeeDTO.getName());
dto.setPhoneNumber(employeeDTO.getMobilePhone());
dto.setDepartId(employeeDTO.getOldDepartmentId());
// todo
dto.setDepartName("");
dto.setJobId(employeeDTO.getOIdJobPostId());
dto.setJobName(employeeDTO.getOIdJobPost());
dto.setPersonStatus(employeeDTO.getZzStatus());
// 设置开单权限状态
Byte openOrderStatus = personOpenOrderStatusMap.get(employeeDTO.getUserID()).getOpenOrderStatus();
dto.setOpenOrderStatus(openOrderStatus != null ? openOrderStatus : (byte) 0);
dto.setEntryDate(employeeDTO.getEntryDate());
// todo
dto.setCompletedCourseCount(null);
resultList.add(dto);
}
}
page.addAll(resultList);
return page;
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage()); throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage());
...@@ -81,4 +154,19 @@ public class LearningCenterTrainingPlanPersonService { ...@@ -81,4 +154,19 @@ public class LearningCenterTrainingPlanPersonService {
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage()); throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR, e.getMessage());
} }
} }
/**
* 查询人员已推送的培训计划
* @author yangwei
* @since 2025/12/1 16:33
* @param userId 用户id
* @return java.util.List<cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson>
*/
public List<LearningCenterTrainingPlanPerson> findPersonTrainingPlan(Integer userId) {
Example example = new Example(LearningCenterTrainingPlanPerson.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("personId", userId);
criteria.andEqualTo("deletedFlag", DeleteFlagEnum.N.getValue());
return learningCenterTrainingPlanPersonMapper.selectByExample(example);
}
} }
package cn.com.glsx.dj.riskmanage.service.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamPersonDTO;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamRespDTO;
import cn.com.glsx.dj.riskmanage.enums.learningcenter.CourseTypeEnum;
import cn.com.glsx.dj.riskmanage.enums.learningcenter.FlagEnum;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanCourse;
import cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson;
import cn.com.glsx.dj.riskmanage.util.validation.BeanValidationUtils;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.validation.groups.Default;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* pad端学习中心业务对象
* @author yangwei
* @version 1.0
* @since 2025/12/01 14:36
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class PadLearningCenterService {
private final MerchantStaffRemote merchantStaffRemote;
private final LearningCenterLevelExamPersonService learningCenterLevelExamPersonService;
private final LearningCenterTrainingPlanPersonService learningCenterTrainingPlanPersonService;
private final LearningCenterTrainingPlanCourseService learningCenterTrainingPlanCourseService;
/**
* pad端学习中心-开始测评弹窗
* 1. 获取用户当前处于的培训计划阶段
* 2. 当前培训计划等级考试未考,则返回等级考试信息
* @author yangwei
* @since 2025/12/1 14:38
* @param request 请求对象
* @return cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamRespDTO 响应对象
*/
public LearningCenterLevelExamRespDTO learningCenterLevelExam(LearningCenterLevelExamDTO request) {
BeanValidationUtils.validateAndThrow(request, Default.class);
BeiSenEmployeeListResonseDTO beiSenEmployeeListResonseDTO = getBeiSenUserInfo(request.getStaffPhone());
if (ObjectUtil.isNull(beiSenEmployeeListResonseDTO)) {
return null;
}
// 获取用户当前处于的培训计划阶段
LearningCenterLevelExamPersonDTO userTrainingPlanStage = getUserTrainingPlanStage(beiSenEmployeeListResonseDTO);
if (ObjectUtil.isNull(userTrainingPlanStage)) {
return null;
}
Byte isCompleted = Optional.ofNullable(userTrainingPlanStage.getIsCompleted()).orElse(FlagEnum.NO.getCode().byteValue());
if (FlagEnum.YES.getCode().compareTo(isCompleted.intValue()) == 0) {
return null;
}
return LearningCenterLevelExamRespDTO.builder()
.title(userTrainingPlanStage.getBeisenExamName())
.examId(userTrainingPlanStage.getBeisenExamId())
.userId(request.getUserId())
.staffPhone(request.getStaffPhone())
.build();
}
/**
* pad端学习中心-获取北森用户信息
* @author yangwei
* @since 2025/12/1 14:38
* @param phone 手机号
* @return cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO 用户信息
*/
public BeiSenEmployeeListResonseDTO getBeiSenUserInfo(String phone) {
BeiSenEmployeeListRequestDTO beiSenEmployeeListRequestDTO = new BeiSenEmployeeListRequestDTO();
beiSenEmployeeListRequestDTO.setMobilePhone(phone);
RpcPagination<BeiSenEmployeeListRequestDTO> rpcPagination = new RpcPagination<>();
rpcPagination.setCondition(beiSenEmployeeListRequestDTO);
RpcResponse<RpcPagination<BeiSenEmployeeListResonseDTO>> beiSenUserInfoPages = merchantStaffRemote.getBeisenUserWithConditions(rpcPagination);
if (!beiSenUserInfoPages.hasResult()) {
return null;
}
RpcPagination<BeiSenEmployeeListResonseDTO> result = beiSenUserInfoPages.getResult();
return result.getList().get(0);
}
/**
* 获取用户当前处于的培训计划阶段
* @author yangwei
* @since 2025/12/1 17:17
* @param beiSenEmpInfo 北森用户信息
* @return cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamPersonDTO 培训计划阶段信息
*/
public LearningCenterLevelExamPersonDTO getUserTrainingPlanStage(BeiSenEmployeeListResonseDTO beiSenEmpInfo) {
LearningCenterLevelExamPersonDTO result = null;
Integer userId = beiSenEmpInfo.getUserID();
// 获取用户的所有培训计划
List<LearningCenterLevelExamPersonDTO> learningCenterLevelExamPersons = learningCenterLevelExamPersonService.findLevelExamPerson(userId);
if (CollUtil.isEmpty(learningCenterLevelExamPersons)) {
return null;
}
List<LearningCenterTrainingPlanCourse> trainingPlanCourses = learningCenterLevelExamPersons.stream().map(element -> {
LearningCenterTrainingPlanCourse trainingPlanCourse = new LearningCenterTrainingPlanCourse();
trainingPlanCourse.setPlanId(element.getId());
trainingPlanCourse.setExamLevelId(element.getLevelId());
return trainingPlanCourse;
}).collect(Collectors.toList());
// 筛选出包含必修课程的培训计划
List<LearningCenterTrainingPlanCourse> trainingPlanCourse = learningCenterTrainingPlanCourseService.findTransPlanCourseList(trainingPlanCourses);
if (CollUtil.isEmpty(trainingPlanCourse)) {
return null;
}
Map<Integer, List<LearningCenterTrainingPlanCourse>> planIdMapCourse = trainingPlanCourse.stream()
.filter(element -> CourseTypeEnum.REQUIRED.getType().compareTo(element.getType()) == 0)
.collect(Collectors.groupingBy(LearningCenterTrainingPlanCourse::getPlanId));
learningCenterLevelExamPersons = learningCenterLevelExamPersons.stream()
.filter(element -> planIdMapCourse.containsKey(element.getPlanId()))
.sorted(Comparator.comparing(LearningCenterLevelExamPersonDTO::getExamTime))
.collect(Collectors.toList());
if (CollUtil.isEmpty(learningCenterLevelExamPersons)) {
return null;
}
// 确定当前用户所处培训
List<LearningCenterTrainingPlanPerson> trainingPlanPerson = learningCenterTrainingPlanPersonService.findPersonTrainingPlan(userId);
Map<Integer, LearningCenterTrainingPlanPerson> pushedPlanIdMapPerson = trainingPlanPerson.stream().collect(
Collectors.toMap(LearningCenterTrainingPlanPerson::getPlanId, Function.identity(), (k1, k2) -> k1));
for (int i = 0; i < learningCenterLevelExamPersons.size(); i++) {
LearningCenterLevelExamPersonDTO element = learningCenterLevelExamPersons.get(i);
if (FlagEnum.NO.getCode() == element.getIsCompleted().intValue()) {
result = element;
break;
}
// 未推送培训计划,即等级考试未考
LearningCenterTrainingPlanPerson learningCenterTrainingPlanPerson = pushedPlanIdMapPerson.get(element.getPlanId());
if (ObjectUtil.isNull(learningCenterTrainingPlanPerson)) {
result = element;
break;
}
element.setTrainingPlanPerson(learningCenterTrainingPlanPerson);
// 培训计划未完成
if (FlagEnum.NO.getCode() == learningCenterTrainingPlanPerson.getOpenOrderStatus().intValue()) {
result = element;
break;
}
// 培训已完成但后面还存在等级考试,继续往后找
if (FlagEnum.YES.getCode() == learningCenterTrainingPlanPerson.getIsCompleted().intValue() && i < (learningCenterLevelExamPersons.size() - 1)) {
continue;
}
result = element;
}
return result;
}
}
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<sql id="coursePageCondition"> <sql id="coursePageCondition">
<where> <where>
bc.delete_flag = 'N' bc.deleted_flag = 'N'
<if test="courseCategoryId != null"> <if test="courseCategoryId != null">
<choose> <choose>
<when test="courseCategoryId == 1"> <when test="courseCategoryId == 1">
...@@ -93,23 +93,29 @@ ...@@ -93,23 +93,29 @@
<if test="createdBy != null and createdBy != ''"> <if test="createdBy != null and createdBy != ''">
and bc.beisen_created_by like concat('%', #{createdBy}, '%') and bc.beisen_created_by like concat('%', #{createdBy}, '%')
</if> </if>
<if test="createdStartTime != null"> <if test="createTimeStart != null">
and bc.beisen_created_time &gt;= #{createdStartTime} and bc.beisen_created_time &gt;= #{createTimeStart}
</if> </if>
<if test="createdEndTime != null"> <if test="createTimeEnd != null">
and bc.beisen_created_time &lt;= #{createdEndTime} and bc.beisen_created_time &lt;= #{createTimeEnd}
</if>
<if test="courseIds != null and courseIds.size() > 0">
and bc.id in
<foreach collection="courseIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if> </if>
</where> </where>
</sql> </sql>
<select id="listCoursePageInfo" resultMap="BaseResultMap" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO" > <select id="listCoursePageInfo" resultMap="CoursePageMap" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO" >
select bc.id, bc.title, bc.course_file_type, bc.total_duration, bc.course_status, select bc.id, bc.title, bc.course_file_type, bc.total_duration, bc.course_status,
cc.category_name as categoryName, ccr.category_id as categoryId, ccr.parent_id as parentId, cc.category_name as categoryName, ccr.category_id as categoryId, ccr.parent_id as parentId,
bo.name as organizationName, bc.learn_total, bc.total_star, bc.beisen_created_by, bc.beisen_created_time bo.name as organizationName, bc.learn_total, bc.total_star, bc.beisen_created_by, bc.beisen_created_time
from dj_beisen_course bc from dj_beisen_course bc
left join dj_car_life_learning_center_course_category_rel ccr on bc.id = ccr.course_id and ccr.delete_flag = 'N' left join dj_car_life_learning_center_course_category_rel ccr on bc.id = ccr.course_id and ccr.deleted_flag = 'N'
left join dj_car_life_learning_center_course_category cc on ccr.category_id = cc.id and cc.delete_flag = 'N' left join dj_car_life_learning_center_course_category cc on ccr.category_id = cc.id and cc.deleted_flag = 'N'
left join dj_beisen_organization bo on bc.organization = bo.o_id and bo.delete_flag = 0 left join dj_beisen_organization bo on bc.organization = bo.o_id and bo.std_is_deleted = 0
<include refid="coursePageCondition"></include> <include refid="coursePageCondition"></include>
<if test="sortType != null"> <if test="sortType != null">
<choose> <choose>
...@@ -128,9 +134,9 @@ ...@@ -128,9 +134,9 @@
<select id="countCourse" resultType="java.lang.Integer" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO" > <select id="countCourse" resultType="java.lang.Integer" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO" >
select count(1) from dj_beisen_course bc select count(1) from dj_beisen_course bc
left join dj_car_life_learning_center_course_category_rel ccr on bc.id = ccr.course_id and ccr.delete_flag = 'N' left join dj_car_life_learning_center_course_category_rel ccr on bc.id = ccr.course_id and ccr.deleted_flag = 'N'
left join dj_car_life_learning_center_course_category cc on ccr.category_id = cc.id and cc.delete_flag = 'N' left join dj_car_life_learning_center_course_category cc on ccr.category_id = cc.id and cc.deleted_flag = 'N'
left join dj_beisen_organization bo on bc.organization = bo.o_id and bo.delete_flag = 0 left join dj_beisen_organization bo on bc.organization = bo.o_id and bo.std_is_deleted = 0
<include refid="coursePageCondition"></include> <include refid="coursePageCondition"></include>
</select> </select>
......
...@@ -36,11 +36,27 @@ ...@@ -36,11 +36,27 @@
</resultMap> </resultMap>
<resultMap id="CourseDetailMap" type="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseDetailPageInfo"> <resultMap id="CourseDetailMap" type="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseDetailPageInfo">
<result column="user_id" property="userId" jdbcType="VARCHAR" /> <result column="user_id" property="userId"/>
<result column="learn_status" property="learnStatus" jdbcType="VARCHAR" /> <result column="learn_status" property="learnStatus" jdbcType="VARCHAR" />
<result column="total_score" property="maxScore" jdbcType="DECIMAL" /> <result column="total_score" property="maxScore" jdbcType="DECIMAL" />
</resultMap> </resultMap>
<resultMap id="CoursePageMap" type="cn.com.glsx.dj.riskmanage.dto.learningcenter.CoursePageInfo">
<result column="id" property="courseId" jdbcType="VARCHAR" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="course_file_type" property="courseFileType" jdbcType="VARCHAR" />
<result column="total_duration" property="totalDuration"/>
<result column="course_status" property="courseStatus" jdbcType="VARCHAR" />
<result column="categoryName" property="categoryName" jdbcType="VARCHAR" />
<result column="categoryId" property="categoryId" />
<result column="parentId" property="parentId"/>
<result column="organizationName" property="organizationName" jdbcType="VARCHAR" />
<result column="learn_total" property="learnTotal" />
<result column="total_star" property="totalStar" />
<result column="beisen_created_time" property="createdTime" />
<result column="plan_course_type" property="planCourseType" />
</resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
...@@ -72,6 +88,12 @@ ...@@ -72,6 +88,12 @@
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="userIds != null and userIds.size() > 0">
and cs.user_id in
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</if>
</where> </where>
order by cs.total_score ${sortOrder}, cs.user_id asc order by cs.total_score ${sortOrder}, cs.user_id asc
</select> </select>
...@@ -107,4 +129,58 @@ ...@@ -107,4 +129,58 @@
) )
</foreach> </foreach>
</insert> </insert>
<select id="listRecommendedCoursePageInfo" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO" resultMap="CoursePageMap">
select bc.id as courseId, bc.title, bc.course_file_type, bc.total_duration, bc.course_status,
bc.learn_total, bc.total_star, bc.beisen_created_time, cpc.plan_course_type
from learning_center_person_course cpc
left join dj_beisen_course bc on cpc.course_id = bc.id and bc.deleted_flag = 'N'
left join dj_car_life_learning_center_course_category_rel ccr on bc.id = ccr.course_id and ccr.deleted_flag = 'N'
<where>
cpc.deleted_flag = 'N'
<if test="userId != null">
and cpc.person_id = #{userId}
</if>
<if test="courseCategoryId != null">
<choose>
<when test="courseCategoryId == 1">
and (ccr.course_id = #{courseCategoryId} or ccr.id is null)
</when>
<otherwise>
and ccr.category_id = #{courseCategoryId}
</otherwise>
</choose>
</if>
<if test="title != null and title != ''">
and bc.title like concat('%', #{title}, '%')
</if>
<if test="courseFileType != null and courseFileType != ''">
and bc.course_file_type = #{courseFileType}
</if>
<if test="courseStatus != null and courseStatus != ''">
and bc.course_status = #{courseStatus}
</if>
<if test="planCourseType != null">
and cpc.plan_course_type = #{planCourseType}
</if>
<if test="totalStar != null">
and bc.total_star &gt;= #{totalStar}
</if>
</where>
group by bc.id
<if test="sortType != null">
<choose>
<when test="sortType == 0">
order by bc.learn_total ${sortOrder}, bc.title asc
</when>
<when test="sortType == 1">
order by bc.total_star ${sortOrder}, bc.title asc
</when>
<otherwise>
order by bc.beisen_created_time ${sortOrder}, bc.title asc
</otherwise>
</choose>
</if>
</select>
</mapper> </mapper>
...@@ -27,6 +27,18 @@ ...@@ -27,6 +27,18 @@
<result column="deleted_flag" property="deletedFlag" jdbcType="VARCHAR" /> <result column="deleted_flag" property="deletedFlag" jdbcType="VARCHAR" />
<result column="ext_fields" property="extFields" jdbcType="VARCHAR" /> <result column="ext_fields" property="extFields" jdbcType="VARCHAR" />
</resultMap> </resultMap>
<resultMap id="ExaminationDetailInfoMap" type="cn.com.glsx.dj.riskmanage.dto.learningcenter.ExaminationDetailInfo">
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="examination_id" property="examination" jdbcType="VARCHAR" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="duration" property="duration" />
<result column="question_count" property="questionCount" />
<result column="exam_times" property="examTimes" />
<result column="count" property="useCount" jdbcType="INTEGER" />
<result column="top_point" property="maxTotalScore" />
</resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
...@@ -62,4 +74,44 @@ ...@@ -62,4 +74,44 @@
) )
</foreach> </foreach>
</insert> </insert>
<sql id="ExaminationDetailCondition" >
et.deleted_flag = 'N'
<if test="userId != null">
and et.user_id = #{userId}
</if>
<if test="examResult != null">
<choose>
<when test="examResult == 1">
and et.top_point &gt;= #{passScore}
</when>
<when test="examResult == 2">
and et.top_point &lt; #{passScore}
</when>
</choose>
</if>
<if test="source != null">
and be.source = #{source}
</if>
</sql>
<select id="listExaminationDetail" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.ExaminationSearchDTO" resultMap="ExaminationDetailInfoMap">
select et.user_id, et.examination_id, be.title, be.duration, be.question_count, be.exam_times, et.count, et.top_point
from dj_beisen_examination_trainees et
left join dj_beisen_examination be on et.examination_id = be.id and be.deleted_flag = 'N'
<where>
<include refid="ExaminationDetailCondition"></include>
</where>
order by et.beisen_created_time desc
</select>
<select id="countExaminationDetail" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.ExaminationSearchDTO" resultType="java.lang.Integer">
select count(*)
from dj_beisen_examination_trainees et
left join dj_beisen_examination be on et.examination_id = be.id and be.deleted_flag = 'N'
<where>
<include refid="ExaminationDetailCondition"></include>
</where>
</select>
</mapper> </mapper>
...@@ -69,6 +69,16 @@ ...@@ -69,6 +69,16 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="selectJobPostByOId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM dj_beisen_job_post
WHERE o_id IN
<foreach item="item" collection="ids" index="index" separator="," close=")" open="(">
#{item}
</foreach>
</select>
<select id="beiSenJobPostPage" resultMap="beiSenJobPostDTOMap"> <select id="beiSenJobPostPage" resultMap="beiSenJobPostDTOMap">
SELECT SELECT
* *
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</insert> </insert>
<select id="sumStudyDuration" resultType="java.math.BigDecimal" > <select id="sumStudyDuration" resultType="java.math.BigDecimal">
select ifnull(sum(duration),0) select ifnull(sum(duration),0)
from dj_beisen_learn_staff_progress_daily from dj_beisen_learn_staff_progress_daily
where deleted_flag = 'N' and staff = #{userId} where deleted_flag = 'N' and staff = #{userId}
...@@ -61,4 +61,37 @@ ...@@ -61,4 +61,37 @@
and `date` &lt;= #{endDate} and `date` &lt;= #{endDate}
</if> </if>
</select> </select>
<select id="listStudyDurationRank" parameterType="cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO" resultType="cn.com.glsx.dj.riskmanage.dto.learningcenter.StudyDurationDetail">
SELECT staff as userId, total_duration as duration, rank
FROM (
SELECT
staff,
total_duration,
@rank := IF(@prev_duration = total_duration, @rank, @rank + 1) AS rank,
@prev_duration := total_duration
FROM (
SELECT
staff,
SUM(duration) AS total_duration
FROM dj_beisen_learn_staff_progress_daily
<where>
deleted_flag = 'N' and duration is not null
<if test="createTimeStart != null">
and `date` &gt;= #{createTimeStart}
</if>
<if test="createTimeEnd != null">
and `date` &lt;= #{createTimeEnd}
</if>
</where>
GROUP BY staff
ORDER BY total_duration desc, staff desc
) AS grouped_data,
(SELECT @prev_duration := NULL, @rank := 0) AS init
ORDER BY total_duration desc, staff desc
) AS ranked_data
</select>
</mapper> </mapper>
...@@ -77,22 +77,22 @@ ...@@ -77,22 +77,22 @@
</if> </if>
ORDER BY ORDER BY
<choose> <choose>
<when test="createdDateSort != null and createdDateSort == 0"> <when test="orderByType != null and orderByType == 0">
created_date ASC created_date ASC
</when> </when>
<when test="createdDateSort != null and createdDateSort == 1"> <when test="orderByType != null and orderByType == 1">
created_date DESC created_date DESC
</when> </when>
<when test="submittedCountSort != null and submittedCountSort == 0"> <when test="orderByType != null and orderByType == 2">
submitted_count ASC submitted_count ASC
</when> </when>
<when test="submittedCountSort != null and submittedCountSort == 1"> <when test="orderByType != null and orderByType == 3">
submitted_count DESC submitted_count DESC
</when> </when>
<when test="effectiveDateSort != null and effectiveDateSort == 0"> <when test="orderByType != null and orderByType == 4">
effective_time ASC effective_time ASC
</when> </when>
<when test="effectiveDateSort != null and effectiveDateSort == 1"> <when test="orderByType != null and orderByType == 5">
effective_time DESC effective_time DESC
</when> </when>
<otherwise> <otherwise>
......
...@@ -82,4 +82,30 @@ ...@@ -82,4 +82,30 @@
SELECT 1 FROM dj_beisen_examination_trainees t where t.deleted_flag = 'N' and t.exam_status in ('10', '20') and t.examination_id = le.beisen_exam_id and t.user_id = lep.person_id SELECT 1 FROM dj_beisen_examination_trainees t where t.deleted_flag = 'N' and t.exam_status in ('10', '20') and t.examination_id = le.beisen_exam_id and t.user_id = lep.person_id
) )
</select> </select>
<select id="findLevelExamPerson"
resultType="cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterLevelExamPersonDTO">
SELECT
t1.exam_id AS examId,
t1.person_id AS personId,
t1.person_name AS personName,
t1.is_completed AS isCompleted,
t1.level_id AS levelId,
t1.level_name AS levelName,
t2.id AS planId,
t2.order_permission_status AS orderPermissionStatus,
t2.order_permission_type AS orderPermissionType,
t2.limit_time_param AS limitTimeParam,
t2.white_list AS whiteList,
t3.exam_time AS examTime,
t3.beisen_exam_id AS beisenExamId,
t3.beisen_exam_name AS beisenExamName
FROM dj_car_life_learning_center_level_exam_person t1
INNER JOIN dj_car_life_learning_center_training_plan t2 ON t1.exam_id = t2.exam_id
INNER JOIN dj_car_life_learning_center_level_exam t3 ON t1.exam_id = t3.id
WHERE t1.person_id = #{userId}
AND t1.deleted_flag = 'N'
AND t2.deleted_flag = 'N'
AND t3.deleted_flag = 'N'
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
<if test="status != null"> <if test="status != null">
AND t.status = #{status} AND t.status = #{status}
</if> </if>
<if test="createdBy != null and createdBy != ''"> <if test="creator != null and creator != ''">
AND t.created_by LIKE CONCAT('%', #{createdBy}, '%') AND t.creator LIKE CONCAT('%', #{creator}, '%')
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
AND t.created_date &gt;= #{startTime} AND t.created_date &gt;= #{startTime}
......
package cn.com.glsx.dj.riskmanage.service.learningcenter;
import cn.com.glsx.dj.riskmanage.dto.learningcenter.*;
import cn.com.glsx.dj.riskmanage.service.BaseServiceTest;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import com.github.pagehelper.Page;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
public class LearningCenterCourseServiceTest extends BaseServiceTest {
@Autowired
LearningCenterCourseService learningCenterCourseService;
@Test
public void testPageCourse() {
RpcPagination<CourseSearchDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
CourseSearchDTO request = new CourseSearchDTO();
pagination.setCondition(request);
request.setTitle("测试课程");
request.setSortOrder("asc");
request.setSortType(0);
Page<CoursePageInfo> res1 = learningCenterCourseService.pageCourse(pagination);
System.out.println(res1);
}
@Test
public void testCountCourse() {
CourseSearchDTO request = new CourseSearchDTO();
request.setCourseStatus("40");
request.setCourseCategoryId(1);
Integer res1 = learningCenterCourseService.countCourse(request);
System.out.println(res1);
}
@Test
public void testPageCourseDetail() {
RpcPagination<CourseDetailSearchDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
CourseDetailSearchDTO request = new CourseDetailSearchDTO();
pagination.setCondition(request);
request.setPassFlag(1);
Page<CourseDetailPageInfo> res1 = learningCenterCourseService.pageCourseDetail(pagination);
System.out.println(res1);
}
@Test
public void testGetCourseStatistics() {
CourseSearchDTO request = new CourseSearchDTO();
request.setStaffPhone("13476670746");
CourseStatisticsDTO res1 = learningCenterCourseService.getCourseStatistics(request);
System.out.println(res1);
}
@Test
public void testPageRecommendedCourse() {
RpcPagination<CourseSearchDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
CourseSearchDTO request = new CourseSearchDTO();
pagination.setCondition(request);
request.setStaffPhone("13476670746");
request.setCourseCategoryId(4);
Page<CoursePageInfo> res1 = learningCenterCourseService.pageRecommendedCourse(pagination);
System.out.println(res1);
}
@Test
public void testPageExaminationDetail() {
RpcPagination<ExaminationSearchDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
ExaminationSearchDTO request = new ExaminationSearchDTO();
pagination.setCondition(request);
request.setStaffPhone("13476670746");
request.setExamResult(1);
Page<ExaminationDetailInfo> res1 = learningCenterCourseService.pageExaminationDetail(pagination);
System.out.println(res1);
request.setExamResult(2);
Page<ExaminationDetailInfo> res2 = learningCenterCourseService.pageExaminationDetail(pagination);
System.out.println(res2);
}
@Test
public void testGetExaminationCount() {
ExaminationSearchDTO request = new ExaminationSearchDTO();
request.setStaffPhone("13476670746");
ExaminationCount res1 = learningCenterCourseService.getExaminationCount(request);
System.out.println(res1);
}
@Test
public void testGetPeriodStudyDurationRank() {
CourseSearchDTO request = new CourseSearchDTO();
request.setStaffPhone("13476670746");
request.setPeriodType(0);
StudyDurationRankInfo res1 = learningCenterCourseService.getPeriodStudyDurationRank(request);
System.out.println(res1);
request.setPeriodType(1);
StudyDurationRankInfo res2 = learningCenterCourseService.getPeriodStudyDurationRank(request);
System.out.println(res2);
request.setPeriodType(2);
StudyDurationRankInfo res3 = learningCenterCourseService.getPeriodStudyDurationRank(request);
System.out.println(res3);
request.setPeriodType(3);
StudyDurationRankInfo res4 = learningCenterCourseService.getPeriodStudyDurationRank(request);
System.out.println(res4);
}
}
  • @wangxw1
    commented
    Master

    Auto Review Result:

    代码审查报告

    问题描述和优化建议

    1. 学习时长字段类型变更

      • 问题:BeiSenLearnStaffProgressDaily 类中的 duration 字段从 Double 变更为 Integer,这可能导致精度丢失。
      • 影响:如果学习时长需要精确到秒,使用 Integer 类型会导致精度损失。
      • 建议:如果学习时长确实只需要精确到秒,可以保留 Integer 类型。否则,建议使用 Long 类型以避免精度丢失。
    2. 作业名称不一致

      • 问题:SyncBeisenExamResultJob 的描述从 "同步北森考试结果" 变更为 "同步北森考试明细"。
      • 影响:作业描述不准确可能导致后续维护人员混淆。
      • 建议:修正描述以确保准确反映作业功能。
    3. 日志信息

      • 问题:部分作业的日志信息不够详细,只记录了开始和结束信息。
      • 影响:在调试和排查问题时,可能缺乏足够的上下文信息。
      • 建议:增加日志信息的详细程度,如记录处理的数据量、错误信息等。
    4. 依赖管理

      • 问题:多个作业类中引入了相同的依赖,但没有统一管理。
      • 影响:可能导致依赖版本冲突或重复导入。
      • 建议:将常用的依赖提取到父类或公共模块中统一管理。
    5. 批处理工具类

      • 问题:BatchUtils 类中的方法没有提供详细的文档说明。
      • 影响:其他开发者可能不清楚方法的具体用途和参数含义。
      • 建议:为每个方法添加详细的 Javadoc 注释,说明参数、返回值和异常情况。

    评分明细

    1. 功能实现的正确性与健壮性(40分)

      • 得分:35分
      • 说明:代码逻辑基本正确,但存在学习时长字段类型变更可能导致的精度丢失问题。
    2. 安全性与潜在风险(30分)

      • 得分:28分
      • 说明:代码中未发现明显的安全漏洞,但部分作业描述不准确可能导致维护困难。
    3. 是否符合最佳实践(20分)

      • 得分:16分
      • 说明:代码结构合理,但缺少详细的日志信息和方法文档说明。
    4. 性能与资源利用效率(5分)

      • 得分:5分
      • 说明:未发现明显的性能问题,批处理工具类有助于提高性能。
    5. Commits信息的清晰性与准确性(5分)

      • 得分:4分
      • 说明:提交信息总体清晰,但合并分支的信息不够具体。

    总分: 88分


    以上是针对提交代码的详细审查报告,希望对改进代码质量和可维护性有所帮助。

Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!