From e6201af3dba7f246f3ac9390bd4c64ab3b37ac84 Mon Sep 17 00:00:00 2001 From: weizhong Date: Mon, 22 Sep 2025 22:39:59 +0800 Subject: [PATCH 01/51] =?UTF-8?q?=E2=80=9Crs=E6=8B=9B=E8=81=98=E5=92=8C?= =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E4=BF=AE=E6=94=B9=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rs/domain/RsTrainingApplication.java | 52 + .../dromara/rs/domain/RsTrainingApproval.java | 61 +- .../rs/mapper/RsTrainingApprovalMapper.java | 8 + .../impl/RsTrainingApprovalServiceImpl.java | 4 +- .../mapper/rs/RsTrainingApplicationMapper.xml | 16 +- .../mapper/rs/RsTrainingApprovalMapper.xml | 83 +- web/src/api/rs/training.ts | 32 +- .../bzrkh/teacherAssessment/submitDialog.vue | 99 +- web/src/views/rs/index.vue | 66 +- web/src/views/rs/training/index.vue | 1007 +++++++++++++++-- web/src/views/rs/trainingApproval/index.vue | 892 +++++++++++---- 11 files changed, 1966 insertions(+), 354 deletions(-) diff --git a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApplication.java b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApplication.java index 9e5fb734..ea61e5cb 100644 --- a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApplication.java +++ b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApplication.java @@ -9,6 +9,7 @@ import org.dromara.common.mybatis.core.domain.BaseEntity; import com.fasterxml.jackson.annotation.JsonFormat; import com.baomidou.mybatisplus.annotation.IdType; +import java.math.BigDecimal; import java.util.Date; /** @@ -60,6 +61,52 @@ public class RsTrainingApplication extends BaseEntity { */ private String position; + /** + * 现职称 + */ + private String currentTitle; + + /** + * 现岗位 + */ + private String currentPosition; + + /** + * 参加工作时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date workStartTime; + + /** + * 联系电话 + */ + private String phone; + + /** + * 主办单位 + */ + private String organizerUnit; + + /** + * 培训类型 + */ + private String trainingType; + + /** + * 培训费用 + */ + private BigDecimal trainingFee; + + /** + * 同行人员(JSON格式) + */ + private String companions; + + /** + * 培训目的 + */ + private String trainingPurpose; + /** * 申请理由 */ @@ -118,6 +165,11 @@ public class RsTrainingApplication extends BaseEntity { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date rejectTime; + + /** + * 附件ID列表(逗号分隔) + */ + private String attachmentIds; /** * 排除状态(查询时排除指定状态,不存储到数据库) diff --git a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApproval.java b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApproval.java index e31961e9..473e20f7 100644 --- a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApproval.java +++ b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/domain/RsTrainingApproval.java @@ -70,10 +70,69 @@ public class RsTrainingApproval extends BaseEntity { */ private String tenantId; - /** 非数据库字段 **/ + /** 非数据库字段 - 审批记录列表显示 **/ @TableField(exist = false) private String applicationUserName; @TableField(exist = false) private String courseTitle; + + /** 非数据库字段 - 审批记录详情显示 **/ + @TableField(exist = false) + private String userName; + + @TableField(exist = false) + private String department; + + @TableField(exist = false) + private String currentTitle; + + @TableField(exist = false) + private String currentPosition; + + @TableField(exist = false) + @JsonFormat(pattern = "yyyy-MM-dd") + private Date workStartTime; + + @TableField(exist = false) + private String phone; + + @TableField(exist = false) + private String organizerUnit; + + @TableField(exist = false) + private String courseName; + + @TableField(exist = false) + private String location; + + @TableField(exist = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + + @TableField(exist = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + @TableField(exist = false) + private String trainingType; + + @TableField(exist = false) + private Double trainingFee; + + @TableField(exist = false) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date applyTime; + + @TableField(exist = false) + private String companions; + + @TableField(exist = false) + private String trainingPurpose; + + @TableField(exist = false) + private String reason; + + @TableField(exist = false) + private String attachmentIds; } \ No newline at end of file diff --git a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/mapper/RsTrainingApprovalMapper.java b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/mapper/RsTrainingApprovalMapper.java index 6a73e593..7a069c58 100644 --- a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/mapper/RsTrainingApprovalMapper.java +++ b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/mapper/RsTrainingApprovalMapper.java @@ -20,4 +20,12 @@ public interface RsTrainingApprovalMapper extends BaseMapperPlus selectRsTrainingApprovalWithDetailsList(RsTrainingApproval approval); + /** + * 查询带详细信息的审批记录数量(关联申请人和课程信息) + * + * @param approval 查询条件 + * @return 记录数量 + */ + long selectRsTrainingApprovalWithDetailsCount(RsTrainingApproval approval); + } \ No newline at end of file diff --git a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/service/impl/RsTrainingApprovalServiceImpl.java b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/service/impl/RsTrainingApprovalServiceImpl.java index 8cae68fa..f80bcb6c 100644 --- a/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/service/impl/RsTrainingApprovalServiceImpl.java +++ b/backend/ruoyi-modules/ruoyi-rs/src/main/java/org/dromara/rs/service/impl/RsTrainingApprovalServiceImpl.java @@ -197,8 +197,8 @@ public class RsTrainingApprovalServiceImpl implements IRsTrainingApprovalService approval.setTenantId(LoginHelper.getTenantId()); } - // 查询总数 - long total = trainingApprovalMapper.selectCount(buildQueryWrapper(approval)); + // 查询总数 - 使用与列表查询相同的条件 + long total = trainingApprovalMapper.selectRsTrainingApprovalWithDetailsCount(approval); // 使用自定义分页查询获取列表数据 List list = trainingApprovalMapper.selectRsTrainingApprovalWithDetailsList(approval); diff --git a/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApplicationMapper.xml b/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApplicationMapper.xml index 965aa2f5..a022c1e5 100644 --- a/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApplicationMapper.xml +++ b/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApplicationMapper.xml @@ -11,6 +11,16 @@ + + + + + + + + + + @@ -31,8 +41,10 @@ SELECT - a.application_id, a.course_id, a.course_name as custom_course_name, a.user_id, a.user_name, a.department, a.position, a.reason, - a.status, a.apply_time, a.current_approver, a.location, a.duration, a.start_time, a.end_time, + a.application_id, a.course_id, a.course_name as custom_course_name, a.user_id, a.user_name, a.department, a.position, + a.current_title, a.current_position, a.work_start_time, a.phone, a.organizer_unit, + a.training_type, a.training_fee, a.companions, a.training_purpose, a.attachment_ids, + a.reason, a.status, a.apply_time, a.current_approver, a.location, a.duration, a.start_time, a.end_time, a.tenant_id, a.create_dept, a.reject_time, a.create_by, a.create_time, a.update_by, a.update_time, CASE WHEN a.course_id = 0 THEN a.course_name diff --git a/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApprovalMapper.xml b/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApprovalMapper.xml index 928a1e79..98ffd39a 100644 --- a/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApprovalMapper.xml +++ b/backend/ruoyi-modules/ruoyi-rs/src/main/resources/mapper/rs/RsTrainingApprovalMapper.xml @@ -37,9 +37,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + + + + + + + + + + + + + + + + + @@ -81,8 +100,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.approval_id, a.application_id, a.approver_id, a.approver_name, a.approval_level, a.status, a.approval_time, a.opinion, a.tenant_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, + -- 审批记录列表显示字段 app.user_name as application_user_name, - COALESCE(app.course_name, c.title) as course_title + COALESCE(app.course_name, c.title) as course_title, + -- 详情弹窗显示字段(使用别名避免重复) + app.user_name as user_name, + app.department, + app.current_title, + app.current_position, + app.work_start_time, + app.phone, + app.organizer_unit, + app.course_name as course_name, + app.location, + app.start_time, + app.end_time, + app.training_type, + app.training_fee, + app.apply_time, + app.companions, + app.training_purpose, + app.reason, + app.attachment_ids FROM rs_training_approval a LEFT JOIN rs_training_application app ON a.application_id = app.application_id AND app.deleted = '0' LEFT JOIN rs_training_course c ON app.course_id = c.course_id AND c.deleted = '0' @@ -121,4 +160,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY a.approval_time DESC + + + \ No newline at end of file diff --git a/web/src/api/rs/training.ts b/web/src/api/rs/training.ts index 12c40d89..6b82e408 100644 --- a/web/src/api/rs/training.ts +++ b/web/src/api/rs/training.ts @@ -70,16 +70,29 @@ export interface ApplicationVO { userName: string; department: string; position?: string; + currentTitle?: string; // 现职称 + currentPosition?: string; // 现岗位 + workStartTime?: string; // 参加工作时间 + phone?: string; // 联系电话 + organizerUnit?: string; // 主办单位 + trainingType?: string; // 培训类型 + trainingFee?: number; // 培训费用 + companions?: string; // 同行人员(JSON字符串) + trainingPurpose?: string; // 培训目的 reason?: string; status: string; applyTime: string; currentApprover?: string; - certificatePath?: string; - certificateNumber?: string; + location?: string; + duration?: number; + startTime?: string; + endTime?: string; + rejectTime?: string; // 拒绝时间 + attachmentIds?: string; // 附件ID列表 createTime: string; updateTime: string; - createBy: string; - updateBy: string; + createBy: number; // 修正类型:string -> number + updateBy: number; // 修正类型:string -> number remark: string; } @@ -92,12 +105,23 @@ export interface ApplicationForm { userName?: string; department?: string; position?: string; + currentTitle?: string; // 现职称 + currentPosition?: string; // 现岗位 + workStartTime?: string; // 参加工作时间 + phone?: string; // 联系电话 + organizerUnit?: string; // 主办单位 + trainingType?: string; // 培训类型 + trainingTypeOther?: string; // 其他培训类型描述 + trainingFee?: number; // 培训费用 + companions?: (string | number)[]; // 同行人员数组 + trainingPurpose?: string; // 培训目的 reason?: string; status?: string; location?: string; duration?: number; startTime?: string; endTime?: string; + attachmentIds?: string[]; // 附件ID数组 remark?: string; } diff --git a/web/src/views/bzrkh/teacherAssessment/submitDialog.vue b/web/src/views/bzrkh/teacherAssessment/submitDialog.vue index a19bc6e9..cc338991 100644 --- a/web/src/views/bzrkh/teacherAssessment/submitDialog.vue +++ b/web/src/views/bzrkh/teacherAssessment/submitDialog.vue @@ -157,14 +157,10 @@ - - - {{ studentRecordsData ? '查看已加载的违规处分信息' : '学生违规处分信息查看' }} - + + + {{ studentRecordsData ? '查看已加载的违规处分信息' : '学生违规处分信息查看' }} + @@ -382,27 +378,22 @@ - + - - - + + 重新同步到班级扣分 - + @@ -417,10 +408,7 @@ @@ -721,7 +709,7 @@ const loadAssessmentDetail = async () => { overallComment: monthlyScoreForm.overallComment }); console.log('=================='); - + // 自动加载学生违规处分信息数据 await autoLoadStudentRecords(); } catch (error) { @@ -746,7 +734,7 @@ const autoLoadStudentRecords = async () => { try { const res = await getClassStudentRecords(props.classId, props.planId); studentRecordsData.value = res.data; - + // 自动同步违纪记录扣分到班级扣分字段(不显示提示消息) autoSyncDeductionToClassScore(false); console.log('✅ 学生违规处分数据自动加载完成'); @@ -778,7 +766,7 @@ const handleViewStudentViolations = async () => { studentRecordsData.value = res.data; studentRecordsVisible.value = true; } - + // 手动查看时也重新同步一次扣分(显示提示消息) autoSyncDeductionToClassScore(true); } catch (error) { @@ -795,7 +783,7 @@ const getEffectiveDisciplineRecords = () => { return []; } // 只统计状态为'1'(生效)的违纪记录 - return studentRecordsData.value.disciplineRecords.filter(record => record.status === '1'); + return studentRecordsData.value.disciplineRecords.filter((record) => record.status === '1'); }; /** 计算违纪记录总扣分 */ @@ -810,50 +798,57 @@ const calculateTotalDeduction = () => { /** 自动同步违纪记录扣分到班级扣分字段 */ const autoSyncDeductionToClassScore = (showMessage = true) => { const totalDeduction = calculateTotalDeduction(); - + // 自动将汇总的扣分设置到班级扣分字段 managementEffectivenessForm.classDeduction = totalDeduction; // 自动计算50%计 calculateDeductionHalf(); - + if (totalDeduction > 0 && showMessage) { proxy?.$modal.msgSuccess(`已自动同步违纪记录扣分汇总 ${totalDeduction} 分到班级扣分字段`); } }; // 监听学生违纪记录数据变化,自动同步扣分 -watch(() => studentRecordsData.value?.disciplineRecords, (newRecords) => { - if (newRecords && studentRecordsVisible.value) { - // 延迟执行,确保数据完全加载,但不显示提示消息 - nextTick(() => { - autoSyncDeductionToClassScore(false); - }); - } -}, { deep: true }); +watch( + () => studentRecordsData.value?.disciplineRecords, + (newRecords) => { + if (newRecords && studentRecordsVisible.value) { + // 延迟执行,确保数据完全加载,但不显示提示消息 + nextTick(() => { + autoSyncDeductionToClassScore(false); + }); + } + }, + { deep: true } +); /** 将违纪记录扣分汇总应用到班级扣分字段 */ const applyDeductionToClassScore = () => { const totalDeduction = calculateTotalDeduction(); - + if (totalDeduction === 0) { proxy?.$modal.msgWarning('当前没有生效的违纪记录扣分可以应用'); return; } // 确认应用操作 - proxy?.$modal.confirm(`确定要将违纪记录扣分汇总 ${totalDeduction} 分重新应用到班级扣分字段吗?`).then(() => { - // 将汇总的扣分设置到班级扣分字段 - managementEffectivenessForm.classDeduction = totalDeduction; - // 自动计算50%计 - calculateDeductionHalf(); - - proxy?.$modal.msgSuccess(`已重新应用违纪记录扣分汇总 ${totalDeduction} 分到班级扣分字段`); - - // 关闭学生记录弹窗 - studentRecordsVisible.value = false; - }).catch(() => { - // 用户取消操作 - }); + proxy?.$modal + .confirm(`确定要将违纪记录扣分汇总 ${totalDeduction} 分重新应用到班级扣分字段吗?`) + .then(() => { + // 将汇总的扣分设置到班级扣分字段 + managementEffectivenessForm.classDeduction = totalDeduction; + // 自动计算50%计 + calculateDeductionHalf(); + + proxy?.$modal.msgSuccess(`已重新应用违纪记录扣分汇总 ${totalDeduction} 分到班级扣分字段`); + + // 关闭学生记录弹窗 + studentRecordsVisible.value = false; + }) + .catch(() => { + // 用户取消操作 + }); }; /** 保存考核数据 */ diff --git a/web/src/views/rs/index.vue b/web/src/views/rs/index.vue index dc3363b1..7a6b01b6 100644 --- a/web/src/views/rs/index.vue +++ b/web/src/views/rs/index.vue @@ -385,6 +385,18 @@ {{ viewForm.applicantCount }} {{ viewForm.viewCount }} + + + 点击前往应聘页面 + + + {{ parseTime(viewForm.publishTime) || (viewForm.isActive === '0' ? parseTime(viewForm.createTime) || '长期有效' : '未发布') }} @@ -508,7 +520,21 @@ {{ parseTime(applicationDetail.applyTime) }} {{ applicationDetail.contactPhone }} - {{ applicationDetail.contactEmail }} + +
+ {{ applicationDetail.contactEmail }} + + 发送邮件 + +
+
{{ applicationDetail.education || '暂无信息' }} {{ applicationDetail.educationBackground || '暂无信息' }} {{ applicationDetail.experience || '暂无信息' }} @@ -544,7 +570,21 @@ {{ currentApplication?.gender || '未提供' }} {{ currentApplication?.age || '未提供' }} {{ currentApplication?.contactPhone }} - {{ currentApplication?.contactEmail }} + +
+ {{ currentApplication?.contactEmail }} + + 发送邮件 + +
+
- + - + -