6c6700aa 康伟

kangwei : 解决违章处理,测试账号没有数据问题

1 个父辈 a3591b69
......@@ -122,33 +122,26 @@ public class SafetyOffenceRecordController {
HttpServletRequest req) {
Result<IPage<SafetyOffenceRecord>> result = new Result<IPage<SafetyOffenceRecord>>();
Boolean flag = false;
String role_ah_id = sysConfigService.queryValueByKey("ROLE_AH_ADMIN");//安环管理员角色编号
String role_cz_id = sysConfigService.queryValueByKey("ROLE_CZ");//厂长角色编号
String userRoleIds = BaseContextHandler.getRoles();
safetyOffenceRecord.setDepartId( "0" );//屏蔽数据使用;非安环管理员、与厂长角色看不到数据
safetyOffenceRecord.setReportType("1");//上报集团--默认
//safetyOffenceRecord.setDepartId( "0" );//屏蔽数据使用;非安环管理员、与厂长角色看不到数据
//安装部长角色看集团类型的违法上报
if( userRoleIds != null && userRoleIds.contains( role_ah_id ) ){//判断安环管理员
safetyOffenceRecord.setDepartId( null );
flag = false;
safetyOffenceRecord.setReportType("1");//上报集团--默认
}
if( userRoleIds != null && userRoleIds.contains( role_cz_id ) ){//判断 厂长 ,查询分管的所有长编号
safetyOffenceRecord.setDepartId( BaseContextHandler.getDeparts() );//BaseContextHandler.getRealDepartId()
safetyOffenceRecord.setReportType("2");//上报厂长
flag = true;
}
if(safetyOffenceRecord.getStatus() !=null && safetyOffenceRecord.getStatus().equals("0")){
safetyOffenceRecord.setStatus(null);//默认全部
}
//各个厂长角色看到厂长类型的违法上报 departId
QueryWrapper<SafetyOffenceRecord> queryWrapper = QueryGenerator.initQueryWrapper(safetyOffenceRecord, req.getParameterMap());
Page<SafetyOffenceRecord> page = new Page<SafetyOffenceRecord>(pageNo, pageSize);
if(flag ){
/* if(flag ){
queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(","));
}*/
if(safetyOffenceRecord.getStatus() == null ){
queryWrapper.ge("status","1");// 状态 >=1
}
IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper);
result.setSuccess(true);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!