feat:职工福利ui优化
This commit is contained in:
@@ -48,7 +48,8 @@ public class WelfareMineController {
|
||||
@At
|
||||
@SaCheckPermission("welfare.mine")
|
||||
public Result pageData(PageForm pageForm,
|
||||
Integer year) {
|
||||
Integer year,
|
||||
String name) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wp.*,
|
||||
@@ -57,13 +58,14 @@ public class WelfareMineController {
|
||||
WHEN wus.selectUserId IS NOT NULL THEN
|
||||
1 ELSE 0
|
||||
END AS isChoose,
|
||||
GROUP_CONCAT(DISTINCT wuso.optionName ,'(',wus.selectNum,'份)') AS gist_list,
|
||||
wus.receiveAddress,
|
||||
GROUP_CONCAT(DISTINCT wuso.optionName ,'(',wus.selectNum,'份)') AS gist_list,
|
||||
MAX(wus.selectTime) AS selectTime,
|
||||
wus.receiveAddress,
|
||||
wl.userId
|
||||
FROM
|
||||
welfare_list wl
|
||||
LEFT JOIN welfare_project wp ON wp.id = wl.projectId
|
||||
LEFT JOIN welfare_project_user_selection wus ON wl.projectId = wus.welfareId
|
||||
INNER JOIN welfare_project_user_selection wus ON wl.projectId = wus.welfareId
|
||||
AND wus.selectUserId = @selectUserId
|
||||
LEFT JOIN welfare_project_subject_option wuso ON wus.selectOptionId = wuso.id
|
||||
$condition
|
||||
@@ -73,6 +75,9 @@ public class WelfareMineController {
|
||||
cnd.and("wp.isDisabled", "=", 0);
|
||||
cnd.andEX("YEAR(wp.choiceTimeStart)", "=", year);
|
||||
cnd.andEX("wl.userId", "=", SecurityUtil.getUserId());
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
cnd.and("wp.name", "like", "%" + name.trim() + "%");
|
||||
}
|
||||
cnd.desc("wp.choiceTimeStart");
|
||||
cnd.groupBy("wl.id");
|
||||
sql.setCondition(cnd);
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.welfare.controller;
|
||||
|
||||
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;
|
||||
@@ -47,7 +48,7 @@ public class WelfareUserSelectController {
|
||||
@At
|
||||
@SaCheckPermission("welfare.user.select")
|
||||
@ApiOperation("获取用户选择列表分页")
|
||||
public Result pageData(PageForm pageForm, Integer year) {
|
||||
public Result pageData(PageForm pageForm, Integer year, String name) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
wp.*,
|
||||
@@ -71,6 +72,9 @@ public class WelfareUserSelectController {
|
||||
cnd.and("wp.provideMode", "in", "2,3");
|
||||
cnd.andEX("YEAR(wp.choiceTimeStart)", "in", year);
|
||||
cnd.and("wp.isDisabled", "=", 0);
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
cnd.and("wp.name", "like", "%" + name.trim() + "%");
|
||||
}
|
||||
cnd.groupBy("wp.id");
|
||||
cnd.desc("wp.choiceTimeStart");
|
||||
sql.setCondition(cnd);
|
||||
|
||||
Reference in New Issue
Block a user