diff --git a/mt/src/main/java/com/ccsens/mt/api/ExcelController.java b/mt/src/main/java/com/ccsens/mt/api/ExcelController.java index c04ccd75..ec2ee354 100644 --- a/mt/src/main/java/com/ccsens/mt/api/ExcelController.java +++ b/mt/src/main/java/com/ccsens/mt/api/ExcelController.java @@ -59,4 +59,26 @@ public class ExcelController { String path = excelService.competeAllCount(params.getParam()); return JsonResponse.newInstance().ok(path); } + + + @MustLogin + @ApiOperation(value = "大赛参赛队伍信息表", notes = "") + @RequestMapping(value = "/competitionTeamInformationTable", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse dasaiduiwuxinxiWPS(@ApiParam @Validated @RequestBody QueryDto params) throws IOException { + log.info("导出大赛参赛队伍信息表:{}",params); + String path = excelService.dasaiduiwuxinxiWPS(params); + return JsonResponse.newInstance().ok(path); + } + @MustLogin + @ApiOperation(value = "代表队名单", notes = "") + @RequestMapping(value = "/teamList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse teamList(@ApiParam @Validated @RequestBody QueryDto params) throws IOException { + log.info("导出代表队名单表:{}",params); + String path = excelService.iTeamListService(params); + return JsonResponse.newInstance().ok(path); + } + + + + } diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java new file mode 100644 index 00000000..91e3bfe0 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java @@ -0,0 +1,117 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteProjectConfig implements Serializable { + private Long id; + + private Long projectId; + + private Integer siteNum; + + private Long startTime; + + private Long endTime; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long projectDuration; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Integer getSiteNum() { + return siteNum; + } + + public void setSiteNum(Integer siteNum) { + this.siteNum = siteNum; + } + + public Long getStartTime() { + return startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getProjectDuration() { + return projectDuration; + } + + public void setProjectDuration(Long projectDuration) { + this.projectDuration = projectDuration; + } + + @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(", projectId=").append(projectId); + sb.append(", siteNum=").append(siteNum); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", projectDuration=").append(projectDuration); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java new file mode 100644 index 00000000..590e4e41 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java @@ -0,0 +1,741 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteProjectConfigExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteProjectConfigExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + 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 values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List 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 andSiteNumIsNull() { + addCriterion("site_num is null"); + return (Criteria) this; + } + + public Criteria andSiteNumIsNotNull() { + addCriterion("site_num is not null"); + return (Criteria) this; + } + + public Criteria andSiteNumEqualTo(Integer value) { + addCriterion("site_num =", value, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumNotEqualTo(Integer value) { + addCriterion("site_num <>", value, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumGreaterThan(Integer value) { + addCriterion("site_num >", value, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumGreaterThanOrEqualTo(Integer value) { + addCriterion("site_num >=", value, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumLessThan(Integer value) { + addCriterion("site_num <", value, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumLessThanOrEqualTo(Integer value) { + addCriterion("site_num <=", value, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumIn(List values) { + addCriterion("site_num in", values, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumNotIn(List values) { + addCriterion("site_num not in", values, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumBetween(Integer value1, Integer value2) { + addCriterion("site_num between", value1, value2, "siteNum"); + return (Criteria) this; + } + + public Criteria andSiteNumNotBetween(Integer value1, Integer value2) { + addCriterion("site_num not between", value1, value2, "siteNum"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Long value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Long value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Long value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Long value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Long value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Long value1, Long value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Long value1, Long value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Long value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Long value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Long value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Long value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Long value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Long value1, Long value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Long value1, Long value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andProjectDurationIsNull() { + addCriterion("project_duration is null"); + return (Criteria) this; + } + + public Criteria andProjectDurationIsNotNull() { + addCriterion("project_duration is not null"); + return (Criteria) this; + } + + public Criteria andProjectDurationEqualTo(Long value) { + addCriterion("project_duration =", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationNotEqualTo(Long value) { + addCriterion("project_duration <>", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationGreaterThan(Long value) { + addCriterion("project_duration >", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationGreaterThanOrEqualTo(Long value) { + addCriterion("project_duration >=", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationLessThan(Long value) { + addCriterion("project_duration <", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationLessThanOrEqualTo(Long value) { + addCriterion("project_duration <=", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationIn(List values) { + addCriterion("project_duration in", values, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationNotIn(List values) { + addCriterion("project_duration not in", values, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationBetween(Long value1, Long value2) { + addCriterion("project_duration between", value1, value2, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationNotBetween(Long value1, Long value2) { + addCriterion("project_duration not between", value1, value2, "projectDuration"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java index 518ba17f..2c46dd01 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java @@ -44,6 +44,13 @@ public class CompeteVo { @ApiModelProperty("描述") private String groupDescription; } + @Data + @ApiModel + public static class CompeteC{ + @ApiModelProperty("参赛队伍") + private String cansaiduiName; + + } @Data @ApiModel("模糊查询参赛单位") diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java index 4e8260a1..50874fc4 100644 --- a/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java @@ -1,6 +1,8 @@ package com.ccsens.mt.persist.dao; import com.ccsens.mt.bean.dto.ProvinceCompeteDto; +import com.ccsens.mt.bean.po.CompeteCoach; +import com.ccsens.mt.bean.po.CompeteCompany; import com.ccsens.mt.bean.vo.CompeteVo; import com.ccsens.mt.bean.vo.ProvinceCompeteVo; import com.ccsens.mt.persist.mapper.CompeteCompanyMapper; @@ -101,4 +103,17 @@ public interface CompeteCompanyDao extends CompeteCompanyMapper { * @return */ List getPlayerByTeamProject(@Param("projectId")Long projectId, @Param("type")Byte type); + /** + * 根据大赛id查看当前大赛所有队伍信息,以及联系人的信息 + * @param CompeteTimeId 大赛CompeteTimeId + * @return 返回参赛队伍详细信息 + */ + List selectByCompeteTimeId(Long CompeteTimeId); + + /** + * 根据查出来得大赛得单位的id查询教练和领队得信息 + * @param companyId 单位id + * @return + */ + List selectByCompanyId(@Param("companyId")Long companyId); } diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java index da4a55c4..024d2545 100644 --- a/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java @@ -1,5 +1,6 @@ package com.ccsens.mt.persist.dao; +import com.ccsens.mt.bean.po.CompetePlayer; import com.ccsens.mt.bean.vo.CompeteVo; import com.ccsens.mt.bean.vo.ProvinceCompeteVo; import com.ccsens.mt.bean.vo.TableVo; diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectConfigMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectConfigMapper.java new file mode 100644 index 00000000..bbbbcb9d --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectConfigMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteProjectConfig; +import com.ccsens.mt.bean.po.CompeteProjectConfigExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteProjectConfigMapper { + long countByExample(CompeteProjectConfigExample example); + + int deleteByExample(CompeteProjectConfigExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteProjectConfig record); + + int insertSelective(CompeteProjectConfig record); + + List selectByExample(CompeteProjectConfigExample example); + + CompeteProjectConfig selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteProjectConfig record, @Param("example") CompeteProjectConfigExample example); + + int updateByExample(@Param("record") CompeteProjectConfig record, @Param("example") CompeteProjectConfigExample example); + + int updateByPrimaryKeySelective(CompeteProjectConfig record); + + int updateByPrimaryKey(CompeteProjectConfig record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/service/ExcelService.java b/mt/src/main/java/com/ccsens/mt/service/ExcelService.java index 552d94d3..0e8aef44 100644 --- a/mt/src/main/java/com/ccsens/mt/service/ExcelService.java +++ b/mt/src/main/java/com/ccsens/mt/service/ExcelService.java @@ -1,5 +1,4 @@ package com.ccsens.mt.service; - import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdcardUtil; import cn.hutool.core.util.ObjectUtil; @@ -11,6 +10,9 @@ import com.ccsens.mt.persist.mapper.*; import com.ccsens.util.CodeEnum; import com.ccsens.util.PoiUtil; import com.ccsens.util.PropUtil; +import com.ccsens.util.RedisUtil; +import com.ccsens.util.WebConstant; + import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; @@ -19,7 +21,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - import javax.annotation.Resource; import java.io.File; import java.io.FileOutputStream; @@ -28,11 +29,12 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.List; - @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ExcelService implements IExcelService { + @Resource + private CompeteCompanyDao competeCompanyDao; @Resource private CompeteTimeDao competeTimeDao; @Resource @@ -54,10 +56,244 @@ public class ExcelService implements IExcelService { @Resource private IProvinceService provinceService; @Resource - private CompeteCompanyDao competeCompanyDao; - @Resource CompeteCoachMapper competeCoachMapper; + @Resource + private CompetePlayerMapper competePlayerMapper; + + @Override + public String dasaiduiwuxinxiWPS(QueryDto params) { + //这个里面包含联系人得信息 + List competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId()); + List competeCoachList =new ArrayList(); + for (CompeteCompany com:competeCompanyList) { + //再根据单位id查询,领队和教练信息,返回list集合 + competeCoachList.addAll(competeCompanyDao.selectByCompanyId(com.getId())); + } + List> biao = new ArrayList<>(); + //先把联系人的都添加进去 + List biaotou=new ArrayList<>(); + PoiUtil.PoiUtilCell biaotouName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 8, 1, null, null); + biaotouName.setValue(competeTimeDao.selectByPrimaryKey(params.getParam().getCompeteTimeId()).getName()); + biaotou.add(biaotouName); + biao.add(biaotou); + List hangTou=new ArrayList<>(); + PoiUtil.PoiUtilCell xuhaoTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + xuhaoTou.setValue("序号"); + hangTou.add(xuhaoTou); + PoiUtil.PoiUtilCell cansaiduiwuTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + cansaiduiwuTou.setValue("参赛队伍"); + hangTou.add(cansaiduiwuTou); + PoiUtil.PoiUtilCell lianxirenTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + lianxirenTou.setValue("联系人/领队/教练"); + hangTou.add(lianxirenTou); + PoiUtil.PoiUtilCell nameTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + nameTou.setValue("姓名"); + hangTou.add(nameTou); + PoiUtil.PoiUtilCell sexTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + sexTou.setValue("性别"); + hangTou.add(sexTou); + PoiUtil.PoiUtilCell lianxifangshiTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + lianxifangshiTou.setValue("联系方式"); + hangTou.add(lianxifangshiTou); + PoiUtil.PoiUtilCell shenfenzhengTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + shenfenzhengTou.setValue("身份证号"); + hangTou.add(shenfenzhengTou); + PoiUtil.PoiUtilCell beizhuTou=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + beizhuTou.setValue("备注"); + hangTou.add(beizhuTou); + biao.add(hangTou); + int i=1; + for(CompeteCompany competeCompany:competeCompanyList){ + List hang=new ArrayList<>(); + PoiUtil.PoiUtilCell xuhao=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + xuhao.setValue(String.valueOf(i++)); + hang.add(xuhao); + PoiUtil.PoiUtilCell cansaiduiwu=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + cansaiduiwu.setValue(competeCompany.getName()); + hang.add(cansaiduiwu); + PoiUtil.PoiUtilCell renyuanleibei=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + renyuanleibei.setValue("联系人"); + hang.add(renyuanleibei); + PoiUtil.PoiUtilCell name=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + name.setValue(competeCompany.getContactsName()); + hang.add(name); + PoiUtil.PoiUtilCell sex=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + sex.setValue("/"); + hang.add(sex); + PoiUtil.PoiUtilCell pho=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + pho.setValue(String.valueOf(competeCompany.getContactsPhone())); + hang.add(pho); + PoiUtil.PoiUtilCell idCardNum=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + idCardNum.setValue("/"); + hang.add(idCardNum); + PoiUtil.PoiUtilCell beizhu=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + beizhu.setValue("无"); + hang.add(beizhu); + biao.add(hang); + for (CompeteCoach competeCoach:competeCoachList){ + if(competeCoach.getCompanyId().equals(competeCompany.getId())){ + List hanghou=new ArrayList<>(); + PoiUtil.PoiUtilCell xuhaoCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + xuhaoCach.setValue(String.valueOf(i++)); + hanghou.add(xuhaoCach); + PoiUtil.PoiUtilCell cansaiduiwuCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + cansaiduiwuCach.setValue(competeCompany.getName()); + hanghou.add(cansaiduiwuCach); + PoiUtil.PoiUtilCell renyuanleibeiCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + if (competeCoach.getIdentity().equals((byte) 0)){ + renyuanleibeiCach.setValue("领队"); + }else { + renyuanleibeiCach.setValue("教练"); + } + hanghou.add(renyuanleibeiCach); + PoiUtil.PoiUtilCell nameCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + nameCach.setValue(competeCoach.getName()); + hanghou.add(nameCach); + PoiUtil.PoiUtilCell sexCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + sexCach.setValue(competeCoach.getGender().equals((byte) 0)?"女":"男"); + hanghou.add(sexCach); + PoiUtil.PoiUtilCell phoCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + phoCach.setValue(String.valueOf(competeCoach.getPhone())); + hanghou.add(phoCach); + PoiUtil.PoiUtilCell idCardNumCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + idCardNumCach.setValue(String.valueOf(competeCoach.getIdPhoto())); + hanghou.add(idCardNumCach); + PoiUtil.PoiUtilCell beizhuCach=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1, null, null); + beizhuCach.setValue("无"); + hanghou.add(beizhuCach); + biao.add(hanghou); + } + } + } + Workbook workbook = new XSSFWorkbook(); + PoiUtil.exportWB("参赛队伍信息表",biao,workbook); + //String name = "跳绳比赛报名人数统计表" + ".xlsx"; + String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = PropUtil.path + filepath; + + String path1="C:/d/"+filepath;//本地的路径 + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + File file = new File(path); + try { + OutputStream outputStream = new FileOutputStream(file); + workbook.write(outputStream); + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return PropUtil.domain + "file/download/know?path="+path; + } + + + @Override + public String iTeamListService(QueryDto params) { + //查出所有的单位的id + List competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId()); + List> biao = new ArrayList<>(); + List biaoti=new ArrayList<>(); + PoiUtil.PoiUtilCell biaotouName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 2, 1, null, null); + biaotouName.setValue("代表队名单"); + biaoti.add(biaotouName); + biao.add(biaoti); + for (CompeteCompany com:competeCompanyList) { + //查出教练和领队的list + List jLandLD=competeCompanyDao.selectByCompanyId(com.getId()); + CompetePlayerExample competePlayerExample=new CompetePlayerExample(); + competePlayerExample.createCriteria().andCompanyIdEqualTo(com.getId()); + //运动员list + List competePlayerList = competePlayerMapper.selectByExample(competePlayerExample); + + List daibiaodui=new ArrayList<>(); + PoiUtil.PoiUtilCell daibiaoduiName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 2, 1, null, null); + daibiaoduiName.setValue(com.getName()); + daibiaodui.add(daibiaoduiName); + biao.add(daibiaodui); + //领队和教练 + List lingduiList=new ArrayList<>(); + PoiUtil.PoiUtilCell lingdui=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1); + lingdui.setValue("领 队:"); + lingduiList.add(lingdui); + biao.add(lingduiList); + StringBuffer lingduiName=new StringBuffer(""); + StringBuffer jiaolianName=new StringBuffer(""); + jLandLD.forEach(jLD->{ + if (jLD.getIdentity().equals((byte) 0)) { + lingduiName.append(jLD.getName()+'、'); + } else { + jiaolianName.append(jLD.getName()+'、'); + } + }); + if(lingduiName.length()>0){ + lingduiName.deleteCharAt(lingduiName.length() - 1) ; + } + if(jiaolianName.length()>0){ + jiaolianName.deleteCharAt(jiaolianName.length() - 1) ; + } + PoiUtil.PoiUtilCell lingduiNameHang=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1); + lingduiNameHang.setValue(String.valueOf(lingduiName)); + lingduiList.add(lingduiNameHang); + + biao.add(lingduiList); + List jiaolianList=new ArrayList<>(); + PoiUtil.PoiUtilCell jiaoling=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1); + jiaoling.setValue("教 练:"); + jiaolianList.add(jiaoling); + PoiUtil.PoiUtilCell jiaolianHang= new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1); + jiaolianHang.setValue(String.valueOf(jiaolianName)); + jiaolianList.add(jiaolianHang); + biao.add(jiaolianList); + + //再放运动员 + StringBuffer yDYLN=new StringBuffer(""); + competePlayerList.forEach(cpL->{ + yDYLN.append(cpL.getName()); + yDYLN.append("("); + yDYLN.append(cpL.getGender().equals((byte) 0)?"女":"男"); + yDYLN.append(")、"); + }); + if (yDYLN.length()>0){ + yDYLN.deleteCharAt(yDYLN.length()-1); + } + + List yundongyuanList=new ArrayList<>(); + PoiUtil.PoiUtilCell yuandongyuan=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1); + yuandongyuan.setValue("运动员"); + yundongyuanList.add(yuandongyuan); + PoiUtil.PoiUtilCell yuandongyuanName=new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 1, 1); + yuandongyuanName.setValue(String.valueOf(yDYLN)); + yundongyuanList.add(yuandongyuanName); + biao.add(yundongyuanList); + biao.add(yundongyuanList); + List entryList=new ArrayList<>(); + PoiUtil.PoiUtilCell enter= new PoiUtil.PoiUtilCell(WebConstant.CELL_NULL, 2, 1); + entryList.add(enter); + biao.add(entryList); + } + biao.remove(biaoti.size()-1); + Workbook workbook = new XSSFWorkbook(); + PoiUtil.exportWB("代表队名单",biao,workbook); + String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = PropUtil.path + filepath; + String path1="C:/d/"+filepath;//本地的路径 + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + File file = new File(path); + try { + OutputStream outputStream = new FileOutputStream(file); + workbook.write(outputStream); + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return PropUtil.domain + "file/download/know?path="+path; + } + @Override public String competeJoin(QueryDto params) throws IOException { @@ -391,7 +627,9 @@ public class ExcelService implements IExcelService { @Override public String competeAllCount(CompeteDto.CompeteTime params) throws IOException { - return null; + List competeAllCountList = competeAllCountList(params); + String path = getExcelFilePathForCompeteAllCount(competeAllCountList); + return path; } // private List competeAllCountList(CompeteDto.CompeteTime params){ @@ -432,25 +670,94 @@ public class ExcelService implements IExcelService { return competePlayerDao.getTeamJoinNumByType(params.getCompeteTimeId()); } -} - - - - - - - - - - - - - - - - - + private String getExcelFilePathForCompeteAllCount(List arrayList) throws IOException { + //创建excle表格对象 + List> list = new ArrayList<>(); + //创建行对象 + List title = new ArrayList<>(); + //给首行单元格赋值 + title.add(new PoiUtil.PoiUtilCell("序号")); + title.add(new PoiUtil.PoiUtilCell("参赛项目")); + title.add(new PoiUtil.PoiUtilCell("小学男子组")); + title.add(new PoiUtil.PoiUtilCell("小学女子组")); + title.add(new PoiUtil.PoiUtilCell("小学混合组")); + title.add(new PoiUtil.PoiUtilCell("中学男子组")); + title.add(new PoiUtil.PoiUtilCell("中学女子组")); + title.add(new PoiUtil.PoiUtilCell("中学混合组")); + title.add(new PoiUtil.PoiUtilCell("高职院校男子组")); + title.add(new PoiUtil.PoiUtilCell("高职院校女子组")); + title.add(new PoiUtil.PoiUtilCell("高职院校混合组")); + title.add(new PoiUtil.PoiUtilCell("本科院校男子组")); + title.add(new PoiUtil.PoiUtilCell("本科院校女子组")); + title.add(new PoiUtil.PoiUtilCell("本科院校混合组")); + title.add(new PoiUtil.PoiUtilCell("俱乐部男子组(14岁及以下)")); + title.add(new PoiUtil.PoiUtilCell("俱乐部女子组(14岁及以下)")); + title.add(new PoiUtil.PoiUtilCell("俱乐部混合组(14岁及以下)")); + title.add(new PoiUtil.PoiUtilCell("合计")); + list.add(title); + //创建整个excel表格对象 + Workbook workbook = new XSSFWorkbook(); + int i = 1; + for (TableVo.CompeteAllCount competeAllCount : arrayList) { + //行对象 + List cells = new ArrayList<>(); + cells.add(new PoiUtil.PoiUtilCell(i + "", 1, 1, 300, 18)); + //单元格对象 + PoiUtil.PoiUtilCell poiUtilCel15 = new PoiUtil.PoiUtilCell(competeAllCount.getProjectName()); + cells.add(poiUtilCel15); + PoiUtil.PoiUtilCell poiUtilCel = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(0))); + cells.add(poiUtilCel); + PoiUtil.PoiUtilCell poiUtilCell = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(1))); + cells.add(poiUtilCell); + PoiUtil.PoiUtilCell poiUtilCel2 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(2))); + cells.add(poiUtilCel2); + PoiUtil.PoiUtilCell poiUtilCel3 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(3))); + cells.add(poiUtilCel3); + PoiUtil.PoiUtilCell poiUtilCel4 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(4))); + cells.add(poiUtilCel4); + PoiUtil.PoiUtilCell poiUtilCel5 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(5))); + cells.add(poiUtilCel5); + PoiUtil.PoiUtilCell poiUtilCel6 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(6))); + cells.add(poiUtilCel6); + PoiUtil.PoiUtilCell poiUtilCel7 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(7))); + cells.add(poiUtilCel7); + PoiUtil.PoiUtilCell poiUtilCel8 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(8))); + cells.add(poiUtilCel8); + PoiUtil.PoiUtilCell poiUtilCel9 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(9))); + cells.add(poiUtilCel9); + PoiUtil.PoiUtilCell poiUtilCel10 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(10))); + cells.add(poiUtilCel10); + PoiUtil.PoiUtilCell poiUtilCel11 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(11))); + cells.add(poiUtilCel11); + PoiUtil.PoiUtilCell poiUtilCel12 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(12))); + cells.add(poiUtilCel12); + PoiUtil.PoiUtilCell poiUtilCel13 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(13))); + cells.add(poiUtilCel13); + PoiUtil.PoiUtilCell poiUtilCel14 = new PoiUtil.PoiUtilCell(String.valueOf(competeAllCount.getNums().get(14))); + cells.add(poiUtilCel14); + list.add(cells); + i++; + } + //生成excel表格对象,并将数据放入 + Workbook wbs = PoiUtil.exportWB("XXX比赛报名汇总表", list, workbook); + //8:关联金山在线文档 + String name = "参赛人数统计表" + ".xlsx"; + String filepath = "mt/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = PropUtil.path + filepath; +// String path = filepath; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + //PropUtil.path获取配置文件中的path属性,拼接生成写入信息的文件名, + File file = new File(path); + OutputStream stream = new FileOutputStream(file); + wbs.write(stream); + stream.close(); + return path; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IExcelService.java b/mt/src/main/java/com/ccsens/mt/service/IExcelService.java index 053f40c1..23dc6648 100644 --- a/mt/src/main/java/com/ccsens/mt/service/IExcelService.java +++ b/mt/src/main/java/com/ccsens/mt/service/IExcelService.java @@ -1,13 +1,28 @@ package com.ccsens.mt.service; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.mt.bean.dto.CompeteDto; import com.ccsens.util.bean.dto.QueryDto; import java.io.IOException; -/** - * @author li - */ + public interface IExcelService { + /** + * 导出大赛队伍信息表 + * @param params + * @return + */ + String dasaiduiwuxinxiWPS(QueryDto params); + + /** + *导出代表队名单 + * @param params + * @return + */ + String iTeamListService(QueryDto params); + + /** * XXXX大赛报名表 * @param params 大赛id diff --git a/mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml b/mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml index 48077005..9daf7c6a 100644 --- a/mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml @@ -41,7 +41,6 @@ and cc.rec_status = 0 limit 1 - + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml b/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml index aff7340a..f9e89461 100644 --- a/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml +++ b/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml @@ -196,6 +196,9 @@ id = #{playerId} and rec_status = 0 +<<<<<<< HEAD + +======= +>>>>>>> c32326aa81c6ae6a4ce3e0a067a7617201458f50 \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml new file mode 100644 index 00000000..83c3bf11 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, site_num, start_time, end_time, created_at, updated_at, rec_status, + project_duration + + + + + delete from t_compete_project_config + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_project_config + + + + + + insert into t_compete_project_config (id, project_id, site_num, + start_time, end_time, created_at, + updated_at, rec_status, project_duration + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{siteNum,jdbcType=INTEGER}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{projectDuration,jdbcType=BIGINT} + ) + + + insert into t_compete_project_config + + + id, + + + project_id, + + + site_num, + + + start_time, + + + end_time, + + + created_at, + + + updated_at, + + + rec_status, + + + project_duration, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{siteNum,jdbcType=INTEGER}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{projectDuration,jdbcType=BIGINT}, + + + + + + update t_compete_project_config + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + site_num = #{record.siteNum,jdbcType=INTEGER}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + project_duration = #{record.projectDuration,jdbcType=BIGINT}, + + + + + + + + update t_compete_project_config + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + site_num = #{record.siteNum,jdbcType=INTEGER}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + project_duration = #{record.projectDuration,jdbcType=BIGINT} + + + + + + update t_compete_project_config + + + project_id = #{projectId,jdbcType=BIGINT}, + + + site_num = #{siteNum,jdbcType=INTEGER}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + project_duration = #{projectDuration,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_project_config + set project_id = #{projectId,jdbcType=BIGINT}, + site_num = #{siteNum,jdbcType=INTEGER}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + project_duration = #{projectDuration,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file