コード例 #1
0
  /**
   * @param periodicalIssueNo 期号
   * @param periodicalId 刊号
   * @param request
   * @return
   */
  @RequestMapping(value = "/toArticleToYingWenPage")
  public ModelAndView toArticleToYingWen(
      @RequestParam("periodicalIssueNo") String periodicalIssueNo,
      String periodicalId,
      HttpServletRequest request,
      String periodicalYear) {
    ModelAndView mav = new ModelAndView("editor_toYingWenPage");

    /** 查询期刊 */
    Periodical periodical = new Periodical();
    periodical.setPeriodicalId(periodicalId);
    periodical.setPeriodicalIssueNo(periodicalIssueNo);
    PeriodicalInfoQuery periodicalInfoQuery =
        periodicalManager.selectPeridicalByperiodicalId(periodical);

    /** 查询专家 */
    ExpertInfoQuery query = new ExpertInfoQuery();
    query.setExtend1(RoleIdEnums.EN_EXPERT.getCode());
    List<ExpertInfo> expertInfos = expertInfoManager.queryList(query);

    mav.addObject("periodicalInfoQuery", periodicalInfoQuery);
    mav.addObject("expertInfos", expertInfos);
    mav.addObject("periodicalYear", periodicalYear);
    return mav;
  }
コード例 #2
0
 /** toGroupPage 组稿 */
 @RequestMapping(value = "/toGroupPage")
 public ModelAndView toGroupPage(
     HttpServletRequest request,
     String periodicalId,
     String periodicalIssueNo,
     String periodicalYear) {
   logger.info("组稿Page:[ " + periodicalId + " ]");
   ModelAndView mav = new ModelAndView("editor_groupPage");
   PeriodicalInfoQuery periodicalInfoQuery = new PeriodicalInfoQuery();
   periodicalInfoQuery.setPeriodicalId(periodicalId);
   periodicalInfoQuery.setPeriodicalYear("");
   PeriodicalInfo periodicalInfo = periodicalInfoManager.selectByPeriodicalId(periodicalInfoQuery);
   PeriodicalQuery query = new PeriodicalQuery();
   query.setPeriodicalId(periodicalId);
   query.setPeriodicalIssueNo(periodicalIssueNo);
   query.setPeriodicalYear(periodicalYear);
   String periodicalYear1 = periodicalYear.substring(2, 4);
   List<Periodical> periodicals = periodicalManager.queryList(query);
   if (null == periodicals || periodicals.isEmpty()) {
     for (int i = 1; i <= periodicalInfo.getCycle(); i++) {
       Periodical periodical = new Periodical();
       periodical.setPeriodicalId(periodicalInfo.getPeriodicalId());
       //                periodical.setPeriodicalIssueNo(GenerateOrderNo.generateOrderNo()); //
       // 就用国内刊号
       if (i < 10) {
         periodical.setPeriodicalIssueNo(
             periodicalInfo.getPeriodicalId() + "-" + periodicalYear1 + "0" + i);
       } else {
         periodical.setPeriodicalIssueNo(
             periodicalInfo.getPeriodicalId() + "-" + periodicalYear1 + i);
       }
       //				periodical.setPeriodicalIssueNo(periodicalInfo.getCnNo());
       periodical.setPeriodicalState(PeriodicalStateEnums.NEW.getCode());
       periodical.setExtend2(PeriodicalStateEnums.NEW.getCode());
       periodical.setCycleNums(i);
       periodical.setPeriodicalYear(periodicalYear);
       //
       //	periodical.setPublishNums(periodicalInfo.getPublishNums()==null?10000:periodicalInfo.get);
       periodical.setCreateTime(new Date());
       periodicalManager.savePeriodical(periodical);
     }
     periodicals = periodicalManager.queryList(query);
   }
   mav.addObject("list", periodicals);
   mav.addObject("p", periodicalInfo);
   return mav;
 }