kangwei : 解决违章处理,测试账号没有数据问题
正在显示
1 个修改的文件
包含
6 行增加
和
13 行删除
... | @@ -122,33 +122,26 @@ public class SafetyOffenceRecordController { | ... | @@ -122,33 +122,26 @@ public class SafetyOffenceRecordController { |
122 | HttpServletRequest req) { | 122 | HttpServletRequest req) { |
123 | Result<IPage<SafetyOffenceRecord>> result = new Result<IPage<SafetyOffenceRecord>>(); | 123 | Result<IPage<SafetyOffenceRecord>> result = new Result<IPage<SafetyOffenceRecord>>(); |
124 | 124 | ||
125 | Boolean flag = false; | ||
126 | String role_ah_id = sysConfigService.queryValueByKey("ROLE_AH_ADMIN");//安环管理员角色编号 | 125 | String role_ah_id = sysConfigService.queryValueByKey("ROLE_AH_ADMIN");//安环管理员角色编号 |
127 | String role_cz_id = sysConfigService.queryValueByKey("ROLE_CZ");//厂长角色编号 | 126 | String role_cz_id = sysConfigService.queryValueByKey("ROLE_CZ");//厂长角色编号 |
128 | String userRoleIds = BaseContextHandler.getRoles(); | 127 | String userRoleIds = BaseContextHandler.getRoles(); |
129 | 128 | ||
130 | safetyOffenceRecord.setDepartId( "0" );//屏蔽数据使用;非安环管理员、与厂长角色看不到数据 | 129 | //safetyOffenceRecord.setDepartId( "0" );//屏蔽数据使用;非安环管理员、与厂长角色看不到数据 |
131 | safetyOffenceRecord.setReportType("1");//上报集团--默认 | ||
132 | |||
133 | //安装部长角色看集团类型的违法上报 | 130 | //安装部长角色看集团类型的违法上报 |
134 | if( userRoleIds != null && userRoleIds.contains( role_ah_id ) ){//判断安环管理员 | 131 | if( userRoleIds != null && userRoleIds.contains( role_ah_id ) ){//判断安环管理员 |
135 | safetyOffenceRecord.setDepartId( null ); | 132 | safetyOffenceRecord.setReportType("1");//上报集团--默认 |
136 | flag = false; | ||
137 | } | 133 | } |
138 | if( userRoleIds != null && userRoleIds.contains( role_cz_id ) ){//判断 厂长 ,查询分管的所有长编号 | 134 | if( userRoleIds != null && userRoleIds.contains( role_cz_id ) ){//判断 厂长 ,查询分管的所有长编号 |
139 | safetyOffenceRecord.setDepartId( BaseContextHandler.getDeparts() );//BaseContextHandler.getRealDepartId() | ||
140 | safetyOffenceRecord.setReportType("2");//上报厂长 | 135 | safetyOffenceRecord.setReportType("2");//上报厂长 |
141 | flag = true; | ||
142 | } | ||
143 | if(safetyOffenceRecord.getStatus() !=null && safetyOffenceRecord.getStatus().equals("0")){ | ||
144 | safetyOffenceRecord.setStatus(null);//默认全部 | ||
145 | } | 136 | } |
146 | |||
147 | //各个厂长角色看到厂长类型的违法上报 departId | 137 | //各个厂长角色看到厂长类型的违法上报 departId |
148 | QueryWrapper<SafetyOffenceRecord> queryWrapper = QueryGenerator.initQueryWrapper(safetyOffenceRecord, req.getParameterMap()); | 138 | QueryWrapper<SafetyOffenceRecord> queryWrapper = QueryGenerator.initQueryWrapper(safetyOffenceRecord, req.getParameterMap()); |
149 | Page<SafetyOffenceRecord> page = new Page<SafetyOffenceRecord>(pageNo, pageSize); | 139 | Page<SafetyOffenceRecord> page = new Page<SafetyOffenceRecord>(pageNo, pageSize); |
150 | if(flag ){ | 140 | /* if(flag ){ |
151 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); | 141 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); |
142 | }*/ | ||
143 | if(safetyOffenceRecord.getStatus() == null ){ | ||
144 | queryWrapper.ge("status","1");// 状态 >=1 | ||
152 | } | 145 | } |
153 | IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper); | 146 | IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper); |
154 | result.setSuccess(true); | 147 | result.setSuccess(true); | ... | ... |
-
请 注册 或 登录 后发表评论