Browse Source

修改全局任务判断

master
zhangye 5 years ago
parent
commit
93976fb6c2
  1. 92
      mt/src/main/java/com/ccsens/mt/api/ScoreController.java
  2. 2
      mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java
  3. 11
      mt/src/main/java/com/ccsens/mt/bean/po/MtScore.java
  4. 60
      mt/src/main/java/com/ccsens/mt/bean/po/MtScoreExample.java
  5. 16
      mt/src/main/java/com/ccsens/mt/bean/vo/ScoreVo.java
  6. 9
      mt/src/main/java/com/ccsens/mt/service/IScoreService.java
  7. 371
      mt/src/main/java/com/ccsens/mt/service/ScoreService.java
  8. 4
      mt/src/main/resources/application.yml
  9. 31
      mt/src/main/resources/mapper_raw/MtScoreMapper.xml
  10. BIN
      mt/src/main/resources/template/gradeTemplate.xlsx
  11. BIN
      mt/src/main/resources/template/judgeTemplate.xlsx
  12. BIN
      mt/src/main/resources/template/rankingTemplate.xlsx
  13. 6
      tall/src/main/java/com/ccsens/tall/util/TaskUtil.java
  14. 4
      util/src/main/java/com/ccsens/util/WebConstant.java

92
mt/src/main/java/com/ccsens/mt/api/ScoreController.java

@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;
@Api(tags = "评分插件相关" , description = "")
@Api(tags = "评分插件相关", description = "")
@RestController
@RequestMapping("/plugins")
@Slf4j
@ -26,10 +26,10 @@ public class ScoreController {
@Autowired
private IScoreService scoreService;
@ApiOperation(value = "评委获取评分项",notes = "")
@ApiOperation(value = "评委获取评分项", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "roleId", value = "评委id", required = true, paramType = "path"),
@ApiImplicitParam(name = "taskId", value = "参赛项目id", required = true, paramType = "path"),
@ApiImplicitParam(name = "taskId", value = "任务id", required = true, paramType = "path"),
})
@RequestMapping(value = "/score", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ScoreVo.ScoreInfo>> getScoreLog(HttpServletRequest request,
@ -38,11 +38,11 @@ public class ScoreController {
//获取userId
Long userId = userService.getUserIdByToken(request);
List<ScoreVo.ScoreInfo> scoreInfoList = scoreService.getScoreLog(userId,taskId);
List<ScoreVo.ScoreInfo> scoreInfoList = scoreService.getScoreLog(userId, taskId);
return JsonResponse.newInstance().ok(scoreInfoList);
}
@ApiOperation(value = "提交评分",notes = "")
@ApiOperation(value = "提交评分", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/score", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@ -51,11 +51,11 @@ public class ScoreController {
//获取userId
Long userId = userService.getUserIdByToken(request);
scoreService.submitScore(userId,submitScore);
scoreService.submitScore(userId, submitScore);
return JsonResponse.newInstance().ok();
}
@ApiOperation(value = "提交单项评分",notes = "")
@ApiOperation(value = "提交单项评分", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/oneScore", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@ -64,42 +64,41 @@ public class ScoreController {
//获取userId
Long userId = userService.getUserIdByToken(request);
scoreService.submitOnlyOneScore(userId,submitOnlyOneScore);
scoreService.submitOnlyOneScore(userId, submitOnlyOneScore);
return JsonResponse.newInstance().ok();
}
@ApiOperation(value = "获取评分",notes = "")
@ApiOperation(value = "获取评分", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "roleId", value = "评委id", required = true, paramType = "path"),
@ApiImplicitParam(name = "playerId", value = "任务id", required = true, paramType = "path"),
@ApiImplicitParam(name = "taskId", value = "任务id", required = true, paramType = "path"),
})
@RequestMapping(value = "/scores", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<ScoreVo.AdminScore>> adminScore(HttpServletRequest request,
public JsonResponse<ScoreVo.AdminScore> adminScore(HttpServletRequest request,
@RequestParam(required = true) Long roleId,
@RequestParam(required = true) Long taskId) throws Exception {
//获取userId
Long userId = userService.getUserIdByToken(request);
List<ScoreVo.AdminScore> adminScoreList = scoreService.adminScore(userId,roleId,taskId);
ScoreVo.AdminScore adminScoreList = scoreService.adminScore(userId, roleId, taskId);
return JsonResponse.newInstance().ok(adminScoreList);
}
@ApiOperation(value = "退回单个评委的评分",notes = "")
@ApiOperation(value = "退回单个评委的评分", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "roleId", value = "评委id", required = true, paramType = "path"),
@ApiImplicitParam(name = "taskId", value = "taskId", required = true, paramType = "path"),
@ApiImplicitParam(name = "taskId", value = "任务Id", required = true, paramType = "path"),
})
@RequestMapping(value = "/back", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"})
public JsonResponse backScore(@RequestParam(required = true) Long roleId,
@RequestParam(required = true) Long taskId) throws Exception {
scoreService.backScore(roleId,taskId);
scoreService.backScore(roleId, taskId);
return JsonResponse.newInstance().ok();
}
@ApiOperation(value = "退回所有评委的评分",notes = "")
@ApiOperation(value = "退回所有评委的评分", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "taskId", value = "任务id", required = true, paramType = "path"),
})
@ -109,7 +108,7 @@ public class ScoreController {
return JsonResponse.newInstance().ok();
}
@ApiOperation(value = "查看排名及详细分数",notes = "")
@ApiOperation(value = "查看排名及详细分数", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectId", value = "", required = true, paramType = "path"),
})
@ -121,15 +120,15 @@ public class ScoreController {
}
@ApiOperation(value = "亮分环节",notes = "")
@ApiOperation(value = "亮分环节", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectId", value = "项目id", required = true, paramType = "path"),
@ApiImplicitParam(name = "playerId", value = "参赛公司id", required = true, paramType = "path")
@ApiImplicitParam(name = "taskId", value = "任务id", required = true, paramType = "path")
})
@RequestMapping(value = "/show", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse showScore(HttpServletRequest request,
@RequestParam(required = true)Long projectId,Long taskId) throws Exception {
scoreService.showScore(projectId,taskId);
@RequestParam(required = true) Long projectId, Long taskId) throws Exception {
scoreService.showScore(projectId, taskId);
return JsonResponse.newInstance().ok();
}
@ -137,9 +136,9 @@ public class ScoreController {
* 普通成员获取自己给任务的评分
*/
@RequestMapping(value = "/memberScore", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public BigDecimal getMemberScore(Long taskId,Long userId) throws Exception {
public BigDecimal getMemberScore(Long taskId, Long userId) throws Exception {
BigDecimal memberScore = scoreService.getMemberScore(taskId,userId);
BigDecimal memberScore = scoreService.getMemberScore(taskId, userId);
return memberScore;
}
@ -147,9 +146,50 @@ public class ScoreController {
* 项目经理获取任务的平均分
*/
@RequestMapping(value = "/adminScore", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public BigDecimal getAdminScore(Long projectId,Long taskId) throws Exception {
public BigDecimal getAdminScore(Long projectId, Long taskId) throws Exception {
BigDecimal adminScore = scoreService.getAdminScore(projectId,taskId);
BigDecimal adminScore = scoreService.getAdminScore(projectId, taskId);
return adminScore;
}
@ApiOperation(value = "导出签字表", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectId", value = "项目Id", required = true, paramType = "path"),
@ApiImplicitParam(name = "taskId", value = "任务id", required = true, paramType = "path")
})
@RequestMapping(value = "/export", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse exportExcel(HttpServletRequest request,
@RequestParam(required = true) Long projectId,
@RequestParam(required = true) Long taskId) throws Exception {
//获取userId
// Long userId = userService.getUserIdByToken(request);
String path = scoreService.exportExcel(projectId,taskId);
return JsonResponse.newInstance().ok(path);
}
@ApiOperation(value = "导出总评分表",notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectId", value = "项目Id", required = true, paramType = "path")
})
@RequestMapping(value = "/exportAll", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse exportAll(HttpServletRequest request,
@RequestParam(required = true) Long projectId) throws Exception {
String path = scoreService.rankingAllExcel(projectId);
return JsonResponse.newInstance().ok(path);
}
@ApiOperation(value = "导出总排名表",notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectId", value = "项目Id", required = true, paramType = "path")
})
@RequestMapping(value = "/rankExcel", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<String> ranking(HttpServletRequest request,
@RequestParam(required = true) Long projectId) throws Exception {
String path = scoreService.rankingExcel(projectId);
return JsonResponse.newInstance().ok(path);
}
}

2
mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java

@ -26,7 +26,7 @@ public class ScoreDto {
public static class SubmitScore{
@ApiModelProperty("评委id")
private Long roleId;
@ApiModelProperty("公司项目Id")
@ApiModelProperty("任务Id")
private Long taskId;
@ApiModelProperty("评分信息")
private List<ScoreInfo1> data;

11
mt/src/main/java/com/ccsens/mt/bean/po/MtScore.java

@ -11,6 +11,8 @@ public class MtScore implements Serializable {
private Long scoreLogId;
private Long projectId;
private Long taskId;
private String taskName;
@ -51,6 +53,14 @@ public class MtScore implements Serializable {
this.scoreLogId = scoreLogId;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Long getTaskId() {
return taskId;
}
@ -116,6 +126,7 @@ public class MtScore implements Serializable {
sb.append(", id=").append(id);
sb.append(", judgeUserId=").append(judgeUserId);
sb.append(", scoreLogId=").append(scoreLogId);
sb.append(", projectId=").append(projectId);
sb.append(", taskId=").append(taskId);
sb.append(", taskName=").append(taskName);
sb.append(", score=").append(score);

60
mt/src/main/java/com/ccsens/mt/bean/po/MtScoreExample.java

@ -286,6 +286,66 @@ public class MtScoreExample {
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(Long value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(Long value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andTaskIdIsNull() {
addCriterion("task_id is null");
return (Criteria) this;

16
mt/src/main/java/com/ccsens/mt/bean/vo/ScoreVo.java

@ -54,6 +54,16 @@ public class ScoreVo {
@Setter
@ApiModel
public static class AdminScore{
@ApiModelProperty("总分")
private BigDecimal totalScore;
@ApiModelProperty("每个评委的评分")
private List<_adminScoreList> judgeScore;
}
@Getter
@Setter
@ApiModel
public static class _adminScoreList{
@ApiModelProperty("评委id")
private Long judge;
@ApiModelProperty("是否是最高最低分 0普通 1最高 2最低")
@ -75,7 +85,7 @@ public class ScoreVo {
private String company;
@ApiModelProperty("分组")
private String group;
@ApiModelProperty("平均分得分")
@ApiModelProperty("平均分")
private BigDecimal aveScore;
@ApiModelProperty("每个评委的分数")
private List<JudgeScore> judgeScoreList;
@ -111,8 +121,8 @@ public class ScoreVo {
@Setter
@ApiModel
public static class player{
@ApiModelProperty("公司参赛项目Id")
private Long playerId;
@ApiModelProperty("任务id")
private Long taskId;
@ApiModelProperty("行业")
private String industry;
@ApiModelProperty("参赛项目名称")

9
mt/src/main/java/com/ccsens/mt/service/IScoreService.java

@ -3,6 +3,7 @@ package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.ScoreDto;
import com.ccsens.mt.bean.vo.ScoreVo;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
@ -11,7 +12,7 @@ public interface IScoreService {
void submitScore(Long userId, ScoreDto.SubmitScore submitScore);
List<ScoreVo.AdminScore> adminScore(Long userId, Long roleId, Long playerId);
ScoreVo.AdminScore adminScore(Long userId, Long roleId, Long playerId);
List<ScoreVo.RankingScore> getRanking(Long projectId);
@ -26,4 +27,10 @@ public interface IScoreService {
BigDecimal getMemberScore(Long taskId, Long userId);
BigDecimal getAdminScore(Long projectId,Long taskId);
String exportExcel(Long projectId, Long taskId) throws Exception;
String rankingExcel(Long projectId) throws Exception;
String rankingAllExcel(Long projectId)throws Exception;
}

371
mt/src/main/java/com/ccsens/mt/service/ScoreService.java

@ -2,8 +2,10 @@ package com.ccsens.mt.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.crypto.SecureUtil;
import com.ccsens.cloudutil.bean.tall.vo.MemberVo;
import com.ccsens.cloudutil.bean.tall.vo.TaskVo;
import com.ccsens.cloudutil.feign.TallFeignClient;
@ -16,23 +18,27 @@ import com.ccsens.mt.persist.dao.MtJudgeDao;
import com.ccsens.mt.persist.dao.MtScoreDao;
import com.ccsens.mt.persist.dao.MtScoreLogDao;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.ExcelUtil;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import com.ccsens.util.exception.BaseException;
import lombok.Data;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Service;
import java.io.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
import static java.math.BigDecimal.ROUND_HALF_UP;
@Service
public class ScoreService implements IScoreService{
public class ScoreService implements IScoreService {
@Autowired
private TallFeignClient tallFeignClient;
@Autowired
@ -48,6 +54,7 @@ public class ScoreService implements IScoreService{
/**
* 获取评分项
*
* @param userId
* @param playerId
* @return
@ -55,28 +62,28 @@ public class ScoreService implements IScoreService{
@Override
public List<ScoreVo.ScoreInfo> getScoreLog(Long userId, Long playerId) {
List<ScoreVo.ScoreInfo> scoreInfoList = new ArrayList<>();
if(ObjectUtil.isNull(userId)){
if (ObjectUtil.isNull(userId)) {
throw new BaseException(CodeEnum.NOT_LOGIN);
}
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(playerId);
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
JsonResponse<MemberVo.MemberInfo> jMemberInfo = tallFeignClient.getMemberByUserId(userId,taskInfo.getProjectId());
if(ObjectUtil.isNull(jMemberInfo)){
JsonResponse<MemberVo.MemberInfo> jMemberInfo = tallFeignClient.getMemberByUserId(userId, taskInfo.getProjectId());
if (ObjectUtil.isNull(jMemberInfo)) {
throw new BaseException(CodeEnum.NOT_MEMBER);
}
MemberVo.MemberInfo memberInfo = jMemberInfo.getData();
if(ObjectUtil.isNull(memberInfo)){
if (ObjectUtil.isNull(memberInfo)) {
throw new BaseException(CodeEnum.NOT_MEMBER);
}
MtScoreLogExample scoreLogExample = new MtScoreLogExample();
scoreLogExample.createCriteria().andProjectIdEqualTo(taskInfo.getProjectId());
List<MtScoreLog> scoreLogList = scoreLogDao.selectByExample(scoreLogExample);
if(CollectionUtil.isNotEmpty(scoreLogList)){
if (CollectionUtil.isNotEmpty(scoreLogList)) {
ScoreVo.ScoreInfo scoreInfo = null;
for(MtScoreLog mtScoreLog : scoreLogList){
for (MtScoreLog mtScoreLog : scoreLogList) {
scoreInfo = new ScoreVo.ScoreInfo();
scoreInfo.setId(mtScoreLog.getId());
scoreInfo.setMax(mtScoreLog.getMaxScore());
@ -101,24 +108,25 @@ public class ScoreService implements IScoreService{
/**
* 提交评分
*
* @param userId
* @param submitScore
*/
@Override
public void submitScore(Long userId, ScoreDto.SubmitScore submitScore) {
if(ObjectUtil.isNull(userId)){
if (ObjectUtil.isNull(userId)) {
throw new BaseException(CodeEnum.NOT_LOGIN);
}
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(submitScore.getTaskId());
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
JsonResponse<MemberVo.MemberInfo> jMemberInfo = tallFeignClient.getMemberByUserId(userId,taskInfo.getProjectId());
if(ObjectUtil.isNull(jMemberInfo)){
JsonResponse<MemberVo.MemberInfo> jMemberInfo = tallFeignClient.getMemberByUserId(userId, taskInfo.getProjectId());
if (ObjectUtil.isNull(jMemberInfo)) {
throw new BaseException(CodeEnum.NOT_MEMBER);
}
MemberVo.MemberInfo memberInfo = jMemberInfo.getData();
if(ObjectUtil.isNull(memberInfo)){
if (ObjectUtil.isNull(memberInfo)) {
throw new BaseException(CodeEnum.NOT_MEMBER);
}
//添加评委
@ -133,6 +141,7 @@ public class ScoreService implements IScoreService{
MtScore score = new MtScore();
score.setId(snowflake.nextId());
score.setJudgeUserId(memberInfo.getId());
score.setProjectId(taskInfo.getProjectId());
score.setTaskId(taskInfo.getId());
score.setTaskName(taskInfo.getName());
score.setScoreLogId(data.getId());
@ -146,35 +155,37 @@ public class ScoreService implements IScoreService{
throw new BaseException(CodeEnum.SCORE_REPEAT);
}
}
private void addJudge(MemberVo.MemberInfo memberInfo){
private void addJudge(MemberVo.MemberInfo memberInfo) {
MtJudge judge = judgeDao.selectByPrimaryKey(memberInfo.getId());
if(ObjectUtil.isNull(judge)){
if (ObjectUtil.isNull(judge)) {
judge = new MtJudge();
BeanUtil.copyProperties(memberInfo,judge);
BeanUtil.copyProperties(memberInfo, judge);
judgeDao.insertSelective(judge);
}
}
/**
* 提交单项评分
*
* @param userId
* @param submitOnlyOneScore
*/
@Override
public void submitOnlyOneScore(Long userId, ScoreDto.SubmitOnlyOneScore submitOnlyOneScore) {
if(ObjectUtil.isNull(userId)){
if (ObjectUtil.isNull(userId)) {
throw new BaseException(CodeEnum.NOT_LOGIN);
}
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(submitOnlyOneScore.getTaskId());
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
JsonResponse<MemberVo.MemberInfo> jMemberInfo = tallFeignClient.getMemberByUserId(userId,taskInfo.getProjectId());
if(ObjectUtil.isNull(jMemberInfo)){
JsonResponse<MemberVo.MemberInfo> jMemberInfo = tallFeignClient.getMemberByUserId(userId, taskInfo.getProjectId());
if (ObjectUtil.isNull(jMemberInfo)) {
throw new BaseException(CodeEnum.NOT_MEMBER);
}
MemberVo.MemberInfo memberInfo = jMemberInfo.getData();
if(ObjectUtil.isNull(memberInfo)){
if (ObjectUtil.isNull(memberInfo)) {
throw new BaseException(CodeEnum.NOT_MEMBER);
}
//添加评委
@ -187,6 +198,7 @@ public class ScoreService implements IScoreService{
MtScore score = new MtScore();
score.setId(snowflake.nextId());
score.setJudgeUserId(memberInfo.getId());
score.setProjectId(taskInfo.getProjectId());
score.setTaskId(taskInfo.getId());
score.setTaskName(taskInfo.getName());
score.setScore(submitOnlyOneScore.getScore());
@ -200,37 +212,46 @@ public class ScoreService implements IScoreService{
/**
* 查看评分
*
* @param userId
* @param roleId
* @param playerId
* @return
*/
@Override
public List<ScoreVo.AdminScore> adminScore(Long userId, Long roleId, Long playerId) {
List<ScoreVo.AdminScore> adminScoreList = new ArrayList<>();
ScoreVo.AdminScore adminScore = null;
//
public ScoreVo.AdminScore adminScore(Long userId, Long roleId, Long playerId) {
ScoreVo.AdminScore adminScore = new ScoreVo.AdminScore();
List<ScoreVo._adminScoreList> judgeScoreList = new ArrayList<>();
ScoreVo._adminScoreList judgeScore = new ScoreVo._adminScoreList();
// Score scoreMax = scoreDao.maxScore(playerId);//最高分
// Score scoreMin = scoreDao.minScore(playerId);//最低分
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(playerId);
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
//总分
BigDecimal totalScore = BigDecimal.valueOf(0);
//获取项目下的所有评委
MtJudgeExample judgeExample = new MtJudgeExample();
judgeExample.createCriteria().andProjectIdEqualTo(taskInfo.getProjectId());
List<MtJudge> judgeList = judgeDao.selectByExample(judgeExample);
if(CollectionUtil.isNotEmpty(judgeList)){
for(MtJudge mtJudge:judgeList){
BigDecimal score = scoreDao.sumScoreByJudgeId(mtJudge.getId(),taskInfo.getId());
adminScore = new ScoreVo.AdminScore();
if (CollectionUtil.isNotEmpty(judgeList)) {
for (MtJudge mtJudge : judgeList) {
BigDecimal score = scoreDao.sumScoreByJudgeId(mtJudge.getId(), taskInfo.getId());
judgeScore = new ScoreVo._adminScoreList();
adminScore.setJudge(mtJudge.getId());
adminScore.setScore(score);
adminScore.setJudgeName(mtJudge.getNickname());
adminScoreList.add(adminScore);
judgeScore.setJudge(mtJudge.getId());
judgeScore.setScore(score);
judgeScore.setJudgeName(mtJudge.getNickname());
judgeScoreList.add(judgeScore);
if (ObjectUtil.isNotNull(score)) {
totalScore = totalScore.add(score);
}
}
}
return adminScoreList;
adminScore.setTotalScore(totalScore);
adminScore.setJudgeScore(judgeScoreList);
return adminScore;
}
/**
@ -240,47 +261,57 @@ public class ScoreService implements IScoreService{
public List<ScoreVo.RankingScore> getRanking(Long projectId) {
//获取所有参赛任务
Set<Long> taskIdList = new HashSet<>();
MtScoreLogExample scoreLogExample = new MtScoreLogExample();
scoreLogExample.createCriteria().andProjectIdEqualTo(projectId);
List<MtScoreLog> scoreLogList = scoreLogDao.selectByExample(scoreLogExample);
if(CollectionUtil.isNotEmpty(scoreLogList)){
for(MtScoreLog scoreLog : scoreLogList){
if (CollectionUtil.isNotEmpty(scoreLogList)) {
for (MtScoreLog scoreLog : scoreLogList) {
MtScoreExample scoreExample = new MtScoreExample();
scoreExample.createCriteria().andScoreLogIdEqualTo(scoreLog.getId());
List<MtScore> scoreList = scoreDao.selectByExample(scoreExample);
if(CollectionUtil.isNotEmpty(scoreList)){
for(MtScore score : scoreList){
if (CollectionUtil.isNotEmpty(scoreList)) {
for (MtScore score : scoreList) {
taskIdList.add(score.getTaskId());
}
}
}
} else {
MtScoreExample mtScoreExample = new MtScoreExample();
mtScoreExample.createCriteria().andProjectIdEqualTo(projectId);
List<MtScore> scoreList = scoreDao.selectByExample(mtScoreExample);
if (CollectionUtil.isNotEmpty(scoreList)) {
for (MtScore score : scoreList) {
taskIdList.add(score.getTaskId());
}
}
}
//查找每个任务的分数
List<ScoreVo.RankingScore> rankingScoreList = new ArrayList<>();
ScoreVo.RankingScore rankingScore = null;
if(CollectionUtil.isNotEmpty(taskIdList)){
for(Long taskId : taskIdList){
if (CollectionUtil.isNotEmpty(taskIdList)) {
for (Long taskId : taskIdList) {
rankingScore = new ScoreVo.RankingScore();
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId);
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
rankingScore.setTaskId(taskInfo.getId());
rankingScore.setCompany(taskInfo.getName());
//获取每个评委对此任务的评分
List<ScoreVo.JudgeScore> judgeScoreList = findJudgeScore(projectId,taskInfo.getId());
List<ScoreVo.JudgeScore> judgeScoreList = findJudgeScore(projectId, taskInfo.getId());
// rankingScore.setJudgeScoreList(judgeScoreList);
//获取此任务的平均分
BigDecimal aveScore = BigDecimal.valueOf(0);
if(CollectionUtil.isNotEmpty(judgeScoreList)){
for(ScoreVo.JudgeScore judgeScore : judgeScoreList){
if (CollectionUtil.isNotEmpty(judgeScoreList)) {
for (ScoreVo.JudgeScore judgeScore : judgeScoreList) {
aveScore = aveScore.add(judgeScore.getScore());
}
aveScore = aveScore.divide(BigDecimal.valueOf(judgeScoreList.size()), 2, ROUND_HALF_UP);
}
rankingScore.setAveScore(aveScore);
rankingScore.setJudgeScoreList(judgeScoreList);
rankingScoreList.add(rankingScore);
}
}
@ -314,7 +345,7 @@ public class ScoreService implements IScoreService{
if (CollectionUtil.isNotEmpty(judgeList)) {
for (MtJudge judge : judgeList) {
BigDecimal scoreSum = scoreDao.sumScoreByJudgeId(judge.getId(), taskId);
if(ObjectUtil.isNotNull(scoreSum)) {
if (ObjectUtil.isNotNull(scoreSum)) {
judgeScore = new ScoreVo.JudgeScore();
judgeScore.setJudgeId(judge.getId());
judgeScore.setJudgeName(judge.getNickname());
@ -339,7 +370,7 @@ public class ScoreService implements IScoreService{
//项目
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId);
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
data.setProjectId(taskInfo.getProjectId());
@ -347,10 +378,10 @@ public class ScoreService implements IScoreService{
data.setPlayerId(taskInfo.getId());
data.setPlayerName(taskInfo.getName());
//获取每个评委对此任务的评分
List<ScoreVo.JudgeScore> judgeScoreList = findJudgeScore(projectId,taskInfo.getId());
List<ScoreVo.JudgeScore> judgeScoreList = findJudgeScore(projectId, taskInfo.getId());
BigDecimal aveScore = BigDecimal.valueOf(0);
if(CollectionUtil.isNotEmpty(judgeScoreList)){
for(ScoreVo.JudgeScore judgeScore : judgeScoreList){
if (CollectionUtil.isNotEmpty(judgeScoreList)) {
for (ScoreVo.JudgeScore judgeScore : judgeScoreList) {
MtJudge mtJudge = judgeDao.selectByPrimaryKey(judgeScore.getJudgeId());
judge = new SyncMessageWithShowDto.Data.Judge();
@ -359,7 +390,7 @@ public class ScoreService implements IScoreService{
judge.setScore(judgeScore.getScore());
judgeList.add(judge);
//获取此任务的总分
if(ObjectUtil.isNotNull(judgeScore.getScore())){
if (ObjectUtil.isNotNull(judgeScore.getScore())) {
aveScore = aveScore.add(judgeScore.getScore());
}
}
@ -390,14 +421,14 @@ public class ScoreService implements IScoreService{
@Override
public void backScore(Long roleId, Long taskId) {
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId);
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
MtScoreExample mtScoreExample = new MtScoreExample();
mtScoreExample.createCriteria().andJudgeUserIdEqualTo(roleId).andTaskIdEqualTo(taskInfo.getId());
List<MtScore> mtScoreList = scoreDao.selectByExample(mtScoreExample);
if(CollectionUtil.isNotEmpty(mtScoreList)){
for(MtScore score : mtScoreList){
if (CollectionUtil.isNotEmpty(mtScoreList)) {
for (MtScore score : mtScoreList) {
score.setRecStatus((byte) 2);
scoreDao.updateByPrimaryKeySelective(score);
}
@ -410,43 +441,247 @@ public class ScoreService implements IScoreService{
@Override
public void backScoreAll(Long taskId) {
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId);
if(ObjectUtil.isNull(taskInfo)){
if (ObjectUtil.isNull(taskInfo)) {
throw new BaseException(CodeEnum.NOT_TASK);
}
MtScoreExample mtScoreExample = new MtScoreExample();
mtScoreExample.createCriteria().andTaskIdEqualTo(taskInfo.getId());
List<MtScore> mtScoreList = scoreDao.selectByExample(mtScoreExample);
if(CollectionUtil.isNotEmpty(mtScoreList)){
for(MtScore score : mtScoreList){
if (CollectionUtil.isNotEmpty(mtScoreList)) {
for (MtScore score : mtScoreList) {
score.setRecStatus((byte) 2);
scoreDao.updateByPrimaryKeySelective(score);
}
}
}
/**
* 导出签字表
*
* @param projectId
* @param taskId
* @return
*/
@Override
public String exportExcel(Long projectId, Long taskId) throws Exception {
//返回excel地址
String excelPath = "";
//获取模板
ResourceLoader resourceLoader = new DefaultResourceLoader();
InputStream is = resourceLoader.getResource("classpath:template/judgeTemplate.xlsx").getInputStream();
XSSFWorkbook excel = new XSSFWorkbook(is);
//获取任务和项目信息
TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId);
//查找项目下所有评委
MtJudgeExample judgeExample = new MtJudgeExample();
judgeExample.createCriteria().andProjectIdEqualTo(projectId);
List<MtJudge> judgeList = judgeDao.selectByExample(judgeExample);
if (CollectionUtil.isNotEmpty(judgeList)) {
for (int i = 0; i < judgeList.size(); i++) {
MtJudge judge = judgeList.get(i);
writeExcel(taskInfo, judge, excel.getSheetAt(i));
}
}
//保存地址
String path = taskInfo.getName();
String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE;
String extraPath = DateUtil.format(new Date(), "yyyyMMdd");
String ePath = dir + File.separator + extraPath + File.separator + path + ".xlsx";
//导出
File tmpFile = new File(dir + File.separator + extraPath);
if (!tmpFile.exists()) {
tmpFile.mkdirs();
}
File file = new File(ePath);
//将文件写入创建的file当中
OutputStream stream = new FileOutputStream(file);
excel.write(stream);
//关闭流
stream.close();
String rePath = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + path + ".xlsx";
return rePath;
}
/**
* 写入excel
*
* @param taskInfo
* @param judge
* @throws Exception
*/
public void writeExcel(TaskVo.TaskInfoWithFeign taskInfo, MtJudge judge, XSSFSheet judgeSheet) throws Exception {
XSSFCell industry = judgeSheet.getRow(5).getCell(3);
//项目名
XSSFCell projectName = judgeSheet.getRow(5).getCell(5);
projectName.setCellValue(taskInfo.getProjectName());
//任务名
XSSFCell company = judgeSheet.getRow(5).getCell(9);
company.setCellValue(taskInfo.getName());
XSSFCell cell1 = judgeSheet.getRow(8).getCell(10);
XSSFCell cell2 = judgeSheet.getRow(9).getCell(10);
//评委名
XSSFCell judgeName = judgeSheet.getRow(10).getCell(6);
judgeName.setCellValue(judge.getNickname());
MtScoreExample mtScoreExample = new MtScoreExample();
mtScoreExample.createCriteria().andJudgeUserIdEqualTo(judge.getId()).andTaskIdEqualTo(taskInfo.getId());
List<MtScore> scoreList = scoreDao.selectByExample(mtScoreExample);
if (CollectionUtil.isNotEmpty(scoreList)) {
for (int i = 0; i < scoreList.size(); i++) {
cell1.setCellValue(scoreList.get(0).getScore().toString());
}
BigDecimal score = new BigDecimal(0);
for (MtScore score1 : scoreList) {
score = score.add(score1.getScore());
}
cell2.setCellValue(score.toString());
}
}
/**
* 导出排名表
* @param projectId
* @return
* @throws Exception
*/
@Override
public String rankingExcel(Long projectId) throws Exception {
String path = "";
//获取模板
ResourceLoader resourceLoader = new DefaultResourceLoader();
InputStream is = resourceLoader.getResource("classpath:template/rankingTemplate.xlsx").getInputStream();
XSSFWorkbook excel = new XSSFWorkbook(is);
XSSFSheet sheet = excel.getSheetAt(0);
List<ScoreVo.RankingScore> rankingScoreList = getRanking(projectId);
if(CollectionUtil.isNotEmpty(rankingScoreList)){
for(int i=0; i<rankingScoreList.size(); i++){
ScoreVo.RankingScore rankingScore = rankingScoreList.get(i);
XSSFCell no = sheet.getRow(i+1).getCell(0);
XSSFCell taskName = sheet.getRow(i+1).getCell(1);
XSSFCell aveScore = sheet.getRow(i+1).getCell(2);
no.setCellValue(i+1);
taskName.setCellValue(rankingScore.getCompany());
aveScore.setCellValue(rankingScore.getAveScore().toString());
}
}
//保存地址
String filePath = SecureUtil.simpleUUID();
String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE;
String extraPath = DateUtil.format(new Date(), "yyyyMMdd");
String ePath = dir + File.separator + extraPath + File.separator + filePath + ".xlsx";
//导出
File tmpFile = new File(dir + File.separator + extraPath);
if (!tmpFile.exists()) {
tmpFile.mkdirs();
}
File file = new File(ePath);
//将文件写入创建的file当中
OutputStream stream = new FileOutputStream(file);
excel.write(stream);
//关闭流
stream.close();
path = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + filePath + ".xlsx";
return path;
}
/**
* 获取总评分表
* @param projectId
* @return
*/
@Override
public String rankingAllExcel(Long projectId) throws Exception{
//获取模板
ResourceLoader resourceLoader = new DefaultResourceLoader();
InputStream is = resourceLoader.getResource("classpath:template/gradeTemplate.xlsx").getInputStream();
XSSFWorkbook excel = new XSSFWorkbook(is);
XSSFSheet sheet = excel.getSheetAt(0);
//获取排名信息
List<ScoreVo.RankingScore> rankingScoreList = getRanking(projectId);
//获取所有评委信息
//获取项目下的所有评委
int a = 2;
MtJudgeExample judgeExample = new MtJudgeExample();
judgeExample.createCriteria().andProjectIdEqualTo(projectId);
List<MtJudge> judgeList = judgeDao.selectByExample(judgeExample);
if(CollectionUtil.isNotEmpty(judgeList)){
for(MtJudge judge:judgeList){
XSSFCell judgeName = sheet.getRow(0).getCell(a);
judgeName.setCellValue(judge.getNickname());
a++;
}
XSSFCell aveScore = sheet.getRow(0).getCell(a);
aveScore.setCellValue("平均分");
}
if(CollectionUtil.isNotEmpty(rankingScoreList)){
int index = 1;
for(ScoreVo.RankingScore rankingScore : rankingScoreList){
XSSFCell taskName = sheet.getRow(index).getCell(1);
taskName.setCellValue(rankingScore.getCompany());
if(CollectionUtil.isNotEmpty(rankingScore.getJudgeScoreList())){
for(int i = 2; i < a; i++){
String judgeName = ExcelUtil.getCellValue(sheet.getRow(0).getCell(i));
for(ScoreVo.JudgeScore judgeScore : rankingScore.getJudgeScoreList()){
if(judgeName.equalsIgnoreCase(judgeScore.getJudgeName())){
XSSFCell score = sheet.getRow(index).getCell(i);
score.setCellValue(judgeScore.getScore().toString());
}
}
}
}
XSSFCell aveScore = sheet.getRow(index).getCell(a);
aveScore.setCellValue(rankingScore.getAveScore().toString());
index++;
}
}
//保存地址
String filePath = SecureUtil.simpleUUID();
String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE;
String extraPath = DateUtil.format(new Date(), "yyyyMMdd");
String ePath = dir + File.separator + extraPath + File.separator + filePath + ".xlsx";
//导出
File tmpFile = new File(dir + File.separator + extraPath);
if (!tmpFile.exists()) {
tmpFile.mkdirs();
}
File file = new File(ePath);
//将文件写入创建的file当中
OutputStream stream = new FileOutputStream(file);
excel.write(stream);
//关闭流
stream.close();
String path = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + filePath + ".xlsx";
return path;
}
/*=====================================================*/
@Override
public BigDecimal getMemberScore(Long taskId, Long userId) {
BigDecimal score = null;
BigDecimal scoreSum = scoreDao.sumScoreByJudgeId(userId, taskId);
if(ObjectUtil.isNotNull(scoreSum)){
if (ObjectUtil.isNotNull(scoreSum)) {
score = scoreSum;
}
return score;
}
@Override
public BigDecimal getAdminScore(Long projectId,Long taskId) {
public BigDecimal getAdminScore(Long projectId, Long taskId) {
BigDecimal aveScore = null;
//获取每个评委对此任务的评分
List<ScoreVo.JudgeScore> judgeScoreList = findJudgeScore(projectId,taskId);
if(CollectionUtil.isNotEmpty(judgeScoreList)){
List<ScoreVo.JudgeScore> judgeScoreList = findJudgeScore(projectId, taskId);
if (CollectionUtil.isNotEmpty(judgeScoreList)) {
aveScore = BigDecimal.valueOf(0);
for(ScoreVo.JudgeScore judgeScore : judgeScoreList){
for (ScoreVo.JudgeScore judgeScore : judgeScoreList) {
//获取此任务的总分
if(ObjectUtil.isNotNull(judgeScore.getScore())){
if (ObjectUtil.isNotNull(judgeScore.getScore())) {
aveScore = aveScore.add(judgeScore.getScore());
}
}

4
mt/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: test
include: common, util-test
active: dev
include: common, util-dev

31
mt/src/main/resources/mapper_raw/MtScoreMapper.xml

@ -5,6 +5,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="judge_user_id" jdbcType="BIGINT" property="judgeUserId" />
<result column="score_log_id" jdbcType="BIGINT" property="scoreLogId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="task_id" jdbcType="BIGINT" property="taskId" />
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
<result column="score" jdbcType="DECIMAL" property="score" />
@ -72,8 +73,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, judge_user_id, score_log_id, task_id, task_name, score, is_score, created_at,
updated_at, rec_status
id, judge_user_id, score_log_id, project_id, task_id, task_name, score, is_score,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.MtScoreExample" resultMap="BaseResultMap">
select
@ -107,13 +108,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.MtScore">
insert into t_mt_score (id, judge_user_id, score_log_id,
task_id, task_name, score,
is_score, created_at, updated_at,
rec_status)
project_id, task_id, task_name,
score, is_score, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{judgeUserId,jdbcType=BIGINT}, #{scoreLogId,jdbcType=BIGINT},
#{taskId,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL},
#{isScore,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
#{projectId,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR},
#{score,jdbcType=DECIMAL}, #{isScore,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.MtScore">
insert into t_mt_score
@ -127,6 +128,9 @@
<if test="scoreLogId != null">
score_log_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="taskId != null">
task_id,
</if>
@ -159,6 +163,9 @@
<if test="scoreLogId != null">
#{scoreLogId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="taskId != null">
#{taskId,jdbcType=BIGINT},
</if>
@ -200,6 +207,9 @@
<if test="record.scoreLogId != null">
score_log_id = #{record.scoreLogId,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.taskId != null">
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
@ -231,6 +241,7 @@
set id = #{record.id,jdbcType=BIGINT},
judge_user_id = #{record.judgeUserId,jdbcType=BIGINT},
score_log_id = #{record.scoreLogId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
task_name = #{record.taskName,jdbcType=VARCHAR},
score = #{record.score,jdbcType=DECIMAL},
@ -251,6 +262,9 @@
<if test="scoreLogId != null">
score_log_id = #{scoreLogId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="taskId != null">
task_id = #{taskId,jdbcType=BIGINT},
</if>
@ -279,6 +293,7 @@
update t_mt_score
set judge_user_id = #{judgeUserId,jdbcType=BIGINT},
score_log_id = #{scoreLogId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
task_name = #{taskName,jdbcType=VARCHAR},
score = #{score,jdbcType=DECIMAL},

BIN
mt/src/main/resources/template/gradeTemplate.xlsx

Binary file not shown.

BIN
mt/src/main/resources/template/judgeTemplate.xlsx

Binary file not shown.

BIN
mt/src/main/resources/template/rankingTemplate.xlsx

Binary file not shown.

6
tall/src/main/java/com/ccsens/tall/util/TaskUtil.java

@ -42,6 +42,12 @@ public class TaskUtil {
long beginMin = 0;
long endMax = 0;
List<TaskVo.NormalTask> temp = new ArrayList<>();
//若时间段内只有一个任务,则此任务不论时间跨度是多少都显示咋时间轴上(普通任务)
if(taskDetails.size() == 1){
temp.add(taskDetails.get(0));
task.setCommonTask(temp);
return task;
}
//判断时间不明确的为全局任务(时间为空或跨天)
for (TaskVo.NormalTask detail : taskDetails) {
if((process==1 && detail.getProcess()!=2) || (process==2 && detail.getProcess()==2)){

4
util/src/main/java/com/ccsens/util/WebConstant.java

@ -69,6 +69,8 @@ public class WebConstant {
public static final String PREFIX_WEBSOCKET_GROUPID = "groupId=";
public static final String UPLOAD_PATH_BASE = "/home/cloud/tall/uploads";
public static final String UPLOAD_PATH_BASE_MT_JUDGE = "mt";
public static final String UPLOAD_PATH_DELIVER = UPLOAD_PATH_BASE + File.separator + "delivers";
public static final String UPLOAD_PATH_DELIVER1 ="delivers";
public static final String UPLOAD_PROJECT_WBS = UPLOAD_PATH_BASE + File.separator + "project";
@ -79,6 +81,8 @@ public class WebConstant {
public static final String TEST_URL_GAME_BH = TEST_URL + "game-bh/";
public static final String TEST_URL_BASE = TEST_URL + "gateway/tall/v1.0/uploads/";
public static final String TEST_URL_BASE_MT = TEST_URL + "gateway/mt/uploads/";
public static final Integer Expired_Verify_Code_In_Seconds = 120;
public static final Integer Exist_Verify_Code_In_Seconds = 60;

Loading…
Cancel
Save