Commit 0538970b authored by Quxl's avatar Quxl

x

parent 1f4d870c
......@@ -560,39 +560,35 @@ public class FilmServiceImpl implements FilmService {
+ "fc_member_film f2 "
+ "where "
+ "(f.apply_state = 2) "
// + "(f.apply_state = 2 or f.apply_state = 3) "
+ "and (f.en_name = f2.en_name and f.cn_name = f2.cn_name) "
+ "and (((f.en_name = f2.en_name or (f.en_name is null and f2.en_name is null)) and (f.cn_name = f2.cn_name or (f.cn_name is null and f2.cn_name is null))) "
+ "and f2.id = ? "
+ "and f.id != ?";
List<Fc_member_film> list = jdbcTemplate.queryForBeans(sql0, Fc_member_film.class, filmId, filmId);
if(list.size() > 0) {
String sql = ""
+ "select "
+ "count(fp.id) "
+ "from "
+ "fc_member_film_playactor fp, "
+ "fc_member_film_playactor fp2 "
+ "where "
+ "fp.playactor_type = 'director' "
+ "and fp.playactor_type = fp2.playactor_type "
+ "and fp.playactor_name = fp2.playactor_name "
+ "and fp2.film_id = ? "
+ "and fp.film_id != ?";
Integer count = jdbcTemplate.queryForInt(sql, filmId, filmId);
if(count > 0 && count == jdbcTemplate.queryForInt("select count(fp.id) from fc_member_film_playactor fp where fp.playactor_type = 'director' and fp.film_id = ?", filmId)) {
Fc_member_film film = list.get(0);
Long passtime = film.getPass_time();
if(passtime == null) {
passtime = film.getLast_modify_time();
String sql = "select playactor_name from fc_member_film_playactor where playactor_type = 'director' and film_id = ?";
List<String> directorList = jdbcTemplate.queryForObjects(sql, String.class, filmId);
for(Fc_member_film film : list) {
List<String> directorListTmp = jdbcTemplate.queryForObjects(sql, String.class, film.getId());
if(directorList.size() == directorListTmp.size()) {
boolean boo = true;
for(String director : directorListTmp) {
if(!directorList.contains(director)) {
boo = false;
break;
}
}
String no = StringUtil.formatLength(film.getFilm_no(), "0000");
String str = "通过";
if(film.getApply_state().intValue() == 3) {
str = "否决";
if(boo) {
Long passtime = film.getPass_time();
if(passtime == null) {
passtime = film.getLast_modify_time();
}
String no = StringUtil.formatLength(film.getFilm_no(), "0000");
String str = "通过";
if(film.getApply_state().intValue() == 3) {
str = "否决";
}
int state = film.getApply_state().intValue();
throw new XRException("该片名已经在" + DateUtil.format(new Date(passtime*1000), "yyyy年MM月dd日HH") + "时被管理员" + str + (state == 2 ? ",通过的影片ID号为" + no : ""));
}
int state = film.getApply_state().intValue();
throw new XRException("该片名已经在" + DateUtil.format(new Date(passtime*1000), "yyyy年MM月dd日HH") + "时被管理员" + str + (state == 2 ? ",通过的影片ID号为" + no : ""));
}
}
}
......
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