Browse Source

20201110mt合并冲突

tiaosheng
zy_Java 5 years ago
parent
commit
7c10292388
  1. 22
      mt/src/main/java/com/ccsens/mt/api/ExcelController.java
  2. 117
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java
  3. 741
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java
  4. 7
      mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java
  5. 15
      mt/src/main/java/com/ccsens/mt/persist/dao/CompeteCompanyDao.java
  6. 1
      mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java
  7. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectConfigMapper.java
  8. 355
      mt/src/main/java/com/ccsens/mt/service/ExcelService.java
  9. 21
      mt/src/main/java/com/ccsens/mt/service/IExcelService.java
  10. 31
      mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml
  11. 4
      mt/src/main/resources/mapper_dao/CompetePlayerDao.xml
  12. 276
      mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml

22
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<String> dasaiduiwuxinxiWPS(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> 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<String> teamList(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteTime> params) throws IOException {
log.info("导出代表队名单表:{}",params);
String path = excelService.iTeamListService(params);
return JsonResponse.newInstance().ok(path);
}
}

117
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();
}
}

741
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<Criteria> oredCriteria;
public CompeteProjectConfigExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria 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<Integer> values) {
addCriterion("site_num in", values, "siteNum");
return (Criteria) this;
}
public Criteria andSiteNumNotIn(List<Integer> 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<Long> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<Long> 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<Long> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<Long> 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<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> 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<Long> values) {
addCriterion("project_duration in", values, "projectDuration");
return (Criteria) this;
}
public Criteria andProjectDurationNotIn(List<Long> 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);
}
}
}

7
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("模糊查询参赛单位")

15
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<ProvinceCompeteVo.GroupAndPlayer> getPlayerByTeamProject(@Param("projectId")Long projectId, @Param("type")Byte type);
/**
* 根据大赛id查看当前大赛所有队伍信息,以及联系人的信息
* @param CompeteTimeId 大赛CompeteTimeId
* @return 返回参赛队伍详细信息
*/
List<CompeteCompany> selectByCompeteTimeId(Long CompeteTimeId);
/**
* 根据查出来得大赛得单位的id查询教练和领队得信息
* @param companyId 单位id
* @return
*/
List<CompeteCoach> selectByCompanyId(@Param("companyId")Long companyId);
}

1
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;

30
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<CompeteProjectConfig> 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);
}

355
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<CompeteDto.CompeteTime> params) {
//这个里面包含联系人得信息
List<CompeteCompany> competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId());
List<CompeteCoach> competeCoachList =new ArrayList<CompeteCoach>();
for (CompeteCompany com:competeCompanyList) {
//再根据单位id查询,领队和教练信息,返回list集合
competeCoachList.addAll(competeCompanyDao.selectByCompanyId(com.getId()));
}
List<List<PoiUtil.PoiUtilCell>> biao = new ArrayList<>();
//先把联系人的都添加进去
List<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<CompeteDto.CompeteTime> params) {
//查出所有的单位的id
List<CompeteCompany> competeCompanyList= competeCompanyDao.selectByCompeteTimeId(params.getParam().getCompeteTimeId());
List<List<PoiUtil.PoiUtilCell>> biao = new ArrayList<>();
List<PoiUtil.PoiUtilCell> 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<CompeteCoach> jLandLD=competeCompanyDao.selectByCompanyId(com.getId());
CompetePlayerExample competePlayerExample=new CompetePlayerExample();
competePlayerExample.createCriteria().andCompanyIdEqualTo(com.getId());
//运动员list
List<CompetePlayer> competePlayerList = competePlayerMapper.selectByExample(competePlayerExample);
List<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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<CompeteDto.CompeteTime> params) throws IOException {
@ -391,7 +627,9 @@ public class ExcelService implements IExcelService {
@Override
public String competeAllCount(CompeteDto.CompeteTime params) throws IOException {
return null;
List<TableVo.CompeteAllCount> competeAllCountList = competeAllCountList(params);
String path = getExcelFilePathForCompeteAllCount(competeAllCountList);
return path;
}
// private List<TableVo.CompeteAllCount> competeAllCountList(CompeteDto.CompeteTime params){
@ -432,25 +670,94 @@ public class ExcelService implements IExcelService {
return competePlayerDao.getTeamJoinNumByType(params.getCompeteTimeId());
}
}
private String getExcelFilePathForCompeteAllCount(List<TableVo.CompeteAllCount> arrayList) throws IOException {
//创建excle表格对象
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
//创建行对象
List<PoiUtil.PoiUtilCell> 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<PoiUtil.PoiUtilCell> 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;
}
}

21
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<CompeteDto.CompeteTime> params);
/**
*导出代表队名单
* @param params
* @return
*/
String iTeamListService(QueryDto<CompeteDto.CompeteTime> params);
/**
* XXXX大赛报名表
* @param params 大赛id

31
mt/src/main/resources/mapper_dao/CompeteCompanyDao.xml

@ -41,7 +41,6 @@
and cc.rec_status = 0
limit 1
</select>
<select id="queryPlayerByGroupId" resultMap="group_player">
SELECT
cg.id as groupId,
@ -254,5 +253,35 @@
and p.rec_status = 0
</select>
<select id="selectByCompeteTimeId" resultType="com.ccsens.mt.bean.po.CompeteCompany">
SELECT
tcc.`id` as id,
tcc.`name` as name,
tcc.`contacts_name` as contactsName,
tcc.`contacts_phone` as contactsPhone
from
t_compete_company tcc
where
tcc.compete_time_id=#{CompeteTimeId}
</select>
<select id="selectByCompanyId" resultType="com.ccsens.mt.bean.po.CompeteCoach">
select
tcc.`id` as id,
tcc.`identity` as identity,
tcc.`name` as `name`,
tcc.`gender` as `gender`,
tcc.`phone` as `phone`,
tcc.`id_card` as `idCard`,
tcc.`id_photo` as `idPhoto`,
tcc.`coach_certificate` as `coachCertificate`,
tcc.`company_id` as `companyId`,
tcc.`created_at` as `createdAt`,
tcc.`updated_at` as `updatedAt`,
tcc.`rec_status` as `recStatus`
FROM
t_compete_coach tcc
where
tcc.`company_id`= #{companyId}
</select>
</mapper>

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

@ -196,6 +196,9 @@
id = #{playerId}
and rec_status = 0
</select>
<<<<<<< HEAD
=======
<select id="getTeamGroupRemark" resultType="com.ccsens.mt.bean.vo.ProvinceCompeteVo$TeamGroupRemark">
SELECT
g.group_name as groupRemark,
@ -262,4 +265,5 @@
and g.rec_status in (0,1)
ORDER BY g.sequence
</select>
>>>>>>> c32326aa81c6ae6a4ce3e0a067a7617201458f50
</mapper>

276
mt/src/main/resources/mapper_raw/CompeteProjectConfigMapper.xml

@ -0,0 +1,276 @@
<?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.mapper.CompeteProjectConfigMapper">
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteProjectConfig">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="site_num" jdbcType="INTEGER" property="siteNum" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="project_duration" jdbcType="BIGINT" property="projectDuration" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, project_id, site_num, start_time, end_time, created_at, updated_at, rec_status,
project_duration
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfigExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_compete_project_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_compete_project_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_compete_project_config
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfigExample">
delete from t_compete_project_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfig">
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>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfig">
insert into t_compete_project_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="siteNum != null">
site_num,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
<if test="projectDuration != null">
project_duration,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="siteNum != null">
#{siteNum,jdbcType=INTEGER},
</if>
<if test="startTime != null">
#{startTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
#{endTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
<if test="projectDuration != null">
#{projectDuration,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfigExample" resultType="java.lang.Long">
select count(*) from t_compete_project_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_compete_project_config
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.siteNum != null">
site_num = #{record.siteNum,jdbcType=INTEGER},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=BIGINT},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
<if test="record.projectDuration != null">
project_duration = #{record.projectDuration,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfig">
update t_compete_project_config
<set>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="siteNum != null">
site_num = #{siteNum,jdbcType=INTEGER},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
<if test="projectDuration != null">
project_duration = #{projectDuration,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteProjectConfig">
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}
</update>
</mapper>
Loading…
Cancel
Save