update 法规分页查询根据左侧树查询
This commit is contained in:
+8
-2
@@ -72,7 +72,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
@Override
|
||||
public IPage<Map<String, Object>> getCommonPage(Map<String, Object> parameterMap) {
|
||||
// 获取操作模块
|
||||
String module = parameterMap.get(FieldCommon.MODULE).toString();
|
||||
String module = (String) parameterMap.get(FieldCommon.MODULE);
|
||||
// 获取要操作的表名
|
||||
String tableName = TableNameEnum.getTableName(module);
|
||||
|
||||
@@ -624,7 +624,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
**/
|
||||
private String getSelectCondition(Map<String, Object> parameterMap, List<LawsTag> fieldList) {
|
||||
//查询条件
|
||||
StringBuilder selectCondition = new StringBuilder("where 1 = 1");
|
||||
StringBuilder selectCondition = new StringBuilder("where del_flag = 0");
|
||||
// 删除pageNo和pageSize,不参与条件查询
|
||||
parameterMap.remove("pageNo");
|
||||
parameterMap.remove("pageSize");
|
||||
@@ -640,6 +640,12 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
jointSelectCondition(fieldList, selectCondition, key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理左侧树code查询
|
||||
String nodeCode = (String) parameterMap.get(FieldCommon.NODE_CODE); // 获取树节点code
|
||||
selectCondition.append(" and id in (select unique_relation_flag from laws_node_relation " +
|
||||
"where node_code like concat('" + nodeCode + "','%'))");
|
||||
|
||||
//处理列表表头排序
|
||||
String orderByField = (String) parameterMap.get(FieldCommon.ORDER_BY_FIELD);
|
||||
if (StringUtils.isNotBlank(orderByField)) {
|
||||
|
||||
+5
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -39,6 +40,10 @@ public class LawsDomesticController {
|
||||
@PostMapping(value = "/getCommonPage")
|
||||
public Result<IPage<Map<String,Object>>> getCommonPage(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
// 如果没有选择树节点,则是根节点
|
||||
if (Objects.isNull(parameterMap.get(FieldCommon.NODE_CODE))) {
|
||||
parameterMap.put(FieldCommon.NODE_CODE, "A02");
|
||||
}
|
||||
return Result.OK(lawsCommonService.getCommonPage(parameterMap));
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -39,6 +40,10 @@ public class LawsEnterpriseController {
|
||||
@PostMapping(value = "/getCommonPage")
|
||||
public Result<IPage<Map<String,Object>>> getCommonPage(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
// 如果没有选择树节点,则是根节点
|
||||
if (Objects.isNull(parameterMap.get(FieldCommon.NODE_CODE))) {
|
||||
parameterMap.put(FieldCommon.NODE_CODE, "A01");
|
||||
}
|
||||
return Result.OK(lawsCommonService.getCommonPage(parameterMap));
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -39,6 +40,10 @@ public class LawsOverseasController {
|
||||
@PostMapping(value = "/getCommonPage")
|
||||
public Result<IPage<Map<String,Object>>> getCommonPage(@RequestBody Map<String,Object> parameterMap) {
|
||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||
// 如果没有选择树节点,则是根节点
|
||||
if (Objects.isNull(parameterMap.get(FieldCommon.NODE_CODE))) {
|
||||
parameterMap.put(FieldCommon.NODE_CODE, "A03");
|
||||
}
|
||||
return Result.OK(lawsCommonService.getCommonPage(parameterMap));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user