kangwei:
1、题库管理不做数据权限过滤 3、试题管理展示提交人、所属机构、提交时间 4、试卷管理时,选择题库不做数据权限过滤
正在显示
4 个修改的文件
包含
35 行增加
和
7 行删除
... | @@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | @@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
25 | import com.skua.modules.edu.service.IQuestionService; | 25 | import com.skua.modules.edu.service.IQuestionService; |
26 | import lombok.extern.slf4j.Slf4j; | 26 | import lombok.extern.slf4j.Slf4j; |
27 | 27 | ||
28 | import org.apache.commons.lang3.StringUtils; | ||
28 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 29 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
29 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 30 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
30 | import org.jeecgframework.poi.excel.entity.ExportParams; | 31 | import org.jeecgframework.poi.excel.entity.ExportParams; |
... | @@ -115,6 +116,12 @@ public class QuestionDBController { | ... | @@ -115,6 +116,12 @@ public class QuestionDBController { |
115 | public Result<QuestionDB> add(@RequestBody QuestionDB questionDB) { | 116 | public Result<QuestionDB> add(@RequestBody QuestionDB questionDB) { |
116 | Result<QuestionDB> result = new Result<QuestionDB>(); | 117 | Result<QuestionDB> result = new Result<QuestionDB>(); |
117 | try { | 118 | try { |
119 | if(StringUtils.isEmpty(questionDB.getUserId())){ | ||
120 | questionDB.setUserId(BaseContextHandler.getUserId()); | ||
121 | } | ||
122 | if(StringUtils.isEmpty(questionDB.getDepartId())){ | ||
123 | questionDB.setDepartId(BaseContextHandler.getRealDepartId()); | ||
124 | } | ||
118 | questionDBService.save(questionDB); | 125 | questionDBService.save(questionDB); |
119 | result.success("添加成功!"); | 126 | result.success("添加成功!"); |
120 | } catch (Exception e) { | 127 | } catch (Exception e) { | ... | ... |
... | @@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; | ... | @@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
25 | @Accessors(chain = true) | 25 | @Accessors(chain = true) |
26 | @ApiModel(value="edu_question_db对象", description="在线考试-题库") | 26 | @ApiModel(value="edu_question_db对象", description="在线考试-题库") |
27 | public class QuestionDB { | 27 | public class QuestionDB { |
28 | 28 | ||
29 | /**主键*/ | 29 | /**主键*/ |
30 | @TableId(type = IdType.ID_WORKER_STR) | 30 | @TableId(type = IdType.ID_WORKER_STR) |
31 | @ApiModelProperty(value = "主键") | 31 | @ApiModelProperty(value = "主键") |
... | @@ -35,9 +35,10 @@ public class QuestionDB { | ... | @@ -35,9 +35,10 @@ public class QuestionDB { |
35 | @ApiModelProperty(value = "厂id") | 35 | @ApiModelProperty(value = "厂id") |
36 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | 36 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") |
37 | private String departId; | 37 | private String departId; |
38 | /**创建人编号*/ | 38 | /**提交人编号*/ |
39 | @Excel(name = "创建人编号", width = 15) | 39 | @Excel(name = "提交人编号", width = 15) |
40 | @ApiModelProperty(value = "创建人编号") | 40 | @ApiModelProperty(value = "提交人编号") |
41 | @Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname") | ||
41 | private String userId; | 42 | private String userId; |
42 | /**父机构ID*/ | 43 | /**父机构ID*/ |
43 | @Excel(name = "父机构ID", width = 15) | 44 | @Excel(name = "父机构ID", width = 15) | ... | ... |
... | @@ -23,8 +23,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ... | @@ -23,8 +23,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
23 | import com.baomidou.mybatisplus.core.metadata.IPage; | 23 | import com.baomidou.mybatisplus.core.metadata.IPage; |
24 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 24 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
25 | import com.skua.modules.safe.service.IDangerLevelManageShareService; | 25 | import com.skua.modules.safe.service.IDangerLevelManageShareService; |
26 | import com.skua.modules.system.entity.SysDepart; | ||
26 | import com.skua.modules.system.mapper.SysConfigMapper; | 27 | import com.skua.modules.system.mapper.SysConfigMapper; |
27 | import com.skua.modules.system.service.ISysConfigService; | 28 | import com.skua.modules.system.service.ISysConfigService; |
29 | import com.skua.modules.system.service.ISysDepartService; | ||
28 | import lombok.extern.slf4j.Slf4j; | 30 | import lombok.extern.slf4j.Slf4j; |
29 | 31 | ||
30 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 32 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
... | @@ -62,6 +64,9 @@ public class DangerLevelManageController { | ... | @@ -62,6 +64,9 @@ public class DangerLevelManageController { |
62 | private String webUrl; | 64 | private String webUrl; |
63 | @Autowired | 65 | @Autowired |
64 | private ISysConfigService configService; | 66 | private ISysConfigService configService; |
67 | |||
68 | @Autowired | ||
69 | private ISysDepartService departService; | ||
65 | /** | 70 | /** |
66 | * 分页列表查询 | 71 | * 分页列表查询 |
67 | * @param dangerLevelManage | 72 | * @param dangerLevelManage |
... | @@ -96,8 +101,21 @@ public class DangerLevelManageController { | ... | @@ -96,8 +101,21 @@ public class DangerLevelManageController { |
96 | HttpServletRequest req) { | 101 | HttpServletRequest req) { |
97 | Result<IPage<DangerLevelManageShare>> result = new Result<IPage<DangerLevelManageShare>>(); | 102 | Result<IPage<DangerLevelManageShare>> result = new Result<IPage<DangerLevelManageShare>>(); |
98 | QueryWrapper<DangerLevelManageShare> queryWrapper = QueryGenerator.initQueryWrapper(dangerLevelManage, req.getParameterMap()); | 103 | QueryWrapper<DangerLevelManageShare> queryWrapper = QueryGenerator.initQueryWrapper(dangerLevelManage, req.getParameterMap()); |
99 | Page<DangerLevelManageShare> page = new Page<DangerLevelManageShare>(pageNo, pageSize); | 104 | Page<DangerLevelManageShare> page = new Page<>(pageNo, pageSize); |
100 | IPage<DangerLevelManageShare> pageList = dangerLevelManageShareService.page(page, queryWrapper); | 105 | IPage<DangerLevelManageShare> pageList = dangerLevelManageShareService.page(page, queryWrapper); |
106 | |||
107 | /* List<SysDepart> sysDepartList = departService.queryList(); | ||
108 | if(pageList.getRecords() != null && !pageList.getRecords().isEmpty()){ | ||
109 | for( DangerLevelManageShare shareVO: pageList.getRecords()){ | ||
110 | if(shareVO.getDepartId() != null ){ | ||
111 | for( sysDepartList){ | ||
112 | |||
113 | } | ||
114 | } | ||
115 | } | ||
116 | |||
117 | }*/ | ||
118 | |||
101 | result.setSuccess(true); | 119 | result.setSuccess(true); |
102 | result.setResult(pageList); | 120 | result.setResult(pageList); |
103 | return result; | 121 | return result; | ... | ... |
... | @@ -86,8 +86,10 @@ public class MybatisInterceptor implements Interceptor { | ... | @@ -86,8 +86,10 @@ public class MybatisInterceptor implements Interceptor { |
86 | //巡检触发方式卡片配置 | 86 | //巡检触发方式卡片配置 |
87 | add("inspection_point_trigger_config"); | 87 | add("inspection_point_trigger_config"); |
88 | 88 | ||
89 | //用户试卷 | 89 | //在线考试 |
90 | add("edu_user_paper"); | 90 | add("edu_user_paper");//用户的试卷 |
91 | add("edu_question");//试题 | ||
92 | add("edu_question_db");//题库 | ||
91 | //采购药剂物料 | 93 | //采购药剂物料 |
92 | add("erp_purchase_plan_item"); | 94 | add("erp_purchase_plan_item"); |
93 | add("erp_purchase_material"); | 95 | add("erp_purchase_material"); | ... | ... |
-
请 注册 或 登录 后发表评论