服务指令bug
This commit is contained in:
parent
2cd93f8a21
commit
a0ae7e07b8
|
@ -32,6 +32,11 @@ public class NuCommonApi {
|
||||||
return Result.ok(sysBaseAPI.getOrgInfo(orgCode));
|
return Result.ok(sysBaseAPI.getOrgInfo(orgCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取标准指令库信息
|
||||||
|
@GetMapping("/getDMOrgInfo")
|
||||||
|
public Result<JSONObject> getDMOrgInfo(){
|
||||||
|
return Result.ok(sysBaseAPI.getDMOrgInfo());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据父id查询对应省、市、区/县 列表
|
* 根据父id查询对应省、市、区/县 列表
|
||||||
|
|
|
@ -10,6 +10,8 @@ import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
@ -39,13 +41,13 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 可新增指令
|
* @Description: 可新增指令
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2025-08-01
|
* @Date: 2025-08-01
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="可新增指令")
|
@Api(tags = "可新增指令")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/canadddirective/canAddDirective")
|
@RequestMapping("/canadddirective/canAddDirective")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -63,18 +65,20 @@ public class CanAddDirectiveController extends JeecgController<CanAddDirective,
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "可新增指令-分页列表查询")
|
//@AutoLog(value = "可新增指令-分页列表查询")
|
||||||
@ApiOperation(value="可新增指令-分页列表查询", notes="可新增指令-分页列表查询")
|
@ApiOperation(value = "可新增指令-分页列表查询", notes = "可新增指令-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<CanAddDirective>> queryPageList(CanAddDirective canAddDirective,
|
public Result<IPage<CanAddDirective>> queryPageList(CanAddDirective canAddDirective,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
// 自定义查询规则
|
// 自定义查询规则
|
||||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||||
customeRuleMap.put("orgCode", QueryRuleEnum.LIKE_WITH_OR);
|
customeRuleMap.put("orgCode", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
QueryWrapper<CanAddDirective> queryWrapper = QueryGenerator.initQueryWrapper(canAddDirective, req.getParameterMap(),customeRuleMap);
|
QueryWrapper<CanAddDirective> queryWrapper = QueryGenerator.initQueryWrapper(canAddDirective, req.getParameterMap(), customeRuleMap);
|
||||||
queryWrapper.notIn("directive_id",canAddDirective.getExistDirectiveIds().split(","));
|
if (StringUtils.isNotBlank(canAddDirective.getExistDirectiveIds())) {
|
||||||
|
queryWrapper.notIn("directive_id", canAddDirective.getExistDirectiveIds().split(","));
|
||||||
|
}
|
||||||
Page<CanAddDirective> page = new Page<CanAddDirective>(pageNo, pageSize);
|
Page<CanAddDirective> page = new Page<CanAddDirective>(pageNo, pageSize);
|
||||||
IPage<CanAddDirective> pageList = canAddDirectiveService.page(page, queryWrapper);
|
IPage<CanAddDirective> pageList = canAddDirectiveService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
|
|
|
@ -627,6 +627,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||||
|
|
||||||
JSONObject getOrgInfo(String orgCode);
|
JSONObject getOrgInfo(String orgCode);
|
||||||
|
|
||||||
|
JSONObject getDMOrgInfo();
|
||||||
|
|
||||||
JSONObject getDeptInfo();
|
JSONObject getDeptInfo();
|
||||||
|
|
||||||
String addOrg(SysDepartEntity sysDepart);
|
String addOrg(SysDepartEntity sysDepart);
|
||||||
|
|
|
@ -1904,6 +1904,20 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||||
return queryOrgInfo(orgCode);
|
return queryOrgInfo(orgCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getDMOrgInfo() {
|
||||||
|
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("iz_directive_main", "0");//标准指令库
|
||||||
|
qw.eq("org_category", "1");//机构类型
|
||||||
|
qw.eq("del_flag", "0");//未删除数据
|
||||||
|
SysDepart sysDepart = sysDepartService.getOne(qw);
|
||||||
|
if (sysDepart != null) {
|
||||||
|
return (JSONObject) JSONObject.toJSON(sysDepart);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getDeptInfo() {
|
public JSONObject getDeptInfo() {
|
||||||
Map<String,Object> map = Maps.newHashMap();
|
Map<String,Object> map = Maps.newHashMap();
|
||||||
|
|
Loading…
Reference in New Issue