Commit 9fcf7f1798211bc20cc1ad2ea0fefdc5d8aee7bc
1 parent
6fc66238
update
Showing
1 changed file
with
16 additions
and
10 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -369,13 +369,19 @@ public class VideosController extends BaseController { |
| 369 | 369 | * @param response |
| 370 | 370 | */ |
| 371 | 371 | @GetMapping("excel") |
| 372 | - public void getExcel(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, Integer source,String video_user_id,String orderByClause,Integer sp_Id, HttpSession session, HttpServletResponse response) { | |
| 372 | + public void getExcel(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, Integer source, String video_user_id, String orderByClause, Integer sp_Id, String sp_desc, HttpSession session, HttpServletResponse response) { | |
| 373 | + if (CommonUtils.isNotEmpty(sp_desc)) { | |
| 374 | + ShySites shySite = sitesService.findspidBySpdesc(sp_desc); | |
| 375 | + if (CommonUtils.isNotNull(shySite)) { | |
| 376 | + sp_Id = shySite.getSpid(); | |
| 377 | + } | |
| 378 | + } | |
| 373 | 379 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 374 | 380 | Integer spid = sessionUser.getSpid(); |
| 375 | 381 | String userId = sessionUser.getUserId(); |
| 376 | 382 | if (spid == 0) spid = null; |
| 377 | - if(sp_Id!=null){ | |
| 378 | - spid=sp_Id; | |
| 383 | + if (sp_Id != null) { | |
| 384 | + spid = sp_Id; | |
| 379 | 385 | } |
| 380 | 386 | List<ShyVideos> shyVideosList = videosService.findByCondition(video_title, start_date, end_date, state, receive, video_priority, orderByClause, spid, userId, source, video_user_id); |
| 381 | 387 | String fileName = "点播数据"; |
| ... | ... | @@ -438,7 +444,7 @@ public class VideosController extends BaseController { |
| 438 | 444 | cell = row.createCell(5);//列 |
| 439 | 445 | /* 审核员需要做处理*/ |
| 440 | 446 | if (shyVideosList.get(i).getState() != CommonConst.AUDIT_INTT) { |
| 441 | - updater = CommonUtils.isEmpty(shyVideosList.get(i).getUpdater()) || "null".equals(shyVideosList.get(i).getUpdater())? "白名单":shyVideosList.get(i).getUpdater(); | |
| 447 | + updater = CommonUtils.isEmpty(shyVideosList.get(i).getUpdater()) || "null".equals(shyVideosList.get(i).getUpdater()) ? "白名单" : shyVideosList.get(i).getUpdater(); | |
| 442 | 448 | String auditor_id = shyVideosList.get(i).getAuditor_id(); |
| 443 | 449 | if (CommonUtils.isNotEmpty(auditor_id)) { |
| 444 | 450 | ShyUsers user = new ShyUsers(); |
| ... | ... | @@ -447,7 +453,7 @@ public class VideosController extends BaseController { |
| 447 | 453 | if (CommonUtils.isNotNull(user)) { |
| 448 | 454 | String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail(); |
| 449 | 455 | String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername(); |
| 450 | - updater = userName ; | |
| 456 | + updater = userName; | |
| 451 | 457 | } |
| 452 | 458 | } |
| 453 | 459 | } |
| ... | ... | @@ -485,11 +491,11 @@ public class VideosController extends BaseController { |
| 485 | 491 | //显示spid简称 |
| 486 | 492 | ShySites shySites = sitesService.findspidDescByspid(shyVideosList.get(i).getSpid()); |
| 487 | 493 | if (CommonUtils.isNotNull(shySites)) { |
| 488 | - if(CommonUtils.isNotEmpty(shyVideosList.get(i).getCategory())&­VideosList.get(i).getCategory().equals(CommonConst.CATEGORY_WITNESS)){ | |
| 489 | - cell.setCellValue(shySites.getName()+"(目击者)"); | |
| 490 | - }else if(CommonUtils.isNotEmpty(shyVideosList.get(i).getCategory())&­VideosList.get(i).getCategory().equals(CommonConst.CATEGORY_MOMENT)){ | |
| 491 | - cell.setCellValue(shySites.getName()+"(朋友圈)"); | |
| 492 | - }else{ | |
| 494 | + if (CommonUtils.isNotEmpty(shyVideosList.get(i).getCategory()) && shyVideosList.get(i).getCategory().equals(CommonConst.CATEGORY_WITNESS)) { | |
| 495 | + cell.setCellValue(shySites.getName() + "(目击者)"); | |
| 496 | + } else if (CommonUtils.isNotEmpty(shyVideosList.get(i).getCategory()) && shyVideosList.get(i).getCategory().equals(CommonConst.CATEGORY_MOMENT)) { | |
| 497 | + cell.setCellValue(shySites.getName() + "(朋友圈)"); | |
| 498 | + } else { | |
| 493 | 499 | cell.setCellValue(shySites.getName()); |
| 494 | 500 | } |
| 495 | 501 | } | ... | ... |