Commit 366dc972 authored by Quxl's avatar Quxl

x

parent d673e20f
...@@ -42,9 +42,9 @@ public interface AdminUserService { ...@@ -42,9 +42,9 @@ public interface AdminUserService {
void deleteGroupById(Integer group_id); void deleteGroupById(Integer group_id);
List<Map<String, Object>> getReviewUserList(Integer review_id); List<Map<String, Object>> getReviewUserList(Integer review_id, Integer review_round);
List<Map<String, Object>> getReviewGroupList(Integer review_id); List<Map<String, Object>> getReviewGroupList(Integer review_id, Integer review_round);
} }
...@@ -137,15 +137,15 @@ public class AdminUserServiceImpl implements AdminUserService { ...@@ -137,15 +137,15 @@ public class AdminUserServiceImpl implements AdminUserService {
} }
@Override @Override
public List<Map<String, Object>> getReviewUserList(Integer review_id) { public List<Map<String, Object>> getReviewUserList(Integer review_id, Integer review_round) {
String sql = "select u.*, ug.group_name from fc_user u left join fc_user_group ug on ug.group_id = u.group_id, fc_user_group_round ugr, fc_user_group_enroll uge, fc_review r where u.group_id = ugr.group_id and u.group_id = uge.group_id and ugr.review_round = r.review_round and uge.enroll_type_id = r.enroll_type_id and r.id = ?"; String sql = "select u.*, ug.group_name from fc_user u left join fc_user_group ug on ug.group_id = u.group_id, fc_user_group_round ugr, fc_user_group_enroll uge, fc_review r where u.group_id = ugr.group_id and u.group_id = uge.group_id and ugr.review_round = ? and uge.enroll_type_id = r.enroll_type_id and r.id = ?";
return jdbcTemplate.queryForList(sql, review_id); return jdbcTemplate.queryForList(sql, review_round, review_id);
} }
@Override @Override
public List<Map<String, Object>> getReviewGroupList(Integer review_id) { public List<Map<String, Object>> getReviewGroupList(Integer review_id, Integer review_round) {
String sql = "select g.* from fc_user_group ug, fc_user_gorup_round ugr, fc_user_group_enroll uge, fc_review r where ug.group_id = ugr.group_id and ug.group_id = uge.group_id and ugr.review_round = r.review_round and uge.enroll_type_id = r.enroll_type_id and r.id = ?"; String sql = "select g.* from fc_user_group ug, fc_user_gorup_round ugr, fc_user_group_enroll uge, fc_review r where ug.group_id = ugr.group_id and ug.group_id = uge.group_id and ugr.review_round = ? and uge.enroll_type_id = r.enroll_type_id and r.id = ?";
return jdbcTemplate.queryForList(sql, review_id); return jdbcTemplate.queryForList(sql, review_round, review_id);
} }
} }
...@@ -94,13 +94,14 @@ public class AdminReviewController { ...@@ -94,13 +94,14 @@ public class AdminReviewController {
@ResponseBody @ResponseBody
@PostMapping("getReviewGroupUserList") @PostMapping("getReviewGroupUserList")
@ApiOperation("分配审片评委") @ApiOperation("可分配的审片评委查询")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="review_id", value="审片主表ID"), @ApiImplicitParam(paramType="query", dataType="int", required=true, name="review_id", value="审片主表ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="review_round", value="分配评委的审片环节"),
}) })
public Object getReviewGroupUserList(Integer review_id) { public Object getReviewGroupUserList(Integer review_id, Integer review_round) {
List<Map<String, Object>> groupList = adminUserService.getReviewGroupList(review_id); List<Map<String, Object>> groupList = adminUserService.getReviewGroupList(review_id, review_round);
List<Map<String, Object>> userList = adminUserService.getReviewUserList(review_id); List<Map<String, Object>> userList = adminUserService.getReviewUserList(review_id, review_round);
return Rjx.jsonOk().set("userList", userList).set("groupList", groupList); return Rjx.jsonOk().set("userList", userList).set("groupList", groupList);
} }
......
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