diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/rest/controller/RestQueryController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/rest/controller/RestQueryController.java index 39e5e36..a8c6560 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/rest/controller/RestQueryController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/rest/controller/RestQueryController.java @@ -5,8 +5,8 @@ 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.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.utils.CommonDownloadUtil; import com.budwk.app.zhgh.dayofficework.rest.models.RestAct; @@ -22,6 +22,7 @@ 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 javax.servlet.http.HttpServletResponse; import javax.validation.Valid; @@ -31,7 +32,7 @@ import java.util.List; @IocBean @At("/platform/rest/query") @Ok("json:full") -@Api(tags = "疗休养查询统计接口") +@Api(tags = "疗休养综合查询接口") public class RestQueryController { @Inject @@ -50,6 +51,9 @@ public class RestQueryController { @ApiOperation("分页查询") public Result pageData(@Valid RestQueryPageForm pageForm) { Cnd cnd = Cnd.NEW(); + cnd.andEX(RestActSignUp::getRestActId, "=", pageForm.getActId()); + cnd.andEX(RestActSignUp::getUnionId, "=", pageForm.getUnionId()); + cnd.andEX(RestActSignUp::getUnitId, "=", pageForm.getUnitId()); Pagination pagination = restActSignUpService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd); return Result.success(pagination); } @@ -65,8 +69,7 @@ public class RestQueryController { List entities = new ArrayList<>(); entities.add(new ExcelExportEntity("工号", "loginName", 20)); entities.add(new ExcelExportEntity("姓名", "name", 20)); - entities.add(new ExcelExportEntity("性别", "sex", 20)); - entities.add(new ExcelExportEntity("部门", "unitName", 20)); + entities.add(new ExcelExportEntity("单位", "unitName", 20)); entities.add(new ExcelExportEntity("分工会", "unionName", 20)); entities.add(new ExcelExportEntity("批次", "batch", 20)); entities.add(new ExcelExportEntity("备注", "remark", 20)); @@ -82,4 +85,13 @@ public class RestQueryController { e.printStackTrace(); } } + + @At + @SaCheckPermission("rest.query") + @ApiOperation("删除") + @SLog(tag = "疗休养综合查询", msg = "删除报名人员,报名记录ID:${args[0]}") + public Result delete(@Param("id") @Valid String id) { + restActSignUpService.delete(id); + return Result.success(); + } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/rest/param/RestQueryPageForm.java b/src/main/java/com/budwk/app/zhgh/dayofficework/rest/param/RestQueryPageForm.java index c14581d..0dd21e1 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/rest/param/RestQueryPageForm.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/rest/param/RestQueryPageForm.java @@ -17,4 +17,10 @@ public class RestQueryPageForm extends PageForm { @ApiModelProperty("批次") private String batch; + @ApiModelProperty("分工会ID") + private String unionId; + + @ApiModelProperty("单位ID") + private String unitId; + } diff --git a/src/main/resources/views/platform/zhgh/dayofficework/rest/query/index.html b/src/main/resources/views/platform/zhgh/dayofficework/rest/query/index.html index 2fbc246..c502a89 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/rest/query/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/rest/query/index.html @@ -5,14 +5,47 @@ layout("/layouts/platform.html"){
- + - - + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + + + + + +