master
赵玉瑞 2 years ago
parent fbedf10989
commit f1295e244e
  1. 11
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  2. 2
      ant-design-vue-jeecg/src/views/projectx/ProjectxList.vue
  3. 29
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/controller/ModulexController.java
  4. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/entity/Modulex.java
  5. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/mapper/ModulexMapper.java

@ -176,11 +176,12 @@ export default {
// align: "center", // align: "center",
// dataIndex: 'pmDescribe' // dataIndex: 'pmDescribe'
// }, // },
// { {
// title:'', title:'责任人',
// align:"center", align:"center",
// dataIndex: 'managerUsers' // dataIndex: 'managerUsers'
// }, dataIndex: 'managerUsers_dictText'
},
{ {
title: '任务等级', title: '任务等级',
align: "center", align: "center",

@ -7,7 +7,7 @@
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item label="项目名称"> <a-form-item label="项目名称">
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>--> <!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
<j-input placeholder="输入账号模糊查询" v-model="queryParam.projectName"></j-input> <j-input placeholder="" v-model="queryParam.projectName"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>

@ -13,17 +13,17 @@ import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.mapper.ModulexMapper;
import org.jeecg.modules.modulex.service.IModulexService; import org.jeecg.modules.modulex.service.IModulexService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays; import java.util.*;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -39,6 +39,8 @@ import java.util.stream.Collectors;
public class ModulexController extends JeecgController<Modulex, IModulexService> { public class ModulexController extends JeecgController<Modulex, IModulexService> {
@Autowired @Autowired
private IModulexService modulexService; private IModulexService modulexService;
@Resource
private ModulexMapper modulexMapper;
/** /**
* 分页列表查询 * 分页列表查询
@ -59,6 +61,27 @@ public class ModulexController extends JeecgController<Modulex, IModulexService>
QueryWrapper<Modulex> queryWrapper = QueryGenerator.initQueryWrapper(modulex, req.getParameterMap()); QueryWrapper<Modulex> queryWrapper = QueryGenerator.initQueryWrapper(modulex, req.getParameterMap());
Page<Modulex> page = new Page<Modulex>(pageNo, pageSize); Page<Modulex> page = new Page<Modulex>(pageNo, pageSize);
IPage<Modulex> pageList = modulexService.page(page, queryWrapper); IPage<Modulex> pageList = modulexService.page(page, queryWrapper);
List<Modulex> modulexList = pageList.getRecords();
for (Modulex modu :modulexList) {
if (!StringUtils.hasText(modu.getManagerUsers())){
break;
}else {
String[] split = modu.getManagerUsers().split(",");
List<String> stringList = Arrays.asList(split);
List<String> strings = new ArrayList<>();
stringList.forEach(manager -> {
String realName = modulexMapper.getRealName(manager);
if (StringUtils.hasText(realName)) {
strings.add(realName);
} else {
strings.add(manager);
}
});
String toString = strings.toString();
String substring = toString.substring(1, toString.length() - 1);
modu.setManagerUsers_dictText(substring);
}
}
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -2,6 +2,7 @@ package org.jeecg.modules.modulex.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -96,6 +97,13 @@ public class Modulex implements Serializable {
@Excel(name = "责任人", width = 15) @Excel(name = "责任人", width = 15)
@ApiModelProperty(value = "责任人") @ApiModelProperty(value = "责任人")
private String managerUsers; private String managerUsers;
/**
* 上面的字段 本身的数据字典无法翻译 也不能直接把原来的字段替换掉
* 用这个字段代表 翻译后的值 不改变原先的
*/
@TableField(exist = false)
private String managerUsers_dictText;
/** /**
* 任务等级 * 任务等级
* 12345默认2 * 12345默认2

@ -2,6 +2,7 @@ package org.jeecg.modules.modulex.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.modulex.entity.Modulex; import org.jeecg.modules.modulex.entity.Modulex;
/** /**
@ -12,4 +13,6 @@ import org.jeecg.modules.modulex.entity.Modulex;
*/ */
public interface ModulexMapper extends BaseMapper<Modulex> { public interface ModulexMapper extends BaseMapper<Modulex> {
@Select("SELECT realname FROM sys_user WHERE id = #{id}")
String getRealName(String id);
} }

Loading…
Cancel
Save