建言献策

This commit is contained in:
=
2025-10-15 09:47:31 +08:00
parent 9a8ed547e2
commit c20d5378e6
5 changed files with 89 additions and 15 deletions
@@ -53,7 +53,12 @@ public class SuggestionBoxQueryController {
@At
@SaCheckPermission(value = {"suggestionBox.query", "h5.suggestionBox.query"}, mode = SaMode.OR)
public Result pageData(Integer pageNumber, Integer pageSize, String searchKeyword, Integer year) {
public Result pageData(Integer pageNumber,
Integer pageSize,
String searchKeyword,
String unionId,
String unitId,
Integer year) {
Sql sql = Sqls.create("""
SELECT
info.id,
@@ -91,6 +96,11 @@ public class SuggestionBoxQueryController {
if (StrUtil.isNotBlank(searchKeyword)) {
cnd.where().andLike("info.title", searchKeyword);
}
// 工会、单位名称查询条件
cnd.andEX("unionId", "=", unionId);
cnd.andEX("unitId", "=", unitId);
// 只查询流程实例状态为20的数据(已完成状态)
cnd.and("ins.state", "=", 20);
cnd.desc("info.submitTime");
sql.setCondition(cnd);
Pagination<NutMap> pagination = suggestionBoxService.listPageMap(pageNumber, pageSize, sql);
@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiOperation;
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.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -51,7 +52,13 @@ public class SuggestionXghController {
@At
@SaCheckPermission(value = {"suggestionBox.xgh", "h5.suggestionBox.xgh"}, mode = SaMode.OR)
public Result pageData(PageForm pageForm, String taskId, String searchKeyword, Integer year, boolean approval) {
public Result pageData(PageForm pageForm,
String taskId,
String searchKeyword,
Integer year,
String unionId,
String unitId,
boolean approval) {
Sql sql = Sqls.create("""
SELECT
info.id,
@@ -102,6 +109,10 @@ public class SuggestionXghController {
cnd.where().andLike("info.title", searchKeyword);
}
// 工会、单位名称查询条件
cnd.andEX("unionId", "=", unionId);
cnd.andEX("unitId", "=", unitId);
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.submitTime");
} else {