Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
@@ -42,6 +42,11 @@ public class Sys_dict extends BaseModel implements Serializable {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String name;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String remark;
|
||||
|
||||
@Column
|
||||
@Comment("编码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class FamilyActivityAddController {
|
||||
@Ok("json:full")
|
||||
@ApiOperation("亲子活动新增/修改")
|
||||
@SaCheckPermission("family.manage.activity")
|
||||
@SLog(type = "family", tag = "新增/修改活动", msg = "新增/修改活动")
|
||||
@SLog(tag = "亲子活动-活动管理", msg = "新增/修改活动")
|
||||
public Result doHandle(FamilyActivity activity) {
|
||||
if (StrUtil.isBlank(activity.getId())) {
|
||||
familyActivityManageService.add(activity, null);
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class FamilyActivityController {
|
||||
@At
|
||||
@ApiOperation("活动删除")
|
||||
@SaCheckPermission("family.manage.activity")
|
||||
@SLog(type = "family", tag = "删除活动", msg = "删除活动")
|
||||
@SLog(tag = "亲子活动-活动管理", msg = "删除活动")
|
||||
public Result onDelete(String id) {
|
||||
Trans.exec(() -> {
|
||||
familyActivityManageService.delete(id);
|
||||
|
||||
+3
-3
@@ -90,7 +90,7 @@ public class FamilyTypeController {
|
||||
@At
|
||||
@ApiOperation("活动类型新增")
|
||||
@SaCheckPermission("family.manage.type")
|
||||
@SLog(type = "family", tag = "活动类型新增", msg = "活动类型新增")
|
||||
@SLog(tag = "亲子活动-活动类型管理", msg = "活动类型新增")
|
||||
public Result doAdd(@Param("data") String data) throws Exception {
|
||||
FamilyType type = Json.fromJson(FamilyType.class, data);
|
||||
int count = dao.count(FamilyType.class, Cnd.where("code", "=", type.getCode()));
|
||||
@@ -106,7 +106,7 @@ public class FamilyTypeController {
|
||||
@At
|
||||
@ApiOperation("活动类型修改")
|
||||
@SaCheckPermission("family.manage.type")
|
||||
@SLog(type = "family", tag = "活动类型修改", msg = "活动类型修改")
|
||||
@SLog(tag = "亲子活动-活动类型管理", msg = "活动类型修改")
|
||||
public Result doEdit(FamilyType type) {
|
||||
int count = dao.count(FamilyType.class, Cnd.where("code", "=", type.getCode()).and("id", "!=", type.getId()));
|
||||
if (count > 0) {
|
||||
@@ -121,7 +121,7 @@ public class FamilyTypeController {
|
||||
@At
|
||||
@ApiOperation("活动类型删除")
|
||||
@SaCheckPermission("family.manage.type")
|
||||
@SLog(type = "family", tag = "活动类型删除", msg = "活动类型删除")
|
||||
@SLog(tag = "亲子活动-活动类型管理", msg = "活动类型删除")
|
||||
public Object doDelete(@Param(value = "id") String id) {
|
||||
dao.clear(FamilyType.class, Cnd.where("id", "=", id));
|
||||
dao.clear(FamilyMobileSignColumn.class, Cnd.where("typeId", "=", id));
|
||||
|
||||
+2
-2
@@ -123,7 +123,7 @@ public class FamilyUserAdjustController {
|
||||
@At
|
||||
@ApiOperation("人员调整")
|
||||
@SaCheckPermission("family.manage.activity.adjust")
|
||||
@SLog(type = "family", tag = "人员调整", msg = "人员调整")
|
||||
@SLog(tag = "亲子活动-人员调整", msg = "人员调整")
|
||||
public Result adjust(String activityId, String oldCourseId, String newCourseId, String userId) {
|
||||
|
||||
Cnd oldCnd = Cnd.where("activityId", "=", activityId)
|
||||
@@ -162,7 +162,7 @@ public class FamilyUserAdjustController {
|
||||
@At
|
||||
@ApiOperation("删除报名人员")
|
||||
@SaCheckPermission("family.manage.activity.adjust")
|
||||
@SLog(type = "family", tag = "删除报名人员", msg = "删除报名人员")
|
||||
@SLog(tag = "亲子活动-人员调整", msg = "删除报名人员")
|
||||
public Result deleteSignUser(String activityId, String courseId, String userId) {
|
||||
|
||||
//删除
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ public class FamilyUserBlackListManageController {
|
||||
@At
|
||||
@ApiOperation("报名人员处理")
|
||||
@SaCheckPermission("family.user.activity")
|
||||
@SLog(type = "family", tag = "报名人员处理", msg = "报名人员处理")
|
||||
@SLog(tag = "亲子活动-人员调整", msg = "报名人员处理")
|
||||
public Result doHandleUser(@Param("userId") String userId) {
|
||||
familyBlackListService.doHandleUser(userId);
|
||||
return Result.success();
|
||||
@@ -134,7 +134,7 @@ public class FamilyUserBlackListManageController {
|
||||
@At
|
||||
@ApiOperation("补充人员")
|
||||
@SaCheckPermission("family.user.activity")
|
||||
@SLog(type = "family", tag = "补充人员", msg = "补充人员")
|
||||
@SLog(tag = "亲子活动-人员管理", msg = "补充人员")
|
||||
public Result reserveSingUp(String[] ids, String courseId) {
|
||||
//先查询这个课程有多少个未签到的人员
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+4
-4
@@ -140,7 +140,7 @@ public class MFamilyActivityController {
|
||||
@At
|
||||
@ApiOperation("活动报名")
|
||||
@SaCheckPermission("h5.family.sign")
|
||||
@SLog(type = "family", tag = "活动报名", msg = "活动报名")
|
||||
@SLog(tag = "亲子活动-活动报名", msg = "活动报名")
|
||||
public Result doSignUp(FamilyUser familyUser) {
|
||||
try {
|
||||
lock.lock();
|
||||
@@ -179,7 +179,7 @@ public class MFamilyActivityController {
|
||||
@At
|
||||
@ApiOperation("取消报名")
|
||||
@SaCheckPermission("h5.family.sign")
|
||||
@SLog(type = "family", tag = "取消报名", msg = "取消报名")
|
||||
@SLog(tag = "亲子活动-活动报名", msg = "取消报名")
|
||||
public Result cancelSignUp(@Param("activityId") String activityId, @Param("courseId") String courseId) {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
//取消分两种情况
|
||||
@@ -222,7 +222,7 @@ public class MFamilyActivityController {
|
||||
@At
|
||||
@ApiOperation("签到")
|
||||
@SaCheckPermission("h5.family.sign")
|
||||
@SLog(type = "family", tag = "签到", msg = "签到")
|
||||
@SLog(tag = "亲子活动-活动报名", msg = "活动签到")
|
||||
public Result doQd(@Param("id") String id, @Param("courseId") String courseId, @Param("point") Double[] points) {
|
||||
FamilyCourse course = dao.fetch(FamilyCourse.class, courseId);
|
||||
List<Double> coursePoints = course.getCourseLocationCoordinates();
|
||||
@@ -351,7 +351,7 @@ public class MFamilyActivityController {
|
||||
@At
|
||||
@ApiOperation("二维码签到")
|
||||
@SaCheckPermission("h5.family.sign")
|
||||
@SLog(type = "family", tag = "二维码签到", msg = "二维码签到")
|
||||
@SLog(tag = "亲子活动-活动报名", msg = "二维码签到")
|
||||
public Result codeSign(String id, String codeCourseId, String clickCourseId) {
|
||||
if(StrUtil.isBlank(codeCourseId) || StrUtil.isBlank(clickCourseId)) {
|
||||
return Result.error("签到失败,没有获取到扫描信息");
|
||||
|
||||
+2
-2
@@ -112,7 +112,7 @@ public class YearPlanController {
|
||||
@At
|
||||
@ApiOperation("新增/修改年度计划")
|
||||
@SaCheckPermission("planSummary.yearPlan.manage")
|
||||
@SLog(type = "yearPlan", tag = "新增/修改年度计划", msg = "新增/修改年度计划")
|
||||
@SLog(tag = "年度计划总结-年度计划管理", msg = "新增/修改年度计划")
|
||||
public Object onSubmit(YearPlan yearPlan) {
|
||||
yearPlanService.insertOrUpdate(yearPlan);
|
||||
return Result.success();
|
||||
@@ -121,7 +121,7 @@ public class YearPlanController {
|
||||
@At
|
||||
@ApiOperation("删除年度计划")
|
||||
@SaCheckPermission("planSummary.yearPlan.manage")
|
||||
@SLog(type = "yearPlan", tag = "删除年度计划", msg = "删除年度计划")
|
||||
@SLog(tag = "年度计划总结-年度计划管理", msg = "删除年度计划")
|
||||
public Object onDelete(String id) {
|
||||
yearPlanService.delete(id);
|
||||
return Result.success();
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ public class YearSummaryController {
|
||||
@At
|
||||
@ApiOperation("新增/修改年度总结")
|
||||
@SaCheckPermission("planSummary.yearSummary.manage")
|
||||
@SLog(type = "yearSummary", tag = "新增/修改年度总结", msg = "新增/修改年度总结")
|
||||
@SLog(tag = "年度计划总结-年度总结管理", msg = "新增/修改年度总结")
|
||||
public Object onSubmit(YearSummary yearSummary) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where(View_user::getId, "=", SecurityUtil.getUserId()));
|
||||
yearSummary.setUserId(SecurityUtil.getUserId());
|
||||
@@ -128,7 +128,7 @@ public class YearSummaryController {
|
||||
@At
|
||||
@ApiOperation("删除年度总结")
|
||||
@SaCheckPermission("planSummary.yearSummary.manage")
|
||||
@SLog(type = "yearSummary", tag = "删除年度总结", msg = "删除年度总结")
|
||||
@SLog(tag = "年度计划总结-年度总结管理", msg = "删除年度总结")
|
||||
public Object onDelete(String id) {
|
||||
yearSummaryService.delete(id);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class TrainSignUpActivityAddController {
|
||||
@Ok("json:full")
|
||||
@ApiOperation("品牌活动新增/修改")
|
||||
@SaCheckPermission("trainSingUp.manage.activity")
|
||||
@SLog(type = "trainSignUp", tag = "新增/修改活动", msg = "新增/修改活动")
|
||||
@SLog(tag = "品牌活动-活动管理", msg = "新增/修改活动")
|
||||
public Result doHandle(TrainSignUpActivity activity) {
|
||||
if (StrUtil.isBlank(activity.getId())) {
|
||||
trainSignUpActivityManageService.add(activity, null);
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class TrainSignUpActivityController {
|
||||
@At
|
||||
@ApiOperation("活动删除")
|
||||
@SaCheckPermission("trainSingUp.manage.activity")
|
||||
@SLog(type = "trainSignUp", tag = "删除活动", msg = "删除活动")
|
||||
@SLog(tag = "品牌活动-活动管理", msg = "删除活动")
|
||||
public Result onDelete(String id) {
|
||||
Trans.exec(() -> {
|
||||
trainSignUpActivityManageService.delete(id);
|
||||
|
||||
+3
-3
@@ -90,7 +90,7 @@ public class TrainSignUpTypeController {
|
||||
@At
|
||||
@ApiOperation("活动类型新增")
|
||||
@SaCheckPermission("trainSingUp.manage.type")
|
||||
@SLog(type = "trainSignUp", tag = "活动类型新增", msg = "活动类型新增")
|
||||
@SLog(tag = "品牌活动-类型管理", msg = "活动类型新增")
|
||||
public Result doAdd(@Param("data") String data) throws Exception {
|
||||
TrainSignUpType type = Json.fromJson(TrainSignUpType.class, data);
|
||||
int count = dao.count(TrainSignUpType.class, Cnd.where("code", "=", type.getCode()));
|
||||
@@ -106,7 +106,7 @@ public class TrainSignUpTypeController {
|
||||
@At
|
||||
@ApiOperation("活动类型修改")
|
||||
@SaCheckPermission("trainSingUp.manage.type")
|
||||
@SLog(type = "trainSignUp", tag = "活动类型修改", msg = "活动类型修改")
|
||||
@SLog(tag = "品牌活动-类型管理", msg = "活动类型修改")
|
||||
public Result doEdit(TrainSignUpType type) {
|
||||
int count = dao.count(TrainSignUpType.class, Cnd.where("code", "=", type.getCode()).and("id", "!=", type.getId()));
|
||||
if (count > 0) {
|
||||
@@ -121,7 +121,7 @@ public class TrainSignUpTypeController {
|
||||
@At
|
||||
@ApiOperation("活动类型删除")
|
||||
@SaCheckPermission("trainSingUp.manage.type")
|
||||
@SLog(type = "trainSignUp", tag = "活动类型删除", msg = "活动类型删除")
|
||||
@SLog(tag = "品牌活动-类型管理", msg = "活动类型删除")
|
||||
public Object doDelete(@Param(value = "id") String id) {
|
||||
dao.clear(TrainSignUpType.class, Cnd.where("id", "=", id));
|
||||
dao.clear(TrainMobileSignColumn.class, Cnd.where("typeId", "=", id));
|
||||
|
||||
+2
-2
@@ -125,7 +125,7 @@ public class TrainSignUpUserAdjustController {
|
||||
@At
|
||||
@ApiOperation("人员调整")
|
||||
@SaCheckPermission("trainSingUp.manage.activity.adjust")
|
||||
@SLog(type = "trainSingUp", tag = "人员调整", msg = "人员调整")
|
||||
@SLog(tag = "品牌活动-人员调整", msg = "人员调整")
|
||||
public Result adjust(String activityId, String oldCourseId, String newCourseId, String userId) {
|
||||
|
||||
Cnd oldCnd = Cnd.where("activityId", "=", activityId)
|
||||
@@ -164,7 +164,7 @@ public class TrainSignUpUserAdjustController {
|
||||
@At
|
||||
@ApiOperation("删除报名人员")
|
||||
@SaCheckPermission("trainSingUp.manage.activity.adjust")
|
||||
@SLog(type = "trainSingUp", tag = "删除报名人员", msg = "删除报名人员")
|
||||
@SLog(tag = "品牌活动-人员调整", msg = "删除报名人员")
|
||||
public Result deleteSignUser(String activityId, String courseId, String userId) {
|
||||
|
||||
//删除
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ public class TrainSignUpUserBlackListManageController {
|
||||
@At
|
||||
@ApiOperation("报名人员处理")
|
||||
@SaCheckPermission("trainSingUp.user.activity")
|
||||
@SLog(type = "trainSingUp", tag = "报名人员处理", msg = "报名人员处理")
|
||||
@SLog(tag = "品牌活动-人员管理", msg = "报名人员处理")
|
||||
public Result doHandleUser(@Param("userId") String userId) {
|
||||
trainSignUpBlackListService.doHandleUser(userId);
|
||||
return Result.success();
|
||||
@@ -132,7 +132,7 @@ public class TrainSignUpUserBlackListManageController {
|
||||
@At
|
||||
@ApiOperation("补充人员")
|
||||
@SaCheckPermission("trainSingUp.user.activity")
|
||||
@SLog(type = "trainSingUp", tag = "补充人员", msg = "补充人员")
|
||||
@SLog(tag = "品牌活动-人员管理", msg = "补充人员")
|
||||
public Result reserveSingUp(String[] ids, String courseId) {
|
||||
//先查询这个课程有多少个未签到的人员
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+4
-2
@@ -145,6 +145,7 @@ public class MTrainSignUpActivityController {
|
||||
@At
|
||||
@ApiOperation("活动报名")
|
||||
@SaCheckPermission("h5.trainSignUp.sign")
|
||||
@SLog(tag = "品牌活动-活动报名", msg = "活动报名")
|
||||
public Result doSignUp(TrainSignUpUser trainSignUpUser) {
|
||||
try {
|
||||
lock.lock();
|
||||
@@ -184,6 +185,7 @@ public class MTrainSignUpActivityController {
|
||||
@At
|
||||
@ApiOperation("取消报名")
|
||||
@SaCheckPermission("h5.trainSignUp.sign")
|
||||
@SLog(tag = "品牌活动-活动报名", msg = "取消报名")
|
||||
public Result cancelSignUp(@Param("activityId") String activityId, @Param("courseId") String courseId) {
|
||||
String userId = SecurityUtil.getUserId();
|
||||
//取消分两种情况
|
||||
@@ -226,7 +228,7 @@ public class MTrainSignUpActivityController {
|
||||
@At
|
||||
@ApiOperation("签到")
|
||||
@SaCheckPermission("h5.trainSignUp.sign")
|
||||
@SLog(type = "family", tag = "签到", msg = "签到")
|
||||
@SLog(tag = "品牌活动-活动报名", msg = "签到")
|
||||
public Result doQd(@Param("id") String id, @Param("courseId") String courseId, @Param("point") Double[] points) {
|
||||
TrainSignUpCourse course = dao.fetch(TrainSignUpCourse.class, courseId);
|
||||
List<Double> coursePoints = course.getCourseLocationCoordinates();
|
||||
@@ -355,7 +357,7 @@ public class MTrainSignUpActivityController {
|
||||
@At
|
||||
@ApiOperation("二维码签到")
|
||||
@SaCheckPermission("h5.trainSignUp.sign")
|
||||
@SLog(type = "family", tag = "二维码签到", msg = "二维码签到")
|
||||
@SLog(tag = "品牌活动-活动报名", msg = "二维码签到")
|
||||
public Result codeSign(String id, String codeCourseId, String clickCourseId) {
|
||||
if(StrUtil.isBlank(codeCourseId) || StrUtil.isBlank(clickCourseId)) {
|
||||
return Result.error("签到失败,没有获取到扫描信息");
|
||||
|
||||
+2
-2
@@ -96,7 +96,7 @@ public class ClubUserJoinApplyController {
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("condolence.apply")
|
||||
@SLog(type = "clubUser", tag = "保存协会入会", msg = "保存协会入会")
|
||||
@SLog(tag = "协会管理系统-申请入会", msg = "保存协会入会")
|
||||
public Result save(@Param("data") ClubUserApply clubUserApply) {
|
||||
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
|
||||
clubUserApply.setMode(true);
|
||||
@@ -109,7 +109,7 @@ public class ClubUserJoinApplyController {
|
||||
@ApiOperation("提交")
|
||||
@SaCheckPermission("club.join.apply")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "clubUser", tag = "申请协会入会", msg = "申请协会入会")
|
||||
@SLog(tag = "协会管理系统-申请入会", msg = "申请协会入会")
|
||||
public Result submit(ClubUserApply clubUserApply) {
|
||||
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
|
||||
if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isBlank(userApply.getId())) {
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public class ClubUserJoinMineController {
|
||||
@SaCheckPermission("club.join.apply")
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "clubUser", tag = "删除协会入会", msg = "删除协会入会")
|
||||
@SLog(tag = "协会管理系统-申请入会-我的申请", msg = "删除协会入会")
|
||||
public Result delete(@Valid String id) {
|
||||
dao.delete(ClubUserApply.class, id);
|
||||
dao.delete(ClubUser.class, id);
|
||||
|
||||
+2
-2
@@ -68,7 +68,7 @@ public class ClubEvaluateApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.apply")
|
||||
@SLog(type = "evaluateApply", tag = "保存协会评优申请", msg = "保存协会评优申请")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "保存协会评优申请")
|
||||
public Result save(@Param("data") SysClubEvaluate evaluate) {
|
||||
evaluateService.dao().insertOrUpdate(evaluate);
|
||||
return Result.success(evaluate);
|
||||
@@ -77,7 +77,7 @@ public class ClubEvaluateApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.apply")
|
||||
@SLog(type = "evaluateApply", tag = "提交协会评优", msg = "提交协会评优")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "提交协会评优")
|
||||
public Result submit(@Valid @Param("data") SysClubEvaluate evaluate) {
|
||||
evaluateService.dao().insertOrUpdate(evaluate);
|
||||
|
||||
|
||||
+3
-3
@@ -63,7 +63,7 @@ public class ClubEvaluateClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.clubAudit")
|
||||
@SLog(type = "clubEvaluate", tag = "会长审核评优申请", msg = "会长审核评优申请", param = true)
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "会长审核评优申请")
|
||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
@@ -80,8 +80,8 @@ public class ClubEvaluateClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.clubAudit")
|
||||
@SLog(type = "clubEvaluate", tag = "会长撤回评优申请", msg = "会长撤回评优申请", param = true)
|
||||
public Result revoke(@Valid String taskId) {
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "会长撤回评优申请")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class ClubEvaluateMineController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.mine")
|
||||
@SLog(type = "evaluateApply", tag = "删除协会评优", msg = "删除协会评优")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "删除协会评优")
|
||||
public Result doDelete(@Valid String id) {
|
||||
sysClubEvaluateService.dao().delete(SysClubEvaluate.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+3
-3
@@ -138,7 +138,7 @@ public class ClubExamineApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.apply")
|
||||
@SLog(type = "examineApply", tag = "保存协会年审", msg = "保存协会年审")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "保存协会年审")
|
||||
public Result save(@Param("data") SysClubExamineRegister examineRegister,
|
||||
@Param("incomeDetailed") String incomeDetailed,
|
||||
@Param("incomeCensus") String incomeCensus) {
|
||||
@@ -153,7 +153,7 @@ public class ClubExamineApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.apply")
|
||||
@SLog(type = "examineApply", tag = "提交协会年审", msg = "提交协会年审")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "提交协会年审")
|
||||
public Result submit(@Param("data") SysClubExamineRegister examineRegister,
|
||||
@Param("incomeDetailed") String incomeDetailed,
|
||||
@Param("incomeCensus") String incomeCensus) {
|
||||
@@ -168,7 +168,7 @@ public class ClubExamineApplyController {
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, reg);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHPY", reg.getId(), SecurityUtil.getUserId(), args);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHNS", reg.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
|
||||
+3
-3
@@ -57,7 +57,7 @@ public class ClubExamineClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.clubAudit")
|
||||
@SLog(type = "clubExamine", tag = "会长审核年度考核", msg = "会长审核年度考核", param = true)
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "会长审核年度考核")
|
||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
@@ -74,8 +74,8 @@ public class ClubExamineClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.clubAudit")
|
||||
@SLog(type = "clubExamine", tag = "会长撤回年度考核", msg = "会长撤回年度考核", param = true)
|
||||
public Result revoke(@Valid String taskId) {
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "会长撤回年度考核")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class ClubExamineMineController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.mine")
|
||||
@SLog(type = "evaluateApply", tag = "删除协会年审", msg = "删除协会年审")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "删除协会年审")
|
||||
public Result doDelete(@Valid String id) {
|
||||
sysClubExamineService.delete(id);
|
||||
sysClubExamineService.dao().clear(SysClubExamineRegisterDetailed.class, Cnd.where("registerId", "=", id));
|
||||
|
||||
-1
@@ -87,7 +87,6 @@ public class ClubAuditManagerController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||
|
||||
cnd.and("t.taskName", "=", "ef81777f-22fb-4fe4-9800-909e6c681210");
|
||||
|
||||
+2
-2
@@ -127,7 +127,7 @@ public class ClubChangeManagerController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.change")
|
||||
@SLog(type = "changManager", tag = "提交变更理事机构", msg = "提交变更理事机构")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交变更理事机构")
|
||||
public Object submit(@Param("data") SysClubManager clubManager) {
|
||||
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubManager.getClubId()).and(ClubUser::getUserId, "=", clubManager.getUserId()));
|
||||
@@ -169,7 +169,7 @@ public class ClubChangeManagerController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.change")
|
||||
@SLog(type = "ruleUpdate", tag = "删除变更理事机构", msg = "删除变更理事机构")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除变更理事机构")
|
||||
public Result delete(@Param("id") String id) {
|
||||
dao.delete(SysClubManager.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+7
-7
@@ -98,7 +98,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "修改协会信息", msg = "修改协会信息", param = true)
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改协会信息")
|
||||
public Result doSubmit(@Param("club") SysClub club) {
|
||||
clubInfoManageService.dao().update(club);
|
||||
return Result.success();
|
||||
@@ -107,7 +107,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "修改缴费状态", msg = "修改缴费状态", param = true)
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改缴费状态")
|
||||
public Result updatePayed(@Valid Boolean payed, @Valid String id) {
|
||||
clubInfoManageService.dao().update(ClubUser.class, Chain.make("payed", payed), Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
@@ -116,7 +116,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "修改拨付状态", msg = "修改拨付状态", param = true)
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改拨付状态")
|
||||
public Result updateGive(@Valid Boolean giveMoney, @Valid String id) {
|
||||
clubInfoManageService.dao().update(ClubUser.class, Chain.make("giveMoney", giveMoney), Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
@@ -125,7 +125,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "退会", msg = "退会", param = true)
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "退会")
|
||||
public Result exitClub(@Valid String id) {
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||
dao.delete(ClubUser.class,id);
|
||||
@@ -146,7 +146,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "删除协会成员", msg = "删除协会成员", param = true)
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除协会成员")
|
||||
public Result userDelete(@Valid String id) {
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, id);
|
||||
dao.delete(ClubUser.class,id);
|
||||
@@ -167,7 +167,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "修改身份", msg = "修改身份")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改身份")
|
||||
public Result updateRoleCode(@Param("id") String id, @Valid String[] roleCodes, @Valid String clubId) {
|
||||
List<String> roleCodeList = Arrays.asList(roleCodes);
|
||||
//查询社团是否存在会长或者秘书长
|
||||
@@ -243,7 +243,7 @@ public class ClubInfoManageController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.manage")
|
||||
@SLog(type = "infoManage", tag = "添加协会成员", msg = "添加协会成员", param = true)
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "添加协会成员")
|
||||
public Result userDoAdd(@Valid String clubId, @Valid String[] users, @Valid String roleCode, @Valid Boolean payed) {
|
||||
|
||||
//查询社团是否存在会长或者秘书长
|
||||
|
||||
+2
-2
@@ -114,7 +114,7 @@ public class ClubRefreshReportController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.refreshReport")
|
||||
@SLog(type = "refreshReport", tag = "提交换届报告", msg = "提交换届报告")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交换届报告")
|
||||
public Object submit(@Param("data") SysClubRefresh clubRefresh) {
|
||||
|
||||
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, Cnd.NEW());
|
||||
@@ -163,7 +163,7 @@ public class ClubRefreshReportController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.refreshReport")
|
||||
@SLog(type = "refreshReport", tag = "删除换届报告", msg = "删除换届报告")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除换届报告")
|
||||
public Result delete(@Param("id") String id) {
|
||||
clubInfoManageService.dao().delete(SysClubRefresh.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+2
-2
@@ -115,7 +115,7 @@ public class ClubRuleUpdateController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||
@SLog(type = "ruleUpdate", tag = "提交章程备案", msg = "提交章程备案")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交章程备案")
|
||||
public Object submit(@Param("data")SysClubRule clubRule) {
|
||||
|
||||
List<SysClubRule> list = dao.query(SysClubRule.class, Cnd.NEW());
|
||||
@@ -164,7 +164,7 @@ public class ClubRuleUpdateController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.infoManage.ruleUpdate")
|
||||
@SLog(type = "ruleUpdate", tag = "删除章程备案", msg = "删除章程备案")
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "删除章程备案")
|
||||
public Result delete(@Param("id") String id) {
|
||||
clubInfoManageService.dao().delete(SysClubRule.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
-1
@@ -75,7 +75,6 @@ public class ClubSchoolAuditReportController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||
|
||||
cnd.and("t.taskName", "=", "d4323546-8d09-419e-88d4-7b15862ca29d");
|
||||
|
||||
-1
@@ -75,7 +75,6 @@ public class ClubSchoolAuditRuleController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("year(info.creatTime)", "=", pageForm.getYear());
|
||||
|
||||
cnd.and("t.taskName", "=", "4a1f0656-7390-45d1-8018-ea0aff38450b");
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ public class ClubConfirmController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.clubConfirm")
|
||||
@SLog(type = "clubConfirm", tag = "协会确认", msg = "协会确认", param = true)
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "协会确认")
|
||||
public Result doAudit() {
|
||||
return Result.success();
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class ClubConfirmController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.clubConfirm")
|
||||
@SLog(type = "clubConfirm", tag = "协会确认撤回", msg = "协会确认撤回", param = true)
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "协会确认撤回")
|
||||
public Result withdraw(@Valid Long processTaskId) {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class ClubMyApplyController {
|
||||
@ApiOperation("删除协会")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.myApply")
|
||||
@SLog(type = "clubRegister", tag = "删除协会", msg = "删除协会")
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "删除协会")
|
||||
public Result doDelete(@Valid String id) {
|
||||
sysClubService.delete(id);
|
||||
sysClubService.dao().clear(SysClubSponsor.class, Cnd.where("clubId", "=", id));
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ public class ClubRegistApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.apply")
|
||||
@SLog(type = "registerApply", tag = "保存注册协会", msg = "保存注册协会")
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "保存注册协会")
|
||||
public Result save(@Param("club") SysClub club,
|
||||
@Param("::deleteIds") List<String> deleteIds,
|
||||
@Param("::managePerson") List<NutMap> managePerson) {
|
||||
@@ -81,7 +81,7 @@ public class ClubRegistApplyController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.apply")
|
||||
@SLog(type = "registerApply", tag = "提交注册协会", msg = "提交注册协会")
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "提交注册协会")
|
||||
public Result submit(@Param("club") SysClub club,
|
||||
@Param("::deleteIds") List<String> deleteIds,
|
||||
@Param("::managePerson") List<NutMap> managePerson) {
|
||||
|
||||
+4
-4
@@ -63,8 +63,8 @@ public class ClubSchoolLeaderAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.schoolLeaderAudit")
|
||||
@SLog(type = "schoolLeaderAudit", tag = "分管领导审核注册协会", msg = "分管领导审核注册协会", param = true)
|
||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "分管领导审核注册协会")
|
||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
|
||||
@@ -80,8 +80,8 @@ public class ClubSchoolLeaderAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.register.schoolLeaderAudit")
|
||||
@SLog(type = "schoolLeaderAudit", tag = "分管领导撤回注册协会", msg = "分管领导撤回注册协会", param = true)
|
||||
public Result revoke(@Valid String taskId) {
|
||||
@SLog(tag = "协会管理系统-协会注册", msg = "分管领导撤回注册协会")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class ClothingApplyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改服装登记")
|
||||
@SaCheckPermission("clothing.apply")
|
||||
@SLog(type = "clothing", tag = "新增/修改服装登记", msg = "新增/修改服装登记")
|
||||
@SLog(tag = "服装登记管理-登记申请", msg = "新增/修改服装登记")
|
||||
public Object doHandler(String[] ids, String projectId, Integer year, Boolean isBuy) {
|
||||
if(!isBuy) {
|
||||
clothingService.add(ids, projectId);
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ public class ClothingRecordController {
|
||||
@At
|
||||
@ApiOperation("根据项目删除")
|
||||
@SaCheckPermission("clothing.record")
|
||||
@SLog(type = "clothing", tag = "根据项目删除", msg = "根据项目删除")
|
||||
@SLog(tag = "服装登记管理-登记记录", msg = "根据项目删除")
|
||||
public Result doDelete(String projectId, String year, String userId) {
|
||||
if(StrUtil.isBlank(projectId)) {
|
||||
Result.error("项目不能为空");
|
||||
@@ -100,7 +100,7 @@ public class ClothingRecordController {
|
||||
@At
|
||||
@ApiOperation("删除单个人员")
|
||||
@SaCheckPermission("clothing.record")
|
||||
@SLog(type = "clothing", tag = "删除单个人员", msg = "删除单个人员")
|
||||
@SLog(tag = "服装登记管理-登记记录", msg = "删除单个人员")
|
||||
public Result deleteBuyUser(String id) {
|
||||
if(StrUtil.isBlank(id)) {
|
||||
Result.error("项目不能为空");
|
||||
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriod;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriodUser;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingType;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.service.MeetingInfoService;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
|
||||
import com.budwk.app.zhgh.democratic.workercongress.models.Worker_congress_session;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.checkerframework.checker.units.qual.C;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingManageController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 18:42
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "会议管理")
|
||||
@At("/platform/meeting/manage")
|
||||
public class MeetingManageController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private MeetingInfoService infoService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("meeting.manage")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/meeting/manage/index.html")
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("meeting.manage")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param("year") Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
mi.*,
|
||||
mt.name as typeName
|
||||
from
|
||||
meeting_info mi
|
||||
left join meeting_type mt on mt.id = mi.typeId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year(createTime)", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("mi.name", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("createTime");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = infoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("新增/修改会议")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("meeting.manage")
|
||||
@SLog(tag = "会议管理系统-会议管理", msg = "新增/修改会议")
|
||||
public Object submit(@Param("data") MeetingInfo info,
|
||||
@Param("users") MeetingTimePeriodUser[] users) {
|
||||
if(StrUtil.isBlank(info.getId())) {
|
||||
infoService.add(info, users);
|
||||
} else {
|
||||
infoService.edit(info, users);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除会议")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("meeting.manage")
|
||||
@SLog(tag = "会议管理系统-会议管理", msg = "删除会议")
|
||||
public Object delete(String id) {
|
||||
infoService.delete(id);
|
||||
dao.clear(MeetingTimePeriod.class, Cnd.where(MeetingTimePeriod::getMeetingId, "=", id));
|
||||
dao.clear(MeetingTimePeriodUser.class, Cnd.where(MeetingTimePeriodUser::getMeetingId, "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json:{locked:'password|salt',ignoreNull:false}")
|
||||
@SaCheckLogin
|
||||
public Result userPageData(@Valid PageForm pageForm,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String roleId,
|
||||
String sex,
|
||||
String teacherCongressSessionId,
|
||||
String workerCongressSessionId) {
|
||||
try {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
u.id as userId,
|
||||
u.username as userName,
|
||||
u.loginname as loginName,
|
||||
u.sex,
|
||||
u.mobile,
|
||||
u.unitid as unitId,
|
||||
u.unitname as unitName,
|
||||
u.unionid as unionId,
|
||||
u.unionname as unionName,
|
||||
u.userState,
|
||||
u.personType,
|
||||
u.preparedBy
|
||||
from
|
||||
vw_user u
|
||||
$condition
|
||||
""");
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
cnd.andEX("u.unitId", "=", unitId);
|
||||
cnd.and(Cnd.likeEX("u.sex", sex));
|
||||
if (StrUtil.isNotBlank(roleId)) {
|
||||
cnd.and(new Static("u.id in (select userId from sys_user_role where roleId = '%s')".formatted(roleId)));
|
||||
}
|
||||
if (StrUtil.isNotBlank(roleId) && StrUtil.isNotBlank(teacherCongressSessionId)) {
|
||||
cnd.and(new Static("u.id in (select userId from sys_user_role where roleId = '%s' and tcSessionId = '%s')".formatted(roleId, teacherCongressSessionId)));
|
||||
}
|
||||
if (StrUtil.isNotBlank(roleId) && StrUtil.isNotBlank(workerCongressSessionId)) {
|
||||
cnd.and(new Static("u.id in (select userId from sys_user_role where roleId = '%s' and wcSessionId = '%s')".formatted(roleId, workerCongressSessionId)));
|
||||
}
|
||||
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(pageForm.getSearchName(), "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
}
|
||||
if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return Result.success().addData(infoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
|
||||
} catch (Exception e) {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询单个场地信息")
|
||||
@SaCheckPermission("meeting")
|
||||
public Result info(String id) {
|
||||
MeetingInfo info = infoService.fetchLinks(infoService.fetch(id), "timePeriods", Cnd.NEW().asc("startTime"));
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
mt.*,
|
||||
u.sex,
|
||||
u.mobile,
|
||||
u.userState,
|
||||
u.personType,
|
||||
u.preparedBy
|
||||
from
|
||||
meeting_time_period_user mt
|
||||
left join vw_user u on u.id = mt.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("mt.meetingId", "=", id);
|
||||
cnd.groupBy("mt.userId");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> listMap = infoService.listMap(sql);
|
||||
info.setUsers(listMap);
|
||||
|
||||
MeetingType type = dao.fetch(MeetingType.class, info.getTypeId());
|
||||
info.setTypeName(type.getName());
|
||||
return Result.success(info);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询教代会信息")
|
||||
@SaCheckPermission("meeting")
|
||||
public Result queryTeacherCongress() {
|
||||
List<Teacher_congress_session> list = dao.query(Teacher_congress_session.class, Cnd.where(Teacher_congress_session::getEnable, "=", true).desc("year"));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询工代会信息")
|
||||
@SaCheckPermission("meeting")
|
||||
public Result queryWorkerCongress() {
|
||||
List<Worker_congress_session> list = dao.query(Worker_congress_session.class, Cnd.where(Teacher_congress_session::getEnable, "=", true).desc("year"));
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriod;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriodUser;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.service.MeetingOnlineService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingOnlineController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/29 15:03
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "会议现场")
|
||||
@At("/platform/meeting/online")
|
||||
public class MeetingOnlineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private MeetingOnlineService onlineService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("meeting.online")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/meeting/online/index.html")
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("meeting.manage")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param("year") Integer year,
|
||||
@Param("typeId") String typeId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
type.name as typeName,
|
||||
@qrCodeUrl as qrCodeUrl
|
||||
FROM
|
||||
meeting_info info
|
||||
LEFT JOIN meeting_type type ON type.id = info.typeId
|
||||
$condition
|
||||
""");
|
||||
sql.setParam("qrCodeUrl", "");
|
||||
cnd.andEX("year(info.createTime)", "=", year);
|
||||
cnd.andEX("info.typeId", "=", typeId);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("info.meetingName", pageForm.getSearchKeyword());
|
||||
seg.orLike("info.location", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.desc("info.createTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = onlineService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
List<NutMap> list = pagination.getList();
|
||||
for (NutMap map : list) {
|
||||
List<MeetingTimePeriod> timePeriods = dao.query(MeetingTimePeriod.class, Cnd.where("meetingId", "=", map.getString("id", "")).asc("startTime"));
|
||||
map.setv("timePeriods", timePeriods);
|
||||
}
|
||||
pagination.setList(list);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At("/generateQrCodeUrl")
|
||||
@Ok("json:full")
|
||||
@SaCheckLogin
|
||||
public Result generateQrCodeUrl(@Param(value = "tpId") String tpId,
|
||||
@Param(value = "meetingId") String meetingId) {
|
||||
String url = Globals.AppDomain +
|
||||
"/mobile/meeting/mine/go_sign?" +
|
||||
"mtpId=" + tpId +
|
||||
"&" +
|
||||
"meetingId=" + meetingId;
|
||||
return Result.success().addData(url);
|
||||
}
|
||||
|
||||
@At("/getRealTimeData/?")
|
||||
@Ok("json:full")
|
||||
@SaCheckLogin
|
||||
public Result getRealTimeData(String timePeriodId) {
|
||||
List<MeetingTimePeriodUser> signInUser = onlineService.getSignInUser(timePeriodId);
|
||||
List<Map<String, Object>> countData = onlineService.getRealTimeData(timePeriodId);
|
||||
return Result.success(Map.of("countData", countData, "userData", signInUser));
|
||||
}
|
||||
|
||||
@Ok("void")
|
||||
@SaCheckLogin
|
||||
@At("/exportSignature/?")
|
||||
@ApiOperation("导出签字表")
|
||||
public void exportSignature(@Param(value = "timePeriodId") String timePeriodId, HttpServletResponse response) {
|
||||
MeetingTimePeriod timePeriod = dao.fetch(MeetingTimePeriod.class, timePeriodId);
|
||||
MeetingInfo meetingInfo = dao.fetch(MeetingInfo.class, timePeriod.getMeetingId());
|
||||
String fileName = meetingInfo.getName() + "(" + timePeriod.getPeriodName() + ")签字表";
|
||||
|
||||
List<ExcelExportEntity> entityArrayList = new ArrayList<>();
|
||||
entityArrayList.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
entityArrayList.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
entityArrayList.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||
entityArrayList.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
//entityArrayList.add(new ExcelExportEntity("角色", "roleName", 20));
|
||||
entityArrayList.add(new ExcelExportEntity("签字", "", 20));
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setTitle(timePeriod.getPeriodName() + "签字表");
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityArrayList, onlineService.exportSignature(timePeriodId));
|
||||
CommonDownloadUtil.download(fileName + ".xlsx", workbook, response);
|
||||
}
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingType;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.service.MeetingTypeService;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingTypeController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/27 8:53
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "会议类型")
|
||||
@At("/platform/meeting/type")
|
||||
public class MeetingTypeController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private MeetingTypeService typeService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("meeting.type")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/meeting/type/index.html")
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("meeting.type")
|
||||
public Result pageData(PageForm pageForm) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or(SiteType::getName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or(SiteType::getCode, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.asc("code");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
Pagination pagination = typeService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("新增/修改会议类型")
|
||||
@SaCheckPermission("meeting.type")
|
||||
@SLog(tag = "会议管理系统-会议类型", msg = "新增/修改会议类型")
|
||||
public Object submit(MeetingType type) {
|
||||
typeService.insertOrUpdate(type);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除会议类型")
|
||||
@SaCheckPermission("meeting.type")
|
||||
@SLog(tag = "会议管理系统-会议类型", msg = "删除会议类型")
|
||||
public Object delete(String id) {
|
||||
typeService.delete(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询会议类型")
|
||||
@SaCheckLogin
|
||||
public Result queryMeetingType() {
|
||||
List<MeetingType> list = typeService.query(Cnd.where(MeetingType::getEnable, "=", true).asc(MeetingType::getCode));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("meeting")
|
||||
public Result queryDesignList() {
|
||||
List<ProcessDefine> list = dao.query(ProcessDefine.class, Cnd.where(ProcessDefine::getState, "=", true).groupBy("name"));
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingInfo
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 16:50
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("会议信息")
|
||||
@Accessors(chain = true)
|
||||
@Table("meeting_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MeetingInfo extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("会议名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String name;
|
||||
|
||||
@Column
|
||||
@Comment("地点")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String address;
|
||||
|
||||
@Column
|
||||
@Comment("会议类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String typeId;
|
||||
|
||||
@Column
|
||||
@Comment("会议描述")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String description;
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createTime;
|
||||
|
||||
@Column
|
||||
@Comment("所属教代会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String teacherCongressSessionId;
|
||||
|
||||
@Column
|
||||
@Comment("所属工代会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String workerCongressSessionId;
|
||||
|
||||
@Many(field = "meetingId")
|
||||
private List<MeetingTimePeriod> timePeriods;
|
||||
|
||||
private List<NutMap> users;
|
||||
private String typeName;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingTimePeriod
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 18:27
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("会议时间段")
|
||||
@Accessors(chain = true)
|
||||
@Table("meeting_time_period")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MeetingTimePeriod extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("会议id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String meetingId;
|
||||
|
||||
@Column
|
||||
@Comment("时间段会议名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String periodName;
|
||||
|
||||
@Column
|
||||
@Comment("开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date startTime;
|
||||
|
||||
@Column
|
||||
@Comment("结束时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date endTime;
|
||||
|
||||
@Column
|
||||
@Comment("是否可以请假")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("0")
|
||||
private Boolean canLeave;
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingTimePeriodUser
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 18:37
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("会议参会人员")
|
||||
@Accessors(chain = true)
|
||||
@Table("meeting_time_period_user")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MeetingTimePeriodUser extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("会议id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String meetingId;
|
||||
|
||||
@Column
|
||||
@Comment("会议时间段id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String timePeriodId;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("用户id")
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("用户工号")
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("所属单位id")
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
@Comment("所属单位")
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("所属工会id")
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
@Comment("所属工会")
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Comment("参加状态")
|
||||
@Default("1")
|
||||
private Boolean joinStatus;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
@Comment("请假时间")
|
||||
private Date leaveTime;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Comment("请假理由")
|
||||
private String leaveReason;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Comment("签到状态")
|
||||
@Default("0")
|
||||
private Boolean signStatus;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
@Comment("签到时间")
|
||||
private Date signTime;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingType
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 16:24
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("会议类型")
|
||||
@Accessors(chain = true)
|
||||
@Table("meeting_type")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MeetingType extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
@Comment("类型编码")
|
||||
private String code;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Comment("类型名称")
|
||||
private String name;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Comment("是否启用")
|
||||
@Default("1")
|
||||
private Boolean enable;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.INT)
|
||||
@Comment("排序编号")
|
||||
private Integer sortNum;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("流程id")
|
||||
private String designId;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriodUser;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingInfoService
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 18:42
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
public interface MeetingInfoService extends BaseService<MeetingInfo> {
|
||||
|
||||
void add(MeetingInfo info, MeetingTimePeriodUser[] users);
|
||||
void edit(MeetingInfo info, MeetingTimePeriodUser[] users);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriodUser;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingOnlineService
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/29 15:08
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
public interface MeetingOnlineService extends BaseService<MeetingInfo> {
|
||||
|
||||
List<MeetingTimePeriodUser> exportSignature(String timePeriodId);
|
||||
List<MeetingTimePeriodUser> getSignInUser(String timePeriodId);
|
||||
List<Map<String, Object>> getRealTimeData(String timePeriodId);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingType;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingTypeService
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 16:46
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
public interface MeetingTypeService extends BaseService<MeetingType> {
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriod;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriodUser;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.service.MeetingInfoService;
|
||||
import com.google.common.collect.Sets;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingInfoServiceImpl
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 18:43
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MeetingInfoServiceImpl extends BaseServiceImpl<MeetingInfo> implements MeetingInfoService {
|
||||
|
||||
public MeetingInfoServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void add(MeetingInfo info, MeetingTimePeriodUser[] users) {
|
||||
// 插入会议表和会议场次表
|
||||
info.setCreateTime(DateUtil.now());
|
||||
insertWith(info, "timePeriods");
|
||||
// 插入参与人员表
|
||||
if (Lang.isNotEmpty(info.getTimePeriods()) && Lang.isNotEmpty(users)) {
|
||||
List<MeetingTimePeriodUser> relations = info.getTimePeriods()
|
||||
.stream()
|
||||
.flatMap(period -> Arrays.stream(users).map(user -> buildRelation(info.getId(), period.getId(), user)))
|
||||
.toList();
|
||||
dao().insert(relations);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void edit(MeetingInfo info, MeetingTimePeriodUser[] users) {
|
||||
String meetingId = info.getId();
|
||||
|
||||
// 设置外键并保存场次(含新增和修改)
|
||||
info.getTimePeriods().forEach(p -> p.setMeetingId(meetingId));
|
||||
|
||||
// 查询旧场次
|
||||
List<MeetingTimePeriod> oldPeriods = dao().query(MeetingTimePeriod.class, Cnd.where("meetingId", "=", meetingId));
|
||||
Set<String> oldPeriodIds = oldPeriods.stream().map(MeetingTimePeriod::getId).collect(Collectors.toSet());
|
||||
|
||||
dao().insertOrUpdate(info.getTimePeriods());
|
||||
|
||||
// 查询旧人员
|
||||
List<MeetingTimePeriodUser> oldUsers = dao().query(MeetingTimePeriodUser.class, Cnd.where("meetingId", "=", meetingId).groupBy("userId"));
|
||||
Set<String> oldUserIds = oldUsers.stream().map(MeetingTimePeriodUser::getUserId).collect(Collectors.toSet());
|
||||
|
||||
// 页面传过来的新场次
|
||||
Set<String> newPeriodIds = info.getTimePeriods().stream()
|
||||
.map(MeetingTimePeriod::getId)
|
||||
.filter(StrUtil::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 页面传过来的新人员
|
||||
Set<String> newUserIds = Arrays.stream(users).map(MeetingTimePeriodUser::getUserId).collect(Collectors.toSet());
|
||||
|
||||
// 删除废弃场次及其所有关联
|
||||
Set<String> deletedPeriodIds = Sets.difference(oldPeriodIds, newPeriodIds);
|
||||
if (Lang.isNotEmpty(deletedPeriodIds)) {
|
||||
dao().clear(MeetingTimePeriodUser.class, Cnd.where("timePeriodId", "in", deletedPeriodIds));
|
||||
dao().clear(MeetingTimePeriod.class, Cnd.where("id", "in", deletedPeriodIds));
|
||||
}
|
||||
|
||||
// 删除已移除的用户(在所有场次中)
|
||||
Set<String> deletedUserIds = Sets.difference(oldUserIds, newUserIds);
|
||||
if (Lang.isNotEmpty(deletedUserIds)) {
|
||||
dao().clear(MeetingTimePeriodUser.class,
|
||||
Cnd.where("meetingId", "=", meetingId).and("userId", "in", deletedUserIds));
|
||||
}
|
||||
|
||||
// 构建需要新增的关系
|
||||
List<MeetingTimePeriodUser> newRelations = new ArrayList<>();
|
||||
|
||||
// 新增的用户 → 所有现存场次
|
||||
List<MeetingTimePeriodUser> newUsers = Arrays.stream(users).filter(u -> StrUtil.isBlank(u.getId())).toList();
|
||||
for (String periodId : newPeriodIds) {
|
||||
for (MeetingTimePeriodUser user : newUsers) {
|
||||
newRelations.add(buildRelation(meetingId, periodId, user));
|
||||
}
|
||||
}
|
||||
|
||||
// 新增的场次 → 所有现存老用户(避免重复插入新用户)
|
||||
Set<String> addedPeriodIds = Sets.difference(newPeriodIds, oldPeriodIds);
|
||||
for (String periodId : addedPeriodIds) {
|
||||
for (MeetingTimePeriodUser user : users) {
|
||||
if (StrUtil.isBlank(user.getId())) continue;
|
||||
newRelations.add(buildRelation(meetingId, periodId, user));
|
||||
}
|
||||
}
|
||||
|
||||
// 统一插入新增关系
|
||||
if (!newRelations.isEmpty()) {
|
||||
dao().insert(newRelations);
|
||||
}
|
||||
}
|
||||
|
||||
private MeetingTimePeriodUser buildRelation(String meetingId, String periodId, MeetingTimePeriodUser user) {
|
||||
MeetingTimePeriodUser rel = new MeetingTimePeriodUser();
|
||||
BeanUtil.copyProperties(user, rel, false);
|
||||
rel.setMeetingId(meetingId);
|
||||
rel.setTimePeriodId(periodId);
|
||||
rel.setJoinStatus(true);
|
||||
return rel;
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.service.impl;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.flow.entity.ProcessDesign;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriod;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingTimePeriodUser;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingType;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.service.MeetingOnlineService;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.meetings.models.Teacher_congress_meeting;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
|
||||
import com.budwk.app.zhgh.democratic.workercongress.models.Worker_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.workercongress.models.Worker_congress_session;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.Daos;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mapl.Mapl;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingOnlineServiceImpl
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/29 15:09
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MeetingOnlineServiceImpl extends BaseServiceImpl<MeetingInfo> implements MeetingOnlineService {
|
||||
|
||||
@Inject
|
||||
private SysRoleService roleService;
|
||||
|
||||
public MeetingOnlineServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MeetingTimePeriodUser> exportSignature(String timePeriodId) {
|
||||
List<MeetingTimePeriodUser> list = dao().query(MeetingTimePeriodUser.class, Cnd.where(MeetingTimePeriodUser::getTimePeriodId, "=", timePeriodId));
|
||||
|
||||
/*MeetingTimePeriod period = dao().fetch(MeetingTimePeriod.class, timePeriodId);
|
||||
MeetingInfo meetingInfo = dao().fetch(MeetingInfo.class, period.getMeetingId());
|
||||
MeetingType meetingType = dao().fetch(MeetingType.class, meetingInfo.getTypeId());
|
||||
|
||||
if("JDHHY".equals(meetingType.getDesignId())) {
|
||||
|
||||
} else if("GDHHY".equals(meetingType.getDesignId())) {
|
||||
|
||||
}*/
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MeetingTimePeriodUser> getSignInUser(String timePeriodId) {
|
||||
return dao().query(
|
||||
MeetingTimePeriodUser.class,
|
||||
Cnd.where(MeetingTimePeriodUser::getTimePeriodId, "=", timePeriodId)
|
||||
.and(MeetingTimePeriodUser::getSignStatus, "=", true)
|
||||
.desc("signTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getRealTimeData(String timePeriodId) {
|
||||
MeetingTimePeriod timePeriod = dao().fetch(MeetingTimePeriod.class, timePeriodId);
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
(select count(1) from meeting_time_period_user where timePeriodId = @timePeriodId) as shouldComeNumber,
|
||||
(select count(1) from meeting_time_period_user where timePeriodId = @timePeriodId and (joinStatus is null or (joinStatus is not null ) and signStatus is null)) as actualComeNumber,
|
||||
(select count(1) from meeting_time_period_user where timePeriodId = @timePeriodId and signStatus = 1) as signInNumber,
|
||||
(select count(1) from meeting_time_period_user where timePeriodId = @timePeriodId and joinStatus = 0 ) as leaveNumber
|
||||
""");
|
||||
sql.setParam("timePeriodId", timePeriodId);
|
||||
NutMap dataMap = (NutMap) Daos.query(dao(), sql.toString(), Sqls.callback.map());
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
list.add(Map.of("label", "应到人数", "key", "shouldComeNumber", "value", dataMap.getInt("shouldComeNumber", 0)));
|
||||
list.add(Map.of("label", "未到人数", "key", "actualComeNumber", "value", dataMap.getInt("actualComeNumber", 0)));
|
||||
list.add(Map.of("label", "签到人数", "key", "signInNumber", "value", dataMap.getInt("signInNumber", 0)));
|
||||
|
||||
//如果是教代会,就查询签到的正式代表和列席代表各多少人
|
||||
MeetingInfo meetingInfo = dao().fetch(MeetingInfo.class, timePeriod.getMeetingId());
|
||||
MeetingType meetingType = dao().fetch(MeetingType.class, meetingInfo.getTypeId());
|
||||
|
||||
if ("JDHHY".equals(meetingType.getDesignId())) {
|
||||
processCongressDelegateStats(list,
|
||||
timePeriodId,
|
||||
meetingInfo.getTeacherCongressSessionId(),
|
||||
RoleConstant.TEACHER_CONGRESS_DELEGATE_FORMAL.name(),
|
||||
RoleConstant.TEACHER_CONGRESS_DELEGATE_ATTENDANCE.name(),
|
||||
Teacher_congress_delegate.class);
|
||||
} else if ("GDHHY".equals(meetingType.getDesignId())) {
|
||||
processCongressDelegateStats(
|
||||
list,
|
||||
timePeriodId,
|
||||
meetingInfo.getWorkerCongressSessionId(),
|
||||
RoleConstant.WORKER_CONGRESS_DELEGATE_FORMAL.name(),
|
||||
RoleConstant.WORKER_CONGRESS_DELEGATE_ATTENDANCE.name(),
|
||||
Worker_congress_delegate.class
|
||||
);
|
||||
}
|
||||
list.add(Map.of("label", "请假人数", "key", "leaveNumber", "value", dataMap.getInt("leaveNumber", 0)));
|
||||
return list;
|
||||
}
|
||||
|
||||
private <T> void processCongressDelegateStats(
|
||||
List<Map<String, Object>> result,
|
||||
String timePeriodId,
|
||||
String sessionId,
|
||||
String formalRoleCode,
|
||||
String attendanceRoleCode,
|
||||
Class<T> delegateClass) {
|
||||
|
||||
Sys_role formalRole = roleService.getByCode(formalRoleCode);
|
||||
Sys_role attendanceRole = roleService.getByCode(attendanceRoleCode);
|
||||
|
||||
List<String> signedInUserIds = getSignInUser(timePeriodId).stream()
|
||||
.map(MeetingTimePeriodUser::getUserId)
|
||||
.filter(Objects::nonNull)
|
||||
.toList();
|
||||
|
||||
List<T> delegates = dao().query(delegateClass, Cnd.where("sessionId", "=", sessionId));
|
||||
|
||||
long formalCount = 0L;
|
||||
long attendanceCount = 0L;
|
||||
|
||||
for (T delegate : delegates) {
|
||||
try {
|
||||
// 获取 roleId 字段值
|
||||
Field roleIdField = delegateClass.getDeclaredField("roleId");
|
||||
roleIdField.setAccessible(true);
|
||||
String roleId = (String) roleIdField.get(delegate);
|
||||
|
||||
// 获取 userId 字段值
|
||||
Field userIdField = delegateClass.getDeclaredField("userId");
|
||||
userIdField.setAccessible(true);
|
||||
String userId = (String) userIdField.get(delegate);
|
||||
|
||||
// 判断是否在签到名单中
|
||||
if (!signedInUserIds.contains(userId)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (formalRole.getId().equals(roleId)) {
|
||||
formalCount++;
|
||||
} else if (attendanceRole.getId().equals(roleId)) {
|
||||
attendanceCount++;
|
||||
}
|
||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||
// 可选:记录日志,避免因个别对象失败影响整体
|
||||
// log.warn("反射访问字段失败: {}", delegateClass.getSimpleName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
result.add(Map.of("label", "正式代表", "key", "formalCount", "value", formalCount));
|
||||
result.add(Map.of("label", "列席代表", "key", "attendanceCount", "value", attendanceCount));
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.budwk.app.zhgh.dayofficework.meeting.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.model.MeetingType;
|
||||
import com.budwk.app.zhgh.dayofficework.meeting.service.MeetingTypeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @ClassName MeetingTypeServiceImpl
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/28 16:46
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MeetingTypeServiceImpl extends BaseServiceImpl<MeetingType> implements MeetingTypeService {
|
||||
|
||||
public MeetingTypeServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -117,7 +117,7 @@ public class SiteApplyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改场地预约")
|
||||
@SaCheckPermission("site.apply")
|
||||
@SLog(type = "site", tag = "新增/修改场地预约", msg = "新增/修改场地预约")
|
||||
@SLog(tag = "场地管理-场地预约", msg = "新增/修改场地预约")
|
||||
public Result submit(@Param("data") SiteApply siteApply, @Param("days") String[] days) {
|
||||
Map<Boolean, String> validate = applyService.validateApply(siteApply, days[0]);
|
||||
if(validate.containsKey(false)) {
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ public class SiteManageController {
|
||||
@At
|
||||
@ApiOperation("新增/修改场地")
|
||||
@SaCheckPermission("site.manage")
|
||||
@SLog(type = "site", tag = "新增/修改场地", msg = "新增/修改场地")
|
||||
@SLog(tag = "场地管理-场地管理", msg = "新增/修改场地")
|
||||
public Object submit(@Param("data") SiteInfo info) {
|
||||
infoService.insertOrUpdate(info);
|
||||
return Result.success();
|
||||
@@ -96,7 +96,7 @@ public class SiteManageController {
|
||||
@At
|
||||
@ApiOperation("删除场地")
|
||||
@SaCheckPermission("site.manage")
|
||||
@SLog(type = "site", tag = "删除场地", msg = "删除场地")
|
||||
@SLog(tag = "场地管理-场地管理", msg = "删除场地")
|
||||
public Object delete(String id) {
|
||||
infoService.delete(id);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public class SiteMineController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("site.mine")
|
||||
@SLog(type = "site", tag = "删除场地预约", msg = "删除场地预约")
|
||||
@SLog(tag = "场地管理-场地预约", msg = "删除场地预约")
|
||||
public Result delete(@Param("id") String id) {
|
||||
applyService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ public class SiteTypeController {
|
||||
@At
|
||||
@ApiOperation("新增/修改场地类型")
|
||||
@SaCheckPermission("site.type")
|
||||
@SLog(type = "site", tag = "新增/修改场地类型", msg = "新增/修改场地类型")
|
||||
@SLog(tag = "场地管理-场地类型", msg = "新增/修改场地类型")
|
||||
public Object submit(SiteType type) {
|
||||
typeService.insertOrUpdate(type);
|
||||
return Result.success();
|
||||
@@ -81,7 +81,7 @@ public class SiteTypeController {
|
||||
@At
|
||||
@ApiOperation("删除场地类型")
|
||||
@SaCheckPermission("site.type")
|
||||
@SLog(type = "site", tag = "删除场地类型", msg = "删除场地类型")
|
||||
@SLog(tag = "场地管理-场地类型", msg = "删除场地类型")
|
||||
public Object delete(String id) {
|
||||
typeService.delete(id);
|
||||
return Result.success();
|
||||
|
||||
+2
-3
@@ -68,7 +68,7 @@ public class CondolenceApplyController {
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("condolence.apply")
|
||||
@SLog(type = "condolence", tag = "职工慰问-慰问申请", msg = "保存职工慰问申请")
|
||||
@SLog(tag = "职工慰问系统-慰问申请", msg = "保存申请")
|
||||
public Result save(@Param("data") Condolence condolence) {
|
||||
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
|
||||
dao.insertOrUpdate(condolence);
|
||||
@@ -78,7 +78,7 @@ public class CondolenceApplyController {
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@SaCheckPermission("condolence.apply")
|
||||
@SLog(type = "condolence", tag = "职工慰问-慰问申请", msg = "提交职工慰问申请")
|
||||
@SLog(tag = "职工慰问系统-慰问申请", msg = "提交申请")
|
||||
public Result submit(@Param("data") Condolence condolence) {
|
||||
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
|
||||
dao.insertOrUpdate(condolence);
|
||||
@@ -113,7 +113,6 @@ public class CondolenceApplyController {
|
||||
@At
|
||||
@ApiOperation("查询用户")
|
||||
@SaCheckPermission("condolence.apply")
|
||||
@SLog(type = "condolence", tag = "查询用户", msg = "查询用户")
|
||||
public Object listUser(String keyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ public class CondolenceMineController {
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("condolence")
|
||||
@SLog(type = "condolence", tag = "删除职工慰问", msg = "删除职工慰问")
|
||||
@SLog(tag = "职工慰问系统-我的申请", msg = "删除职工慰问")
|
||||
public Result delete(@Param("id") String id) {
|
||||
condolenceService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+2
-2
@@ -66,7 +66,7 @@ public class CondolenceTypeController {
|
||||
@At
|
||||
@ApiOperation("新增/修改职工慰问类型")
|
||||
@SaCheckPermission("condolence.type")
|
||||
@SLog(type = "condolence", tag = "新增/修改职工慰问类型", msg = "新增/修改职工慰问类型")
|
||||
@SLog(tag = "职工慰问系统-慰问类型", msg = "新增/修改职工慰问类型")
|
||||
public Object onSubmit(CondolenceType type) {
|
||||
typeService.insertOrUpdate(type);
|
||||
return Result.success();
|
||||
@@ -75,7 +75,7 @@ public class CondolenceTypeController {
|
||||
@At
|
||||
@ApiOperation("删除职工慰问类型")
|
||||
@SaCheckPermission("condolence.type")
|
||||
@SLog(type = "condolence", tag = "删除职工慰问类型", msg = "删除职工慰问类型")
|
||||
@SLog(tag = "职工慰问系统-慰问类型", msg = "删除职工慰问类型")
|
||||
public Object onDelete(String id) {
|
||||
typeService.delete(id);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class LegalApplyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改法律援助预约")
|
||||
@SaCheckPermission("legal.apply")
|
||||
@SLog(type = "legal", tag = "新增/修改法律援助预约", msg = "新增/修改法律援助预约")
|
||||
@SLog(tag = "法律援助系统-援助申请", msg = "新增/修改法律援助预约")
|
||||
public Object onSubmit(LegalApply apply) {
|
||||
LegalApply legalApply = applyService.fetch(apply.getId());
|
||||
if(StrUtil.isNotBlank(legalApply.getUserId())) {
|
||||
|
||||
+3
-3
@@ -87,7 +87,7 @@ public class LegalAppointmentSetController {
|
||||
@At
|
||||
@ApiOperation("新增/修改法律援助安排")
|
||||
@SaCheckPermission("legal.appointmentSet")
|
||||
@SLog(type = "legal", tag = "新增/修改法律援助安排", msg = "新增/修改法律援助安排")
|
||||
@SLog(tag = "法律援助系统-预约安排", msg = "新增/修改法律援助安排")
|
||||
public Object onSubmit(LegalApply apply) {
|
||||
long startTimeTs = com.budwk.app.base.utils.DateUtil.formatDate(apply.getStartTime());
|
||||
long endTimeTs = com.budwk.app.base.utils.DateUtil.formatDate(apply.getEndTime());
|
||||
@@ -114,7 +114,7 @@ public class LegalAppointmentSetController {
|
||||
@At
|
||||
@ApiOperation("修改法律援助安排")
|
||||
@SaCheckPermission("legal.appointmentSet")
|
||||
@SLog(type = "legal", tag = "修改法律援助安排", msg = "修改法律援助安排")
|
||||
@SLog(tag = "法律援助系统-预约安排", msg = "修改法律援助安排")
|
||||
public Object onEdit(String id, String[] askType) {
|
||||
LegalApply apply = applyService.fetch(id);
|
||||
apply.setAskType(Lang.isNotEmpty(askType) ? Arrays.asList(askType) : new ArrayList<>());
|
||||
@@ -127,7 +127,7 @@ public class LegalAppointmentSetController {
|
||||
@At
|
||||
@ApiOperation("删除法律援助安排")
|
||||
@SaCheckPermission("legal.appointmentSet")
|
||||
@SLog(type = "legal", tag = "删除法律援助安排", msg = "删除法律援助安排")
|
||||
@SLog(tag = "法律援助系统-预约安排", msg = "删除法律援助安排")
|
||||
public Object onDelete(String id) {
|
||||
applyService.delete(id);
|
||||
//TODO:以后这里加个发短信
|
||||
|
||||
+3
-4
@@ -74,9 +74,9 @@ public class LegalDoctorController {
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("新增/修改法律援助师")
|
||||
@ApiOperation("提交法律援助预约")
|
||||
@SaCheckPermission("legal.doctorManage")
|
||||
@SLog(type = "legal", tag = "新增/修改法律援助师", msg = "新增/修改法律援助师")
|
||||
@SLog(tag = "法律援助系统-援助申请", msg = "提交法律援助预约")
|
||||
public Object onSubmit(LegalDoctor doctor) {
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.LEGAL_DOCTOR);
|
||||
if(StrUtil.isBlank(doctor.getId())) {
|
||||
@@ -104,7 +104,7 @@ public class LegalDoctorController {
|
||||
@At
|
||||
@ApiOperation("删除法律援助师")
|
||||
@SaCheckPermission("legal.doctorManage")
|
||||
@SLog(type = "legal", tag = "删除法律援助师", msg = "删除法律援助师")
|
||||
@SLog(tag = "法律援助系统-援助师管理", msg = "删除法律援助师")
|
||||
public Object onDelete(String id) {
|
||||
doctorService.delete(id);
|
||||
return Result.success();
|
||||
@@ -113,7 +113,6 @@ public class LegalDoctorController {
|
||||
@At
|
||||
@ApiOperation("查询用户")
|
||||
@SaCheckPermission("legal.doctorManage")
|
||||
@SLog(type = "legal", tag = "查询用户", msg = "查询用户")
|
||||
public Object listUser(String keyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class LegalListController {
|
||||
@At
|
||||
@ApiOperation("删除法律援助预约")
|
||||
@SaCheckPermission("legal.list")
|
||||
@SLog(type = "legal", tag = "删除法律援助预约", msg = "删除法律援助预约")
|
||||
@SLog(tag = "法律援助系统-法律援助预约", msg = "删除法律援助预约")
|
||||
public Object onDelete(String id) {
|
||||
LegalApply apply = applyService.fetch(id);
|
||||
apply.setUserId(null);
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ public class LegalOnlinePostController {
|
||||
@At
|
||||
@ApiOperation("新增/修改法律援助线上发帖")
|
||||
@SaCheckPermission("legal.onlinePost")
|
||||
@SLog(type = "legal", tag = "新增/修改法律援助线上发帖", msg = "新增/修改法律援助线上发帖")
|
||||
@SLog(tag = "法律援助系统-线上发帖", msg = "新增/修改法律援助线上发帖")
|
||||
public Object onSubmit(LegalOnlinePost post) {
|
||||
if(StrUtil.isBlank(post.getId())) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
@@ -107,7 +107,7 @@ public class LegalOnlinePostController {
|
||||
@At
|
||||
@ApiOperation("删除法律援助线上发帖")
|
||||
@SaCheckPermission("legal.onlinePost")
|
||||
@SLog(type = "legal", tag = "删除法律援助线上发帖", msg = "删除法律援助线上发帖")
|
||||
@SLog(tag = "法律援助系统-线上发帖", msg = "删除法律援助线上发帖")
|
||||
public Object onDelete(String id) {
|
||||
dao.delete(LegalOnlinePost.class, id);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public class LegalOnlineReplyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改法律援助线上回复")
|
||||
@SaCheckPermission("legal.onlineReply")
|
||||
@SLog(type = "legal", tag = "新增/修改法律援助线上回复", msg = "新增/修改法律援助线上回复")
|
||||
@SLog(tag = "法律援助系统-线上回复", msg = "新增/修改法律援助线上回复")
|
||||
public Object onSubmit(LegalOnlineReply reply) {
|
||||
if (StrUtil.isBlank(reply.getId())) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ public class LegalStudyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改法律援助资料")
|
||||
@SaCheckPermission("legal.study")
|
||||
@SLog(type = "legal", tag = "新增/修改法律援助资料", msg = "新增/修改法律援助资料")
|
||||
@SLog(tag = "法律援助系统-援助资料", msg = "新增/修改法律援助资料")
|
||||
public Object onSubmit(LegalStudy study) {
|
||||
dao.insertOrUpdate(study);
|
||||
return Result.success();
|
||||
@@ -87,7 +87,7 @@ public class LegalStudyController {
|
||||
@At
|
||||
@ApiOperation("删除法律援助资料")
|
||||
@SaCheckPermission("legal.study")
|
||||
@SLog(type = "legal", tag = "删除法律援助资料", msg = "删除法律援助资料")
|
||||
@SLog(tag = "法律援助系统-援助资料", msg = "删除法律援助资料")
|
||||
public Object onDelete(String id) {
|
||||
dao.delete(LegalStudy.class, id);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class PsychologyApplyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改心理咨询预约")
|
||||
@SaCheckPermission("psychology.apply")
|
||||
@SLog(type = "psychology", tag = "新增/修改心理咨询预约", msg = "新增/修改心理咨询预约")
|
||||
@SLog(tag = "心理咨询系统-心理咨询预约", msg = "新增/修改心理咨询预约")
|
||||
public Object onSubmit(PsychologyApply apply) {
|
||||
PsychologyApply psychologyApply = applyService.fetch(apply.getId());
|
||||
if(StrUtil.isNotBlank(psychologyApply.getUserId())) {
|
||||
|
||||
+3
-3
@@ -91,7 +91,7 @@ public class PsychologyAppointmentSetController {
|
||||
@At
|
||||
@ApiOperation("新增/修改心理咨询安排")
|
||||
@SaCheckPermission("psychology.appointmentSet")
|
||||
@SLog(type = "psychology", tag = "新增/修改心理咨询安排", msg = "新增/修改心理咨询安排")
|
||||
@SLog(tag = "心理咨询系统-心理咨询安排", msg = "新增/修改心理咨询安排")
|
||||
public Object onSubmit(PsychologyApply apply) {
|
||||
long startTimeTs = com.budwk.app.base.utils.DateUtil.formatDate(apply.getStartTime());
|
||||
long endTimeTs = com.budwk.app.base.utils.DateUtil.formatDate(apply.getEndTime());
|
||||
@@ -118,7 +118,7 @@ public class PsychologyAppointmentSetController {
|
||||
@At
|
||||
@ApiOperation("修改心理咨询安排")
|
||||
@SaCheckPermission("psychology.appointmentSet")
|
||||
@SLog(type = "psychology", tag = "修改心理咨询安排", msg = "修改心理咨询安排")
|
||||
@SLog(tag = "心理咨询系统-心理咨询安排", msg = "修改心理咨询安排")
|
||||
public Object onEdit(String id, String[] askType) {
|
||||
PsychologyApply apply = applyService.fetch(id);
|
||||
apply.setAskType(Lang.isNotEmpty(askType) ? Arrays.asList(askType) : new ArrayList<>());
|
||||
@@ -131,7 +131,7 @@ public class PsychologyAppointmentSetController {
|
||||
@At
|
||||
@ApiOperation("删除心理咨询安排")
|
||||
@SaCheckPermission("psychology.appointmentSet")
|
||||
@SLog(type = "psychology", tag = "删除心理咨询安排", msg = "删除心理咨询安排")
|
||||
@SLog(tag = "心理咨询系统-心理咨询安排", msg = "删除心理咨询安排")
|
||||
public Object onDelete(String id) {
|
||||
applyService.delete(id);
|
||||
//TODO:以后这里加个发短信
|
||||
|
||||
+2
-3
@@ -76,7 +76,7 @@ public class PsychologyDoctorController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("新增/修改心理咨询师")
|
||||
@SaCheckPermission("psychology.doctorManage")
|
||||
@SLog(type = "psychology", tag = "新增/修改心理咨询师", msg = "新增/修改心理咨询师")
|
||||
@SLog(tag = "心理咨询系统-心理咨询师", msg = "新增/修改心理咨询师")
|
||||
public Object onSubmit(PsychologyDoctor doctor) {
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.PSYCHOLOGY_DOCTOR);
|
||||
if(StrUtil.isBlank(doctor.getId())) {
|
||||
@@ -104,7 +104,7 @@ public class PsychologyDoctorController {
|
||||
@At
|
||||
@ApiOperation("删除心理咨询师")
|
||||
@SaCheckPermission("psychology.doctorManage")
|
||||
@SLog(type = "psychology", tag = "删除心理咨询师", msg = "删除心理咨询师")
|
||||
@SLog(tag = "心理咨询系统-心理咨询师", msg = "删除心理咨询师")
|
||||
public Object onDelete(String id) {
|
||||
doctorService.delete(id);
|
||||
return Result.success();
|
||||
@@ -113,7 +113,6 @@ public class PsychologyDoctorController {
|
||||
@At
|
||||
@ApiOperation("查询用户")
|
||||
@SaCheckPermission("psychology.doctorManage")
|
||||
@SLog(type = "psychology", tag = "查询用户", msg = "查询用户")
|
||||
public Object listUser(String keyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ public class PsychologyListController {
|
||||
@At
|
||||
@ApiOperation("删除心理咨询预约")
|
||||
@SaCheckPermission("psychology.list")
|
||||
@SLog(type = "psychology", tag = "删除心理咨询预约", msg = "删除心理咨询预约")
|
||||
@SLog(tag = "心理咨询系统-心理咨询预约", msg = "删除心理咨询预约")
|
||||
public Object onDelete(String id) {
|
||||
PsychologyApply apply = applyService.fetch(id);
|
||||
apply.setUserId(null);
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ public class PsychologyOnlinePostController {
|
||||
@At
|
||||
@ApiOperation("新增/修改心理咨询线上发帖")
|
||||
@SaCheckPermission("psychology.onlinePost")
|
||||
@SLog(type = "psychology", tag = "新增/修改心理咨询线上发帖", msg = "新增/修改心理咨询线上发帖")
|
||||
@SLog(tag = "心理咨询系统-线上发帖", msg = "新增/修改心理咨询线上发帖")
|
||||
public Object onSubmit(PsychologyOnlinePost post) {
|
||||
if(StrUtil.isBlank(post.getId())) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
@@ -107,7 +107,7 @@ public class PsychologyOnlinePostController {
|
||||
@At
|
||||
@ApiOperation("删除心理咨询线上发帖")
|
||||
@SaCheckPermission("psychology.onlinePost")
|
||||
@SLog(type = "psychology", tag = "删除心理咨询线上发帖", msg = "删除心理咨询线上发帖")
|
||||
@SLog(tag = "心理咨询系统-线上发帖", msg = "删除心理咨询线上发帖")
|
||||
public Object onDelete(String id) {
|
||||
dao.delete(PsychologyOnlinePost.class, id);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public class PsychologyOnlineReplyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改心理咨询线上回复")
|
||||
@SaCheckPermission("psychology.onlineReply")
|
||||
@SLog(type = "psychology", tag = "新增/修改心理咨询线上回复", msg = "新增/修改心理咨询线上回复")
|
||||
@SLog(tag = "心理咨询系统-线上回复", msg = "新增/修改心理咨询线上回复")
|
||||
public Object onSubmit(PsychologyOnlineReply reply) {
|
||||
if (StrUtil.isBlank(reply.getId())) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ public class PsychologyStudyController {
|
||||
@At
|
||||
@ApiOperation("新增/修改心理咨询资料")
|
||||
@SaCheckPermission("psychology.study")
|
||||
@SLog(type = "psychology", tag = "新增/修改心理咨询资料", msg = "新增/修改心理咨询资料")
|
||||
@SLog(tag = "心理咨询系统-咨询资料", msg = "新增/修改心理咨询资料")
|
||||
public Object onSubmit(PsychologyStudy study) {
|
||||
dao.insertOrUpdate(study);
|
||||
return Result.success();
|
||||
@@ -87,7 +87,7 @@ public class PsychologyStudyController {
|
||||
@At
|
||||
@ApiOperation("删除心理咨询资料")
|
||||
@SaCheckPermission("psychology.study")
|
||||
@SLog(type = "psychology", tag = "删除心理咨询资料", msg = "删除心理咨询资料")
|
||||
@SLog(tag = "心理咨询系统-咨询资料", msg = "删除心理咨询资料")
|
||||
public Object onDelete(String id) {
|
||||
dao.delete(PsychologyStudy.class, id);
|
||||
return Result.success();
|
||||
|
||||
+2
-2
@@ -19,12 +19,12 @@ public enum RecuperationSignUpMode {
|
||||
/**
|
||||
* 分工会模式
|
||||
*/
|
||||
UNION(1, "分工会组织", new String[]{"H04", "A06", "sysadmin"}),
|
||||
UNION(1, "分工会组织", new String[]{"BRANCH_UNION_ADMIN", "BRANCH_UNION_CHAIRMAN", "SCHOOL_UNION_ADMIN", "SYSADMIN"}),
|
||||
|
||||
/**
|
||||
* 自由模式
|
||||
*/
|
||||
FREE(2, "校工会组织", new String[]{"A06", "sysadmin"});
|
||||
FREE(2, "校工会组织", new String[]{"SCHOOL_UNION_ADMIN", "SYSADMIN"});
|
||||
|
||||
|
||||
private final int value;
|
||||
|
||||
+4
-4
@@ -151,7 +151,7 @@ public class RecuperationBaseManagerController {
|
||||
@ApiOperation("新增/编辑疗休养基地")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.baseManagement")
|
||||
@SLog(type = "recuperation", tag = "新增/编辑疗休养基地", msg = "新增/编辑疗休养基地")
|
||||
@SLog(tag = "疗休养管理-基地管理", msg = "新增/编辑疗休养基地")
|
||||
public Result onSubmit(RecuperationBaseManagement baseManagement) {
|
||||
baseManagement.setCreateUnionId(SecurityUtil.getUnionId());
|
||||
dao.insertOrUpdate(baseManagement);
|
||||
@@ -162,7 +162,7 @@ public class RecuperationBaseManagerController {
|
||||
@ApiOperation("开启或关闭基地")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.baseManagement")
|
||||
@SLog(type = "recuperation", tag = "开启或关闭基地", msg = "开启或关闭基地")
|
||||
@SLog(tag = "疗休养管理-基地管理", msg = "开启或关闭基地")
|
||||
public Result openClosedBase(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -175,7 +175,7 @@ public class RecuperationBaseManagerController {
|
||||
@ApiOperation("删除基地")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.baseManagement")
|
||||
@SLog(type = "recuperation", tag = "删除基地", msg = "删除基地")
|
||||
@SLog(tag = "疗休养管理-基地管理", msg = "删除基地")
|
||||
public Result onDelete(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -290,7 +290,7 @@ public class RecuperationBaseManagerController {
|
||||
@ApiOperation("目的地导入")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.baseManagement")
|
||||
@SLog(type = "recuperation", tag = "目的地导入", msg = "目的地导入")
|
||||
@SLog(tag = "疗休养管理-基地管理", msg = "目的地导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result baseManagementImport(@Param("file") TempFile file) {
|
||||
List<BaseManagerExcelMode> excelList = ExcelImportUtil.importExcel(file.getFile(), BaseManagerExcelMode.class, new ImportParams());
|
||||
|
||||
+2
-2
@@ -189,7 +189,7 @@ public class RecuperationBranchUnionUserQueryController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("设置出行人员")
|
||||
@SaCheckPermission("recuperation.branchUnionUserQuery")
|
||||
@SLog(type = "recuperation", tag = "设置出行人员", msg = "设置出行人员")
|
||||
@SLog(tag = "疗休养管理-分工会查询", msg = "设置出行人员")
|
||||
public Result setUpParticipants(@Param("data") String data) {
|
||||
List<NutMap> list = Json.fromJsonAsList(NutMap.class, data);
|
||||
for (NutMap map : list) {
|
||||
@@ -205,7 +205,7 @@ public class RecuperationBranchUnionUserQueryController {
|
||||
@At
|
||||
@ApiOperation("删除报名信息")
|
||||
@SaCheckPermission("recuperation.baseManagement")
|
||||
@SLog(type = "recuperation", tag = "删除报名信息", msg = "删除报名信息")
|
||||
@SLog(tag = "疗休养管理-分工会查询", msg = "删除报名信息")
|
||||
public Result deleteMyEnrollInfoById(String id) {
|
||||
enrollService.deleteMyEnrollInfoById(id);
|
||||
return Result.success();
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@ public class RecuperationConfigController {
|
||||
@ApiOperation("新增/编辑疗休养配置")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.config")
|
||||
@SLog(type = "recuperation", tag = "新增/编辑疗休养配置", msg = "新增/编辑疗休养配置")
|
||||
@SLog(tag = "疗休养管理-疗休养配置", msg = "新增/编辑疗休养配置")
|
||||
public Result onSubmit(RecuperationConfig config, String[] lotDeleteList) {
|
||||
if (Strings.isNotBlank(config.getId())) {
|
||||
if (Lang.isNotEmpty(lotDeleteList)) {
|
||||
@@ -103,7 +103,7 @@ public class RecuperationConfigController {
|
||||
@ApiOperation("强制删除标段时长,会删除已绑定的线路和目的地")
|
||||
@SaCheckLogin
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "recuperation", tag = "删除标段", msg = "删除标段")
|
||||
@SLog(tag = "疗休养管理-疗休养配置", msg = "删除标段")
|
||||
public Result deleteLotById(String lotId) {
|
||||
dao.clear(RecuperationLot.class, Cnd.where("id","=",lotId));
|
||||
List<RecuperationLine> lineList = dao.query(RecuperationLine.class, Cnd.where("lotId", "=", lotId));
|
||||
|
||||
+4
-4
@@ -119,7 +119,7 @@ public class RecuperationLineController {
|
||||
@ApiOperation("新增/编辑疗休养线路")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.line")
|
||||
@SLog(type = "recuperation", tag = "新增/编辑疗休养线路", msg = "新增/编辑疗休养线路")
|
||||
@SLog(tag = "疗休养管理-疗休养线路", msg = "新增/编辑疗休养线路")
|
||||
public Result onSubmit(RecuperationLine line) {
|
||||
if (StrUtil.isBlank(line.getId())) {
|
||||
if (lineService.count(Cnd.where("serialNumber", "=", line.getSerialNumber())) > 0) {
|
||||
@@ -139,7 +139,7 @@ public class RecuperationLineController {
|
||||
@ApiOperation("开启或关闭线路")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.line")
|
||||
@SLog(type = "recuperation", tag = "开启或关闭线路", msg = "开启或关闭线路")
|
||||
@SLog(tag = "疗休养管理-疗休养线路", msg = "开启或关闭线路")
|
||||
public Result openClosedLine(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -152,7 +152,7 @@ public class RecuperationLineController {
|
||||
@ApiOperation("删除线路")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.line")
|
||||
@SLog(type = "recuperation", tag = "删除线路", msg = "删除线路")
|
||||
@SLog(tag = "疗休养管理-疗休养线路", msg = "删除线路")
|
||||
public Result onDelete(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -253,7 +253,7 @@ public class RecuperationLineController {
|
||||
@ApiOperation("线路导入")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.line")
|
||||
@SLog(type = "recuperation", tag = "线路导入", msg = "线路导入")
|
||||
@SLog(tag = "疗休养管理-线路管理", msg = "线路导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result lineImport(@Param("file") TempFile file) {
|
||||
List<LineExcelMode> excelList = ExcelImportUtil.importExcel(file.getFile(), LineExcelMode.class, new ImportParams());
|
||||
|
||||
+6
-6
@@ -163,7 +163,7 @@ public class RecuperationLineSelectController {
|
||||
@At("/selectLine")
|
||||
@ApiOperation("选择线路")
|
||||
@SaCheckPermission(value = {"recuperation.branchUnionSelect", "recuperation.schoolUnionSelect"}, mode = SaMode.OR)
|
||||
@SLog(type = "recuperation", tag = "选择线路", msg = "选择线路")
|
||||
@SLog(tag = "疗休养管理-选择线路", msg = "选择线路")
|
||||
public Result selectLine(RecuperationLineSelect us) {
|
||||
lineSelectService.selectLine(us);
|
||||
return Result.success();
|
||||
@@ -179,7 +179,7 @@ public class RecuperationLineSelectController {
|
||||
@ApiOperation("选择线路时间")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"recuperation.branchUnionSelect", "recuperation.schoolUnionSelect"}, mode = SaMode.OR)
|
||||
@SLog(type = "recuperation", tag = "选择线路时间", msg = "选择线路时间")
|
||||
@SLog(tag = "疗休养管理-选择线路", msg = "选择线路时间")
|
||||
public Result selectLineTimes(@Param("lineSelects") RecuperationLineSelect[] lineSelects) {
|
||||
if (Lang.isNotEmpty(lineSelects)) {
|
||||
RecuperationLineSelect lineUnionSelect = lineSelects[0];
|
||||
@@ -251,7 +251,7 @@ public class RecuperationLineSelectController {
|
||||
@ApiOperation("取消选择线路")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"recuperation.branchUnionSelect", "recuperation.schoolUnionSelect"}, mode = SaMode.OR)
|
||||
@SLog(tag = "recuperation", msg = "取消选择线路", param = true, result = true)
|
||||
@SLog(tag = "疗休养管理-选择线路", msg = "取消选择线路")
|
||||
public Result deSelect(@Param("lineId") String lineId, @Param("unionId") String unionId) {
|
||||
try {
|
||||
Assert.notBlank(lineId);
|
||||
@@ -289,7 +289,7 @@ public class RecuperationLineSelectController {
|
||||
@ApiOperation("是否公开分工会选择线路")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"recuperation.branchUnionSelect", "recuperation.schoolUnionSelect"}, mode = SaMode.OR)
|
||||
@SLog(tag = "recuperation", msg = "公开分工会选择线路", param = true, result = true)
|
||||
@SLog(tag = "疗休养管理-选择线路", msg = "公开分工会选择线路")
|
||||
public Result isOpenUnionLine(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -324,7 +324,7 @@ public class RecuperationLineSelectController {
|
||||
@ApiOperation("一键统赋时间,针对于已选择的线路")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"recuperation.branchUnionSelect", "recuperation.schoolUnionSelect"}, mode = SaMode.OR)
|
||||
@SLog(type = "普惠疗休养", tag = "分工会/校工会选择线路", msg = "一键统赋时间,针对于已选择的线路", param = true, result = true)
|
||||
@SLog(tag = "疗休养管理-选择线路", msg = "一键统赋时间,针对于已选择的线路")
|
||||
public Result setGiveLineTimes(@Param("lineIds") String[] lineIds,
|
||||
@Param("lineUnionSelects") RecuperationLineSelect[] lineSelects,
|
||||
@Param(value = "year") Integer year) {
|
||||
@@ -358,7 +358,7 @@ public class RecuperationLineSelectController {
|
||||
@ApiOperation("是否开放对外报名")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"recuperation.branchUnionSelect", "recuperation.schoolUnionSelect"}, mode = SaMode.OR)
|
||||
@SLog(type = "普惠疗休养", tag = "分工会/校工会选择线路", msg = "是否开放对外报名", param = true, result = true)
|
||||
@SLog(tag = "疗休养管理-选择线路", msg = "是否开放对外报名")
|
||||
public Result doEditOpen(String id) {
|
||||
dao.update(RecuperationLineSelect.class, Chain.makeSpecial("isOpen", "isOpen ^ 1"), Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
|
||||
+3
-3
@@ -194,7 +194,7 @@ public class RecuperationSchoolUnionUserQueryController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("设置出行人员")
|
||||
@SaCheckPermission("recuperation.schoolUnionUserQuery")
|
||||
@SLog(type = "recuperation", tag = "设置出行人员", msg = "设置出行人员")
|
||||
@SLog(tag = "疗休养管理-校工会查询", msg = "设置出行人员")
|
||||
public Result setUpParticipants(@Param("data") String data) {
|
||||
List<NutMap> list = Json.fromJsonAsList(NutMap.class, data);
|
||||
for (NutMap map : list) {
|
||||
@@ -210,7 +210,7 @@ public class RecuperationSchoolUnionUserQueryController {
|
||||
@At
|
||||
@ApiOperation("删除报名信息")
|
||||
@SaCheckPermission("recuperation.schoolUnionUserQuery")
|
||||
@SLog(type = "recuperation", tag = "删除报名信息", msg = "删除报名信息")
|
||||
@SLog(tag = "疗休养管理-校工会查询", msg = "删除报名信息")
|
||||
public Result deleteMyEnrollInfoById(String id) {
|
||||
enrollService.deleteMyEnrollInfoById(id);
|
||||
return Result.success();
|
||||
@@ -288,7 +288,7 @@ public class RecuperationSchoolUnionUserQueryController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("修改报名信息")
|
||||
@SaCheckPermission("recuperation.schoolUnionUserQuery")
|
||||
@SLog(type = "recuperation", tag = "修改报名信息", msg = "修改报名信息")
|
||||
@SLog(tag = "疗休养管理-校工会查询", msg = "修改报名信息")
|
||||
public Result doEdit(RecuperationEnroll enroll) {
|
||||
enroll.setNormal(true);
|
||||
dao.updateIgnoreNull(enroll);
|
||||
|
||||
+7
-7
@@ -98,7 +98,7 @@ public class RecuperationTravelAgencyController {
|
||||
@ApiOperation("新增/编辑疗休养旅行社")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SLog(type = "recuperation", tag = "新增/编辑疗休养旅行社", msg = "新增/编辑疗休养旅行社")
|
||||
@SLog(tag = "疗休养管理-旅行社管理", msg = "新增/编辑疗休养旅行社")
|
||||
public Result onSubmit(RecuperationTravelAgency travelAgency) {
|
||||
if (StrUtil.isBlank(travelAgency.getId())) {
|
||||
if (travelAgencyService.count(Cnd.where("serialNumber", "=", travelAgency.getSerialNumber())) > 0) {
|
||||
@@ -118,7 +118,7 @@ public class RecuperationTravelAgencyController {
|
||||
@ApiOperation("开启或关闭旅行社")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SLog(type = "recuperation", tag = "开启或关闭旅行社", msg = "开启或关闭旅行社")
|
||||
@SLog(tag = "疗休养管理-旅行社管理", msg = "开启或关闭旅行社")
|
||||
public Result openClosedTravelAgency(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -131,7 +131,7 @@ public class RecuperationTravelAgencyController {
|
||||
@ApiOperation("删除旅行社")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SLog(type = "recuperation", tag = "删除旅行社", msg = "删除旅行社")
|
||||
@SLog(tag = "疗休养管理-旅行社管理", msg = "删除旅行社")
|
||||
public Result onDelete(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
@@ -142,7 +142,7 @@ public class RecuperationTravelAgencyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询旅行社")
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SaCheckPermission("recuperation")
|
||||
public Result selectTravelAgency(Integer year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year", "=", year);
|
||||
@@ -152,7 +152,7 @@ public class RecuperationTravelAgencyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("年度区间查询旅行社")
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SaCheckPermission("recuperation")
|
||||
public Result selectTravelAgencyByYears(Integer startYear, Integer endYear) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year", ">=", startYear);
|
||||
@@ -163,7 +163,7 @@ public class RecuperationTravelAgencyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("根据旅行社id查线路")
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SaCheckPermission("recuperation")
|
||||
public Result selectLineByAgencyId(String agencyId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT id,lineName FROM `the_rapy_recuperation_line` WHERE travelAgencyId=@travelAgencyId
|
||||
@@ -213,7 +213,7 @@ public class RecuperationTravelAgencyController {
|
||||
@ApiOperation("旅行社导入")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("recuperation.travelAgency")
|
||||
@SLog(type = "recuperation", tag = "旅行社导入", msg = "旅行社导入")
|
||||
@SLog(tag = "疗休养管理-旅行社管理", msg = "旅行社导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result travelAgencyImport(@Param("file") TempFile file) {
|
||||
List<TravelAgencyExcelMode> travelAgency = ExcelImportUtil.importExcel(file.getFile(), TravelAgencyExcelMode.class, new ImportParams());
|
||||
|
||||
@@ -16,7 +16,7 @@ public class LineExcelMode extends ExcelImportError {
|
||||
@Excel(name = "线路名称")
|
||||
private String lineName;
|
||||
|
||||
@Excel(name = "旅行社名称")
|
||||
@Excel(name = "所属旅行社")
|
||||
private String travelAgencyId;
|
||||
|
||||
@Excel(name = "活动范围")
|
||||
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.club.model.OutlayManageClub;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceTypeService;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/unionReimburse/apply")
|
||||
@Api("工会报销申请")
|
||||
@Ok("json:full")
|
||||
public class UnionReimburseApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private CondolenceTypeService typeService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/apply/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SLog(type = "unionReimburse", tag = "工会报销-报销申请", msg = "保存报销申请")
|
||||
public Result save(@Param("data") UnionReimburse unionReimburse) {
|
||||
if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
dao.insertOrUpdate(unionReimburse);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("提交申请")
|
||||
public Result submit(@Param("data") UnionReimburse unionReimburse) {
|
||||
if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
|
||||
dao.insertOrUpdate(unionReimburse);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, unionReimburse);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("GHBX", unionReimburse.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) {
|
||||
if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
|
||||
dao.insertOrUpdate(unionReimburse);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取当前登录人的申请信息")
|
||||
public Result info(@Param("id") String id) {
|
||||
UnionReimburse unionReimburse = dao.fetch(UnionReimburse.class, id);
|
||||
CondolenceType type = unionReimburseService.dao().fetch(CondolenceType.class,
|
||||
Cnd.where(CondolenceType::getId, "=", unionReimburse.getCondolenceType()));
|
||||
NutMap nutMap = Lang.obj2nutmap(unionReimburse);
|
||||
// 使用三元运算符处理 null 情况
|
||||
nutMap.put("typeName", type != null ? type.getName() : "");
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询用户")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SLog(type = "unionReimburse", tag = "查询用户", msg = "查询用户")
|
||||
public Object listUser(String keyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
id,
|
||||
username as userName,
|
||||
loginname as loginName,
|
||||
sex,
|
||||
mobile,
|
||||
technicalTitle,
|
||||
IFNULL(unitname, '暂无') as unitName,
|
||||
unitid as unitId,
|
||||
unionid as unionId,
|
||||
unionname as unionName
|
||||
from
|
||||
vw_user
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(keyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or(View_user::getLoginname, "like", "%" + keyword + "%");
|
||||
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
|
||||
} else {
|
||||
cnd.and(View_user::getId, "=", SecurityUtil.getUserId());
|
||||
}
|
||||
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = unionReimburseService.listPageMap(1, 50, sql);
|
||||
return Result.success(pagination.getList());
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询职工慰问类型")
|
||||
@SaCheckLogin
|
||||
public Result queryCondolenceType() {
|
||||
List<CondolenceType> list = typeService.query(Cnd.NEW().desc(CondolenceType::getCode));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询校工会经费余额")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
public Result getSchoolBudget() {
|
||||
OutlayManageSchool outlayManageSchool = dao.fetch(OutlayManageSchool.class,
|
||||
Cnd.where("year", "=", DateUtil.year(new Date())));
|
||||
if (outlayManageSchool != null) {
|
||||
BigDecimal balance = outlayManageSchool.getTotalQuota().subtract(outlayManageSchool.getUsedQuota());
|
||||
double value = balance.setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
return Result.success(value);
|
||||
}
|
||||
return Result.success(0.0);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询分工会经费余额")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
public Result getUnionBalance() {
|
||||
OutlayManageUnion outlayManageUnion = dao.fetch(OutlayManageUnion.class,
|
||||
Cnd.where("unionId", "=", SecurityUtil.getUnionId()).and("year", "=", DateUtil.year(new Date())));
|
||||
if (outlayManageUnion != null) {
|
||||
BigDecimal balance = outlayManageUnion.getTotalQuota().subtract(outlayManageUnion.getUsedQuota());
|
||||
double value = balance.setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
return Result.success(value);
|
||||
}
|
||||
return Result.success(0.0);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询社团经费余额")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
public Result getClubBudget(@Param("clubId") String clubId) {
|
||||
// 检查clubId参数是否为空
|
||||
if (StrUtil.isBlank(clubId)) {
|
||||
return Result.error("社团ID不能为空");
|
||||
}
|
||||
// 根据社团ID和年份查询特定社团的经费信息
|
||||
OutlayManageClub outlayManageClub = dao.fetch(OutlayManageClub.class,
|
||||
Cnd.where("clubId", "=", clubId)
|
||||
.and("year", "=", DateUtil.year(new Date())));
|
||||
|
||||
if (outlayManageClub != null) {
|
||||
BigDecimal balance = outlayManageClub.getTotalQuota().subtract(outlayManageClub.getUsedQuota());
|
||||
double value = balance.setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
return Result.success(value);
|
||||
}
|
||||
|
||||
// 如果没有找到该社团的经费记录,返回0
|
||||
return Result.success(0.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.sys.models.Sys_dict;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.unionReimburse.vo.UnionReimburseCollectExcelVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/unionReimburse/collect")
|
||||
@Ok("json:full")
|
||||
@Api("查询统计")
|
||||
public class UnionReimburseCollectController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
@Inject
|
||||
private SysDictService sysDictService;
|
||||
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/collect/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("unionReimburse.collect")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "year") Integer year,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@Param(value = "unitId") String unitId,
|
||||
@Param(value = "reimburseProject") String reimburseProject,
|
||||
@Param(value = "userName") String userName) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
|
||||
FROM
|
||||
union_reimburse info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(info.createTime)", "=", year);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 报销项目查询条件
|
||||
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
||||
// 经办人姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.desc("info.createTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("unionReimburse.collect")
|
||||
@ApiOperation("导出报销汇总表")
|
||||
public void onExport(@Param(value = "year") Integer year,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@Param(value = "unitId") String unitId,
|
||||
@Param(value = "reimburseProject") String reimburseProject,
|
||||
@Param(value = "userName") String userName,
|
||||
HttpServletResponse response) {
|
||||
//查询审核通过的数据
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.*,
|
||||
ins.state instanceState
|
||||
FROM
|
||||
union_reimburse t1
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = t1.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = buildCondition(year, unionId, unitId, reimburseProject, userName, "t1.");
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
cnd.desc("t1.createTime");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
List<UnionReimburseCollectExcelVO> list = unionReimburseService.listVO(sql,UnionReimburseCollectExcelVO.class);
|
||||
|
||||
// 获取字典列表
|
||||
List<Sys_dict> reimburseProjectDictList = sysDictService.getSubListByCode("UNION_REIMBURSE_PROJECT");
|
||||
List<Sys_dict> reimburseFundSourceDictList = sysDictService.getSubListByCode("UNION_REIMBURSE_FUND_SOURCE");
|
||||
|
||||
// 转换字典编码为文字并处理备注字段
|
||||
list.forEach(item -> {
|
||||
// 转换报销项目
|
||||
if (item.getReimburseProject() != null) {
|
||||
Sys_dict projectDict = reimburseProjectDictList.stream()
|
||||
.filter(d -> d.getCode().equals(item.getReimburseProject()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (projectDict != null) {
|
||||
item.setReimburseProject(projectDict.getName());
|
||||
}
|
||||
}
|
||||
// 转换报销经费来源
|
||||
if (item.getReimburseFundSource() != null) {
|
||||
Sys_dict typeDict = reimburseFundSourceDictList.stream()
|
||||
.filter(d -> d.getCode().equals(item.getReimburseFundSource()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (typeDict != null) {
|
||||
item.setReimburseFundSource(typeDict.getName());
|
||||
}
|
||||
}
|
||||
|
||||
// 拼接备注字段(仿照系统代码逻辑,使用activityName和condolenceName字段)
|
||||
if (cn.hutool.core.util.StrUtil.isNotBlank(item.getActivityName())) {
|
||||
item.setRemark("活动名称:" + item.getActivityName());
|
||||
} else if (cn.hutool.core.util.StrUtil.isNotBlank(item.getCondolenceName())) {
|
||||
item.setRemark("慰问对象:" + item.getCondolenceName());
|
||||
}
|
||||
});
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, UnionReimburseCollectExcelVO.class, list);
|
||||
CommonDownloadUtil.download("工会报销汇总表.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询条件
|
||||
* @param year 年度
|
||||
* @param unionId 工会ID
|
||||
* @param unitId 单位ID
|
||||
* @param reimburseProject 报销项目
|
||||
* @param userName 经办人姓名
|
||||
* @param prefix 表前缀
|
||||
* @return 查询条件
|
||||
*/
|
||||
private Cnd buildCondition(Integer year, String unionId, String unitId,
|
||||
String reimburseProject, String userName, String prefix) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(" + prefix + "createTime)", "=", year);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX(prefix + "unionId", "=", unionId);
|
||||
cnd.andEX(prefix + "unitId", "=", unitId);
|
||||
|
||||
// 报销项目查询条件
|
||||
cnd.andEX(prefix + "reimburseProject", "=", reimburseProject);
|
||||
|
||||
// 经办人姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and(prefix + "userName", "like", "%" + userName + "%");
|
||||
}
|
||||
|
||||
return cnd;
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @ClassName UnionReimburseMineController
|
||||
* @Author hongqiwei
|
||||
* @Date 2025/8/27 14:00
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/unionReimburse/mine")
|
||||
@Api("工会报销我的")
|
||||
@Ok("json:full")
|
||||
public class UnionReimburseMineController {
|
||||
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/mine/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("unionReimburse.mine")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "year") Integer year,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@Param(value = "unitId") String unitId,
|
||||
@Param(value = "reimburseProject") String reimburseProject,
|
||||
@Param(value = "userName") String userName) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
union_reimburse info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(info.createTime)", "=", year);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 报销项目查询条件
|
||||
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
||||
// 经办人姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
cnd.desc("info.createTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("unionReimburse.mine")
|
||||
@SLog(type = "unionReimburse", tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
unionReimburseService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/unionReimburse/review")
|
||||
@Ok("json:full")
|
||||
@Api("审核报销")
|
||||
public class UnionReimburseReviewController {
|
||||
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/review/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("unionReimburse.review")
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
Integer year,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String reimburseProject,
|
||||
String userName) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN union_reimburse info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "019925d2-6f33-449a-9fb0-34c470222e99");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(info.createTime)", "=", year);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 报销项目查询条件
|
||||
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
||||
|
||||
|
||||
// 经办人姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.createTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.interceptor;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.club.model.OutlayManageClub;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.model.OutlayUseDetail;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool;
|
||||
import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion;
|
||||
import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.json.Json;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
|
||||
//审核同意后扣除校工会、分工会、社团的经费
|
||||
public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
|
||||
|
||||
|
||||
@Override
|
||||
public void intercept(Execution execution) {
|
||||
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||
UnionReimburse unionReimburse = Json.fromJson(UnionReimburse.class, formDataStr);
|
||||
// 从ServiceContext获取Dao实例
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
String reimburseFundSource = unionReimburse.getReimburseFundSource();
|
||||
//经费使用记录表
|
||||
OutlayUseDetail detail = new OutlayUseDetail();
|
||||
//校工会
|
||||
if ("UNION_REIMBURSE_FUND_SOURCE_1".equals(reimburseFundSource)) {
|
||||
OutlayManageSchool outlayManageSchool = dao.fetch(OutlayManageSchool.class,
|
||||
Cnd.where("year", "=", DateUtil.year(new Date())));
|
||||
if (outlayManageSchool != null) {
|
||||
//balance已使用额度
|
||||
BigDecimal balance = outlayManageSchool.getUsedQuota().add(BigDecimal.valueOf(unionReimburse.getMoney()));
|
||||
outlayManageSchool.setUsedQuota(balance);
|
||||
dao.updateIgnoreNull(outlayManageSchool);
|
||||
|
||||
detail.setAdjustUserId(SecurityUtil.getUserId());
|
||||
detail.setAdjustUserName(SecurityUtil.getUserUsername());
|
||||
detail.setAdjustLoginName(SecurityUtil.getUserLoginname());
|
||||
detail.setOutlayReimburseId(unionReimburse.getId());
|
||||
detail.setAdjustMoney(BigDecimal.valueOf(unionReimburse.getMoney()));
|
||||
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
||||
detail.setProjectName(unionReimburse.getActivityName());
|
||||
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
||||
detail.setActivityTime(unionReimburse.getCreateTime());
|
||||
detail.setOutlayManageId(outlayManageSchool.getId());
|
||||
|
||||
dao.insert(detail);
|
||||
}
|
||||
}
|
||||
//分工会
|
||||
else if ("UNION_REIMBURSE_FUND_SOURCE_2".equals(reimburseFundSource)) {
|
||||
OutlayManageUnion outlayManageUnion = dao.fetch(OutlayManageUnion.class,
|
||||
Cnd.where("unionId", "=", SecurityUtil.getUnionId()).and("year", "=", DateUtil.year(new Date())));
|
||||
if (outlayManageUnion != null) {
|
||||
//balance已使用额度
|
||||
BigDecimal balance = outlayManageUnion.getUsedQuota().add(BigDecimal.valueOf(unionReimburse.getMoney()));
|
||||
outlayManageUnion.setUsedQuota(balance);
|
||||
dao.updateIgnoreNull(outlayManageUnion);
|
||||
|
||||
detail.setAdjustUserId(SecurityUtil.getUserId());
|
||||
detail.setAdjustUserName(SecurityUtil.getUserUsername());
|
||||
detail.setAdjustLoginName(SecurityUtil.getUserLoginname());
|
||||
detail.setOutlayReimburseId(unionReimburse.getId());
|
||||
detail.setAdjustMoney(BigDecimal.valueOf(unionReimburse.getMoney()));
|
||||
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
||||
detail.setProjectName(unionReimburse.getActivityName());
|
||||
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
||||
detail.setActivityTime(unionReimburse.getCreateTime());
|
||||
detail.setOutlayManageId(outlayManageUnion.getId());
|
||||
|
||||
dao.insert(detail);
|
||||
}
|
||||
}
|
||||
//社团
|
||||
else if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(reimburseFundSource)){
|
||||
OutlayManageClub outlayManageClub = dao.fetch(OutlayManageClub.class,
|
||||
Cnd.where("year", "=", DateUtil.year(new Date())));
|
||||
if (outlayManageClub != null) {
|
||||
//balance已使用额度
|
||||
BigDecimal balance = outlayManageClub.getUsedQuota().add(BigDecimal.valueOf(unionReimburse.getMoney()));
|
||||
outlayManageClub.setUsedQuota(balance);
|
||||
dao.updateIgnoreNull(outlayManageClub);
|
||||
|
||||
detail.setAdjustUserId(SecurityUtil.getUserId());
|
||||
detail.setAdjustUserName(SecurityUtil.getUserUsername());
|
||||
detail.setAdjustLoginName(SecurityUtil.getUserLoginname());
|
||||
detail.setOutlayReimburseId(unionReimburse.getId());
|
||||
detail.setAdjustMoney(BigDecimal.valueOf(unionReimburse.getMoney()));
|
||||
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
||||
detail.setProjectName(unionReimburse.getActivityName());
|
||||
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
||||
detail.setActivityTime(unionReimburse.getCreateTime());
|
||||
detail.setOutlayManageId(outlayManageClub.getId());
|
||||
|
||||
dao.insert(detail);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// 处理未知的经费来源类型
|
||||
throw new BaseException("不支持的经费来源类型: " + reimburseFundSource);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.model;
|
||||
|
||||
import cn.hutool.db.DaoTemplate;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import com.budwk.app.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName UnionReimburse
|
||||
* @Author hongqiwei
|
||||
* @Date 2025/8/28 14:43
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("union_reimburse")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("工会报销系统")
|
||||
public class UnionReimburse extends BaseModel {
|
||||
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("经办人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("经办人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("经办人单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("经办人单位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("经办人分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("经办人分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("报销类别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String reimburseType;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("报销项目")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String reimburseProject;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("支付方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String paymentWay;
|
||||
|
||||
@Column
|
||||
@Comment("报销经费来源")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimburseFundSource;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("联系方式(经办人电话)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("经费余额")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private Double fundBalance;
|
||||
|
||||
@Column
|
||||
@Comment("户名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String bankUserName;
|
||||
|
||||
@Column
|
||||
@Comment("银行账号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String bankCardNumber;
|
||||
|
||||
@Column
|
||||
@Comment("开户行")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String bankOfDeposit;
|
||||
|
||||
@Column
|
||||
@Comment("发票张数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String invoiceNumber;
|
||||
|
||||
@Column
|
||||
@Comment("发票号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String invoice;
|
||||
|
||||
@Column
|
||||
@Comment("支付内容")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String paymentNotes;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
|
||||
/**
|
||||
* 慰问
|
||||
*/
|
||||
|
||||
@Column
|
||||
@Comment("慰问对象id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String condolenceId;
|
||||
|
||||
@Column
|
||||
@Comment("慰问对象名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String condolenceName;
|
||||
|
||||
@Column
|
||||
@Comment("联系方式(慰问对象电话)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String condolenceMobile;
|
||||
|
||||
@Column
|
||||
@Comment("慰问类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String condolenceType;
|
||||
|
||||
@Column
|
||||
@Comment("慰问金额/报销金额")
|
||||
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||
private Double money;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("慰问时间")
|
||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
||||
private Date condolenceTime;
|
||||
|
||||
|
||||
/**
|
||||
* 活动/建家/日常
|
||||
*/
|
||||
|
||||
@Column
|
||||
@Comment("活动名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 60)
|
||||
private String activityName;
|
||||
|
||||
@Column
|
||||
@Comment("活动类型(1.分工会,2.校工会,3.社团)")
|
||||
@ColDefine(type = ColType.INT, width = 2)
|
||||
private Integer activityType;
|
||||
|
||||
@Column
|
||||
@Comment("活动人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activityNumber;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("活动时间")
|
||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
||||
private Date activityTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动地点")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activityPlace;
|
||||
|
||||
/*
|
||||
* 所属社团
|
||||
*/
|
||||
|
||||
@Column
|
||||
@Comment("社团id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
@Comment("所属社团")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubName;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
|
||||
public interface UnionReimburseService extends BaseService<UnionReimburse> {
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> implements UnionReimburseService {
|
||||
public UnionReimburseServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
//工会报销导出
|
||||
@Data
|
||||
public class UnionReimburseCollectExcelVO implements Serializable {
|
||||
|
||||
@Excel(name = "经办人工号", width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", width = 20)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "所属工会", width = 20)
|
||||
private String unionName;
|
||||
|
||||
@Excel(name = "所属单位", width = 20)
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "报销项目", width = 20)
|
||||
private String reimburseProject;
|
||||
|
||||
@Excel(name = "备注", width = 20)
|
||||
private String remark;
|
||||
|
||||
@Excel(name = "金额", width = 20)
|
||||
private Double money;
|
||||
|
||||
@Excel(name = "申请时间", width = 30)
|
||||
private String createTime;
|
||||
|
||||
@Excel(name = "经费来源", width = 30)
|
||||
private String reimburseFundSource;
|
||||
|
||||
//活动名称
|
||||
private String activityName;
|
||||
|
||||
//被慰问人
|
||||
private String condolenceName;
|
||||
|
||||
}
|
||||
+2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -15,7 +15,7 @@
|
||||
append-to-body
|
||||
>
|
||||
<div class="qrcode-container" style="text-align: center;">
|
||||
<qrcode :value="url" :options="{ width: 126 }" class="signature-qrcode"></qrcode>
|
||||
<qrcode v-if="url" :value="url" :options="{ width: width }" class="signature-qrcode"></qrcode>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">关闭</el-button>
|
||||
@@ -26,7 +26,7 @@
|
||||
<!-- 内联模式 -->
|
||||
<template v-else-if="mode === 'inline'">
|
||||
<div class="qrcode-inline-container">
|
||||
<qrcode :value="url" :options="{ width: 126 }" class="signature-qrcode"></qrcode>
|
||||
<qrcode v-if="url" :value="url" :options="{ width: width }" class="signature-qrcode"></qrcode>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@ module.exports = {
|
||||
// 二维码内容
|
||||
url: {
|
||||
type: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
// 显示模式:dialog(默认)或 inline
|
||||
mode: {
|
||||
@@ -53,6 +53,10 @@ module.exports = {
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 200
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
<!--Sortable-->
|
||||
<script src="${base!}/assets/platform/plugins/sortablejs/sortable.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vuedraggable/vuedraggable.umd.min.js"></script>
|
||||
<!--vue-count-to-->
|
||||
<script src="${base!}/assets/platform/plugins/vue-count-to/vue-count-to.min.js"></script>
|
||||
<!--vxe-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vxe/vxe-pc-ui.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vxe/vxe-table.css" />
|
||||
|
||||
@@ -83,6 +83,9 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item prop="code" label="字典代码">
|
||||
<el-input maxlength="100" placeholder="字典代码" v-model="formData.code" auto-complete="off" tabindex="5" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" label="字典备注">
|
||||
<el-input maxlength="100" placeholder="字典备注" v-model="formData.remark" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-switch v-model="formData.disabled" active-color="#ff4949" inactive-color="#13ce66"></el-switch>
|
||||
</el-form-item>
|
||||
@@ -100,6 +103,9 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item prop="code" label="字典代码">
|
||||
<el-input maxlength="100" placeholder="字典代码" v-model="formData.code" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" label="字典备注">
|
||||
<el-input maxlength="100" placeholder="字典备注" v-model="formData.remark" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="disabled" label="启用状态">
|
||||
<el-switch v-model="formData.disabled" active-color="#ff4949" inactive-color="#13ce66"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
@@ -179,7 +179,7 @@ layout("/layouts/platform.html"){
|
||||
async initData() {
|
||||
this.$set(this.formData, "applyStartYear", new Date().getFullYear() - 1 + "")
|
||||
this.$set(this.formData, "applyEndYear", new Date().getFullYear() + "")
|
||||
const id = GetQueryString("id")
|
||||
const id = GetQueryString("bizId")
|
||||
if (id) {
|
||||
const resp = await this.$axios.post("/platform/club/evaluate/apply/info", { id })
|
||||
if (resp.code === 0) {
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
const meetingInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="会议名称">{{ viewData.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="会议地点">{{ viewData.address }}</el-descriptions-item>
|
||||
<el-descriptions-item label="会议类型">{{ viewData.typeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="会议描述" :span="3">
|
||||
<div v-html="viewData.description"></div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="场次信息" :span="3">
|
||||
<el-table v-if="viewData.timePeriods && viewData.timePeriods.length > 0"
|
||||
:data="viewData.timePeriods" max-height="300" size="mini">
|
||||
<el-table-column prop="periodName" label="场次名称"></el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||
<el-table-column prop="canLeave" label="是否可以请假">
|
||||
<template slot-scope="{ row }">
|
||||
<span v-if="row.canLeave">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span v-else>暂无场次信息</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="会议参与人员" :span="3">
|
||||
<el-table v-if="viewData.users && viewData.users.length > 0"
|
||||
:data="viewData.users" max-height="300" size="mini">
|
||||
<el-table-column fixed prop="loginName" label="工号" width="150"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名" width="120"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别" width="50"></el-table-column>
|
||||
<el-table-column prop="userState" label="在职状态" width="120"></el-table-column>
|
||||
<el-table-column prop="personType" label="人员类型" width="120"></el-table-column>
|
||||
<el-table-column prop="preparedBy" label="人事编制" width="120"></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机" width="120"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<span v-else>暂无会议参与人员信息</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.$axios.post('/platform/meeting/manage/info', {id: row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-descriptions-item__label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,392 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-steps :active="activeName" finish-status="success" simple>
|
||||
<el-step title="会议基本信息"></el-step>
|
||||
<el-step title="场次信息"></el-step>
|
||||
<el-step title="会议参与人员"></el-step>
|
||||
</el-steps>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left" class="mt20">
|
||||
<div v-show="activeName === 0">
|
||||
<el-form-item label="会议名称" prop="name">
|
||||
<el-input type="text" v-model="formData.name" maxlength="50"
|
||||
placeholder="请输入会议名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="会议地点" prop="address">
|
||||
<el-input type="text" v-model="formData.address" maxlength="100"
|
||||
placeholder="请输入会议地点"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="会议类型" prop="typeId">
|
||||
<el-select v-model="formData.typeId" style="width: 100%" placeholder="请选择会议类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="typeOptions.find(o => o.id === formData.typeId)?.designId === 'JDHHY'" label="所属教代会" prop="teacherCongressSessionId">
|
||||
<el-select v-model="formData.teacherCongressSessionId" style="width: 100%" placeholder="请选择所属教代会" filterable clearable>
|
||||
<el-option v-for="item in teacherCongressOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.fullName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="typeOptions.find(o => o.id === formData.typeId)?.designId === 'GDHHY'" label="所属工代会" prop="workerCongressSessionId">
|
||||
<el-select v-model="formData.workerCongressSessionId" style="width: 100%" placeholder="请选择所属工代会" filterable clearable>
|
||||
<el-option v-for="item in workerCongressOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.fullName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会议描述" prop="description">
|
||||
<text-editor v-model="formData.description"></text-editor>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-show="activeName === 1">
|
||||
<el-form-item label="场次信息">
|
||||
<el-table :data="formData.timePeriods" style="width: 100%" size="small">
|
||||
<el-table-column label="场次名称" prop="periodName">
|
||||
<template slot-scope="{ row }">
|
||||
<el-input maxlength="20" v-model="row.periodName" placeholder="请输入场次名称" size="small"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="startTime">
|
||||
<template slot-scope="{ row }">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
placeholder="请选择开始时间"
|
||||
type="datetime"
|
||||
v-model="row.startTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" prop="endTime">
|
||||
<template slot-scope="{ row }">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
placeholder="请选择结束时间"
|
||||
type="datetime"
|
||||
v-model="row.endTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可以请假" prop="canLeave">
|
||||
<template slot-scope="{ row }">
|
||||
<el-radio-group v-model="row.canLeave" size="small">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80">
|
||||
<template slot="header" slot-scope="{ row }">
|
||||
<el-button size="mini" type="primary" icon="el-icon-plus"
|
||||
@click="formData.timePeriods.push({ canLeave: false })"></el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.timePeriods.length <= 1"
|
||||
@click="formData.timePeriods.splice(scope.$index, 1)"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-show="activeName === 2">
|
||||
<el-form-item label="参与人员信息">
|
||||
<el-row class="mb10">
|
||||
<el-button icon="el-icon-search" @click="openSelect" size="small">选择用户</el-button>
|
||||
<el-button icon="el-icon-delete" @click="clearSelect" type="danger" size="small">清空用户</el-button>
|
||||
</el-row>
|
||||
<el-table :data="userTableData" style="width: 100%" size="mini" max-height="300">
|
||||
<el-table-column fixed prop="loginName" label="工号" width="150"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名" width="120"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别" width="50"></el-table-column>
|
||||
<el-table-column prop="userState" label="在职状态" width="120"></el-table-column>
|
||||
<el-table-column prop="personType" label="人员类型" width="120"></el-table-column>
|
||||
<el-table-column prop="preparedBy" label="人事编制" width="120"></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机" width="120"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="userTableData.splice(scope.$index, 1)"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<p style="color: var(--color-primary)">总计:{{userTableData.length}}人</p>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$emit('refresh')">取消</el-button>
|
||||
<el-button v-if="activeName === 1" type="primary" @click="activeName = 0">上一步</el-button>
|
||||
<el-button v-if="activeName === 2" type="primary" @click="activeName = 1">上一步</el-button>
|
||||
<el-button v-if="activeName === 0" type="primary" @click="next()">下一步</el-button>
|
||||
<el-button v-if="activeName === 1" type="primary" @click="activeName = 2">下一步</el-button>
|
||||
<el-button @click="onSave" type="primary">保存</el-button>
|
||||
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-dialog title="选择用户" :visible.sync="selectDialogVisible" width="70%" append-to-body>
|
||||
<div class="btn-group tool-button">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch" style="width: 260px">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="工号" value="u.loginName"></el-option>
|
||||
<el-option label="姓名" value="u.userName"></el-option>
|
||||
<el-option label="手机" value="u.mobile"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits" placeholder="请选择所属工会" filterable clearable>
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" filterable clearable>
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="pageForm.roleId" placeholder="请选择角色" filterable clearable>
|
||||
<el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-button icon="el-icon-search" @click="doSearch" type="primary"></el-button>
|
||||
</div>
|
||||
<div class="left-span-label mt20">人员列表</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="id"
|
||||
ref="tableRef"
|
||||
>
|
||||
<el-table-column type="selection" reserve-selection width="60"></el-table-column>
|
||||
<el-table-column fixed prop="loginName" label="工号" width="150"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名" width="120"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别" width="50"></el-table-column>
|
||||
<el-table-column prop="userState" label="在职状态" width="120"></el-table-column>
|
||||
<el-table-column prop="personType" label="人员类型" width="120"></el-table-column>
|
||||
<el-table-column prop="preparedBy" label="人事编制" width="120"></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机" width="120"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="selectDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSelect">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
unionList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
unitList: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activeName: 0,
|
||||
formData: {
|
||||
timePeriods: [{ canLeave: false }],
|
||||
},
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
typeId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
teacherCongressSessionId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
workerCongressSessionId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
typeOptions: [],
|
||||
userTableData: [],
|
||||
|
||||
selectDialogVisible: false,
|
||||
roleList: [],
|
||||
selectUsers: [],
|
||||
pageForm: {
|
||||
searchName: 'u.userName',
|
||||
},
|
||||
teacherCongressOptions: [],
|
||||
workerCongressOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
next() {
|
||||
const type = this.typeOptions.find(o => o.id === this.formData.typeId)
|
||||
if(type.designId === 'JDHHY' && !this.formData.teacherCongressSessionId) {
|
||||
this.$message.warning('请选择所属教代会')
|
||||
return
|
||||
}
|
||||
if(type.designId === 'GDHHY' && !this.formData.workerCongressSessionId) {
|
||||
this.$message.warning('请选择所属工代会')
|
||||
return
|
||||
}
|
||||
this.activeName = 1
|
||||
},
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.unitList = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.unitList = data
|
||||
})
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.selectUsers = val
|
||||
},
|
||||
doSelect() {
|
||||
const tableLoginNames = this.userTableData.map(v => v.loginName)
|
||||
for (const o of this.selectUsers) {
|
||||
if(!tableLoginNames.includes(o.loginName)){
|
||||
this.userTableData.push(o)
|
||||
}
|
||||
}
|
||||
if(this.$refs.tableRef){
|
||||
this.$refs.tableRef.clearSelection()
|
||||
}
|
||||
this.selectDialogVisible = false
|
||||
},
|
||||
async getRoleList() {
|
||||
const resp = await this.$axios.post("/platform/sys/msg/getRoleList")
|
||||
return resp.data
|
||||
},
|
||||
openSelect() {
|
||||
this.selectDialogVisible = true
|
||||
this.pageData()
|
||||
},
|
||||
clearSelect() {
|
||||
this.userTableData = []
|
||||
if(this.$refs.tableRef){
|
||||
this.$refs.tableRef.clearSelection()
|
||||
}
|
||||
},
|
||||
onOpen(row) {
|
||||
if(row && row.id) {
|
||||
this.$axios.post('/platform/meeting/manage/info', { id: row.id }).then(res => {
|
||||
this.formData = res.data
|
||||
this.userTableData = this.formData.users
|
||||
})
|
||||
}
|
||||
},
|
||||
onSave() {
|
||||
this.$confirm("您确定要保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/meeting/manage/submit', {
|
||||
data: JSON.stringify(this.formData),
|
||||
users: JSON.stringify(this.userTableData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if(this.formData.timePeriods.length === 0) {
|
||||
this.$message.warning("请至少添加一条场次信息")
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < this.formData.timePeriods.length; i++) {
|
||||
const item = this.formData.timePeriods[i]
|
||||
if(!item.periodName) {
|
||||
this.$message.warning("第" + (i + 1) + "条场次信息中,场次名称必填")
|
||||
return
|
||||
}
|
||||
if(!item.startTime) {
|
||||
this.$message.warning("第" + (i + 1) + "条场次信息中,开始时间必填")
|
||||
return
|
||||
}
|
||||
if(!item.endTime) {
|
||||
this.$message.warning("第" + (i + 1) + "条场次信息中,结束时间必填")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.userTableData.length === 0) {
|
||||
this.$message.warning("请选择会议参与人员")
|
||||
return
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/meeting/manage/submit", {
|
||||
data: JSON.stringify(this.formData),
|
||||
users: JSON.stringify(this.userTableData)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
queryMeetingType() {
|
||||
this.$axios.post("/platform/meeting/type/queryMeetingType")
|
||||
.then((res) => {
|
||||
this.typeOptions = res.data
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post("/platform/meeting/manage/userPageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
queryTeacherCongress() {
|
||||
this.$axios.post("/platform/meeting/manage/queryTeacherCongress")
|
||||
.then((res) => {
|
||||
this.teacherCongressOptions = res.data
|
||||
})
|
||||
},
|
||||
queryWorkerCongress() {
|
||||
this.$axios.post("/platform/meeting/manage/queryWorkerCongress")
|
||||
.then((res) => {
|
||||
this.workerCongressOptions = res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.queryMeetingType()
|
||||
this.queryTeacherCongress()
|
||||
this.queryWorkerCongress()
|
||||
this.roleList = await this.getRoleList()
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="名称/地点:">
|
||||
<el-input placeholder="请输入名称或地点查询" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="会议列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增会议
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'createdAt'">
|
||||
<span>{{ $moment(row.createdAt).format('YYYY-MM-DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="refresh" :union-list="unionList" :unit-list="unitList"></basic-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<meeting-info ref="infoRef"></meeting-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/meetingInfo.js'){}#-->
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
"meeting-info": meetingInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '会议名称'},
|
||||
{prop: 'typeName', label: '会议类型'},
|
||||
{prop: 'address', label: '会议地点'},
|
||||
{prop: 'createdAt', label: '创建时间'},
|
||||
],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen()
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/meeting/manage/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,328 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.qrcode {
|
||||
min-width: 240px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.real-data {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.real-data .data-card {
|
||||
border-radius: 10px;
|
||||
width: calc((100% - 80px) / 4);
|
||||
min-width: 100px;
|
||||
background-image: linear-gradient(141deg, #9fb8ad 0%, #1fc8db 51%, #2cb5e8 75%);
|
||||
margin: 10px 0 10px 20px;
|
||||
padding: 10px;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
.real-data .data-card .data-card-title {
|
||||
font-size: 20px;
|
||||
max-width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
position: absolute;
|
||||
}
|
||||
.real-data .data-card .data-card-num {
|
||||
font-size: 90px;
|
||||
flex: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.real-data .data-card .flow-border {
|
||||
position: absolute;
|
||||
display: block;
|
||||
}
|
||||
.timePeriod_card {
|
||||
border-top: 5px solid #106898;
|
||||
border-left: 1px solid #ebeef5;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
border-right: 1px solid #ebeef5;
|
||||
}
|
||||
.timePeriod_card .el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
img {
|
||||
height: 100% !important;
|
||||
width: 100%;
|
||||
}
|
||||
.operation {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1111;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="名称/地点:">
|
||||
<el-input placeholder="请输入名称或地点查询" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="会议类型:">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-row :gutter="20" justify="start" style="flex-wrap: wrap" type="flex"
|
||||
v-if="scope.row.timePeriods && scope.row.timePeriods.length > 0">
|
||||
<el-col :xl="5" v-for="tp,index in scope.row.timePeriods" :key="index">
|
||||
<el-card class="mb10 timePeriod_card" shadow="hover">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="名称">{{tp.periodName}}</el-form-item>
|
||||
<el-form-item label="会议时间">{{tp.startTime}}</el-form-item>
|
||||
<el-form-item label="结束时间">{{tp.endTime}}</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="space-around" style="border-top: 1px solid #ebeef5;padding: 10px 0 0 0" type="flex">
|
||||
<el-button @click="exportSignature(tp.id)" size="medium" type="text">
|
||||
导出签字表
|
||||
</el-button>
|
||||
<el-button @click="openOnline(tp.id,scope.row.id)" size="medium" type="text">
|
||||
扫描二维码
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-else>
|
||||
<el-empty description="没有时间段"></el-empty>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'createdAt'">
|
||||
<span>{{ $moment(row.createdAt).format('YYYY-MM-DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="toggleRowTimePeriod(row)" size="mini" type="primary">展开</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<div style="min-width: 500px;height: 100%;position: relative">
|
||||
<el-row type="flex">
|
||||
<el-col :span="4" class="qrcode">
|
||||
<qr-code-plus :url="qrCodeUrl" ref="qrCodePlusRef" mode="inline"></qr-code-plus>
|
||||
</el-col>
|
||||
<el-col :span="20" class="real-data">
|
||||
<template v-for="rd of realTimeData">
|
||||
<div class="data-card">
|
||||
<div class="data-card-title">
|
||||
{{rd.label}}
|
||||
</div>
|
||||
<div class="data-card-num">
|
||||
<count-to :end-val="rd.value" :start-val="getLastValue(rd.key)"></count-to>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="userData" :max-height="signTableHeight" class="mt20" ref="signTable">
|
||||
<el-table-column label="姓名" prop="username"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginname"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitname"></el-table-column>
|
||||
<el-table-column label="签到时间" prop="signInDateTime"></el-table-column>
|
||||
<el-table-column label="签到名次">
|
||||
<template slot-scope="scope">
|
||||
{{userData.length - scope.$index}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<meeting-info ref="infoRef"></meeting-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/meetingInfo.js'){}#-->
|
||||
let pollingInterval = null
|
||||
const intervalTime = 3500
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"meeting-info": meetingInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '会议名称'},
|
||||
{prop: 'typeName', label: '会议类型'},
|
||||
{prop: 'address', label: '会议地点'},
|
||||
{prop: 'createdAt', label: '创建时间'},
|
||||
],
|
||||
typeOptions: [],
|
||||
meetingId: '',
|
||||
timePeriodId: '',
|
||||
qrCodeUrl: '',
|
||||
lastTimeData: [],
|
||||
realTimeData: [],
|
||||
userData: [],
|
||||
signTableHeight: 600
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleRowTimePeriod(row) {
|
||||
this.$refs['meetingTable'].toggleRowExpansion(row)
|
||||
},
|
||||
exportSignature(timePeriodId) {
|
||||
this.$downLoad(loc() + '/exportSignature/' + timePeriodId)
|
||||
},
|
||||
openOnline(timePeriodId, meetingId) {
|
||||
this.meetingId = meetingId
|
||||
this.timePeriodId = timePeriodId
|
||||
this.$refs.guava.edit(() => {
|
||||
this.calcSignTableHeight()
|
||||
this.generateQrCodeUrl(timePeriodId, meetingId)
|
||||
this.stopInterval()
|
||||
pollingInterval = this.startPolling(this.getRealTimeData)
|
||||
})
|
||||
},
|
||||
calcSignTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
const offsetTop = this.$refs.signTable.$el.offsetTop
|
||||
const th = window.innerHeight - 54 - 40 - offsetTop
|
||||
this.$set(this, 'signTableHeight', th)
|
||||
})
|
||||
})
|
||||
},
|
||||
async generateQrCodeUrl(tpId, meetingId) {
|
||||
const resp = await this.$axios.post(loc() + '/generateQrCodeUrl', {tpId, meetingId})
|
||||
if (resp.code === 0) {
|
||||
this.qrCodeUrl = resp.data
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getRealTimeData() {
|
||||
this.lastTimeData = clone(this.realTimeData)
|
||||
const resp = await this.$axios.post(loc() + '/getRealTimeData/' + this.timePeriodId)
|
||||
if (resp.code === 0) {
|
||||
this.lastTimeData = clone(this.realTimeData)
|
||||
this.$set(this, 'realTimeData', resp.data.countData)
|
||||
let ud = clone(this.userData)
|
||||
ud.unshift(...resp.data.userData)
|
||||
let uMap = new Map()
|
||||
for (let u of ud) {
|
||||
if (!uMap.has(u.loginname)) {
|
||||
uMap.set(u.loginname, u)
|
||||
}
|
||||
}
|
||||
this.$set(this, 'userData', [...uMap.values()])
|
||||
}
|
||||
},
|
||||
startPolling(func) {
|
||||
this.lastTimeData = []
|
||||
this.realTimeData = []
|
||||
this.userData = []
|
||||
func()
|
||||
return setInterval(func, intervalTime)
|
||||
},
|
||||
stopInterval() {
|
||||
if (pollingInterval) {
|
||||
clearInterval(pollingInterval)
|
||||
}
|
||||
},
|
||||
getLastValue(key) {
|
||||
if (this.lastTimeData && this.lastTimeData.length > 0) {
|
||||
return this.lastTimeData.find(v => v.key === key).value
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
queryMeetingType() {
|
||||
this.$axios.post('/platform/meeting/type/queryMeetingType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.queryMeetingType()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,82 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||
<el-form-item label="类型编码" prop="code">
|
||||
<el-input type="text" v-model="formData.code" maxlength="50"
|
||||
placeholder="请输入类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="name">
|
||||
<el-input type="text" v-model="formData.name" maxlength="50"
|
||||
placeholder="请输入类型名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属流程" prop="designId">
|
||||
<el-select v-model="formData.designId" placeholder="请选择所属流程" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in designOptions" :key="item.name" :value="item.name" :label="item.displayName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enable">
|
||||
<el-switch
|
||||
v-model="formData.enable"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$emit('refresh')">取消</el-button>
|
||||
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
enable: true
|
||||
},
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
enable: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
designId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
designOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.queryDesignList()
|
||||
if(row && row.id) {
|
||||
this.formData = clone(row)
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/meeting/type/submit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
queryDesignList() {
|
||||
this.$axios.post("/platform/meeting/type/queryDesignList")
|
||||
.then((res) => {
|
||||
this.designOptions = res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="名称/编码:">
|
||||
<el-input placeholder="请输入名称或编码查询" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="类型列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增类型
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'enable'">
|
||||
<el-switch
|
||||
@change="switchChange(row)"
|
||||
v-model="row.enable"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'code', label: '类型编码'},
|
||||
{prop: 'name', label: '类型名称'},
|
||||
{prop: 'enable', label: '是否启用'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen()
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/meeting/type/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
switchChange(row) {
|
||||
this.$axios.post("/platform/meeting/type/submit", row).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user