/** toArticleGroupDetailPage 组稿详情页 */
  @RequestMapping(value = "/toArticleGroupDetailPageShow")
  public ModelAndView toArticleGroupDetailPageShow(
      @RequestParam("periodicalId") String periodicalId,
      @RequestParam("periodicalIssueNo") String periodicalIssueNo,
      @RequestParam("articleId") String articleId,
      @RequestParam("title") String title,
      HttpServletRequest request) {
    logger.info("组稿左右Page:[ " + periodicalId + "]&[" + periodicalIssueNo + "]");
    ModelAndView mav = new ModelAndView("editor_articleGroupDetailPageShow");

    List<EditorArticleDealRespDto> list = new ArrayList<EditorArticleDealRespDto>();
    ArticleInfoQuery articleInfoQuery = new ArticleInfoQuery();
    /** 取编辑处理完成(点击待刊按钮后)且专家是待刊的状态的稿件进行组刊 */
    articleInfoQuery.setEditorState(ArticleStateEnums.END_ARTICLE.getCode());
    articleInfoQuery.setExpertState(ArticleStateEnums.PUBLISH_ARTICLE.getCode());
    articleInfoQuery.setArticleId(articleId);
    articleInfoQuery.setArticleCnTitle(title);
    articleInfoQuery.setExtends3("N");
    List<ArticleInfo> articleInfos = articleInfoManager.queryListZuGao(articleInfoQuery);
    Iterator<ArticleInfo> iters = articleInfos.iterator();
    while (iters.hasNext()) {
      EditorArticleDealRespDto editorArticleDealRespDto = new EditorArticleDealRespDto();
      ArticleInfo articleInfo = iters.next();
      AuthorInfoQuery authorInfoQuery = new AuthorInfoQuery();
      authorInfoQuery.setArticleId(articleInfo.getArticleId());
      List<AuthorInfo> authorInfos = authorInfoManager.queryList(authorInfoQuery);
      editorArticleDealRespDto.setArticleInfo(articleInfo);
      editorArticleDealRespDto.setAuthorInfos(authorInfos);
      //			editorArticleDealRespDto.setArticleAttachmentInfo(articleAttachmentInfo);
      list.add(editorArticleDealRespDto);
    }

    mav.addObject("list", list);

    SectionInfoQuery query = new SectionInfoQuery();
    query.setPeriodicalId(periodicalId);
    query.setPeriodicalIssueNo(periodicalIssueNo);
    query.setExtend1("N");
    List<SectionInfo> sectionInfos = sectionInfoManager.queryListForGroupAticle(query);
    mav.addObject("sList", sectionInfos);

    mav.addObject("periodicalIssueNo", periodicalIssueNo);
    mav.addObject("periodicalId", periodicalId);
    mav.addObject("articleId", articleId);
    mav.addObject("title", title);
    return mav;
  }
  /** toArticleGroupDetailPage 刊文章页列表面 */
  @RequestMapping(value = "/toArticleGroupDPage", method = RequestMethod.GET)
  public ModelAndView toArticleGroupDPage(
      @RequestParam("periodicalId") String periodicalId,
      @RequestParam("periodicalIssueNo") String periodicalIssueNo,
      HttpServletRequest request) {
    logger.info("组稿左右Page:[ " + periodicalId + "]&[" + periodicalIssueNo + "]");
    ModelAndView mav = new ModelAndView("editor_toArticleGroupPage");

    SectionInfoQuery query = new SectionInfoQuery();
    query.setPeriodicalId(periodicalId);
    query.setPeriodicalIssueNo(periodicalIssueNo);
    query.setExtend1("N");
    List<SectionInfo> sectionInfos = sectionInfoManager.queryListForGroupAticle(query);
    mav.addObject("sList", sectionInfos);

    mav.addObject("periodicalIssueNo", periodicalIssueNo);
    mav.addObject("periodicalId", periodicalId);
    return mav;
  }
  /** toArticleGroupDetailPage 送刊详情页 */
  @RequestMapping(value = "/toArticleGroupDetailPageSongKan", method = RequestMethod.GET)
  public ModelAndView toArticleGroupDetailPageSongKan(
      @RequestParam("periodicalId") String periodicalId,
      @RequestParam("periodicalIssueNo") String periodicalIssueNo,
      String qishu,
      String year,
      HttpServletRequest request) {
    logger.info("送刊左右Page:[ " + periodicalId + "]&[" + periodicalIssueNo + "]");
    ModelAndView mav = new ModelAndView("editor_articleGroupDetailPageSongKan");
    String orderNo = "";
    SectionInfoQuery query = new SectionInfoQuery();
    query.setPeriodicalId(periodicalId);
    query.setPeriodicalIssueNo(periodicalIssueNo);
    query.setExtend1("N");
    List<HashMap<String, Object>> showList = new ArrayList<HashMap<String, Object>>();
    List<SectionInfo> sectionInfos = sectionInfoManager.queryListForGroupAticle(query);
    for (SectionInfo sectionInfo : sectionInfos) {
      List<Map<String, Object>> list = sectionInfo.getList();
      for (Map<String, Object> map : list) {
        String article_id = (String) map.get("articleId"); // 文章显示的(第一次投的)
        String oriArticleId = (String) map.get("oriArticleId"); // 文章id
        String title = (String) map.get("article_cn_title"); // 文章标题

        AuthorInfoQuery authorInfoQuery = new AuthorInfoQuery();
        authorInfoQuery.setArticleId(oriArticleId);
        List<AuthorInfo> authorInfos = authorInfoManager.queryList(authorInfoQuery);

        for (AuthorInfo authorInfo : authorInfos) {
          HashMap<String, Object> m = new HashMap<String, Object>();
          m.put("article_id", article_id);
          m.put("oriArticleId", oriArticleId);
          m.put("title", title);
          m.put("authorName", authorInfo.getAuthorName());
          m.put("count", 1);
          showList.add(m);
        }

        SongKanDetail songKanDetail = songKanDetailManager.selectArticle(article_id);
        if (null != songKanDetail) {
          orderNo = songKanDetail.getOrderNo();
        }
        //                StringBuilder strb_aurhor = new StringBuilder();
        //                for(AuthorInfo authorInfo : authorInfos){
        //                    strb_aurhor.append(","+authorInfo.getAuthorName());
        //                }
        //                map.put("author",String.valueOf(strb_aurhor).replaceFirst(",",""));
        //                map.put("authroCount",authorInfos.size());
        //                if(null==songKanDetail){
        //                    map.put("nums",0);
        //                } else{
        //                    map.put("nums",songKanDetail.getZengSonNum());
        //                    orderNo =  songKanDetail.getOrderNo() ;
        //                }
      }
    }
    mav.addObject("showList", showList);

    mav.addObject("periodicalIssueNo", periodicalIssueNo);
    mav.addObject("periodicalId", periodicalId);
    mav.addObject("qishu", qishu);
    mav.addObject("year", year);
    mav.addObject("orderNo", orderNo);
    return mav;
  }