33 changed files with 1649 additions and 84 deletions
@ -0,0 +1,131 @@ |
|||||
|
package com.ccsens.cloudutil.bean.tall.dto; |
||||
|
|
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.NonNull; |
||||
|
|
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public class TallTaskDto { |
||||
|
|
||||
|
@ApiModel |
||||
|
@Data |
||||
|
public static class AddTask { |
||||
|
@ApiModelProperty("关联项目Id") |
||||
|
private Long projectId; |
||||
|
@ApiModelProperty("关联的任务id(detailId)") |
||||
|
private Long parentTaskId; |
||||
|
@ApiModelProperty("任务名称") |
||||
|
@NotEmpty(message = "任务名不能为空") |
||||
|
private String taskName; |
||||
|
@ApiModelProperty("任务描述") |
||||
|
private String description; |
||||
|
@ApiModelProperty("负责人id") |
||||
|
@NotNull(message = "请选择负责人") |
||||
|
private Long executorId; |
||||
|
@ApiModelProperty("开始时间") |
||||
|
private Long beginTime; |
||||
|
@ApiModelProperty("结束时间") |
||||
|
private Long endTime; |
||||
|
@ApiModelProperty("重复周期") |
||||
|
private String cycle; |
||||
|
@ApiModelProperty("交付物") |
||||
|
private String taskDeliver; |
||||
|
@ApiModelProperty("插件") |
||||
|
private List<Long> pluginList; |
||||
|
@ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0") |
||||
|
private Byte priority; |
||||
|
@ApiModelProperty("任务提醒消息") |
||||
|
private TaskRemindByAdd taskRemind; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("添加时设置任务提醒") |
||||
|
public static class TaskRemindByAdd{ |
||||
|
@ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间") |
||||
|
private Byte remindTiming; |
||||
|
@ApiModelProperty("时长 提醒时机是“开始时”或“结束时”可以为空") |
||||
|
private Long duration = 0L; |
||||
|
@ApiModelProperty("时间单位 0分钟 1小时 2天") |
||||
|
private Byte unit; |
||||
|
|
||||
|
public Long getDuration(){ |
||||
|
if(ObjectUtil.isNull(unit)) { |
||||
|
throw new BaseException("时间单位不能为空"); |
||||
|
} |
||||
|
if(remindTiming == 7){ |
||||
|
return duration; |
||||
|
} |
||||
|
switch (unit) { |
||||
|
case 0: |
||||
|
return duration * 60 * 1000L; |
||||
|
case 1: |
||||
|
return duration * 60 * 60 * 1000L; |
||||
|
case 2: |
||||
|
return duration * 24 * 60 * 60 * 1000L; |
||||
|
default: |
||||
|
return duration; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改任务详细信息") |
||||
|
public static class UpdateTaskInfo{ |
||||
|
@ApiModelProperty("任务id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("任务名") |
||||
|
private String name; |
||||
|
@ApiModelProperty("任务详情") |
||||
|
private String description; |
||||
|
@ApiModelProperty("负责人") |
||||
|
private Long executorRole; |
||||
|
@ApiModelProperty("任务开始时间") |
||||
|
private Long beginTime; |
||||
|
@ApiModelProperty("任务结束时间") |
||||
|
private Long endTime; |
||||
|
@ApiModelProperty("重复频率") |
||||
|
private String cycle; |
||||
|
@ApiModelProperty("任务奖惩") |
||||
|
private Long money; |
||||
|
@ApiModelProperty("任务切换模式,0时间到立刻切换 1延迟delay_time切换 2手动切换") |
||||
|
private int delay; |
||||
|
@ApiModelProperty("延迟切换时间") |
||||
|
private Long delayTime; |
||||
|
@ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0") |
||||
|
private Byte priority; |
||||
|
@ApiModelProperty("是否是里程碑 0否 1是") |
||||
|
private Byte milestone; |
||||
|
@ApiModelProperty("需要修改的插件Id") |
||||
|
private List<Long> plugins; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改插件配置") |
||||
|
public static class UpdatePluginConfig { |
||||
|
@NonNull |
||||
|
@ApiModelProperty("任务id") |
||||
|
private Long taskId; |
||||
|
@ApiModelProperty("任务插件id") |
||||
|
private Long taskPluginId; |
||||
|
@ApiModelProperty("页面接口路径") |
||||
|
private String webPath; |
||||
|
@ApiModelProperty("入参") |
||||
|
private String importParam; |
||||
|
@ApiModelProperty("放置位置 默认0 ,0任务名 1详情页 2任务下") |
||||
|
private Byte placeLocation; |
||||
|
@ApiModelProperty("程序位置 0:tall内部,1外部") |
||||
|
private Byte routineLocation; |
||||
|
|
||||
|
public UpdatePluginConfig() { |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -1,39 +1,77 @@ |
|||||
package com.ccsens.mt.bean.po; |
|
||||
|
package com.ccsens.mt.bean.po; |
||||
import java.io.Serializable; |
|
||||
|
import java.io.Serializable; |
||||
public class CompeteCountScoreKey implements Serializable { |
|
||||
private Long id; |
public class CompeteCountScoreKey implements Serializable { |
||||
|
private Long id; |
||||
private Integer shouldTimes; |
|
||||
|
private Integer shouldTimes; |
||||
private static final long serialVersionUID = 1L; |
|
||||
|
private static final long serialVersionUID = 1L; |
||||
public Long getId() { |
|
||||
return id; |
public Long getId() { |
||||
} |
return id; |
||||
|
} |
||||
public void setId(Long id) { |
|
||||
this.id = id; |
public void setId(Long id) { |
||||
} |
this.id = id; |
||||
|
} |
||||
public Integer getShouldTimes() { |
|
||||
return shouldTimes; |
public Integer getShouldTimes() { |
||||
} |
return shouldTimes; |
||||
|
} |
||||
public void setShouldTimes(Integer shouldTimes) { |
|
||||
this.shouldTimes = shouldTimes; |
public void setShouldTimes(Integer shouldTimes) { |
||||
} |
this.shouldTimes = shouldTimes; |
||||
|
} |
||||
@Override |
|
||||
public String toString() { |
@Override |
||||
StringBuilder sb = new StringBuilder(); |
public String toString() { |
||||
sb.append(getClass().getSimpleName()); |
StringBuilder sb = new StringBuilder(); |
||||
sb.append(" ["); |
sb.append(getClass().getSimpleName()); |
||||
sb.append("Hash = ").append(hashCode()); |
sb.append(" ["); |
||||
sb.append(", id=").append(id); |
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", shouldTimes=").append(shouldTimes); |
sb.append(", id=").append(id); |
||||
sb.append("]"); |
sb.append(", shouldTimes=").append(shouldTimes); |
||||
return sb.toString(); |
sb.append("]"); |
||||
} |
return sb.toString(); |
||||
} |
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//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();
|
||||
|
// }
|
||||
|
//}
|
||||
@ -0,0 +1,18 @@ |
|||||
|
package com.ccsens.mt.persist.dao; |
||||
|
|
||||
|
import com.ccsens.mt.bean.vo.ProvinceCompeteVo; |
||||
|
import com.ccsens.mt.persist.mapper.CompeteJudgmentMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface CompeteJudgmentDao extends CompeteJudgmentMapper { |
||||
|
/** |
||||
|
* 查找裁判分配信息 |
||||
|
* @param competeTimeId 大赛id |
||||
|
* @return |
||||
|
*/ |
||||
|
List<ProvinceCompeteVo.QueryJudgment> queryJudgment(@Param("competeTimeId") Long competeTimeId); |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.ccsens.mt.persist.dao; |
||||
|
|
||||
|
import com.ccsens.mt.bean.po.CompeteCoach; |
||||
|
import com.ccsens.mt.bean.po.CompeteCompany; |
||||
|
import com.ccsens.mt.bean.vo.CompeteExcelVo; |
||||
|
import com.ccsens.mt.bean.vo.CompeteVo; |
||||
|
import com.ccsens.mt.bean.vo.ProvinceCompeteVo; |
||||
|
import com.ccsens.mt.bean.vo.ScoreVo; |
||||
|
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface CompeteScoreDao { |
||||
|
List<ScoreVo.CompeteScore> selectSingleCount (@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
||||
|
List<ScoreVo.CompeteScore> selectGroupCount (@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
||||
|
List<ScoreVo.CompeteScore> selectSingleVarity(@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
||||
|
List<ScoreVo.CompeteScore> selectGroupVarity (@Param("projectId") long projectId,@Param("competeGroupId") long competeGroupId); |
||||
|
List<ScoreVo.CountScoreCurrentSite> selectCountScoreCurrentSite (@Param("siteId") long siteId); |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.mt.persist.dao.CompeteJudgmentDao"> |
||||
|
|
||||
|
<resultMap id="queryJudgment" type="com.ccsens.mt.bean.vo.ProvinceCompeteVo$QueryJudgment"> |
||||
|
<id column="projectId" property="projectId"/> |
||||
|
<result column="projectName" property="projectName"/> |
||||
|
<result column="startTime" property="startTime"/> |
||||
|
<result column="endTime" property="endTime"/> |
||||
|
<collection property="siteList" ofType="com.ccsens.mt.bean.vo.ProvinceCompeteVo$ProjectSite"> |
||||
|
<id column="siteNum" property="siteNum"/> |
||||
|
<collection property="judgmentList" ofType="com.ccsens.mt.bean.vo.ProvinceCompeteVo$SiteJudgment"> |
||||
|
<id column="judgmentNum" property="judgmentNum"/> |
||||
|
<result column="judgmentName" property="judgmentName"/> |
||||
|
<result column="judgmentPhone" property="judgmentPhone"/> |
||||
|
<result column="remark" property="remark"/> |
||||
|
</collection> |
||||
|
</collection> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="queryJudgment" resultMap="queryJudgment"> |
||||
|
SELECT |
||||
|
p.id as projectId, |
||||
|
p.`name` as projectName, |
||||
|
pc.start_time as startTime, |
||||
|
pc.end_time as endTime, |
||||
|
j.site as siteNum, |
||||
|
j.chief_judgment as judgmentNum, |
||||
|
j.`name` as judgmentName, |
||||
|
j.phone as judgmentPhone, |
||||
|
j.remark as remark |
||||
|
FROM |
||||
|
t_compete_project p LEFT JOIN t_compete_time ct on p.type = ct.type |
||||
|
LEFT JOIN t_compete_project_config pc on p.id = pc.project_id |
||||
|
LEFT JOIN t_compete_judgment j on j.project_id = p.id |
||||
|
WHERE |
||||
|
ct.id = #{competeTimeId} |
||||
|
and p.`level` = 2 |
||||
|
and p.rec_status = 0 |
||||
|
and (j.rec_status = 0 or j.rec_status is null) |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,109 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.mt.persist.dao.CompeteScoreDao"> |
||||
|
<select id="selectSingleCount" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
||||
|
SELECT |
||||
|
tcp.`name` as name, |
||||
|
tcc.`name` as companyName, |
||||
|
tccs.final_score as score |
||||
|
from |
||||
|
t_compete_project_player tcpp LEFT JOIN t_compete_player tcp ON tcpp.player_id = tcp.id |
||||
|
LEFT JOIN t_compete_start_order tcso on tcso.player_id = tcpp.player_id |
||||
|
LEFT JOIN t_compete_count_score tccs on tccs.site_order_id = tcso.id |
||||
|
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
||||
|
WHERE tcpp.rec_status = 0 |
||||
|
and tcp.rec_status=0 |
||||
|
and tcso.rec_status=0 |
||||
|
and tccs.rec_status=0 |
||||
|
and tcc.rec_status = 0 |
||||
|
and tcpp.project_id= #{projectId} |
||||
|
and tcpp.compete_group_id =#{competeGroupId} |
||||
|
GROUP BY tccs.final_score |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectGroupCount" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
||||
|
SELECT |
||||
|
tccs.final_score as score, |
||||
|
tcc.`name` as companyName |
||||
|
from |
||||
|
t_compete_team tct LEFT JOIN t_compete_start_order tcso ON tct.id = tcso.player_id |
||||
|
LEFT JOIN t_compete_count_score tccs ON tccs.site_order_id = tcso.id |
||||
|
LEFT JOIN t_compete_company tcc on tcc.id = tct.company_id |
||||
|
WHERE tct.rec_status = 0 |
||||
|
and tcso.rec_status=0 |
||||
|
and tccs.rec_status =0 |
||||
|
and and tct.project_id= #{projectId} |
||||
|
and tct.compete_group_id = #{competeGroupId} |
||||
|
GROUP BY tccs.final_score; |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSingleVarity" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
||||
|
SELECT |
||||
|
tcp.`name` as name, |
||||
|
tcc.`name` as companyName, |
||||
|
tcvs.score as score |
||||
|
|
||||
|
from |
||||
|
t_compete_project_player tcpp LEFT JOIN t_compete_player tcp ON tcpp.player_id = tcp.id |
||||
|
LEFT JOIN t_compete_start_order tcso on tcso.player_id = tcpp.player_id |
||||
|
LEFT JOIN t_compete_variety_score tcvs on tcvs.site_order_id = tcso.id |
||||
|
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
||||
|
WHERE tcpp.rec_status = 0 |
||||
|
and tcp.rec_status=0 |
||||
|
and tcso.rec_status=0 |
||||
|
and tcvs.rec_status=0 |
||||
|
and tcc.rec_status = 0 |
||||
|
and tcpp.project_id= #{projectId} |
||||
|
and tcpp.compete_group_id = #{competeGroupId} |
||||
|
GROUP BY tcvs.score |
||||
|
</select> |
||||
|
<select id="selectGroupVarity" resultType="com.ccsens.mt.bean.vo.ScoreVo$CompeteScore" parameterType="java.util.Map"> |
||||
|
SELECT |
||||
|
tcc.`name` as companyName, |
||||
|
tcvs.score as score |
||||
|
from |
||||
|
t_compete_team tct LEFT JOIN t_compete_start_order tcso ON tct.id = tcso.player_id |
||||
|
LEFT JOIN t_compete_variety_score tcvs ON tcvs.site_order_id = tcso.id |
||||
|
LEFT JOIN t_compete_company tcc on tcc.id = tct.company_id |
||||
|
WHERE tct.rec_status = 0 |
||||
|
and tcso.rec_status=0 |
||||
|
and tcvs.rec_status =0 |
||||
|
and and tct.project_id= #{projectId} |
||||
|
and tct.compete_group_id = #{competeGroupId} |
||||
|
GROUP BY tcvs.score |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="selectCountScoreCurrentSite" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScoreCurrentSite" parameterType="java.util.Map"> |
||||
|
SELECT |
||||
|
tcp.`name` as name, |
||||
|
tcc.`name` as companyName, |
||||
|
tcg.group_name as groupName, |
||||
|
tcppro.`name` as projectName, |
||||
|
tcso.site as site, |
||||
|
tcso.compete_order as competeOrder, |
||||
|
tccs.chief_judgment_score as mainScore, |
||||
|
tccs.judgment_a_score as mainOneScore, |
||||
|
tccs.judgment_b_score2 as mainTwoScore, |
||||
|
tccs.should_times as shouldScore, |
||||
|
tccs.deduct_times as deductTime, |
||||
|
tccs.deduct_cause as deductReason, |
||||
|
tccs.final_score as finalScore |
||||
|
from |
||||
|
t_compete_start_order tcso LEFT JOIN t_compete_player tcp on tcso.player_id = tcp.id |
||||
|
LEFT JOIN t_compete_company tcc on tcc.id = tcp.company_id |
||||
|
LEFT JOIN t_compete_group tcg on tcg.id = tcp.compete_group_id |
||||
|
LEFT JOIN t_compete_project tcppro on tcppro.id = tcso.project_id |
||||
|
LEFT JOIN t_compete_count_score tccs on tccs.site_order_id = tcso.id |
||||
|
WHERE |
||||
|
tcso.rec_status=0 |
||||
|
and tcp.rec_status=0 |
||||
|
and tcc.rec_status=0 |
||||
|
and tcg.rec_status=0 |
||||
|
and tcppro.rec_status=0 |
||||
|
and tccs.rec_status =0 |
||||
|
and tcso.id =#{siteId} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -1,5 +1,5 @@ |
|||||
spring: |
spring: |
||||
profiles: |
profiles: |
||||
active: test |
active: dev |
||||
include: util-test,common |
include: util-dev,common |
||||
|
|
||||
|
|||||
Loading…
Reference in new issue