wuzhen update

This commit is contained in:
wuzhen committed 2025-08-21 21:56:04 +08:00
1 parent f71eada96c
commit 76fada3a51
11 files changed
+404 -237

No files matched your search

@@ -347,4 +347,17 @@ public class JcbtWorkStudyApplicationController extends BaseController {
}
}
/**
* 获取学生已申请岗位列表
*/
@Operation(summary = "获取学生已申请岗位列表")
@GetMapping("/student/status")
@SaCheckPermission("jcbt:workStudyApplication:query")
public R<Map<Long, String>> getStudentApplicationStatus() {
Map<Long, String> statusMap = workStudyApplicationService.getStudentApplicationStatus();
return R.ok(statusMap);
}
}
@@ -416,10 +416,64 @@ public class JcbtWorkStudyPositionController extends BaseController {
/**
* 获取当前用户所在学院ID
* TODO: 实现获取当前用户学院ID的逻辑
* 通过查询学生信息或用户部门信息获取
*/
private Long getCurrentUserCollegeId() {
// 临时返回固定值,实际应该从用户信息中获取
return 1L;
try {
// 获取当前登录用户ID
Long userId = LoginHelper.getUserId();
if (userId == null) {
log.warn("用户未登录");
return null;
}
// 首先尝试通过学生信息获取学院ID
try {
XgStudentMsgVo studentInfo = xgStudentMsgService.queryByUserId(userId);
if (studentInfo != null && studentInfo.getCollegeId() != null) {
log.debug("通过学生信息获取学院ID: {}", studentInfo.getCollegeId());
return Long.parseLong(studentInfo.getCollegeId());
}
} catch (Exception e) {
log.debug("通过学生信息获取学院ID失败,可能用户不是学生: {}", e.getMessage());
}
// 如果不是学生用户,通过用户部门信息获取学院ID
try {
Long deptId = LoginHelper.getDeptId();
if (deptId != null) {
log.debug("通过部门信息获取学院ID: {}", deptId);
return deptId;
}
} catch (Exception e) {
log.debug("通过部门信息获取学院ID失败: {}", e.getMessage());
}
// 尝试通过部门类别获取学院信息
try {
String deptCategory = LoginHelper.getDeptCategory();
String deptName = LoginHelper.getDeptName();
log.debug("用户部门信息 - 部门名称: {}, 部门类别: {}", deptName, deptCategory);
// 如果部门类别是学院类型,则使用部门ID作为学院ID
if ("college".equals(deptCategory) || "学院".equals(deptCategory)) {
Long deptId = LoginHelper.getDeptId();
if (deptId != null) {
log.info("根据部门类别确认为学院用户,学院ID: {}", deptId);
return deptId;
}
}
} catch (Exception e) {
log.debug("通过部门类别获取学院ID失败: {}", e.getMessage());
}
log.warn("无法获取用户 {} 的学院信息,用户ID: {}, 部门ID: {}, 部门名称: {}",
userId, userId, LoginHelper.getDeptId(), LoginHelper.getDeptName());
return null;
} catch (Exception e) {
log.error("获取当前用户学院ID失败", e);
return null;
}
}
}
@@ -24,4 +24,6 @@ public interface JcbtWorkStudyApplicationMapper extends BaseMapperPlus<JcbtWorkS
*/
Map<String, Object> selectApplicationStatus(@Param("positionId") Long positionId, @Param("userId") Long userId);
Map<Long, String> selectApplicationStatusByStudentId(@Param("studentId") Long studentId);
}
@@ -164,4 +164,10 @@ public interface IJcbtWorkStudyApplicationService {
*/
Map<String, Object> getPositionApplicationStatistics(Long positionId);
/**
* 获取学生已申请岗位列表
*
* @return 学生已申请岗位列表
*/
Map<Long, String> getStudentApplicationStatus();
}
@@ -529,4 +529,12 @@ public class JcbtWorkStudyApplicationServiceImpl implements IJcbtWorkStudyApplic
return statistics;
}
/**
* 获取学生已申请岗位列表
*/
@Override
public Map<Long, String> getStudentApplicationStatus() {
Long studentId = LoginHelper.getUserId();
return baseMapper.selectApplicationStatusByStudentId(studentId);
}
}
@@ -133,4 +133,10 @@
AND deleted = 0
</select>
<select id="selectApplicationStatusByStudentId" resultType="java.util.Map">
SELECT position_id, status
FROM jcbt_work_study_application
WHERE student_id = #{studentId} AND deleted = 0
</select>
</mapper>
+264 -232
View File
@@ -1,233 +1,265 @@
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "杭州第一技师学院智慧校园",
"navigationStyle": "custom"
}
},
{
"path": "pages/task/myDocument",
"style": {
"navigationBarTitleText": "我发起的",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/allTaskWaiting",
"style": {
"navigationBarTitleText": "我的待办",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/taskWaiting",
"style": {
"navigationBarTitleText": "我的待办",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/taskFinish",
"style": {
"navigationBarTitleText": "我的已办",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/taskCopyList",
"style": {
"navigationBarTitleText": "抄送我的",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsjcxx/index",
"style": {
"navigationBarTitleText": "学生个人信息",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsws/index",
"style": {
"navigationBarTitleText": "学生信息完善",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsws/stuMsgDialog",
"style": {
"navigationBarTitleText": "信息完善",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsws/stuMsgDetailDialog",
"style": {
"navigationBarTitleText": "提交历史",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsqj/leave/index",
"style": {
"navigationBarTitleText": "学生请假",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsqj/leaveEdit/index",
"style": {
"navigationBarTitleText": "请假申请",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsqj/cancelLeaveEdit/index",
"style": {
"navigationBarTitleText": "学生销假",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wechat/js-sdk-test",
"style": {
"navigationBarTitleText": "微信JS-SDK测试",
"navigationStyle": "custom"
}
},
{
"path": "pages/internship/index",
"style": {
"navigationBarTitleText": "实习打卡",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/index",
"style": {
"navigationBarTitleText": "班主任走访",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/add",
"style": {
"navigationBarTitleText": "新增走访",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/detail",
"style": {
"navigationBarTitleText": "走访详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/edit",
"style": {
"navigationBarTitleText": "编辑走访",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/sswj/grsswj",
"style": {
"navigationBarTitleText": "宿舍违纪",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/sswj/sswjDetail",
"style": {
"navigationBarTitleText": "违纪详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/wsjc/wsjc",
"style": {
"navigationBarTitleText": "宿舍卫生检查",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/wsjc/wsjcAdd",
"style": {
"navigationBarTitleText": "新增宿舍卫生检查",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/wsjc/wsjcDetail",
"style": {
"navigationBarTitleText": "宿舍卫生检查详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/xssswsjc/xssswsjc",
"style": {
"navigationBarTitleText": "宿舍卫生检查",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/xssswsjc/xssswsjcDetail",
"style": {
"navigationBarTitleText": "宿舍卫生检查详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/enrollment/index",
"style": {
"navigationBarTitleText": "新生报名登记",
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "智慧校园",
"navigationBarBackgroundColor": "#0051d9",
"backgroundColor": "#F8F8F8"
}
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "杭州第一技师学院智慧校园",
"navigationStyle": "custom"
}
},
{
"path": "pages/task/myDocument",
"style": {
"navigationBarTitleText": "我发起的",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/allTaskWaiting",
"style": {
"navigationBarTitleText": "我的待办",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/taskWaiting",
"style": {
"navigationBarTitleText": "我的待办",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/taskFinish",
"style": {
"navigationBarTitleText": "我的已办",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/task/taskCopyList",
"style": {
"navigationBarTitleText": "抄送我的",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsjcxx/index",
"style": {
"navigationBarTitleText": "学生个人信息",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsws/index",
"style": {
"navigationBarTitleText": "学生信息完善",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsws/stuMsgDialog",
"style": {
"navigationBarTitleText": "信息完善",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsws/stuMsgDetailDialog",
"style": {
"navigationBarTitleText": "提交历史",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsqj/leave/index",
"style": {
"navigationBarTitleText": "学生请假",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsqj/leaveEdit/index",
"style": {
"navigationBarTitleText": "请假申请",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xg/xsjcxx/xsqj/cancelLeaveEdit/index",
"style": {
"navigationBarTitleText": "学生销假",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wechat/js-sdk-test",
"style": {
"navigationBarTitleText": "微信JS-SDK测试",
"navigationStyle": "custom"
}
},
{
"path": "pages/internship/index",
"style": {
"navigationBarTitleText": "实习打卡",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/index",
"style": {
"navigationBarTitleText": "班主任走访",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/add",
"style": {
"navigationBarTitleText": "新增走访",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/detail",
"style": {
"navigationBarTitleText": "走访详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/visit/edit",
"style": {
"navigationBarTitleText": "编辑走访",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/sswj/grsswj",
"style": {
"navigationBarTitleText": "宿舍违纪",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/sswj/sswjDetail",
"style": {
"navigationBarTitleText": "违纪详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/wsjc/wsjc",
"style": {
"navigationBarTitleText": "宿舍卫生检查",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/wsjc/wsjcAdd",
"style": {
"navigationBarTitleText": "新增宿舍卫生检查",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/wsjc/wsjcDetail",
"style": {
"navigationBarTitleText": "宿舍卫生检查详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/xssswsjc/xssswsjc",
"style": {
"navigationBarTitleText": "宿舍卫生检查",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/xgss/xssswsjc/xssswsjcDetail",
"style": {
"navigationBarTitleText": "宿舍卫生检查详情",
"navigationBarBackgroundColor": "#0051d9",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/enrollment/index",
"style": {
"navigationBarTitleText": "新生报名登记",
"navigationStyle": "custom"
}
},
{
"path": "pages/workStudy/index",
"style": {
"navigationBarTitleText": "勤工俭学",
"navigationBarBackgroundColor": "#1890ff",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/workStudy/detail",
"style": {
"navigationBarTitleText": "岗位详情",
"navigationBarBackgroundColor": "#1890ff",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/workStudy/apply",
"style": {
"navigationBarTitleText": "申请岗位",
"navigationBarBackgroundColor": "#1890ff",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/workStudy/applicationDetail",
"style": {
"navigationBarTitleText": "申请详情",
"navigationBarBackgroundColor": "#1890ff",
"navigationBarTextStyle": "white"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "智慧校园",
"navigationBarBackgroundColor": "#0051d9",
"backgroundColor": "#F8F8F8"
}
}
+23 -1
View File
@@ -220,6 +220,20 @@
/>
</template>
</ServiceItem>
<ServiceItem
v-if="hasPermi(['student:workstudy:list'])"
title="勤工俭学"
@click="gotoWorkStudy"
>
<template #icon>
<image
src="/static/00127.png"
mode="aspectFit"
style="width: 24px; height: 24px"
/>
</template>
</ServiceItem>
</GridLayout>
</Card>
@@ -645,7 +659,8 @@ export default {
this.hasPermi(['student:internship:list']) ||
this.hasPermi(['student:dorm:violation:list']) ||
this.hasPermi(['student:visit:list']) ||
this.hasPermi(['student:dorm:hygiene:list'])
this.hasPermi(['student:dorm:hygiene:list']) ||
this.hasPermi(['student:workstudy:list'])
);
},
@@ -880,6 +895,13 @@ export default {
});
},
// 跳转到勤工俭学页面
gotoWorkStudy() {
uni.navigateTo({
url: '/pages/workStudy/index',
});
},
// 图片加载成功处理
handleImageLoad(event) {
console.log('✅ 轮播图片加载成功:', event.detail);
+10
View File
@@ -244,6 +244,16 @@ export function resumePosition(id: string | number) {
});
}
/**
* 开启岗位招录
*/
export function startRecruiting(id: string | number) {
return request({
url: `/jcbt/workStudyPosition/startRecruiting/${id}`,
method: 'put'
});
}
/**
* 取消岗位
*/
@@ -228,6 +228,13 @@
>
<el-icon><Upload /></el-icon>发布岗位
</el-dropdown-item>
<el-dropdown-item
v-if="hasPermission('jcbt:workStudyPosition:startRecruiting')"
command="startRecruiting"
:disabled="getRowStatus(scope.row) !== 'PUBLISHED'"
>
<el-icon><VideoPlay /></el-icon>开启招录
</el-dropdown-item>
<el-dropdown-item
v-if="hasPermission('jcbt:workStudyPosition:suspend')"
command="suspend"
@@ -288,6 +295,7 @@ import {
exportWorkStudyPosition,
getPositionStatistics,
publishPosition,
startRecruiting,
suspendPosition,
resumePosition,
cancelPosition
@@ -518,6 +526,12 @@ async function handleCommand(command, row) {
proxy?.$modal.msgSuccess('发布成功');
operationSuccess = true;
break;
case 'startRecruiting':
await proxy?.$modal.confirm('确认开启此岗位的招录?开启后学生可以申请此岗位。');
await startRecruiting(row.id);
proxy?.$modal.msgSuccess('开启招录成功');
operationSuccess = true;
break;
case 'suspend':
await proxy?.$modal.confirm('确认暂停此岗位的招录?暂停后学生无法申请此岗位。');
await suspendPosition(row.id);
@@ -148,7 +148,7 @@
<el-table-column label="学生信息" min-width="180" align="left">
<template #default="scope">
<div class="student-info">
<div class=":liststudent-info">
<div class="student-name">{{ scope.row.studentName }}</div>
<div class="student-number">学号:{{ scope.row.studentNumber }}</div>
<!-- <div class="student-class">班级:{{ scope.row.className }}</div> -->