master
admin 2 years ago
parent 38da5996a8
commit 3519ff2b01
  1. 12
      ant-design-vue-jeecg/src/views/taskSkill/TaskSkillList.vue
  2. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskSkill/controller/TaskSkillController.java

@ -9,11 +9,11 @@
<j-search-select-tag placeholder="请输入技能名称" v-model="queryParam.skillId" dict="skill_points,skill_name,id"></j-search-select-tag> <j-search-select-tag placeholder="请输入技能名称" v-model="queryParam.skillId" dict="skill_points,skill_name,id"></j-search-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<!-- <a-form-item label="任务名称">--> <a-form-item label="任务名称">
<!-- <a-input placeholder="请输入任务名称" v-model="queryParam.taskId"></a-input>--> <a-input placeholder="请输入任务名称" v-model="queryParam.taskId"></a-input>
<!-- </a-form-item>--> </a-form-item>
<!-- </a-col>--> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@ -142,7 +142,7 @@
dataIndex: 'taskType_dictText' dataIndex: 'taskType_dictText'
}, },
{ {
title:'任务', title:'任务名称',
align:"center", align:"center",
dataIndex: 'taskId' dataIndex: 'taskId'
}, },

@ -1,5 +1,6 @@
package org.jeecg.modules.taskSkill.controller; package org.jeecg.modules.taskSkill.controller;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -83,7 +84,38 @@ public class TaskSkillController extends JeecgController<TaskSkill, ITaskSkillSe
@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) {
List<String> strings = new ArrayList<>();
if (taskSkill.getTaskId() != null){
List<Projectx> projectlist = projectxService.list(new QueryWrapper<Projectx>().lambda().like(Projectx::getProjectName, taskSkill.getTaskId()));
List<Modulex> modulelist = modulexService.list(new QueryWrapper<Modulex>().lambda().like(Modulex::getModuleName, taskSkill.getTaskId()));
List<Functionx> functionlist = functionxService.list(new QueryWrapper<Functionx>().lambda().like(Functionx::getFunctionName, taskSkill.getTaskId()));
List<Rulex> rulelist = rulexService.list(new QueryWrapper<Rulex>().lambda().like(Rulex::getRuleCode, taskSkill.getTaskId()));
if (!projectlist.isEmpty()){
for (Projectx projectx : projectlist){
strings.add(projectx.getId());
}
}
if (!modulelist.isEmpty()){
for (Modulex modulex : modulelist){
strings.add(modulex.getId());
}
}
if (!functionlist.isEmpty()){
for (Functionx functionx : functionlist){
strings.add(functionx.getId());
}
}
if (!rulelist.isEmpty()){
for (Rulex rulex : rulelist){
strings.add(rulex.getId());
}
}
taskSkill.setTaskId(null);
}
QueryWrapper<TaskSkill> queryWrapper = QueryGenerator.initQueryWrapper(taskSkill, req.getParameterMap()); QueryWrapper<TaskSkill> queryWrapper = QueryGenerator.initQueryWrapper(taskSkill, req.getParameterMap());
if (!strings.isEmpty()){
queryWrapper.in("task_id",strings);
}
Page<TaskSkill> page = new Page<TaskSkill>(pageNo, pageSize); Page<TaskSkill> page = new Page<TaskSkill>(pageNo, pageSize);
IPage<TaskSkill> pageList = taskSkillService.page(page, queryWrapper); IPage<TaskSkill> pageList = taskSkillService.page(page, queryWrapper);
for (TaskSkill taskSkill1 : pageList.getRecords()){ for (TaskSkill taskSkill1 : pageList.getRecords()){

Loading…
Cancel
Save