commit
This commit is contained in:
+8
-5
@@ -204,7 +204,7 @@ public class FamilyActivityApplyController {
|
|||||||
if(Lang.isEmpty(courseList)) {
|
if(Lang.isEmpty(courseList)) {
|
||||||
return Result.success(new ArrayList<>());
|
return Result.success(new ArrayList<>());
|
||||||
}
|
}
|
||||||
List<String> assortList = courseList.stream().map(FamilyCourse::getAssort).filter(StrUtil::isNotBlank).toList();
|
List<String> assortList = courseList.stream().map(FamilyCourse::getAssort).filter(StrUtil::isNotBlank).distinct().toList();
|
||||||
return Result.success(assortList);
|
return Result.success(assortList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,8 +378,12 @@ public class FamilyActivityApplyController {
|
|||||||
if(signFullByUnionId) {
|
if(signFullByUnionId) {
|
||||||
return Result.error(99,"该活动您所在的分工会名额不足");
|
return Result.error(99,"该活动您所在的分工会名额不足");
|
||||||
}
|
}
|
||||||
familyActivityService.doSignUp(familyUser);
|
FamilyUser finishUser = familyActivityService.doSignUp(familyUser);
|
||||||
|
if(finishUser.getState() == 2) {
|
||||||
|
return Result.success("正式报名已满,您已列为替补,如有老师放弃报名,将会按先后顺序依次替补。请您自行关注后续结果。谢谢!");
|
||||||
|
} else {
|
||||||
return Result.success("祝贺您!您已报名成功!请留意各分场活动的准确时间、地点,提前10-15分钟到达活动现场做好准备。如您因故不能参加活动,还请及时登录系统取消报名,以便将机会留给其他有需要的教职工。谢谢!");
|
return Result.success("祝贺您!您已报名成功!请留意各分场活动的准确时间、地点,提前10-15分钟到达活动现场做好准备。如您因故不能参加活动,还请及时登录系统取消报名,以便将机会留给其他有需要的教职工。谢谢!");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return Result.error("报名失败");
|
return Result.error("报名失败");
|
||||||
@@ -407,7 +411,7 @@ public class FamilyActivityApplyController {
|
|||||||
cnd.and(new Static(" userId in (select id from user where unionid = '%s')".formatted(SecurityUtil.getUnionId())));
|
cnd.and(new Static(" userId in (select id from user where unionid = '%s')".formatted(SecurityUtil.getUnionId())));
|
||||||
}
|
}
|
||||||
cnd.asc("signUpTime");
|
cnd.asc("signUpTime");
|
||||||
if (!type.getIsBringFamily() && course.getReserveMode() == 2) {
|
/*if (type.getIsBringFamily() && course.getReserveMode() == 2) {
|
||||||
List<FamilyUser> signUpUsers = dao.query(FamilyUser.class, cnd);
|
List<FamilyUser> signUpUsers = dao.query(FamilyUser.class, cnd);
|
||||||
int thisSignUpUserCount = dao.count(FamilyUser.class,
|
int thisSignUpUserCount = dao.count(FamilyUser.class,
|
||||||
Cnd.where("activityId", "=", activityId)
|
Cnd.where("activityId", "=", activityId)
|
||||||
@@ -418,9 +422,8 @@ public class FamilyActivityApplyController {
|
|||||||
familyUser.setState(1);
|
familyUser.setState(1);
|
||||||
dao.update(familyUser);
|
dao.update(familyUser);
|
||||||
Sys_user user = dao.fetch(Sys_user.class, familyUser.getUserId());
|
Sys_user user = dao.fetch(Sys_user.class, familyUser.getUserId());
|
||||||
//msgApi.sendTextMsg("【" + activity.getActivityName() + "】已候补成功,请按时参加活动!", user.getLoginname());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
//删除报名记录
|
//删除报名记录
|
||||||
dao.clear("family_user_course", Cnd.where("activityId", "=", activityId)
|
dao.clear("family_user_course", Cnd.where("activityId", "=", activityId)
|
||||||
.and("courseId", "=", courseId).and("userId", "=", userId));
|
.and("courseId", "=", courseId).and("userId", "=", userId));
|
||||||
|
|||||||
+13
-1
@@ -162,6 +162,17 @@ public class FamilyActivityStatisticsController {
|
|||||||
ts.activityId = @activityId
|
ts.activityId = @activityId
|
||||||
""").setParam("activityId", activityId);
|
""").setParam("activityId", activityId);
|
||||||
List<NutMap> userList = familyActivityManageService.listMap(sql);
|
List<NutMap> userList = familyActivityManageService.listMap(sql);
|
||||||
|
for (NutMap item : userList) {
|
||||||
|
if (item.getInt("state") == 1) {
|
||||||
|
item.setv("stateName", "正常报名");
|
||||||
|
} else if (item.getInt("state") == 2) {
|
||||||
|
item.setv("stateName", "候补报名");
|
||||||
|
} else if (item.getInt("state") == 3) {
|
||||||
|
item.setv("stateName", "正常报名(候补)");
|
||||||
|
} else if (item.getInt("state") == 4) {
|
||||||
|
item.setv("stateName", "无效报名(缺席)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<FamilyCourse> courseList = dao.query(FamilyCourse.class, Cnd.where("activityId", "=", activityId));
|
List<FamilyCourse> courseList = dao.query(FamilyCourse.class, Cnd.where("activityId", "=", activityId));
|
||||||
|
|
||||||
@@ -178,7 +189,8 @@ public class FamilyActivityStatisticsController {
|
|||||||
Map.of("name", "分工会", "key", "unionName"),
|
Map.of("name", "分工会", "key", "unionName"),
|
||||||
Map.of("name", "性别", "key", "sex"),
|
Map.of("name", "性别", "key", "sex"),
|
||||||
Map.of("name", "人事系统手机号", "key", "newMobile"),
|
Map.of("name", "人事系统手机号", "key", "newMobile"),
|
||||||
Map.of("name", "报名时段", "key", "courseTime")
|
Map.of("name", "报名时段", "key", "courseTime"),
|
||||||
|
Map.of("name", "报名状态", "key", "stateName")
|
||||||
);
|
);
|
||||||
|
|
||||||
List<ExcelExportEntity> excelCommonExportEntity = basicEntity.stream().map(entity -> {
|
List<ExcelExportEntity> excelCommonExportEntity = basicEntity.stream().map(entity -> {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public interface FamilyActivityService extends BaseService<FamilyActivity> {
|
|||||||
* 手机端报名
|
* 手机端报名
|
||||||
* @param familyUser 活动ID
|
* @param familyUser 活动ID
|
||||||
*/
|
*/
|
||||||
void doSignUp(FamilyUser familyUser) throws Exception;
|
FamilyUser doSignUp(FamilyUser familyUser) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异步插入每个报名成功人员的课程数据
|
* 异步插入每个报名成功人员的课程数据
|
||||||
|
|||||||
+13
-3
@@ -244,7 +244,7 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public void doSignUp(FamilyUser familyUser) throws Exception {
|
public FamilyUser doSignUp(FamilyUser familyUser) throws Exception {
|
||||||
String userId = SecurityUtil.getUserId();
|
String userId = SecurityUtil.getUserId();
|
||||||
|
|
||||||
//查询课程
|
//查询课程
|
||||||
@@ -256,8 +256,8 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
//课程已报人数
|
//课程已报人数
|
||||||
int normalCount = statisticsService.queryCourseCount(course.getId(), course.getCourseType());
|
int normalCount = statisticsService.queryCourseCount(course.getId(), course.getCourseType());
|
||||||
//+1是算自己
|
//+1是算自己
|
||||||
int hasRegisterNum = type.getSelfAddFamily() ? normalCount + 1 : 0;
|
int hasRegisterNum = type.getSelfAddFamily() ? normalCount + 1 : normalCount;
|
||||||
familyUser.setState((hasRegisterNum + course.getCourseReservedNumber()) > course.getCoursePeopleNumber() ? 2 : 1);
|
familyUser.setState((hasRegisterNum + course.getCourseReservedNumber()) >= course.getCoursePeopleNumber() ? 2 : 1);
|
||||||
} else {
|
} else {
|
||||||
familyUser.setState(1);
|
familyUser.setState(1);
|
||||||
}
|
}
|
||||||
@@ -287,6 +287,7 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
} else {
|
} else {
|
||||||
asyncInsertUserCourse(familyUser.getActivityId(), familyUser.getCourseId(), userId);
|
asyncInsertUserCourse(familyUser.getActivityId(), familyUser.getCourseId(), userId);
|
||||||
}
|
}
|
||||||
|
return familyUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Async
|
@Async
|
||||||
@@ -408,6 +409,9 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
|
|
||||||
List<List<NutMap>> currentValue = user.getMobileColumnsValue();
|
List<List<NutMap>> currentValue = user.getMobileColumnsValue();
|
||||||
|
|
||||||
|
List<String> aa = List.of("b44a39b7962a43328f2ca59330ef9cc5");
|
||||||
|
List<String> bb = List.of("edbd44528da3465dbeb711421fe2ae63", "636c7f75d32f4413b8254e412db9770e", "baabdff339e447308f4759add2017c90");
|
||||||
|
|
||||||
String tempValue = "";
|
String tempValue = "";
|
||||||
// 循环家属
|
// 循环家属
|
||||||
for (List<NutMap> listMap : currentValue) {
|
for (List<NutMap> listMap : currentValue) {
|
||||||
@@ -438,6 +442,12 @@ public class FamilyActivityServiceImpl extends BaseServiceImpl<FamilyActivity> i
|
|||||||
if(Objects.equals(courseMap.get(user.getCourseId()), courseMap.get(hisRecord.getCourseId()))) {
|
if(Objects.equals(courseMap.get(user.getCourseId()), courseMap.get(hisRecord.getCourseId()))) {
|
||||||
return Map.of(false, onlyKeyValue + "已经报名" + typeMap.get(courseMap.get(user.getCourseId())) + "分场");
|
return Map.of(false, onlyKeyValue + "已经报名" + typeMap.get(courseMap.get(user.getCourseId())) + "分场");
|
||||||
}
|
}
|
||||||
|
if(aa.contains(user.getCourseId()) && bb.contains(hisRecord.getCourseId())) {
|
||||||
|
return Map.of(false, onlyKeyValue + "已经报名" + typeMap.get(courseMap.get(hisRecord.getCourseId())) + "分场,存在冲突");
|
||||||
|
}
|
||||||
|
if(bb.contains(user.getCourseId()) && aa.contains(hisRecord.getCourseId())) {
|
||||||
|
return Map.of(false, onlyKeyValue + "已经报名" + typeMap.get(courseMap.get(hisRecord.getCourseId())) + "分场,存在冲突");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
v-if="['SELECT'].includes(column.columnFormType)"
|
v-if="['SELECT'].includes(column.columnFormType)"
|
||||||
v-model="pickerStates[column.columnCode + 'Picker']"
|
v-model="pickerStates[column.columnCode + 'Picker']"
|
||||||
position="bottom"
|
position="bottom"
|
||||||
|
get-container="body"
|
||||||
>
|
>
|
||||||
<template v-if="['DATETIME', 'DATE'].includes(column.columnType)">
|
<template v-if="['DATETIME', 'DATE'].includes(column.columnType)">
|
||||||
<van-datetime-picker
|
<van-datetime-picker
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ module.exports = {
|
|||||||
.table-column {
|
.table-column {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
align-items: center;
|
/*align-items: center;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@@ -55,8 +55,8 @@ module.exports = {
|
|||||||
color: #555;
|
color: #555;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
flex-grow: 1; /* 动态占据剩余部分 */
|
flex-grow: 1; /* 动态占据剩余部分 */
|
||||||
white-space: nowrap; /* 防止换行 */
|
/*white-space: nowrap;
|
||||||
overflow: hidden; /* 隐藏溢出的部分 */
|
overflow: hidden;
|
||||||
text-overflow: ellipsis; /* 省略号 */
|
text-overflow: ellipsis;*/
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const applyForm = {
|
|||||||
:name="index + ''"
|
:name="index + ''"
|
||||||
:title="activity.keyWord + (index + 1)"
|
:title="activity.keyWord + (index + 1)"
|
||||||
:key="index">
|
:key="index">
|
||||||
<train-dynamic-form v-model="formData.mobileColumnsValue[index]"></train-dynamic-form>
|
<train-dynamic-form v-model="formData.mobileColumnsValue[index]" :key="index"></train-dynamic-form>
|
||||||
</van-tab>
|
</van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<table-column label="类型">{{row.typeName}}</table-column>
|
<table-column label="类型">{{row.typeName}}</table-column>
|
||||||
<table-column label="校区">{{row.campus}}</table-column>
|
<table-column label="校区">{{row.campus}}</table-column>
|
||||||
<table-column label="地点">{{row.courseLocation}}</table-column>
|
<table-column label="地点">{{row.courseLocation}}</table-column>
|
||||||
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
<table-column label="联系人"><span v-html="row.courseInstructor"></span></table-column>
|
||||||
<table-column label="时间">
|
<table-column label="时间">
|
||||||
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
||||||
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
||||||
|
|||||||
Reference in New Issue
Block a user