1、香樟工会讲堂->人员调整:添加代人报表(功能,系统管理员可用)
2、费用报销管理->费用报销:添加弹窗须知(参数配置:ExpenseDeclaration)
This commit is contained in:
@@ -457,7 +457,7 @@ public class SysUnionController {
|
|||||||
@Ok("json:{ignoreNull:true}")
|
@Ok("json:{ignoreNull:true}")
|
||||||
@SaCheckPermission("sys.manager.union")
|
@SaCheckPermission("sys.manager.union")
|
||||||
public Result listUnion(@Valid String unionId, @Valid String keyWord) {
|
public Result listUnion(@Valid String unionId, @Valid String keyWord) {
|
||||||
Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition");
|
Sql sql = Sqls.create("select id,loginname,username,unitName,unionName,sex from vw_user $condition");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and(View_user::getUnionId, "=", unionId);
|
cnd.and(View_user::getUnionId, "=", unionId);
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
|||||||
@@ -158,4 +158,10 @@ public class CommonController {
|
|||||||
return Result.success(count > 0);
|
return Result.success(count > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckLogin
|
||||||
|
@ApiOperation("系统配置")
|
||||||
|
public Result getConfigKeyObj(String key) {
|
||||||
|
return Result.success().addData(sysDictService.dao().fetch(Sys_config.class, Cnd.where("configKey", "=", key)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+48
-1
@@ -7,6 +7,7 @@ import cn.hutool.core.date.DateTime;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
@@ -22,6 +23,7 @@ import com.budwk.app.zhgh.activity.trainSignUp.service.TrainSignUpActivityStatis
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -215,7 +217,7 @@ public class TrainSignUpApplyController {
|
|||||||
@ApiOperation("验证是否能报名")
|
@ApiOperation("验证是否能报名")
|
||||||
@SaCheckPermission(value = {"trainSignUp.apply", "h5.trainSignUp.apply"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"trainSignUp.apply", "h5.trainSignUp.apply"}, mode = SaMode.OR)
|
||||||
public Result validateSignUp(String courseId,
|
public Result validateSignUp(String courseId,
|
||||||
@Param(value = "currentFamilyNumber") Integer currentFamilyNumber) {
|
@Param(value = "currentFamilyNumber") Integer currentFamilyNumber,String IsVerifyUserApply) {
|
||||||
try {
|
try {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
if (StrUtil.isBlank(courseId)) {
|
if (StrUtil.isBlank(courseId)) {
|
||||||
@@ -241,9 +243,11 @@ public class TrainSignUpApplyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//判断是否报名
|
//判断是否报名
|
||||||
|
if(StringUtils.defaultString(IsVerifyUserApply,"0").equals("0")){
|
||||||
boolean courseByUser = trainSignUpActivityService.isSignCourseByUser(courseId, SecurityUtil.getUserId());
|
boolean courseByUser = trainSignUpActivityService.isSignCourseByUser(courseId, SecurityUtil.getUserId());
|
||||||
if (courseByUser) {
|
if (courseByUser) {
|
||||||
return Result.error("抱歉,您已经报名");
|
return Result.error("抱歉,您已经报名");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断活动人数
|
//判断活动人数
|
||||||
@@ -454,4 +458,47 @@ public class TrainSignUpApplyController {
|
|||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("活动代人报名")
|
||||||
|
@SaCheckPermission(value = {"h5.trainSignUp.apply"}, mode = SaMode.OR)
|
||||||
|
public Result doSignUpInsteadApply(TrainSignUpUser trainSignUpUser) {
|
||||||
|
try {
|
||||||
|
lock.lock();
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
|
||||||
|
return Result.error("您没有操作此按钮的权限");
|
||||||
|
}
|
||||||
|
boolean courseByUser = trainSignUpActivityService.isSignCourseByUser(trainSignUpUser.getCourseId(), trainSignUpUser.getUserId());
|
||||||
|
if (courseByUser) {
|
||||||
|
return Result.error("该用户已报过该活动");
|
||||||
|
}
|
||||||
|
//判断人数
|
||||||
|
int number = 0;
|
||||||
|
TrainSignUpCourse course = trainSignUpActivityService.dao().fetch(TrainSignUpCourse.class, trainSignUpUser.getCourseId());
|
||||||
|
TrainSignUpType type = trainSignUpActivityService.dao().fetch(TrainSignUpType.class, course.getCourseType());
|
||||||
|
if (type != null) {
|
||||||
|
if (type.getIsBringFamily() && type.getIsAddFamily()) {
|
||||||
|
List<NutMap> mobileColumnsValue = trainSignUpUser.getMobileColumnsValue();
|
||||||
|
NutMap map = mobileColumnsValue.stream().filter(o -> "xdqsrs".equals(o.getString("columnCode"))).findAny().orElse(null);
|
||||||
|
number = map != null ? map.getInt("columnValue") : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean signFull = trainSignUpActivityService.isSignFull(course, number);
|
||||||
|
if (signFull) {
|
||||||
|
return Result.error("当前报名人数已满");
|
||||||
|
}
|
||||||
|
boolean signFullByUnionId = trainSignUpActivityService.isSignFullByUnionId(course, number);
|
||||||
|
if (signFullByUnionId) {
|
||||||
|
return Result.error("该活动您所在的分工会名额不足");
|
||||||
|
}
|
||||||
|
trainSignUpActivityService.doSignUpInsteadApply(trainSignUpUser);
|
||||||
|
return Result.success("报名成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.success("报名失败");
|
||||||
|
} finally {
|
||||||
|
lock.unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,4 +83,9 @@ public class TrainSignUpUser implements Serializable {
|
|||||||
@Comment("用户报名状态(1.正常 2.待报名成功 3.也是正常,但是是从2变为1的 4.废弃[就是没签到的意思])")
|
@Comment("用户报名状态(1.正常 2.待报名成功 3.也是正常,但是是从2变为1的 4.废弃[就是没签到的意思])")
|
||||||
private Integer state;
|
private Integer state;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("操作人(代人报表)")
|
||||||
|
private String operatorUserId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -126,4 +126,10 @@ public interface TrainSignUpActivityService extends BaseService<TrainSignUpActiv
|
|||||||
List<NutMap> qdInfoByUserId(String userId, String activityId);
|
List<NutMap> qdInfoByUserId(String userId, String activityId);
|
||||||
|
|
||||||
List<TrainSignUpCourse> filterCourseByHostUnion(List<TrainSignUpCourse> courseList);
|
List<TrainSignUpCourse> filterCourseByHostUnion(List<TrainSignUpCourse> courseList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动代人报名
|
||||||
|
* @param trainSignUpUser
|
||||||
|
*/
|
||||||
|
void doSignUpInsteadApply(TrainSignUpUser trainSignUpUser);
|
||||||
}
|
}
|
||||||
|
|||||||
+43
@@ -537,4 +537,47 @@ public class TrainSignUpActivityServiceImpl extends BaseServiceImpl<TrainSignUpA
|
|||||||
}
|
}
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void doSignUpInsteadApply(TrainSignUpUser trainSignUpUser){
|
||||||
|
//查询课程
|
||||||
|
TrainSignUpCourse course = dao().fetch(TrainSignUpCourse.class, trainSignUpUser.getCourseId());
|
||||||
|
TrainSignUpType type = dao().fetch(TrainSignUpType.class, course.getCourseType());
|
||||||
|
//如果这个课程的预留名额方式为报名人数不变
|
||||||
|
if (course.getReserveMode() == 2) {
|
||||||
|
//如果当前报名+已报小于这个课程限制人数
|
||||||
|
//课程已报人数
|
||||||
|
int normalCount = statisticsService.queryCourseCount(course.getId(), course.getCourseType());
|
||||||
|
//+1是算自己
|
||||||
|
int hasRegisterNum = type.getSelfAddFamily() ? normalCount + 1 : 0;
|
||||||
|
trainSignUpUser.setState((hasRegisterNum + course.getCourseReservedNumber()) > course.getCoursePeopleNumber() ? 2 : 1);
|
||||||
|
} else {
|
||||||
|
trainSignUpUser.setState(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
View_user user = dao().fetch(View_user.class, Cnd.where("id", "=", trainSignUpUser.getUserId()));
|
||||||
|
trainSignUpUser.setUnionId(user.getUnionId());
|
||||||
|
trainSignUpUser.setUnionName(user.getUnionName());
|
||||||
|
trainSignUpUser.setUnitId(user.getUnitId());
|
||||||
|
trainSignUpUser.setUnitName(user.getUnitName());
|
||||||
|
trainSignUpUser.setUserId(trainSignUpUser.getUserId());
|
||||||
|
trainSignUpUser.setSignUpTime(new Date());
|
||||||
|
trainSignUpUser.setOperatorUserId(SecurityUtil.getUserId());
|
||||||
|
dao().insert(trainSignUpUser);
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(trainSignUpUser.getActivityCourseId())) {
|
||||||
|
TrainSignUpActivityCourse fetch = dao().fetch(TrainSignUpActivityCourse.class, trainSignUpUser.getActivityCourseId());
|
||||||
|
TrainSignUpUserCourse userCourse = new TrainSignUpUserCourse();
|
||||||
|
userCourse.setActivityId(trainSignUpUser.getActivityId());
|
||||||
|
userCourse.setCourseId(trainSignUpUser.getCourseId());
|
||||||
|
userCourse.setUserId(trainSignUpUser.getUserId());
|
||||||
|
userCourse.setCourseStartTime(fetch.getCourseStartTime());
|
||||||
|
userCourse.setCourseEndTime(fetch.getCourseEndTime());
|
||||||
|
userCourse.setAttend(false);
|
||||||
|
userCourse.setAttendTime(null);
|
||||||
|
userCourse.setActivityCourseId(fetch.getId());
|
||||||
|
dao().insert(userCourse);
|
||||||
|
} else {
|
||||||
|
asyncInsertUserCourse(trainSignUpUser.getActivityId(), trainSignUpUser.getCourseId(), trainSignUpUser.getUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -46,6 +46,7 @@ public class TrainSignUpActivityStatisticsServiceImpl extends BaseServiceImpl<Tr
|
|||||||
tsuc.coursePeopleNumber,
|
tsuc.coursePeopleNumber,
|
||||||
tsuc.courseReservedNumber,
|
tsuc.courseReservedNumber,
|
||||||
type.typeName as courseType,
|
type.typeName as courseType,
|
||||||
|
tsuc.courseType as courseTypeId,
|
||||||
tsuc.courseLocation,
|
tsuc.courseLocation,
|
||||||
tsuc.courseInstructor,
|
tsuc.courseInstructor,
|
||||||
tsuc.reserveMode,
|
tsuc.reserveMode,
|
||||||
|
|||||||
@@ -0,0 +1,246 @@
|
|||||||
|
const applyForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-dialog :close-on-click-modal="false" :visible.sync="signDialog" title="信息填写" width="50%" append-to-body>
|
||||||
|
<el-form :model="formData" ref="form" label-width="120px">
|
||||||
|
<el-row>
|
||||||
|
<el-form-item prop="userId" label="人员">
|
||||||
|
<user-select
|
||||||
|
v-model="formData.userId"
|
||||||
|
style="width: 100%"
|
||||||
|
api="/platform/sys/union/listUnion"
|
||||||
|
ref="useRef"
|
||||||
|
@change="selectUserFun"
|
||||||
|
:option_label_func="
|
||||||
|
(item) => {
|
||||||
|
return item.username + item.loginname
|
||||||
|
}
|
||||||
|
"
|
||||||
|
></user-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="姓名" prop="username">
|
||||||
|
<el-input readonly v-model="formData.username"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="工号" prop="loginname">
|
||||||
|
<el-input readonly v-model="formData.loginname"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="所属单位" prop="unitName">
|
||||||
|
<el-input readonly v-model="formData.unitName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="所属工会" prop="unionName">
|
||||||
|
<el-input readonly v-model="formData.unionName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="性别" prop="sex">
|
||||||
|
<el-input readonly v-model="formData.sex"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!--<el-col :span="24">
|
||||||
|
<el-form-item label="联系方式" prop="mobile">
|
||||||
|
<el-input v-model="formData.mobile"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>-->
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="courseRow.courseIsLimitApply">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="报名时段" prop="activityCourseId"
|
||||||
|
:rules="{ required: true, message: '请选择报名时段', trigger: 'blur'}">
|
||||||
|
<el-select style="width: 100%" v-model="formData.activityCourseId" placeholder="请选择报名时段">
|
||||||
|
<el-option v-for="item in courseTimeSelectList"
|
||||||
|
:label="item.text.substring(0, 12)"
|
||||||
|
:value="item.value"
|
||||||
|
:key="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item
|
||||||
|
v-for="(column, index) in formData.trainMobileSignColumnList"
|
||||||
|
:prop="'trainMobileSignColumnList.' + index + '.columnValue'"
|
||||||
|
:label="column.columnName"
|
||||||
|
:key="column.columnCode"
|
||||||
|
:rules="{ required: column.isRequired,
|
||||||
|
message: (['SELECT', 'FILE'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName,
|
||||||
|
trigger: 'blur'}"
|
||||||
|
>
|
||||||
|
<!--文本框-->
|
||||||
|
<template v-if="!['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||||
|
<el-input
|
||||||
|
v-model="column.columnValue"
|
||||||
|
:placeholder="'请填写' + column.columnName"
|
||||||
|
:type="['INT'].includes(column.columnType) ? 'number' : ''"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
<!--选择框-->
|
||||||
|
<template v-else-if="['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||||
|
<el-select v-model="column.columnValue" :placeholder="'请选择' + column.columnName" style="width: 100%">
|
||||||
|
<el-option v-for="item in column.selectValues" :key="item" :label="item" :value="item"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<!--时间框-->
|
||||||
|
<template v-else-if="['DATE', 'DATETIME'].includes(column.columnType)">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="column.columnValue"
|
||||||
|
:type="column.columnType === 'DATE' ? 'date' : 'datetime'"
|
||||||
|
:placeholder="'请选择' + column.columnName"
|
||||||
|
:value-format="column.columnType === 'DATE' ? 'yyyy-MM-dd' : 'yyyy-MM-dd HH:mm:ss'"
|
||||||
|
></el-date-picker>
|
||||||
|
</template>
|
||||||
|
<!--文件-->
|
||||||
|
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||||
|
<file-upload :upload_number="column.fileNumber" :value.sync="column.columnValue"
|
||||||
|
:accept="column.fileType ? column.fileType.join(',') : ''"
|
||||||
|
upload_result_type="url"
|
||||||
|
complete_result upload_mode="drag"
|
||||||
|
upload_result_category="array"></file-upload>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
|
<el-button @click="signDialog = false">取 消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提 交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
store,
|
||||||
|
dicts: ["TRAIN_SIGNUP_TYPE"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
signDialog: false,
|
||||||
|
formData: {},
|
||||||
|
courseRow: {},
|
||||||
|
courseTimeSelectList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getCourseTimeSelectList(o) {
|
||||||
|
const resp = await $.post('/platform/trainSignUp/apply/getCourseTimeSelectList',{ courseId: o.id })
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.courseTimeSelectList = resp.data
|
||||||
|
} else {
|
||||||
|
this.$message.warning('获取时段信息失败,请联系管理员')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onOpen(row, course) {
|
||||||
|
this.initData(row, course)
|
||||||
|
if (row.courseIsLimitApply) {
|
||||||
|
await this.getCourseTimeSelectList(row)
|
||||||
|
}
|
||||||
|
this.courseRow = row
|
||||||
|
this.signDialog = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.form.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async validateSignUp() {
|
||||||
|
// 获取家属人数
|
||||||
|
let familyCount = this.formData.trainMobileSignColumnList.filter(o => o.columnCode === 'xdqsrs').reduce((sum, item) => {
|
||||||
|
return sum + (Number(item.columnValue) || 0)
|
||||||
|
}, 0)
|
||||||
|
const res = await this.$axios.post("/platform/trainSignUp/apply/validateSignUp", {
|
||||||
|
courseId: this.formData.courseId,
|
||||||
|
currentFamilyNumber: familyCount,
|
||||||
|
IsVerifyUserApply: "1"
|
||||||
|
})
|
||||||
|
return res.code === 0
|
||||||
|
},
|
||||||
|
async validateCourseTime() {
|
||||||
|
const res = await this.$axios.post('/platform/trainSignUp/apply/validateSourceSignUp', {
|
||||||
|
activityCourseId: this.formData.activityCourseId,
|
||||||
|
courseId: this.courseRow.id
|
||||||
|
})
|
||||||
|
return res.code === 0
|
||||||
|
},
|
||||||
|
async onSubmit() {
|
||||||
|
if(!await this.validateSignUp()) return
|
||||||
|
|
||||||
|
if(!this.formData.username) {
|
||||||
|
this.$message.warning("请选择参加人员")
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs["form"].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if(this.courseRow.courseIsLimitApply && !await this.validateCourseTime()) return
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const mobileColumnsValue = this.formData.trainMobileSignColumnList.map((v) => {
|
||||||
|
return {
|
||||||
|
columnName: v.columnName,
|
||||||
|
columnValue: v.columnValue,
|
||||||
|
columnCode: v.columnCode,
|
||||||
|
columnFormType: v.columnFormType
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.formData.mobileColumnsValue = JSON.stringify(mobileColumnsValue)
|
||||||
|
const resp = await this.$axios.post("/platform/trainSignUp/apply/doSignUpInsteadApply", this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.signDialog = false
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
this.formData.userId = '';
|
||||||
|
this.formData.username = '';
|
||||||
|
this.formData.loginname = '';
|
||||||
|
this.formData.unionName = '';
|
||||||
|
this.formData.unitName = '';
|
||||||
|
this.formData.sex = '';
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initData(row, course) {
|
||||||
|
|
||||||
|
this.$set(this.formData, 'activityId', row.activityId)
|
||||||
|
this.$set(this.formData, 'courseId', row.id)
|
||||||
|
this.$set(this.formData, 'trainMobileSignColumnList', course.trainMobileSignColumnList)
|
||||||
|
|
||||||
|
this.formData.trainMobileSignColumnList.forEach((item) => {
|
||||||
|
item.columnValue = this.$store.state.user[item.columnCode] || ""
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectUserFun() {
|
||||||
|
if(this.$refs.useRef.options){
|
||||||
|
let event = this.$refs.useRef.options.find(item => item.id === this.formData.userId);
|
||||||
|
if(event){
|
||||||
|
this.$set(this.formData, 'username', event.username)
|
||||||
|
this.$set(this.formData, 'loginname', event.loginname)
|
||||||
|
this.$set(this.formData, 'unionName', event.unionName)
|
||||||
|
this.$set(this.formData, 'unitName', event.unitName)
|
||||||
|
this.$set(this.formData, 'sex', event.sex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -60,9 +60,11 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" width="150px">
|
<el-table-column label="操作" width="200px">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{row}">
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">调整</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">调整</el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="onSign(row)"
|
||||||
|
v-if="$auth.hasRoleOr(['SYSADMIN'])">代人报名</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -72,18 +74,21 @@ layout("/layouts/platform.html"){
|
|||||||
<template #view>
|
<template #view>
|
||||||
<user-info ref="userInfoRef" @refresh="doSearch"></user-info>
|
<user-info ref="userInfoRef" @refresh="doSearch"></user-info>
|
||||||
</template>
|
</template>
|
||||||
|
<apply-form ref="formRef" @refresh="doSearch"></apply-form>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script nonce="${cspNonce!}">
|
<script nonce="${cspNonce!}">
|
||||||
<!--#include('userInfo.js'){}#-->
|
<!--#include('userInfo.js'){}#-->
|
||||||
|
<!--#include('applyForm.js'){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
dicts: ["TRAIN_SIGNUP_TYPE"],
|
dicts: ["TRAIN_SIGNUP_TYPE"],
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"user-info": userInfo,
|
"user-info": userInfo,
|
||||||
|
"apply-form": applyForm,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -101,6 +106,7 @@ layout("/layouts/platform.html"){
|
|||||||
{ label: "最多报名人数", prop: "coursePeopleNumber", sortable: true },
|
{ label: "最多报名人数", prop: "coursePeopleNumber", sortable: true },
|
||||||
{ label: "已报名人数", prop: "registerNum", sortable: true }
|
{ label: "已报名人数", prop: "registerNum", sortable: true }
|
||||||
],
|
],
|
||||||
|
trainMobileSignColumnList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -133,6 +139,16 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.userInfoRef.onOpen(o, activity)
|
this.$refs.userInfoRef.onOpen(o, activity)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async onSign(row) {
|
||||||
|
await this.$axios.post("/platform/trainSignUp/type/getAllType", {id: row.courseTypeId})
|
||||||
|
.then((res) => {
|
||||||
|
if(res.data && res.data.length > 0){
|
||||||
|
this.trainMobileSignColumnList = res.data[0]?.trainMobileSignColumnList || [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
row.activityId = this.pageForm.activityId
|
||||||
|
this.$refs.formRef.onOpen(row, {trainMobileSignColumnList: this.trainMobileSignColumnList})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
await this.initData()
|
await this.initData()
|
||||||
|
|||||||
+20
@@ -129,6 +129,14 @@ layout("/layouts/platform.html"){
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog title="费用报销须知" :visible.sync="noticeDialogVisible" v-model="noticeDialogVisible">
|
||||||
|
<div style="max-height: 50vh; overflow-y: auto; white-space: pre-line">
|
||||||
|
{{friendlyReminderText}}
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button type="primary" @click="noticeDialogVisible = false">我已知晓</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
new Vue({
|
new Vue({
|
||||||
@@ -145,6 +153,8 @@ layout("/layouts/platform.html"){
|
|||||||
activityList: [],
|
activityList: [],
|
||||||
moneyPlaceholder: "请输入金额",
|
moneyPlaceholder: "请输入金额",
|
||||||
budgetMoney: 0,
|
budgetMoney: 0,
|
||||||
|
noticeDialogVisible: false,
|
||||||
|
friendlyReminderText: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -352,6 +362,7 @@ layout("/layouts/platform.html"){
|
|||||||
mobile: mobile,
|
mobile: mobile,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.getConfigKeyObj();
|
||||||
},
|
},
|
||||||
clubChange() {
|
clubChange() {
|
||||||
if (this.formData.clubId) {
|
if (this.formData.clubId) {
|
||||||
@@ -360,8 +371,17 @@ layout("/layouts/platform.html"){
|
|||||||
} else {
|
} else {
|
||||||
this.$set(this.formData, 'clubName', null)
|
this.$set(this.formData, 'clubName', null)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async getConfigKeyObj() {
|
||||||
|
const resp = await this.$axios.post("/open/common/getConfigKeyObj", { key: "ExpenseDeclaration" })
|
||||||
|
if(resp.data?.note){
|
||||||
|
this.noticeDialogVisible = true;
|
||||||
|
this.friendlyReminderText = resp.data?.note;
|
||||||
|
} else {
|
||||||
|
return "暂无配置提示内容";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.init()
|
this.init()
|
||||||
|
|
||||||
|
|||||||
@@ -79,22 +79,18 @@ public class WelfareTest {
|
|||||||
List<NutMap> nutMaps = welfareService.listMap(sql);
|
List<NutMap> nutMaps = welfareService.listMap(sql);
|
||||||
|
|
||||||
List<HealthCheckupProjectSubject> healthCheckupProjectSubjects = dao.query(HealthCheckupProjectSubject.class,
|
List<HealthCheckupProjectSubject> healthCheckupProjectSubjects = dao.query(HealthCheckupProjectSubject.class,
|
||||||
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", "ccdc49e3d63b4a8cb89c0af0687bb1bf"));
|
Cnd.where(HealthCheckupProjectSubject::getProjectId, "=", "abbb89dec0244392ba2a19394cfc7a0a"));
|
||||||
List<HealthCheckupProjectSubjectMoney> healthCheckupProjectSubjectMoneyList = dao.query(HealthCheckupProjectSubjectMoney.class,
|
List<HealthCheckupProjectSubjectMoney> healthCheckupProjectSubjectMoneyList = dao.query(HealthCheckupProjectSubjectMoney.class,
|
||||||
Cnd.where(HealthCheckupProjectSubjectMoney::getProjectId, "=", "ccdc49e3d63b4a8cb89c0af0687bb1bf"));
|
Cnd.where(HealthCheckupProjectSubjectMoney::getProjectId, "=", "abbb89dec0244392ba2a19394cfc7a0a"));
|
||||||
|
|
||||||
List<HealthCheckupUser> query = dao.query(HealthCheckupUser.class, Cnd.NEW());
|
|
||||||
|
|
||||||
List<PhysicalExamination> physicalExaminationList = ExcelImportUtil.importExcel(new File("C:\\Users\\mayn\\Desktop\\1.xlsx"), PhysicalExamination.class, new ImportParams());
|
List<PhysicalExamination> physicalExaminationList = ExcelImportUtil.importExcel(new File("C:\\Users\\mayn\\Desktop\\1.xlsx"), PhysicalExamination.class, new ImportParams());
|
||||||
physicalExaminationList = physicalExaminationList.stream()
|
List<HealthCheckupUserSelection> userSelectionList = physicalExaminationList.stream().filter(e->StringUtils.isNotBlank(e.getLoginName()))
|
||||||
.filter(e->query.stream().noneMatch(v->e.getLoginName().equals(v.getLoginName())))
|
.map(e -> {
|
||||||
.collect(Collectors.toList());
|
|
||||||
List<HealthCheckupUserSelection> userSelectionList = physicalExaminationList.stream().map(e -> {
|
|
||||||
NutMap nutMap = nutMaps.stream().filter(v -> e.getLoginName().equals(v.getString("loginname"))).findFirst().orElse(null);
|
NutMap nutMap = nutMaps.stream().filter(v -> e.getLoginName().equals(v.getString("loginname"))).findFirst().orElse(null);
|
||||||
HealthCheckupUserSelection userSelection = new HealthCheckupUserSelection();
|
HealthCheckupUserSelection userSelection = new HealthCheckupUserSelection();
|
||||||
if (ObjectUtil.isNotEmpty(nutMap)) {
|
if (ObjectUtil.isNotEmpty(nutMap)) {
|
||||||
userSelection.setSelectUserId(nutMap.getString("id"));
|
userSelection.setSelectUserId(nutMap.getString("id"));
|
||||||
userSelection.setProjectId("ccdc49e3d63b4a8cb89c0af0687bb1bf");
|
userSelection.setProjectId("abbb89dec0244392ba2a19394cfc7a0a");
|
||||||
HealthCheckupProjectSubject healthCheckupProjectSubject = healthCheckupProjectSubjects.stream()
|
HealthCheckupProjectSubject healthCheckupProjectSubject = healthCheckupProjectSubjects.stream()
|
||||||
.filter(v -> e.getHealthExaminationHospital().equals(v.getOptionName()))
|
.filter(v -> e.getHealthExaminationHospital().equals(v.getOptionName()))
|
||||||
.findFirst().orElse(null);
|
.findFirst().orElse(null);
|
||||||
@@ -107,7 +103,7 @@ public class WelfareTest {
|
|||||||
List<HealthCheckupProjectSubjectMoney> healthCheckupProjectSubjectMonies = healthCheckupProjectSubjectMoneyList.stream()
|
List<HealthCheckupProjectSubjectMoney> healthCheckupProjectSubjectMonies = healthCheckupProjectSubjectMoneyList.stream()
|
||||||
.filter(v -> v.getSubjectId().equals(healthCheckupProjectSubject.getId()))
|
.filter(v -> v.getSubjectId().equals(healthCheckupProjectSubject.getId()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
healthCheckupProjectSubjectMonies = healthCheckupProjectSubjectMoneyList.stream()
|
healthCheckupProjectSubjectMonies = healthCheckupProjectSubjectMonies.stream()
|
||||||
.filter(v -> v.getMoney().compareTo(e.getMoney()) == 0
|
.filter(v -> v.getMoney().compareTo(e.getMoney()) == 0
|
||||||
&& v.getSettlementMoney().compareTo(e.getSettlementMoney()) == 0)
|
&& v.getSettlementMoney().compareTo(e.getSettlementMoney()) == 0)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|||||||
Reference in New Issue
Block a user