|
@@ -47,7 +47,6 @@ public class TlIncidentController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(TlIncident tlIncident) {
|
|
|
- startPage();
|
|
|
// 根据当前用户角色,如果是巡检员的话,则只查询自己的
|
|
|
// 如果是巡检员管理员的话,查询接收人是自己的
|
|
|
Set<String> roleSet = sysRoleService.selectRolePermissionByUserId(getUserId());
|
|
@@ -56,6 +55,7 @@ public class TlIncidentController extends BaseController {
|
|
|
} else if (roleSet.contains("xun_manage")) {
|
|
|
tlIncident.setAcceptUser(getUsername());
|
|
|
}
|
|
|
+ startPage();
|
|
|
List<TlIncident> list = tlIncidentService.selectTlIncidentList(tlIncident);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
@@ -86,6 +86,14 @@ public class TlIncidentController extends BaseController {
|
|
|
@Log(title = "巡检事件管理", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
public void export(HttpServletResponse response, TlIncident tlIncident) {
|
|
|
+ // 根据当前用户角色,如果是巡检员的话,则只查询自己的
|
|
|
+ // 如果是巡检员管理员的话,查询接收人是自己的
|
|
|
+ Set<String> roleSet = sysRoleService.selectRolePermissionByUserId(getUserId());
|
|
|
+ if (roleSet.contains("xun")) {
|
|
|
+ tlIncident.setCreateBy(getUsername());
|
|
|
+ } else if (roleSet.contains("xun_manage")) {
|
|
|
+ tlIncident.setAcceptUser(getUsername());
|
|
|
+ }
|
|
|
List<TlIncident> list = tlIncidentService.selectTlIncidentList(tlIncident);
|
|
|
ExcelUtil<TlIncident> util = new ExcelUtil<TlIncident>(TlIncident.class);
|
|
|
util.exportExcel(response, list, "巡检事件管理数据");
|