Commit 636f0358 authored by 张永's avatar 张永
parents 4cb47f31 399a638e
...@@ -92,6 +92,8 @@ public interface ReviewService { ...@@ -92,6 +92,8 @@ public interface ReviewService {
void tryNextRound(Integer review_id); void tryNextRound(Integer review_id);
void createAsiaNewReport(int review_id, int review_round);
void save(Object obj); void save(Object obj);
void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id); void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id);
......
...@@ -140,6 +140,7 @@ public class AdminReviewController { ...@@ -140,6 +140,7 @@ public class AdminReviewController {
@ApiImplicitParam(paramType="query", dataType="int", name="review_round", value="第2或3选(2,3)"), @ApiImplicitParam(paramType="query", dataType="int", name="review_round", value="第2或3选(2,3)"),
@ApiImplicitParam(paramType="query", dataType="long", name="index", value="分页编号"), @ApiImplicitParam(paramType="query", dataType="long", name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", name="limit", value="分页大小"), @ApiImplicitParam(paramType="query", dataType="long", name="limit", value="分页大小"),
@ApiImplicitParam(paramType="query", dataType="string", name="limitKey", value="分页排序", allowMultiple=true),
}) })
public Object getBestMvList( public Object getBestMvList(
String keyword, String keyword,
...@@ -147,10 +148,11 @@ public class AdminReviewController { ...@@ -147,10 +148,11 @@ public class AdminReviewController {
Integer review_round, Integer review_round,
String ext_type, String ext_type,
Long index, Long index,
Long limit) { Long limit,
String[] limitKey) {
index = index == null ? 1 : index; index = index == null ? 1 : index;
limit = limit == null ? 20 : limit; limit = limit == null ? 20 : limit;
Page page = new Page(index, limit); Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = reviewService.queryBestMvListByGroup(keyword, user_group_id, review_round, ext_type, page); List<Map<String, Object>> list = reviewService.queryBestMvListByGroup(keyword, user_group_id, review_round, ext_type, page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
...@@ -270,8 +272,9 @@ public class AdminReviewController { ...@@ -270,8 +272,9 @@ public class AdminReviewController {
int reviewRound = review.getReview_round(); int reviewRound = review.getReview_round();
int enrollType = review.getEnroll_type_id(); int enrollType = review.getEnroll_type_id();
int optState = review.getOpt_state(); int optState = review.getOpt_state();
int reviewState = review.getReview_state();
if(toRoundNumber > reviewRound) { if(toRoundNumber > reviewRound) {
if(optState == 2) { if(optState == 2 || (optState == 1 && reviewRound == 4 && toRoundNumber == 5)) {
if(enrollType == 2 && ((reviewRound <= 1 && reviewRound >= 3) || (reviewRound <= 2 && reviewRound >= 4))) { if(enrollType == 2 && ((reviewRound <= 1 && reviewRound >= 3) || (reviewRound <= 2 && reviewRound >= 4))) {
throw new XRException("亚新二选和三选评分步骤不能跳过"); throw new XRException("亚新二选和三选评分步骤不能跳过");
} }
...@@ -281,6 +284,12 @@ public class AdminReviewController { ...@@ -281,6 +284,12 @@ public class AdminReviewController {
if(enrollType == 4 && (toRoundNumber == 3 || toRoundNumber == 6)) { if(enrollType == 4 && (toRoundNumber == 3 || toRoundNumber == 6)) {
throw new XRException("展映影片没有三选和总局审片流程"); throw new XRException("展映影片没有三选和总局审片流程");
} }
boolean isJinJue23Round = enrollType == 1 && (reviewRound == 2 || reviewRound == 3);
boolean isAsia2Round = enrollType == 2 && reviewRound == 2;
if(reviewState == 5 && (isJinJue23Round || isAsia2Round)) {//金爵二选三选或亚新二选转参赛影片把关流程
reviewService.toType4(review.getId());
reviewService.toRound(review.getId(), 4);
}
reviewService.toRound(review_id, toRoundNumber); reviewService.toRound(review_id, toRoundNumber);
} else { } else {
throw new XRException("当前审片状态为" + rounds[reviewRound] + opts[optState] + ",不能分配" + rounds[toRoundNumber] + "评委"); throw new XRException("当前审片状态为" + rounds[reviewRound] + opts[optState] + ",不能分配" + rounds[toRoundNumber] + "评委");
......
...@@ -28,6 +28,7 @@ import com.egolm.film.bean.Fc_admin; ...@@ -28,6 +28,7 @@ import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_logs_ext; import com.egolm.film.bean.Fc_logs_ext;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_enroll; import com.egolm.film.bean.Fc_member_film_enroll;
import com.egolm.film.bean.Fc_review;
import com.egolm.film.config.XRException; import com.egolm.film.config.XRException;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -173,4 +174,23 @@ public class WebUtilController { ...@@ -173,4 +174,23 @@ public class WebUtilController {
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody
@Transactional
@PostMapping("initAsiaNewBest")
@ApiOperation("初始化亚新榜单")
public Object initAsiaNewBest() {
this.verifyAuth();
List<Fc_review> reviews = jdbcTemplate.queryForBeans("select * from fc_review where enroll_type_id = 2 and review_round >= 2", Fc_review.class);
jdbcTemplate.executeUpdate("delete from fc_report_asia_new");
for(Fc_review review : reviews) {
if(review.getReview_round().intValue() >= 2) {
service.createAsiaNewReport(review.getId(), 2);
}
if(review.getReview_round().intValue() >= 3) {
service.createAsiaNewReport(review.getId(), 3);
}
}
return Rjx.jsonOk();
}
} }
...@@ -51,6 +51,9 @@ public class Fc_report_asia_new implements java.io.Serializable { ...@@ -51,6 +51,9 @@ public class Fc_report_asia_new implements java.io.Serializable {
@Column(columnDefinition="double(4,2)") @Column(columnDefinition="double(4,2)")
private Double item_photographer; private Double item_photographer;
@Column(columnDefinition="double(4,2)")
private Double item_bestfilm;
@Column(columnDefinition="varchar(255)") @Column(columnDefinition="varchar(255)")
private String item_actor_data; private String item_actor_data;
...@@ -66,6 +69,9 @@ public class Fc_report_asia_new implements java.io.Serializable { ...@@ -66,6 +69,9 @@ public class Fc_report_asia_new implements java.io.Serializable {
@Column(columnDefinition="varchar(255)") @Column(columnDefinition="varchar(255)")
private String item_photographer_data; private String item_photographer_data;
@Column(columnDefinition="varchar(255)")
private String item_bestfilm_data;
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -171,6 +177,14 @@ public class Fc_report_asia_new implements java.io.Serializable { ...@@ -171,6 +177,14 @@ public class Fc_report_asia_new implements java.io.Serializable {
return item_photographer; return item_photographer;
} }
public void setItem_bestfilm(Double item_bestfilm) {
this.item_bestfilm = item_bestfilm;
}
public Double getItem_bestfilm() {
return item_bestfilm;
}
public void setItem_actor_data(String item_actor_data) { public void setItem_actor_data(String item_actor_data) {
this.item_actor_data = item_actor_data; this.item_actor_data = item_actor_data;
} }
...@@ -211,5 +225,13 @@ public class Fc_report_asia_new implements java.io.Serializable { ...@@ -211,5 +225,13 @@ public class Fc_report_asia_new implements java.io.Serializable {
return item_photographer_data; return item_photographer_data;
} }
public void setItem_bestfilm_data(String item_bestfilm_data) {
this.item_bestfilm_data = item_bestfilm_data;
}
public String getItem_bestfilm_data() {
return item_bestfilm_data;
}
} }
package com.egolm.film.util; package com.egolm.film.util;
import sun.misc.BASE64Encoder;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import com.egolm.common.HttpUtil;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.security.SignatureException; import java.security.SignatureException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.SimpleTimeZone;
import java.util.UUID;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import com.egolm.common.HttpUtil;
import sun.misc.BASE64Encoder;
/** /**
* 视频点播OpenAPI调用示例 * 视频点播OpenAPI调用示例
* 以GetVideoPlayAuth接口为例,其他接口请替换相应接口名称及私有参数 * 以GetVideoPlayAuth接口为例,其他接口请替换相应接口名称及私有参数
*/ */
@SuppressWarnings("restriction")
public class AliyunSign { public class AliyunSign {
//账号AK信息请填写(必选) //账号AK信息请填写(必选)
private static String access_key_id = "LTAIOtHCCpDLXYp8"; private static String access_key_id = "LTAIOtHCCpDLXYp8";
...@@ -222,7 +233,8 @@ public class AliyunSign { ...@@ -222,7 +233,8 @@ public class AliyunSign {
return df.format(date); return df.format(date);
} }
private static String httpGet(String url) throws IOException { @SuppressWarnings("unused")
private static String httpGet(String url) throws IOException {
/* /*
* Read and covert a inputStream to a String. * Read and covert a inputStream to a String.
* Referred this: * Referred this:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment