commit
This commit is contained in:
+6
-1
@@ -221,6 +221,7 @@ public class FamilyActivityApplyController {
|
||||
|
||||
currentFamilyNumber = currentFamilyNumber != null ? currentFamilyNumber : 0;
|
||||
FamilyCourse course = dao.fetch(FamilyCourse.class, courseId);
|
||||
FamilyType type = dao.fetch(FamilyType.class, course.getCourseType());
|
||||
FamilyActivity activity = dao.fetch(FamilyActivity.class, course.getActivityId());
|
||||
|
||||
//判断时间
|
||||
@@ -237,6 +238,10 @@ public class FamilyActivityApplyController {
|
||||
return Result.error(99,"抱歉,您没有此次活动的权限");
|
||||
}
|
||||
|
||||
if(type.getIsBringFamily() && currentFamilyNumber == 0) {
|
||||
return Result.error(99, "%s信息不能为空".formatted(activity.getKeyWord()));
|
||||
}
|
||||
|
||||
//判断是否报名
|
||||
boolean courseByUser = familyActivityService.isSignCourseByUser(courseId, SecurityUtil.getUserId());
|
||||
if(courseByUser) {
|
||||
@@ -246,7 +251,7 @@ public class FamilyActivityApplyController {
|
||||
//判断活动人数
|
||||
boolean signFull = familyActivityService.isSignFull(course, currentFamilyNumber);
|
||||
if(signFull) {
|
||||
return Result.error(99,"啊哦,目前报名人数已达上限。您可保持关注,如有老师取消之前的报名从而释放出名额,您可再来试试。谢谢!");
|
||||
return Result.error(99,"抱歉,报名人数已满");
|
||||
}
|
||||
|
||||
//判断活动限制
|
||||
|
||||
+27
-6
@@ -67,7 +67,13 @@ public class ClubExamineApplyController {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getCount(@Valid String id, @Valid Integer year) {
|
||||
public Result getCount(String id, Integer year) {
|
||||
if(StrUtil.isBlank(id)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
}
|
||||
if(year == null) {
|
||||
return Result.error("年份信息为空,请核查");
|
||||
}
|
||||
List<SysClubExamineRegister> list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", id).and("year(registerDate)", "=", year));
|
||||
List<ProcessInstance> instanceList = dao.query(
|
||||
ProcessInstance.class,
|
||||
@@ -86,21 +92,30 @@ public class ClubExamineApplyController {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getClubUserNum(@Valid String clubId) {
|
||||
public Result getClubUserNum(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
}
|
||||
List<NutMap> result = sysClubExamineService.getClubUserNum(clubId);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getJgUser(@Valid String clubId) {
|
||||
public Result getJgUser(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
}
|
||||
List<NutMap> result = sysClubExamineService.getJgUser(clubId);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getClubMemberMoney(@Valid String clubId) {
|
||||
public Result getClubMemberMoney(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
}
|
||||
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId));
|
||||
SysClub club = dao.fetch(SysClub.class, clubId);
|
||||
int money = count * (club.getDue() != null ? Integer.parseInt(club.getDue()) : 0);
|
||||
@@ -117,7 +132,10 @@ public class ClubExamineApplyController {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getLasYearSurplus(@Valid String clubId) {
|
||||
public Result getLasYearSurplus(String clubId) {
|
||||
if(StrUtil.isBlank(clubId)) {
|
||||
return Result.error("协会信息为空,请核查");
|
||||
}
|
||||
SysClubExamineRegister register = dao.fetch(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId)
|
||||
.and("YEAR(registerDate)", "=", DateUtil.thisYear() - 1));
|
||||
if (Lang.isNotEmpty(register)) {
|
||||
@@ -130,7 +148,10 @@ public class ClubExamineApplyController {
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club.examine")
|
||||
public Result info(@Valid String id) {
|
||||
public Result info(String id) {
|
||||
if(StrUtil.isBlank(id)) {
|
||||
return Result.error("id信息为空,请核查");
|
||||
}
|
||||
SysClubExamineRegister examineRegister = sysClubExamineService.fetch(id);
|
||||
sysClubExamineService.fetchLinks(examineRegister, "detailedList");
|
||||
return Result.success(examineRegister);
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class LiteracyAdjustController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.adjust")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/userAdjust/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/userAdjust/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -61,19 +61,19 @@ public class LiteracyApplyController {
|
||||
|
||||
@At("/")
|
||||
@SaCheckPermission("literacy.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/apply/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/apply/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@SaCheckPermission("h5.literacy.apply")
|
||||
@Ok("beetl:/platform/zhghh5/activity/literacy/apply/index.html")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/literacy/apply/index.html")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At("/list/h5")
|
||||
@SaCheckPermission("h5.literacy.apply")
|
||||
@Ok("beetl:/platform/zhghh5/activity/literacy/list/index.html")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/literacy/list/index.html")
|
||||
public void listIndex() {
|
||||
}
|
||||
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.budwk.app.zhgh.dayofficework.literacy.controller.manage;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @ClassName LiteracyCourseController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/9/26 16:44
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "职工素养培训-课程管理")
|
||||
@At("/platform/literacy/course")
|
||||
public class LiteracyCourseController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.course")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/course/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("literacy.course")
|
||||
public Result pageData(PageForm pageForm) {
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class LiteracyManageController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.manage")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/manage/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/manage/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -41,13 +41,13 @@ public class LiteracyMineController {
|
||||
|
||||
@At("/")
|
||||
@SaCheckPermission("literacy.mine")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/mine/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/mine/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@SaCheckPermission("h5.literacy.mine")
|
||||
@Ok("beetl:/platform/zhghh5/activity/literacy/mine/index.html")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/literacy/mine/index.html")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.budwk.app.zhgh.dayofficework.literacy.controller.manage;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.literacy.models.LiteracyTeacher;
|
||||
import io.swagger.annotations.Api;
|
||||
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.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "职工素养培训-教师管理")
|
||||
@At("/platform/literacy/teacher")
|
||||
public class LiteracyTeacherController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.teacher")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/teacher/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("literacy.teacher")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "name") String name) {
|
||||
Sql sql = Sqls.create("""
|
||||
select * from literacy_teacher $condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(Cnd.likeEX("name", name));
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("literacy.teacher")
|
||||
@SLog(type = "职工素养-教师管理", tag = "新增", msg = "新增教师")
|
||||
public Result add(LiteracyTeacher teacher) throws Exception {
|
||||
dao.insert(teacher);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("literacy.teacher")
|
||||
@SLog(type = "职工素养-教师管理", tag = "编辑", msg = "编辑教师")
|
||||
public Result edit(LiteracyTeacher teacher) {
|
||||
dao.updateIgnoreNull(teacher);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("literacy.teacher")
|
||||
@SLog(type = "职工素养-教师管理", tag = "删除", msg = "删除教师")
|
||||
public Object delete(@Param(value = "id") String id) {
|
||||
dao.clear(LiteracyTeacher.class, Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("literacy")
|
||||
public Object queryTeachers() {
|
||||
List<LiteracyTeacher> teachers = dao.query(LiteracyTeacher.class, Cnd.NEW());
|
||||
return Result.success(teachers);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -47,7 +47,7 @@ public class LiteracyTypeController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.type")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/type/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/type/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class LiteracyUserManageController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.userManage")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/userManage/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/userManage/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class LiteracyActivityStatisticsController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("literacy.statistics")
|
||||
@Ok("beetl:/platform/zhgh/activity/literacy/statistics/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/literacy/statistics/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.budwk.app.zhgh.dayofficework.literacy.models;
|
||||
|
||||
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.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
@Accessors(chain = true)
|
||||
@Comment("职工素养教师管理")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class LiteracyTeacher extends BaseModel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String name;
|
||||
|
||||
@Column
|
||||
@Comment("单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("联系电话")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("专业")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String major;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String remark;
|
||||
}
|
||||
Reference in New Issue
Block a user