南大三十年教职工疗休养

This commit is contained in:
2026-07-01 18:17:08 +08:00
parent e5a7b49bc1
commit 8b5de6b196
7 changed files with 51 additions and 51 deletions
@@ -96,7 +96,7 @@ public class ThirtyTeachTourBranchUserAssignmentController {
}
/**
* 查询分工会可分配线路选项,选项携带事项、线路和旅行社快照信息。
* 查询分工会可分配批次选项,选项携带事项、线路和旅行社快照信息。
*/
@At
@SaCheckPermission("thirtyTeachTour.branchUserAssignment")
@@ -184,7 +184,7 @@ public class ThirtyTeachTourBranchUserAssignmentController {
}
/**
* 给当前分工会已分配正式人员补选分配路线,具体快照回写、代报名和最大成团人数校验由 service 统一处理。
* 给当前分工会已分配正式人员补选分配批次,具体快照回写、代报名和最大成团人数校验由 service 统一处理。
*/
@At
@Aop(TransAop.READ_COMMITTED)
@@ -122,7 +122,7 @@ public class ThirtyTeachTourSchoolUserAssignmentController {
}
/**
* 查询校工会可分配线路选项,选项携带事项、线路和旅行社快照信息。
* 查询校工会可分配批次选项,选项携带事项、线路和旅行社快照信息。
*/
@At
@SaCheckPermission("thirtyTeachTour.schoolUserAssignment")
@@ -172,7 +172,7 @@ public class ThirtyTeachTourSchoolUserAssignmentController {
}
/**
* 保存校工会人员分配明细,支持弹窗候选列表中每个人单独选择分配线路
* 保存校工会人员分配明细,支持弹窗候选列表中每个人单独选择分配批次
*/
@At
@Aop(TransAop.READ_COMMITTED)
@@ -193,7 +193,7 @@ public class ThirtyTeachTourSchoolUserAssignmentController {
}
/**
* 给校工会已分配人员补选分配线路,具体回写分配表和写台账逻辑由 service 统一处理。
* 给校工会已分配人员补选分配批次,具体回写分配表和写台账逻辑由 service 统一处理。
*/
@At
@Aop(TransAop.READ_COMMITTED)
@@ -131,7 +131,7 @@ public interface ThirtyTeachTourUserAssignmentService extends BaseService<Thirty
List<NutMap> listEnabledSettingOptions(Integer year);
/**
* 查询指定配置下已配置线路的分配线路选项,用于人员分配时指定事项、线路和旅行社。
* 查询指定配置下已配置线路的分配批次选项,用于人员分配时指定事项、线路和旅行社。
*
* @param settingId 疗休养配置ID
* @return 事项选项列表
@@ -139,7 +139,7 @@ public interface ThirtyTeachTourUserAssignmentService extends BaseService<Thirty
List<NutMap> listMatterOptions(String settingId);
/**
* 查询指定配置下当前处于报名时间内的分配线路选项,供分工会人员选择线路时使用。
* 查询指定配置下当前处于报名时间内的分配批次选项,供分工会人员选择线路时使用。
*
* @param settingId 疗休养配置ID
* @return 当前报名时间内的事项选项列表
@@ -155,7 +155,7 @@ public interface ThirtyTeachTourUserAssignmentService extends BaseService<Thirty
/**
* 保存校工会人员分配。保存前会重新按配置可参加人员范围过滤,防止写入范围外人员。
* 分配线路为可选;正式人员选择线路时视为代报名并同步写入疗休养台账,替补人员不能分配线路
* 分配批次为可选;正式人员选择线路时视为代报名并同步写入疗休养台账,替补人员不能分配批次
*
* @param settingId 疗休养配置ID
* @param matterId 疗休养事项ID,可为空
@@ -166,17 +166,17 @@ public interface ThirtyTeachTourUserAssignmentService extends BaseService<Thirty
NutMap assignSchoolUsers(String settingId, String matterId, String personType, List<String> userIds, String photoFiles, String currentPeriodPhotoFiles);
/**
* 保存校工会人员分配,支持每个候选人员单独选择分配线路
* 保存校工会人员分配,支持每个候选人员单独选择分配批次
* assignItems 中每项包含 userId、matterId、photoFiles、currentPeriodPhotoFilesmatterId 为空时只保存人员分配,不写台账。
*
* @param settingId 疗休养配置ID
* @param assignItems 人员和分配线路明细
* @param assignItems 人员和分配批次明细
* @return 保存结果,包含实际分配数量、跳过数量和代报名台账写入数量
*/
NutMap assignSchoolUsers(String settingId, List<NutMap> assignItems);
/**
* 给校工会已分配的正式人员补选分配线路,并按代报名写入疗休养台账。
* 给校工会已分配的正式人员补选分配批次,并按代报名写入疗休养台账。
* 只处理 SCHOOL_UNION 来源且尚未选择线路的分配记录,避免覆盖既有台账。
*
* @param id 人员分配记录ID
@@ -186,7 +186,7 @@ public interface ThirtyTeachTourUserAssignmentService extends BaseService<Thirty
NutMap selectSchoolAssignmentMatter(String id, String matterId, String photoFiles, String currentPeriodPhotoFiles);
/**
* 给当前分工会已分配的正式人员补选分配路线,并按代报名写入疗休养台账。
* 给当前分工会已分配的正式人员补选分配批次,并按代报名写入疗休养台账。
* 只处理当前登录人所在分工会、BRANCH_UNION 来源且尚未选择路线的记录;写台账前校验最多成团人数。
*
* @param id 人员分配记录ID
@@ -52,7 +52,7 @@ public class ThirtyTeachTourLeaveApplyServiceImpl extends BaseServiceImpl<Thirty
""");
Cnd cnd = Cnd.NEW();
cnd.and("a.delFlag", "=", false);
// 退出取消只针对已选路线的数据,未分配路线的人员没有出行时间和台账可处理。
// 退出取消只针对已选路线的数据,未分配批次的人员没有出行时间和台账可处理。
cnd.and("a.matterId", "is not", null);
cnd.and("a.matterId", "<>", "");
cnd.and("a.lineId", "is not", null);
@@ -386,7 +386,7 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
if (Lang.isNotEmpty(assignments)) {
dao().insert(assignments);
}
// 分配线路为空时只写人员分配表;选择分配线路时按代报名写入台账。
// 分配批次为空时只写人员分配表;选择分配批次时按代报名写入台账。
int ledgerCount = insertProxySignupLedgers(matterInfo, candidateUsers);
return NutMap.NEW()
.addv("assignCount", assignments.size())
@@ -438,7 +438,7 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
.forEach(matterId -> {
NutMap matterInfo = fetchMatterInfo(settingId, matterId);
if (matterInfo == null) {
throw new IllegalArgumentException("分配线路不存在或未配置线路");
throw new IllegalArgumentException("分配批次不存在或未配置线路");
}
matterInfoMap.put(matterId, matterInfo);
});
@@ -483,7 +483,7 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
@Override
public NutMap selectSchoolAssignmentMatter(String id, String matterId, String photoFiles, String currentPeriodPhotoFiles) {
if (StrUtil.isBlank(id) || StrUtil.isBlank(matterId)) {
throw new IllegalArgumentException("请选择人员分配记录和分配线路");
throw new IllegalArgumentException("请选择人员分配记录和分配批次");
}
ThirtyTeachTourUserAssignment assignment = fetch(Cnd.where(ThirtyTeachTourUserAssignment::getId, "=", id)
.and(ThirtyTeachTourUserAssignment::getAssignSource, "=", ThirtyTeachTourUserAssignment.ASSIGN_SOURCE_SCHOOL_UNION)
@@ -492,15 +492,15 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
throw new IllegalArgumentException("人员分配记录不存在");
}
if (StrUtil.isNotBlank(assignment.getMatterId())) {
throw new IllegalArgumentException("该人员已选择分配线路");
throw new IllegalArgumentException("该人员已选择分配批次");
}
String personType = normalizePersonType(assignment.getPersonType());
if (!ThirtyTeachTourUserAssignment.PERSON_TYPE_FORMAL.equals(personType)) {
throw new IllegalArgumentException("只有正式人员可以选择分配线路");
throw new IllegalArgumentException("只有正式人员可以选择分配批次");
}
NutMap matterInfo = fetchMatterInfo(assignment.getSettingId(), matterId);
if (matterInfo == null) {
throw new IllegalArgumentException("分配线路不存在或未配置线路");
throw new IllegalArgumentException("分配批次不存在或未配置线路");
}
updateAssignmentMatterSnapshot(id, matterInfo, ThirtyTeachTourUserAssignment.ASSIGN_SOURCE_SCHOOL_UNION,
photoFiles, currentPeriodPhotoFiles);
@@ -513,22 +513,22 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
@Override
public NutMap selectCurrentBranchAssignmentMatter(String id, String matterId, String photoFiles, String currentPeriodPhotoFiles) {
if (StrUtil.isBlank(id) || StrUtil.isBlank(matterId)) {
throw new IllegalArgumentException("请选择人员分配记录和分配路线");
throw new IllegalArgumentException("请选择人员分配记录和分配批次");
}
ThirtyTeachTourUserAssignment assignment = fetchCurrentBranchAssignment(id);
if (assignment == null) {
throw new IllegalArgumentException("人员分配记录不存在");
}
if (StrUtil.isNotBlank(assignment.getMatterId())) {
throw new IllegalArgumentException("该人员已选择分配路线");
throw new IllegalArgumentException("该人员已选择分配批次");
}
String personType = normalizePersonType(assignment.getPersonType());
if (!ThirtyTeachTourUserAssignment.PERSON_TYPE_FORMAL.equals(personType)) {
throw new IllegalArgumentException("只有正式人员可以选择分配路线");
throw new IllegalArgumentException("只有正式人员可以选择分配批次");
}
NutMap matterInfo = fetchMatterInfoForUpdate(assignment.getSettingId(), matterId);
if (matterInfo == null) {
throw new IllegalArgumentException("分配路线不存在或未配置线路");
throw new IllegalArgumentException("分配批次不存在或未配置线路");
}
if (!isMatterSignupOpen(matterInfo)) {
throw new IllegalArgumentException("当前线路不在报名时间内,不能选择");
@@ -1470,7 +1470,7 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
if (!Boolean.TRUE.equals(assignment.getCancelled())) {
throw new IllegalArgumentException("该人员未取消退出,无需恢复");
}
// 取消退出仅恢复人员分配状态,台账需由用户重新报名或管理员重新选择分配线路生成。
// 取消退出仅恢复人员分配状态,台账需由用户重新报名或管理员重新选择分配批次生成。
update(Chain.make("cancelled", false),
Cnd.where(ThirtyTeachTourUserAssignment::getId, "=", assignment.getId()));
}
@@ -1495,15 +1495,15 @@ public class ThirtyTeachTourUserAssignmentServiceImpl extends BaseServiceImpl<Th
private void checkAssignmentCancelDeadline(ThirtyTeachTourUserAssignment assignment) {
if (StrUtil.isBlank(assignment.getMatterId())) {
throw new IllegalArgumentException("该人员未分配路线,无法取消退出");
throw new IllegalArgumentException("该人员未分配批次,无法取消退出");
}
ThirtyTeachTourMatter matter = dao().fetch(ThirtyTeachTourMatter.class, Cnd.where(ThirtyTeachTourMatter::getId, "=", assignment.getMatterId())
.and(ThirtyTeachTourMatter::getDelFlag, "=", false));
if (matter == null) {
throw new IllegalArgumentException("分配路线不存在,无法取消退出");
throw new IllegalArgumentException("分配批次不存在,无法取消退出");
}
LocalDateTime signupEndTime = parseMatterDateTime(matter.getSignupEndTime(), true, "分配路线未设置报名截止时间,无法取消退出", "分配路线报名截止时间格式不正确,无法取消退出");
LocalDateTime travelStartTime = parseMatterDateTime(matter.getTravelStartTime(), false, "分配路线未设置出行开始时间,无法取消退出", "分配路线出行开始时间格式不正确,无法取消退出");
LocalDateTime signupEndTime = parseMatterDateTime(matter.getSignupEndTime(), true, "分配批次未设置报名截止时间,无法取消退出", "分配批次报名截止时间格式不正确,无法取消退出");
LocalDateTime travelStartTime = parseMatterDateTime(matter.getTravelStartTime(), false, "分配批次未设置出行开始时间,无法取消退出", "分配批次出行开始时间格式不正确,无法取消退出");
int days = getCancelDeadlineDays();
LocalDateTime deadline = travelStartTime.minusDays(days);
LocalDateTime now = LocalDateTime.now();
@@ -21,8 +21,8 @@ layout("/layouts/platform.html"){
<el-option v-for="item in settingOptions" :key="item.id" :label="item.configName" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="分配路线">
<el-select v-model="pageForm.matterId" clearable filterable placeholder="请选择分配路线" style="width: 100%">
<search-item label="分配批次">
<el-select v-model="pageForm.matterId" clearable filterable placeholder="请选择分配批次" style="width: 100%">
<el-option v-for="item in pageMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
</search-item>
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="6" v-if="$auth.hasPermission('thirtyTeachTour.branchUserAssignment.selectMatter')">
<el-form-item label="分配路线" prop="matterId">
<el-form-item label="分配批次" prop="matterId">
<el-select v-model="assignForm.matterId" clearable filterable placeholder="可选,选择后代报名" style="width: 100%" :disabled="assignForm.personType === 'BACKUP'">
<el-option v-for="item in assignMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
@@ -225,7 +225,7 @@ layout("/layouts/platform.html"){
<el-table-column label="手机号" prop="mobile" width="130" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="所属分工会" prop="unionName" min-width="160" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="所在单位" prop="unitName" min-width="220" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="材料" width="110" align="center" header-align="center">
<el-table-column label="上传照片" width="110" align="center" header-align="center">
<template slot-scope="{row}">
<el-button type="text" size="mini" :disabled="!isCandidateSelected(row)" @click="openPhotoUpload(row)">
{{ photoFileCount(row) > 0 ? "已上传" : "上传" }}
@@ -334,7 +334,7 @@ layout("/layouts/platform.html"){
</el-dialog>
<el-dialog
title="选择分配路线"
title="选择分配批次"
:visible.sync="selectMatterDialogVisible"
:close-on-click-modal="false"
width="520px"
@@ -343,8 +343,8 @@ layout("/layouts/platform.html"){
<el-form-item label="分配人员">
<el-input v-model="selectMatterForm.userName" disabled></el-input>
</el-form-item>
<el-form-item label="分配路线" prop="matterId">
<el-select v-model="selectMatterForm.matterId" clearable filterable placeholder="请选择分配路线" style="width: 100%">
<el-form-item label="分配批次" prop="matterId">
<el-select v-model="selectMatterForm.matterId" clearable filterable placeholder="请选择分配批次" style="width: 100%">
<el-option v-for="item in selectMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
</el-form-item>
@@ -557,7 +557,7 @@ layout("/layouts/platform.html"){
personType: [{required: true, message: "请选择人员类型", trigger: ["change", "blur"]}]
},
selectMatterRules: {
matterId: [{required: true, message: "请选择分配路线", trigger: ["change", "blur"]}]
matterId: [{required: true, message: "请选择分配批次", trigger: ["change", "blur"]}]
}
}
},
@@ -1143,11 +1143,11 @@ layout("/layouts/platform.html"){
}).then((res) => {
if (res.code === 0) {
const data = res.data || {}
this.$message.success("分配路线选择成功" + (data.ledgerCount > 0 ? ",已代报名" + data.ledgerCount + "人" : ""))
this.$message.success("分配批次选择成功" + (data.ledgerCount > 0 ? ",已代报名" + data.ledgerCount + "人" : ""))
this.selectMatterDialogVisible = false
this.doSearch()
} else {
this.$message.warning(res.msg || "分配路线选择失败")
this.$message.warning(res.msg || "分配批次选择失败")
}
}).finally(() => {
this.selectMatterSubmitting = false
@@ -1212,7 +1212,7 @@ layout("/layouts/platform.html"){
})
}).catch(() => {})
},
// 分配路线选项按业务事项展示,线路名称仅作为历史数据缺失事项名称时的兜底。
// 分配批次选项按业务事项展示,线路名称仅作为历史数据缺失事项名称时的兜底。
matterOptionLabel(item) {
return item.matterName || item.lineName || ""
}
@@ -21,8 +21,8 @@ layout("/layouts/platform.html"){
<el-option v-for="item in settingOptions" :key="item.id" :label="item.configName" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="分配线路">
<el-select v-model="pageForm.matterId" clearable filterable placeholder="请选择分配线路" style="width: 100%">
<search-item label="分配批次">
<el-select v-model="pageForm.matterId" clearable filterable placeholder="请选择分配批次" style="width: 100%">
<el-option v-for="item in pageMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
</search-item>
@@ -181,7 +181,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="分配线路" prop="matterId">
<el-form-item label="分配批次" prop="matterId">
<el-select
v-model="assignForm.matterId"
clearable
@@ -245,7 +245,7 @@ layout("/layouts/platform.html"){
<el-table-column label="手机号" prop="mobile" width="130" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="所属分工会" prop="unionName" min-width="160" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="所在单位" prop="unitName" min-width="220" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="分配线路" min-width="260" align="center" header-align="center">
<el-table-column label="分配批次" min-width="260" align="center" header-align="center">
<template slot-scope="{row}">
<el-select
v-model="row.assignmentMatterId"
@@ -258,7 +258,7 @@ layout("/layouts/platform.html"){
</el-select>
</template>
</el-table-column>
<el-table-column label="材料" width="110" align="center" header-align="center">
<el-table-column label="上传照片" width="110" align="center" header-align="center">
<template slot-scope="{row}">
<el-button type="text" size="mini" :disabled="!isCandidateSelected(row)" @click="openPhotoUpload(row)">
{{ photoFileCount(row) > 0 ? "已上传" : "上传" }}
@@ -367,7 +367,7 @@ layout("/layouts/platform.html"){
</el-dialog>
<el-dialog
title="选择分配线路"
title="选择分配批次"
:visible.sync="selectMatterDialogVisible"
:close-on-click-modal="false"
width="520px"
@@ -376,8 +376,8 @@ layout("/layouts/platform.html"){
<el-form-item label="分配人员">
<el-input v-model="selectMatterForm.userName" disabled></el-input>
</el-form-item>
<el-form-item label="分配线路" prop="matterId">
<el-select v-model="selectMatterForm.matterId" clearable filterable placeholder="请选择分配线路" style="width: 100%">
<el-form-item label="分配批次" prop="matterId">
<el-select v-model="selectMatterForm.matterId" clearable filterable placeholder="请选择分配批次" style="width: 100%">
<el-option v-for="item in selectMatterOptions" :key="item.matterId" :label="matterOptionLabel(item)" :value="item.matterId"></el-option>
</el-select>
</el-form-item>
@@ -551,7 +551,7 @@ layout("/layouts/platform.html"){
settingId: [{required: true, message: "请选择疗休养配置", trigger: ["change", "blur"]}]
},
selectMatterRules: {
matterId: [{required: true, message: "请选择分配线路", trigger: ["change", "blur"]}]
matterId: [{required: true, message: "请选择分配批次", trigger: ["change", "blur"]}]
},
remindRules: {
content: [{required: true, message: "请输入提醒内容", trigger: ["blur"]}]
@@ -1133,11 +1133,11 @@ layout("/layouts/platform.html"){
}).then((res) => {
if (res.code === 0) {
const data = res.data || {}
this.$message.success("分配线路选择成功" + (data.ledgerCount > 0 ? ",已代报名" + data.ledgerCount + "人" : ""))
this.$message.success("分配批次选择成功" + (data.ledgerCount > 0 ? ",已代报名" + data.ledgerCount + "人" : ""))
this.selectMatterDialogVisible = false
this.doSearch()
} else {
this.$message.warning(res.msg || "分配线路选择失败")
this.$message.warning(res.msg || "分配批次选择失败")
}
}).finally(() => {
this.selectMatterSubmitting = false
@@ -1214,7 +1214,7 @@ layout("/layouts/platform.html"){
})
}).catch(() => {})
},
// 分配线路选项按业务事项展示,线路名称仅作为历史数据缺失事项名称时的兜底。
// 分配批次选项按业务事项展示,线路名称仅作为历史数据缺失事项名称时的兜底。
matterOptionLabel(item) {
return item.matterName || item.lineName || ""
}