Browse Source

修改比赛日程配置1.0

tiaosheng
zy_Java 5 years ago
parent
commit
1354b2f766
  1. 11
      mt/src/main/java/com/ccsens/mt/api/CompeteTaskController.java
  2. 49
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCountScore.java
  3. 201
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCountScoreExample.java
  4. 39
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteCountScoreKey.java
  5. 7
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteVarietyScore.java
  6. 21
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteVarietyScoreExample.java
  7. 6
      mt/src/main/java/com/ccsens/mt/bean/vo/TableVo.java
  8. 8
      mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java
  9. 5
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCountScoreMapper.java
  10. 106
      mt/src/main/java/com/ccsens/mt/service/CompeteTaskService.java
  11. 8
      mt/src/main/java/com/ccsens/mt/service/ICompeteTaskService.java
  12. 33
      mt/src/main/java/com/ccsens/mt/service/ProvinceService.java
  13. 10
      mt/src/main/resources/mapper_dao/CompetePlayerDao.xml
  14. 100
      mt/src/main/resources/mapper_raw/CompeteCountScoreMapper.xml
  15. 14
      mt/src/main/resources/mapper_raw/CompeteVarietyScoreMapper.xml

11
mt/src/main/java/com/ccsens/mt/api/CompeteTaskController.java

@ -1,6 +1,7 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.dto.ProvinceCompeteDto;
import com.ccsens.mt.bean.vo.TableVo;
import com.ccsens.mt.service.ICompeteTaskService;
@ -30,6 +31,16 @@ public class CompeteTaskController {
@Resource
private ICompeteTaskService competeTaskService;
@MustLogin
@ApiOperation(value = "查找日期配置", notes = "zy:查找项目对应的配置信息")
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<TableVo.DailyScheduleProcess> queryCompeteConfig(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) {
log.info("日程安排更新:{}",params);
List<TableVo.CompeteProjectConfig> dailyScheduleProcessList = competeTaskService.queryCompeteConfig(params.getParam());
log.info("日程安排更新:{}",dailyScheduleProcessList);
return JsonResponse.newInstance().ok(dailyScheduleProcessList);
}
@MustLogin
@ApiOperation(value = "日程安排更新", notes = "zy:1、循环查找项目对应的配置信息。2、有则修改,没有则添加配置信息。" +
"3、根据配置的时间和场地生成出场顺序表。4存入出场顺序表。5、调用tall接口添加任务")

49
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCountScore.java

@ -1,30 +1,27 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class CompeteCountScore implements Serializable {
private Long id;
public class CompeteCountScore extends CompeteCountScoreKey implements Serializable {
private Long competeTimeId;
private Long projectId;
private Long siteOrderId;
private Long chiefJudgmentScore;
private Integer judgmentAScore;
private BigDecimal chiefJudgmentScore;
private Integer judgmentBScore2;
private BigDecimal judgmentAScore;
private Integer shouldTimes;
private BigDecimal judgmentBScore2;
private Integer deductTimes;
private String deductCause;
private Integer finalScore;
private BigDecimal finalScore;
private Date createdAt;
@ -34,14 +31,6 @@ public class CompeteCountScore implements Serializable {
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
@ -66,38 +55,30 @@ public class CompeteCountScore implements Serializable {
this.siteOrderId = siteOrderId;
}
public Long getChiefJudgmentScore() {
public BigDecimal getChiefJudgmentScore() {
return chiefJudgmentScore;
}
public void setChiefJudgmentScore(Long chiefJudgmentScore) {
public void setChiefJudgmentScore(BigDecimal chiefJudgmentScore) {
this.chiefJudgmentScore = chiefJudgmentScore;
}
public Integer getJudgmentAScore() {
public BigDecimal getJudgmentAScore() {
return judgmentAScore;
}
public void setJudgmentAScore(Integer judgmentAScore) {
public void setJudgmentAScore(BigDecimal judgmentAScore) {
this.judgmentAScore = judgmentAScore;
}
public Integer getJudgmentBScore2() {
public BigDecimal getJudgmentBScore2() {
return judgmentBScore2;
}
public void setJudgmentBScore2(Integer judgmentBScore2) {
public void setJudgmentBScore2(BigDecimal judgmentBScore2) {
this.judgmentBScore2 = judgmentBScore2;
}
public Integer getShouldTimes() {
return shouldTimes;
}
public void setShouldTimes(Integer shouldTimes) {
this.shouldTimes = shouldTimes;
}
public Integer getDeductTimes() {
return deductTimes;
}
@ -114,11 +95,11 @@ public class CompeteCountScore implements Serializable {
this.deductCause = deductCause == null ? null : deductCause.trim();
}
public Integer getFinalScore() {
public BigDecimal getFinalScore() {
return finalScore;
}
public void setFinalScore(Integer finalScore) {
public void setFinalScore(BigDecimal finalScore) {
this.finalScore = finalScore;
}
@ -152,14 +133,12 @@ public class CompeteCountScore implements Serializable {
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", projectId=").append(projectId);
sb.append(", siteOrderId=").append(siteOrderId);
sb.append(", chiefJudgmentScore=").append(chiefJudgmentScore);
sb.append(", judgmentAScore=").append(judgmentAScore);
sb.append(", judgmentBScore2=").append(judgmentBScore2);
sb.append(", shouldTimes=").append(shouldTimes);
sb.append(", deductTimes=").append(deductTimes);
sb.append(", deductCause=").append(deductCause);
sb.append(", finalScore=").append(finalScore);

201
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCountScoreExample.java

@ -1,5 +1,6 @@
package com.ccsens.mt.bean.po;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -165,6 +166,66 @@ public class CompeteCountScoreExample {
return (Criteria) this;
}
public Criteria andShouldTimesIsNull() {
addCriterion("should_times is null");
return (Criteria) this;
}
public Criteria andShouldTimesIsNotNull() {
addCriterion("should_times is not null");
return (Criteria) this;
}
public Criteria andShouldTimesEqualTo(Integer value) {
addCriterion("should_times =", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesNotEqualTo(Integer value) {
addCriterion("should_times <>", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesGreaterThan(Integer value) {
addCriterion("should_times >", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesGreaterThanOrEqualTo(Integer value) {
addCriterion("should_times >=", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesLessThan(Integer value) {
addCriterion("should_times <", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesLessThanOrEqualTo(Integer value) {
addCriterion("should_times <=", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesIn(List<Integer> values) {
addCriterion("should_times in", values, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesNotIn(List<Integer> values) {
addCriterion("should_times not in", values, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesBetween(Integer value1, Integer value2) {
addCriterion("should_times between", value1, value2, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesNotBetween(Integer value1, Integer value2) {
addCriterion("should_times not between", value1, value2, "shouldTimes");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
@ -355,52 +416,52 @@ public class CompeteCountScoreExample {
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreEqualTo(Long value) {
public Criteria andChiefJudgmentScoreEqualTo(BigDecimal value) {
addCriterion("chief_judgment_score =", value, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreNotEqualTo(Long value) {
public Criteria andChiefJudgmentScoreNotEqualTo(BigDecimal value) {
addCriterion("chief_judgment_score <>", value, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreGreaterThan(Long value) {
public Criteria andChiefJudgmentScoreGreaterThan(BigDecimal value) {
addCriterion("chief_judgment_score >", value, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreGreaterThanOrEqualTo(Long value) {
public Criteria andChiefJudgmentScoreGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("chief_judgment_score >=", value, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreLessThan(Long value) {
public Criteria andChiefJudgmentScoreLessThan(BigDecimal value) {
addCriterion("chief_judgment_score <", value, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreLessThanOrEqualTo(Long value) {
public Criteria andChiefJudgmentScoreLessThanOrEqualTo(BigDecimal value) {
addCriterion("chief_judgment_score <=", value, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreIn(List<Long> values) {
public Criteria andChiefJudgmentScoreIn(List<BigDecimal> values) {
addCriterion("chief_judgment_score in", values, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreNotIn(List<Long> values) {
public Criteria andChiefJudgmentScoreNotIn(List<BigDecimal> values) {
addCriterion("chief_judgment_score not in", values, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreBetween(Long value1, Long value2) {
public Criteria andChiefJudgmentScoreBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("chief_judgment_score between", value1, value2, "chiefJudgmentScore");
return (Criteria) this;
}
public Criteria andChiefJudgmentScoreNotBetween(Long value1, Long value2) {
public Criteria andChiefJudgmentScoreNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("chief_judgment_score not between", value1, value2, "chiefJudgmentScore");
return (Criteria) this;
}
@ -415,52 +476,52 @@ public class CompeteCountScoreExample {
return (Criteria) this;
}
public Criteria andJudgmentAScoreEqualTo(Integer value) {
public Criteria andJudgmentAScoreEqualTo(BigDecimal value) {
addCriterion("judgment_a_score =", value, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreNotEqualTo(Integer value) {
public Criteria andJudgmentAScoreNotEqualTo(BigDecimal value) {
addCriterion("judgment_a_score <>", value, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreGreaterThan(Integer value) {
public Criteria andJudgmentAScoreGreaterThan(BigDecimal value) {
addCriterion("judgment_a_score >", value, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreGreaterThanOrEqualTo(Integer value) {
public Criteria andJudgmentAScoreGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("judgment_a_score >=", value, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreLessThan(Integer value) {
public Criteria andJudgmentAScoreLessThan(BigDecimal value) {
addCriterion("judgment_a_score <", value, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreLessThanOrEqualTo(Integer value) {
public Criteria andJudgmentAScoreLessThanOrEqualTo(BigDecimal value) {
addCriterion("judgment_a_score <=", value, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreIn(List<Integer> values) {
public Criteria andJudgmentAScoreIn(List<BigDecimal> values) {
addCriterion("judgment_a_score in", values, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreNotIn(List<Integer> values) {
public Criteria andJudgmentAScoreNotIn(List<BigDecimal> values) {
addCriterion("judgment_a_score not in", values, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreBetween(Integer value1, Integer value2) {
public Criteria andJudgmentAScoreBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("judgment_a_score between", value1, value2, "judgmentAScore");
return (Criteria) this;
}
public Criteria andJudgmentAScoreNotBetween(Integer value1, Integer value2) {
public Criteria andJudgmentAScoreNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("judgment_a_score not between", value1, value2, "judgmentAScore");
return (Criteria) this;
}
@ -475,116 +536,56 @@ public class CompeteCountScoreExample {
return (Criteria) this;
}
public Criteria andJudgmentBScore2EqualTo(Integer value) {
public Criteria andJudgmentBScore2EqualTo(BigDecimal value) {
addCriterion("judgment_b_score2 =", value, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2NotEqualTo(Integer value) {
public Criteria andJudgmentBScore2NotEqualTo(BigDecimal value) {
addCriterion("judgment_b_score2 <>", value, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2GreaterThan(Integer value) {
public Criteria andJudgmentBScore2GreaterThan(BigDecimal value) {
addCriterion("judgment_b_score2 >", value, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2GreaterThanOrEqualTo(Integer value) {
public Criteria andJudgmentBScore2GreaterThanOrEqualTo(BigDecimal value) {
addCriterion("judgment_b_score2 >=", value, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2LessThan(Integer value) {
public Criteria andJudgmentBScore2LessThan(BigDecimal value) {
addCriterion("judgment_b_score2 <", value, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2LessThanOrEqualTo(Integer value) {
public Criteria andJudgmentBScore2LessThanOrEqualTo(BigDecimal value) {
addCriterion("judgment_b_score2 <=", value, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2In(List<Integer> values) {
public Criteria andJudgmentBScore2In(List<BigDecimal> values) {
addCriterion("judgment_b_score2 in", values, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2NotIn(List<Integer> values) {
public Criteria andJudgmentBScore2NotIn(List<BigDecimal> values) {
addCriterion("judgment_b_score2 not in", values, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2Between(Integer value1, Integer value2) {
public Criteria andJudgmentBScore2Between(BigDecimal value1, BigDecimal value2) {
addCriterion("judgment_b_score2 between", value1, value2, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andJudgmentBScore2NotBetween(Integer value1, Integer value2) {
public Criteria andJudgmentBScore2NotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("judgment_b_score2 not between", value1, value2, "judgmentBScore2");
return (Criteria) this;
}
public Criteria andShouldTimesIsNull() {
addCriterion("should_times is null");
return (Criteria) this;
}
public Criteria andShouldTimesIsNotNull() {
addCriterion("should_times is not null");
return (Criteria) this;
}
public Criteria andShouldTimesEqualTo(Integer value) {
addCriterion("should_times =", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesNotEqualTo(Integer value) {
addCriterion("should_times <>", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesGreaterThan(Integer value) {
addCriterion("should_times >", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesGreaterThanOrEqualTo(Integer value) {
addCriterion("should_times >=", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesLessThan(Integer value) {
addCriterion("should_times <", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesLessThanOrEqualTo(Integer value) {
addCriterion("should_times <=", value, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesIn(List<Integer> values) {
addCriterion("should_times in", values, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesNotIn(List<Integer> values) {
addCriterion("should_times not in", values, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesBetween(Integer value1, Integer value2) {
addCriterion("should_times between", value1, value2, "shouldTimes");
return (Criteria) this;
}
public Criteria andShouldTimesNotBetween(Integer value1, Integer value2) {
addCriterion("should_times not between", value1, value2, "shouldTimes");
return (Criteria) this;
}
public Criteria andDeductTimesIsNull() {
addCriterion("deduct_times is null");
return (Criteria) this;
@ -725,52 +726,52 @@ public class CompeteCountScoreExample {
return (Criteria) this;
}
public Criteria andFinalScoreEqualTo(Integer value) {
public Criteria andFinalScoreEqualTo(BigDecimal value) {
addCriterion("final_score =", value, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreNotEqualTo(Integer value) {
public Criteria andFinalScoreNotEqualTo(BigDecimal value) {
addCriterion("final_score <>", value, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreGreaterThan(Integer value) {
public Criteria andFinalScoreGreaterThan(BigDecimal value) {
addCriterion("final_score >", value, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreGreaterThanOrEqualTo(Integer value) {
public Criteria andFinalScoreGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("final_score >=", value, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreLessThan(Integer value) {
public Criteria andFinalScoreLessThan(BigDecimal value) {
addCriterion("final_score <", value, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreLessThanOrEqualTo(Integer value) {
public Criteria andFinalScoreLessThanOrEqualTo(BigDecimal value) {
addCriterion("final_score <=", value, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreIn(List<Integer> values) {
public Criteria andFinalScoreIn(List<BigDecimal> values) {
addCriterion("final_score in", values, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreNotIn(List<Integer> values) {
public Criteria andFinalScoreNotIn(List<BigDecimal> values) {
addCriterion("final_score not in", values, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreBetween(Integer value1, Integer value2) {
public Criteria andFinalScoreBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("final_score between", value1, value2, "finalScore");
return (Criteria) this;
}
public Criteria andFinalScoreNotBetween(Integer value1, Integer value2) {
public Criteria andFinalScoreNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("final_score not between", value1, value2, "finalScore");
return (Criteria) this;
}

39
mt/src/main/java/com/ccsens/mt/bean/po/CompeteCountScoreKey.java

@ -0,0 +1,39 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
public class CompeteCountScoreKey implements Serializable {
private Long id;
private Integer shouldTimes;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getShouldTimes() {
return shouldTimes;
}
public void setShouldTimes(Integer shouldTimes) {
this.shouldTimes = shouldTimes;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", shouldTimes=").append(shouldTimes);
sb.append("]");
return sb.toString();
}
}

7
mt/src/main/java/com/ccsens/mt/bean/po/CompeteVarietyScore.java

@ -1,6 +1,7 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class CompeteVarietyScore implements Serializable {
@ -14,7 +15,7 @@ public class CompeteVarietyScore implements Serializable {
private String code;
private Integer score;
private BigDecimal score;
private Long judgmentId;
@ -66,11 +67,11 @@ public class CompeteVarietyScore implements Serializable {
this.code = code == null ? null : code.trim();
}
public Integer getScore() {
public BigDecimal getScore() {
return score;
}
public void setScore(Integer score) {
public void setScore(BigDecimal score) {
this.score = score;
}

21
mt/src/main/java/com/ccsens/mt/bean/po/CompeteVarietyScoreExample.java

@ -1,5 +1,6 @@
package com.ccsens.mt.bean.po;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -425,52 +426,52 @@ public class CompeteVarietyScoreExample {
return (Criteria) this;
}
public Criteria andScoreEqualTo(Integer value) {
public Criteria andScoreEqualTo(BigDecimal value) {
addCriterion("score =", value, "score");
return (Criteria) this;
}
public Criteria andScoreNotEqualTo(Integer value) {
public Criteria andScoreNotEqualTo(BigDecimal value) {
addCriterion("score <>", value, "score");
return (Criteria) this;
}
public Criteria andScoreGreaterThan(Integer value) {
public Criteria andScoreGreaterThan(BigDecimal value) {
addCriterion("score >", value, "score");
return (Criteria) this;
}
public Criteria andScoreGreaterThanOrEqualTo(Integer value) {
public Criteria andScoreGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("score >=", value, "score");
return (Criteria) this;
}
public Criteria andScoreLessThan(Integer value) {
public Criteria andScoreLessThan(BigDecimal value) {
addCriterion("score <", value, "score");
return (Criteria) this;
}
public Criteria andScoreLessThanOrEqualTo(Integer value) {
public Criteria andScoreLessThanOrEqualTo(BigDecimal value) {
addCriterion("score <=", value, "score");
return (Criteria) this;
}
public Criteria andScoreIn(List<Integer> values) {
public Criteria andScoreIn(List<BigDecimal> values) {
addCriterion("score in", values, "score");
return (Criteria) this;
}
public Criteria andScoreNotIn(List<Integer> values) {
public Criteria andScoreNotIn(List<BigDecimal> values) {
addCriterion("score not in", values, "score");
return (Criteria) this;
}
public Criteria andScoreBetween(Integer value1, Integer value2) {
public Criteria andScoreBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("score between", value1, value2, "score");
return (Criteria) this;
}
public Criteria andScoreNotBetween(Integer value1, Integer value2) {
public Criteria andScoreNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("score not between", value1, value2, "score");
return (Criteria) this;
}

6
mt/src/main/java/com/ccsens/mt/bean/vo/TableVo.java

@ -165,6 +165,12 @@ public class TableVo {
return 0;
}
public Long getStartTime(){
return startTime == 0 ? null : startTime;
}
public Long getEndTime(){
return endTime == 0 ? null : endTime;
}
public int getTimeSum(){
if(duration != 0 && games != 0) {
return duration * games;

8
mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java

@ -78,4 +78,12 @@ public interface CompetePlayerDao extends CompetePlayerMapper {
CompeteGroup selectBySexAndRemark(int gender, int groupRemark);
List<CompeteExcelVo.TeamOrderPlayer> selectSinglePlayerByProjectId(Long id);
/**
* 在这个比赛中是否注册查找此身份证是否被注册
* @param type 比赛类型
* @param idCard 身份证
* @return
*/
int selectJoinNumByIdCard(@Param("type")int type, @Param("idCard")String idCard);
}

5
mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCountScoreMapper.java

@ -2,6 +2,7 @@ package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.CompeteCountScore;
import com.ccsens.mt.bean.po.CompeteCountScoreExample;
import com.ccsens.mt.bean.po.CompeteCountScoreKey;
import java.util.List;
import org.apache.ibatis.annotations.Param;
@ -10,7 +11,7 @@ public interface CompeteCountScoreMapper {
int deleteByExample(CompeteCountScoreExample example);
int deleteByPrimaryKey(Long id);
int deleteByPrimaryKey(CompeteCountScoreKey key);
int insert(CompeteCountScore record);
@ -18,7 +19,7 @@ public interface CompeteCountScoreMapper {
List<CompeteCountScore> selectByExample(CompeteCountScoreExample example);
CompeteCountScore selectByPrimaryKey(Long id);
CompeteCountScore selectByPrimaryKey(CompeteCountScoreKey key);
int updateByExampleSelective(@Param("record") CompeteCountScore record, @Param("example") CompeteCountScoreExample example);

106
mt/src/main/java/com/ccsens/mt/service/CompeteTaskService.java

@ -3,13 +3,16 @@ package com.ccsens.mt.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.dto.ProvinceCompeteDto;
import com.ccsens.mt.bean.po.CompeteProject;
import com.ccsens.mt.bean.po.CompeteProjectConfig;
import com.ccsens.mt.bean.po.CompeteProjectConfigExample;
import com.ccsens.mt.bean.po.*;
import com.ccsens.mt.bean.vo.TableVo;
import com.ccsens.mt.persist.dao.CompeteProjectConfigDao;
import com.ccsens.mt.persist.dao.CompeteProjectDao;
import com.ccsens.mt.persist.dao.CompeteTeamDao;
import com.ccsens.mt.persist.dao.CompeteTimeDao;
import com.ccsens.mt.persist.mapper.CompeteProjectPlayerMapper;
import com.ccsens.mt.persist.mapper.CompeteStartOrderMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@ -32,7 +35,25 @@ public class CompeteTaskService implements ICompeteTaskService{
@Resource
private CompeteProjectDao competeProjectDao;
@Resource
private CompeteTimeDao competeTimeDao;
@Resource
private CompeteProjectPlayerMapper projectPlayerMapper;
@Resource
private Snowflake snowflake;
@Resource
private CompeteStartOrderMapper startOrderMapper;
@Resource
private CompeteTeamDao competeTeamDao;
@Override
public List<TableVo.CompeteProjectConfig> queryCompeteConfig(CompeteDto.CompeteTime param) {
CompeteTime competeTime = competeTimeDao.selectByPrimaryKey(param.getCompeteTimeId());
List<TableVo.CompeteProjectConfig> competeProjectConfigList = new ArrayList<>();
if(ObjectUtil.isNotNull(competeTime)) {
competeProjectConfigList = projectConfigDao.queryProjectConfig(competeTime.getType());
}
return competeProjectConfigList;
}
@Override
public List<TableVo.CompeteProjectConfig> updateCompeteProjectConfig(List<ProvinceCompeteDto.UpdateCompeteTask> param) {
@ -70,8 +91,87 @@ public class CompeteTaskService implements ICompeteTaskService{
projectConfigDao.insertSelective(competeProjectConfig);
}
// TODO 生成出场顺序表,存入数据库。在tall内添加对应的任务
setStartOrder(competeProjectConfig);
});
}
return projectConfigDao.queryProjectConfig(type.get());
}
/**
* 修改配置时生成出场顺序(先删除之前的数据)
*/
public void setStartOrder(CompeteProjectConfig competeProjectConfig) {
if (ObjectUtil.isNotNull(competeProjectConfig)) {
//查找项目
CompeteProject project = competeProjectDao.selectByPrimaryKey(competeProjectConfig.getProjectId());
if (ObjectUtil.isNotNull(project)) {
//首先删除此项目以前的出场顺序
CompeteStartOrderExample startOrderExample = new CompeteStartOrderExample();
startOrderExample.createCriteria().andProjectIdEqualTo(project.getId());
List<CompeteStartOrder> startOrderList = startOrderMapper.selectByExample(startOrderExample);
if(ObjectUtil.isNotNull(startOrderExample)){
startOrderList.forEach(startOrder -> {
startOrder.setRecStatus((byte) 2);
startOrderMapper.updateByPrimaryKeySelective(startOrder);
});
}
//判断是团队还是个人项目
if (project.getTeam() == 0) {
//个人项目查找所有参赛信息
CompeteProjectPlayerExample projectPlayerExample = new CompeteProjectPlayerExample();
projectPlayerExample.createCriteria().andProjectIdEqualTo(project.getId());
List<CompeteProjectPlayer> projectPlayerList = projectPlayerMapper.selectByExample(projectPlayerExample);
if (CollectionUtil.isNotEmpty(projectPlayerList)) {
//场次
int competeOrder = 1;
//场地
int site = 1;
for (CompeteProjectPlayer projectPlayer : projectPlayerList) {
//添加出场顺序
CompeteStartOrder competeStartOrder = new CompeteStartOrder();
competeStartOrder.setId(snowflake.nextId());
competeStartOrder.setProjectId(project.getId());
competeStartOrder.setPlayerId(projectPlayer.getId());
competeStartOrder.setTeam((byte) 0);
competeStartOrder.setSite((byte) site);
competeStartOrder.setCompeteOrder((byte) competeOrder);
startOrderMapper.insertSelective(competeStartOrder);
site++;
if(site > competeProjectConfig.getSiteNum()){
site = 1;
competeOrder++;
}
}
}
} else {
//团体项目查找所有参赛队伍
CompeteTeamExample teamExample = new CompeteTeamExample();
teamExample.createCriteria().andProjectIdEqualTo(project.getId());
List<CompeteTeam> teamList = competeTeamDao.selectByExample(teamExample);
if(CollectionUtil.isNotEmpty(teamList)){
//场次
int competeOrder = 1;
//场地
int site = 1;
for (CompeteTeam competeTeam : teamList) {
//添加出场顺序
CompeteStartOrder competeStartOrder = new CompeteStartOrder();
competeStartOrder.setId(snowflake.nextId());
competeStartOrder.setProjectId(project.getId());
competeStartOrder.setPlayerId(competeTeam.getId());
competeStartOrder.setSite((byte) site);
competeStartOrder.setTeam((byte) 1);
competeStartOrder.setCompeteOrder((byte) competeOrder);
startOrderMapper.insertSelective(competeStartOrder);
site++;
if(site > competeProjectConfig.getSiteNum()){
site = 1;
competeOrder++;
}
}
}
}
}
}
}
}

8
mt/src/main/java/com/ccsens/mt/service/ICompeteTaskService.java

@ -1,5 +1,6 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.dto.ProvinceCompeteDto;
import com.ccsens.mt.bean.vo.TableVo;
@ -15,4 +16,11 @@ public interface ICompeteTaskService {
* @return
*/
List<TableVo.CompeteProjectConfig> updateCompeteProjectConfig(List<ProvinceCompeteDto.UpdateCompeteTask> param);
/**
* 查找所有项目的日程配置
* @param param
* @return
*/
List<TableVo.CompeteProjectConfig> queryCompeteConfig(CompeteDto.CompeteTime param);
}

33
mt/src/main/java/com/ccsens/mt/service/ProvinceService.java

@ -114,6 +114,16 @@ public class ProvinceService implements IProvinceService {
*/
@Override
public void saveOrUpdatePlayer(ProvinceCompeteDto.PlayerInfo param, Long userId) {
int type = 0;
if(ObjectUtil.isNotNull(param.getCompeteId())){
CompeteCompany company = competeCompanyDao.selectByPrimaryKey(param.getCompeteId());
if(ObjectUtil.isNull(company)) {
throw new BaseException(CodeEnum.NOT_COMPANY);
}
type = company.getType();
}else {
throw new BaseException(CodeEnum.NOT_COMPANY);
}
//判断选手id是否为空
if(ObjectUtil.isNull(param.getPlayerId())){
//id为空,新加一个选手
@ -121,13 +131,17 @@ public class ProvinceService implements IProvinceService {
player.setId(snowflake.nextId());
player.setName(param.getPlayerName());
if(ObjectUtil.isNull(param.getCompeteId())){ throw new BaseException(CodeEnum.NOT_COMPANY); }
//身份证不能为空,且正确
if(StrUtil.isEmpty(param.getIdCard()) || !IdcardUtil.isValidCard(param.getIdCard())){throw new BaseException(CodeEnum.ID_CARD_ERROR);}
//是否已注册
CompetePlayerExample competePlayerExample = new CompetePlayerExample();
competePlayerExample.createCriteria().andIdCardEqualTo(param.getIdCard());
if(competePlayerDao.countByExample(competePlayerExample) != 0){
int idCardNum = competePlayerDao.selectJoinNumByIdCard(type,param.getIdCard());
// CompetePlayerExample competePlayerExample = new CompetePlayerExample();
// competePlayerExample.createCriteria().andIdCardEqualTo(param.getIdCard());
// if(competePlayerDao.countByExample(competePlayerExample) != 0){
// throw new BaseException(CodeEnum.ID_CARD_ALREADY);
// }
if(idCardNum > 0){
throw new BaseException(CodeEnum.ID_CARD_ALREADY);
}
//验证性别是否正确
@ -186,9 +200,14 @@ public class ProvinceService implements IProvinceService {
//身份证正确
if(!IdcardUtil.isValidCard(param.getIdCard())){throw new BaseException(CodeEnum.ID_CARD_ERROR);}
//是否已注册
CompetePlayerExample competePlayerExample = new CompetePlayerExample();
competePlayerExample.createCriteria().andIdCardEqualTo(param.getIdCard()).andIdNotEqualTo(param.getPlayerId());
if(competePlayerDao.countByExample(competePlayerExample) != 0){throw new BaseException(CodeEnum.ID_CARD_ALREADY);}
//是否已注册
int idCardNum = competePlayerDao.selectJoinNumByIdCard(type,param.getIdCard());
if(idCardNum > 0){
throw new BaseException(CodeEnum.ID_CARD_ALREADY);
}
// CompetePlayerExample competePlayerExample = new CompetePlayerExample();
// competePlayerExample.createCriteria().andIdCardEqualTo(param.getIdCard()).andIdNotEqualTo(param.getPlayerId());
// if(competePlayerDao.countByExample(competePlayerExample) != 0){throw new BaseException(CodeEnum.ID_CARD_ALREADY);}
//验证性别是否正确
int gender = IdcardUtil.getGenderByIdCard(param.getIdCard());
if(gender != param.getGender()){

10
mt/src/main/resources/mapper_dao/CompetePlayerDao.xml

@ -300,4 +300,14 @@
and tcc.rec_status=0
and tcg.rec_status=0
</select>
<select id="selectJoinNumByIdCard" resultType="java.lang.Integer">
select
count(p.id)
from
t_compete_player p left join t_compete_company c on p.company_id = c.id
where
p.id_card = #{idCard}
and
c.type = #{type}
</select>
</mapper>

100
mt/src/main/resources/mapper_raw/CompeteCountScoreMapper.xml

@ -3,16 +3,16 @@
<mapper namespace="com.ccsens.mt.persist.mapper.CompeteCountScoreMapper">
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteCountScore">
<id column="id" jdbcType="BIGINT" property="id" />
<id column="should_times" jdbcType="INTEGER" property="shouldTimes" />
<result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="site_order_id" jdbcType="BIGINT" property="siteOrderId" />
<result column="chief_judgment_score" jdbcType="BIGINT" property="chiefJudgmentScore" />
<result column="judgment_a_score" jdbcType="INTEGER" property="judgmentAScore" />
<result column="judgment_b_score2" jdbcType="INTEGER" property="judgmentBScore2" />
<result column="should_times" jdbcType="INTEGER" property="shouldTimes" />
<result column="chief_judgment_score" jdbcType="DECIMAL" property="chiefJudgmentScore" />
<result column="judgment_a_score" jdbcType="DECIMAL" property="judgmentAScore" />
<result column="judgment_b_score2" jdbcType="DECIMAL" property="judgmentBScore2" />
<result column="deduct_times" jdbcType="INTEGER" property="deductTimes" />
<result column="deduct_cause" jdbcType="VARCHAR" property="deductCause" />
<result column="final_score" jdbcType="INTEGER" property="finalScore" />
<result column="final_score" jdbcType="DECIMAL" property="finalScore" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
@ -76,8 +76,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, compete_time_id, project_id, site_order_id, chief_judgment_score, judgment_a_score,
judgment_b_score2, should_times, deduct_times, deduct_cause, final_score, created_at,
id, should_times, compete_time_id, project_id, site_order_id, chief_judgment_score,
judgment_a_score, judgment_b_score2, deduct_times, deduct_cause, final_score, created_at,
updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteCountScoreExample" resultMap="BaseResultMap">
@ -94,15 +94,17 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteCountScoreKey" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_compete_count_score
where id = #{id,jdbcType=BIGINT}
and should_times = #{shouldTimes,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<delete id="deleteByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteCountScoreKey">
delete from t_compete_count_score
where id = #{id,jdbcType=BIGINT}
and should_times = #{shouldTimes,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.CompeteCountScoreExample">
delete from t_compete_count_score
@ -111,15 +113,15 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteCountScore">
insert into t_compete_count_score (id, compete_time_id, project_id,
site_order_id, chief_judgment_score, judgment_a_score,
judgment_b_score2, should_times, deduct_times,
insert into t_compete_count_score (id, should_times, compete_time_id,
project_id, site_order_id, chief_judgment_score,
judgment_a_score, judgment_b_score2, deduct_times,
deduct_cause, final_score, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{siteOrderId,jdbcType=BIGINT}, #{chiefJudgmentScore,jdbcType=BIGINT}, #{judgmentAScore,jdbcType=INTEGER},
#{judgmentBScore2,jdbcType=INTEGER}, #{shouldTimes,jdbcType=INTEGER}, #{deductTimes,jdbcType=INTEGER},
#{deductCause,jdbcType=VARCHAR}, #{finalScore,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
values (#{id,jdbcType=BIGINT}, #{shouldTimes,jdbcType=INTEGER}, #{competeTimeId,jdbcType=BIGINT},
#{projectId,jdbcType=BIGINT}, #{siteOrderId,jdbcType=BIGINT}, #{chiefJudgmentScore,jdbcType=DECIMAL},
#{judgmentAScore,jdbcType=DECIMAL}, #{judgmentBScore2,jdbcType=DECIMAL}, #{deductTimes,jdbcType=INTEGER},
#{deductCause,jdbcType=VARCHAR}, #{finalScore,jdbcType=DECIMAL}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.CompeteCountScore">
@ -128,6 +130,9 @@
<if test="id != null">
id,
</if>
<if test="shouldTimes != null">
should_times,
</if>
<if test="competeTimeId != null">
compete_time_id,
</if>
@ -146,9 +151,6 @@
<if test="judgmentBScore2 != null">
judgment_b_score2,
</if>
<if test="shouldTimes != null">
should_times,
</if>
<if test="deductTimes != null">
deduct_times,
</if>
@ -172,6 +174,9 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="shouldTimes != null">
#{shouldTimes,jdbcType=INTEGER},
</if>
<if test="competeTimeId != null">
#{competeTimeId,jdbcType=BIGINT},
</if>
@ -182,16 +187,13 @@
#{siteOrderId,jdbcType=BIGINT},
</if>
<if test="chiefJudgmentScore != null">
#{chiefJudgmentScore,jdbcType=BIGINT},
#{chiefJudgmentScore,jdbcType=DECIMAL},
</if>
<if test="judgmentAScore != null">
#{judgmentAScore,jdbcType=INTEGER},
#{judgmentAScore,jdbcType=DECIMAL},
</if>
<if test="judgmentBScore2 != null">
#{judgmentBScore2,jdbcType=INTEGER},
</if>
<if test="shouldTimes != null">
#{shouldTimes,jdbcType=INTEGER},
#{judgmentBScore2,jdbcType=DECIMAL},
</if>
<if test="deductTimes != null">
#{deductTimes,jdbcType=INTEGER},
@ -200,7 +202,7 @@
#{deductCause,jdbcType=VARCHAR},
</if>
<if test="finalScore != null">
#{finalScore,jdbcType=INTEGER},
#{finalScore,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
@ -225,6 +227,9 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.shouldTimes != null">
should_times = #{record.shouldTimes,jdbcType=INTEGER},
</if>
<if test="record.competeTimeId != null">
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
</if>
@ -235,16 +240,13 @@
site_order_id = #{record.siteOrderId,jdbcType=BIGINT},
</if>
<if test="record.chiefJudgmentScore != null">
chief_judgment_score = #{record.chiefJudgmentScore,jdbcType=BIGINT},
chief_judgment_score = #{record.chiefJudgmentScore,jdbcType=DECIMAL},
</if>
<if test="record.judgmentAScore != null">
judgment_a_score = #{record.judgmentAScore,jdbcType=INTEGER},
judgment_a_score = #{record.judgmentAScore,jdbcType=DECIMAL},
</if>
<if test="record.judgmentBScore2 != null">
judgment_b_score2 = #{record.judgmentBScore2,jdbcType=INTEGER},
</if>
<if test="record.shouldTimes != null">
should_times = #{record.shouldTimes,jdbcType=INTEGER},
judgment_b_score2 = #{record.judgmentBScore2,jdbcType=DECIMAL},
</if>
<if test="record.deductTimes != null">
deduct_times = #{record.deductTimes,jdbcType=INTEGER},
@ -253,7 +255,7 @@
deduct_cause = #{record.deductCause,jdbcType=VARCHAR},
</if>
<if test="record.finalScore != null">
final_score = #{record.finalScore,jdbcType=INTEGER},
final_score = #{record.finalScore,jdbcType=DECIMAL},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -272,16 +274,16 @@
<update id="updateByExample" parameterType="map">
update t_compete_count_score
set id = #{record.id,jdbcType=BIGINT},
should_times = #{record.shouldTimes,jdbcType=INTEGER},
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
site_order_id = #{record.siteOrderId,jdbcType=BIGINT},
chief_judgment_score = #{record.chiefJudgmentScore,jdbcType=BIGINT},
judgment_a_score = #{record.judgmentAScore,jdbcType=INTEGER},
judgment_b_score2 = #{record.judgmentBScore2,jdbcType=INTEGER},
should_times = #{record.shouldTimes,jdbcType=INTEGER},
chief_judgment_score = #{record.chiefJudgmentScore,jdbcType=DECIMAL},
judgment_a_score = #{record.judgmentAScore,jdbcType=DECIMAL},
judgment_b_score2 = #{record.judgmentBScore2,jdbcType=DECIMAL},
deduct_times = #{record.deductTimes,jdbcType=INTEGER},
deduct_cause = #{record.deductCause,jdbcType=VARCHAR},
final_score = #{record.finalScore,jdbcType=INTEGER},
final_score = #{record.finalScore,jdbcType=DECIMAL},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
@ -302,16 +304,13 @@
site_order_id = #{siteOrderId,jdbcType=BIGINT},
</if>
<if test="chiefJudgmentScore != null">
chief_judgment_score = #{chiefJudgmentScore,jdbcType=BIGINT},
chief_judgment_score = #{chiefJudgmentScore,jdbcType=DECIMAL},
</if>
<if test="judgmentAScore != null">
judgment_a_score = #{judgmentAScore,jdbcType=INTEGER},
judgment_a_score = #{judgmentAScore,jdbcType=DECIMAL},
</if>
<if test="judgmentBScore2 != null">
judgment_b_score2 = #{judgmentBScore2,jdbcType=INTEGER},
</if>
<if test="shouldTimes != null">
should_times = #{shouldTimes,jdbcType=INTEGER},
judgment_b_score2 = #{judgmentBScore2,jdbcType=DECIMAL},
</if>
<if test="deductTimes != null">
deduct_times = #{deductTimes,jdbcType=INTEGER},
@ -320,7 +319,7 @@
deduct_cause = #{deductCause,jdbcType=VARCHAR},
</if>
<if test="finalScore != null">
final_score = #{finalScore,jdbcType=INTEGER},
final_score = #{finalScore,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
@ -333,22 +332,23 @@
</if>
</set>
where id = #{id,jdbcType=BIGINT}
and should_times = #{shouldTimes,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteCountScore">
update t_compete_count_score
set compete_time_id = #{competeTimeId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
site_order_id = #{siteOrderId,jdbcType=BIGINT},
chief_judgment_score = #{chiefJudgmentScore,jdbcType=BIGINT},
judgment_a_score = #{judgmentAScore,jdbcType=INTEGER},
judgment_b_score2 = #{judgmentBScore2,jdbcType=INTEGER},
should_times = #{shouldTimes,jdbcType=INTEGER},
chief_judgment_score = #{chiefJudgmentScore,jdbcType=DECIMAL},
judgment_a_score = #{judgmentAScore,jdbcType=DECIMAL},
judgment_b_score2 = #{judgmentBScore2,jdbcType=DECIMAL},
deduct_times = #{deductTimes,jdbcType=INTEGER},
deduct_cause = #{deductCause,jdbcType=VARCHAR},
final_score = #{finalScore,jdbcType=INTEGER},
final_score = #{finalScore,jdbcType=DECIMAL},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
and should_times = #{shouldTimes,jdbcType=INTEGER}
</update>
</mapper>

14
mt/src/main/resources/mapper_raw/CompeteVarietyScoreMapper.xml

@ -7,7 +7,7 @@
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="site_order_id" jdbcType="BIGINT" property="siteOrderId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="score" jdbcType="INTEGER" property="score" />
<result column="score" jdbcType="DECIMAL" property="score" />
<result column="judgment_id" jdbcType="BIGINT" property="judgmentId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@ -111,7 +111,7 @@
judgment_id, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{siteOrderId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER},
#{siteOrderId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL},
#{judgmentId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
@ -166,7 +166,7 @@
#{code,jdbcType=VARCHAR},
</if>
<if test="score != null">
#{score,jdbcType=INTEGER},
#{score,jdbcType=DECIMAL},
</if>
<if test="judgmentId != null">
#{judgmentId,jdbcType=BIGINT},
@ -207,7 +207,7 @@
code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.score != null">
score = #{record.score,jdbcType=INTEGER},
score = #{record.score,jdbcType=DECIMAL},
</if>
<if test="record.judgmentId != null">
judgment_id = #{record.judgmentId,jdbcType=BIGINT},
@ -233,7 +233,7 @@
project_id = #{record.projectId,jdbcType=BIGINT},
site_order_id = #{record.siteOrderId,jdbcType=BIGINT},
code = #{record.code,jdbcType=VARCHAR},
score = #{record.score,jdbcType=INTEGER},
score = #{record.score,jdbcType=DECIMAL},
judgment_id = #{record.judgmentId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
@ -258,7 +258,7 @@
code = #{code,jdbcType=VARCHAR},
</if>
<if test="score != null">
score = #{score,jdbcType=INTEGER},
score = #{score,jdbcType=DECIMAL},
</if>
<if test="judgmentId != null">
judgment_id = #{judgmentId,jdbcType=BIGINT},
@ -281,7 +281,7 @@
project_id = #{projectId,jdbcType=BIGINT},
site_order_id = #{siteOrderId,jdbcType=BIGINT},
code = #{code,jdbcType=VARCHAR},
score = #{score,jdbcType=INTEGER},
score = #{score,jdbcType=DECIMAL},
judgment_id = #{judgmentId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},

Loading…
Cancel
Save