diff --git a/research-admin/src/main/java/com/research/web/controller/client/project/GroupController.java b/research-admin/src/main/java/com/research/web/controller/client/project/GroupController.java index 3dd5aadf..1a48a65d 100644 --- a/research-admin/src/main/java/com/research/web/controller/client/project/GroupController.java +++ b/research-admin/src/main/java/com/research/web/controller/client/project/GroupController.java @@ -169,6 +169,12 @@ public class GroupController { public JsonResponse statistics(){ return JsonResponse.ok(ktsGroupService.statistics()); } + + @PostMapping("/workerStatistics") + public JsonResponse workerStatistics(){ + return JsonResponse.ok(ktsGroupService.workerStatistics()); + } + private void aduit(Long memberId) throws Exception { //1.流程初始化表单 diff --git a/research-generator/src/main/resources/mbg.xml b/research-generator/src/main/resources/mbg.xml index e899e2ed..6e06875f 100644 --- a/research-generator/src/main/resources/mbg.xml +++ b/research-generator/src/main/resources/mbg.xml @@ -62,12 +62,13 @@ - + + - +
diff --git a/research-system/src/main/java/com/research/system/domain/dto/GroupDto.java b/research-system/src/main/java/com/research/system/domain/dto/GroupDto.java index ea9cc83c..3e1ade70 100644 --- a/research-system/src/main/java/com/research/system/domain/dto/GroupDto.java +++ b/research-system/src/main/java/com/research/system/domain/dto/GroupDto.java @@ -120,7 +120,7 @@ public class GroupDto { private Integer qualification; - private Integer title; + private String title; private Integer sort; diff --git a/research-system/src/main/java/com/research/system/domain/dto/OutcomeDto.java b/research-system/src/main/java/com/research/system/domain/dto/OutcomeDto.java index 48536f1a..d2c302f3 100644 --- a/research-system/src/main/java/com/research/system/domain/dto/OutcomeDto.java +++ b/research-system/src/main/java/com/research/system/domain/dto/OutcomeDto.java @@ -56,7 +56,7 @@ public class OutcomeDto { private String paperDoi; - private List authors; + private String authors; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date applyDate; @@ -108,12 +108,20 @@ public class OutcomeDto { @ApiModelProperty("状态(0在研 1毕业)") private Byte status; - public String getAuthors() { - if (CollUtil.isNotEmpty(authors)) { - return String.join(",", authors); - } - return null; + private List authorList; + + @Data + public static class AuthorDto { + private String name; + private Byte type; } + +// public String getAuthors() { +// if (CollUtil.isNotEmpty(authors)) { +// return String.join(",", authors); +// } +// return null; +// } } @Data diff --git a/research-system/src/main/java/com/research/system/domain/po/AchPaperAuthor.java b/research-system/src/main/java/com/research/system/domain/po/AchPaperAuthor.java new file mode 100644 index 00000000..175162f7 --- /dev/null +++ b/research-system/src/main/java/com/research/system/domain/po/AchPaperAuthor.java @@ -0,0 +1,128 @@ +package com.research.system.domain.po; + +import java.io.Serializable; +import java.util.Date; + +public class AchPaperAuthor implements Serializable { + private Long id; + + private Long achievementId; + + private String name; + + private Byte type; + + private Byte delFlag; + + private String createBy; + + private Date createTime; + + private String updateBy; + + private Date updateTime; + + private String remark; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getAchievementId() { + return achievementId; + } + + public void setAchievementId(Long achievementId) { + this.achievementId = achievementId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Byte getDelFlag() { + return delFlag; + } + + public void setDelFlag(Byte delFlag) { + this.delFlag = delFlag; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.trim(); + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + @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(", achievementId=").append(achievementId); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", delFlag=").append(delFlag); + sb.append(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", remark=").append(remark); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/research-system/src/main/java/com/research/system/domain/po/AchPaperAuthorExample.java b/research-system/src/main/java/com/research/system/domain/po/AchPaperAuthorExample.java new file mode 100644 index 00000000..bbdc5fc8 --- /dev/null +++ b/research-system/src/main/java/com/research/system/domain/po/AchPaperAuthorExample.java @@ -0,0 +1,841 @@ +package com.research.system.domain.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class AchPaperAuthorExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public AchPaperAuthorExample() { + 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 andAchievementIdIsNull() { + addCriterion("achievement_id is null"); + return (Criteria) this; + } + + public Criteria andAchievementIdIsNotNull() { + addCriterion("achievement_id is not null"); + return (Criteria) this; + } + + public Criteria andAchievementIdEqualTo(Long value) { + addCriterion("achievement_id =", value, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdNotEqualTo(Long value) { + addCriterion("achievement_id <>", value, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdGreaterThan(Long value) { + addCriterion("achievement_id >", value, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdGreaterThanOrEqualTo(Long value) { + addCriterion("achievement_id >=", value, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdLessThan(Long value) { + addCriterion("achievement_id <", value, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdLessThanOrEqualTo(Long value) { + addCriterion("achievement_id <=", value, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdIn(List values) { + addCriterion("achievement_id in", values, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdNotIn(List values) { + addCriterion("achievement_id not in", values, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdBetween(Long value1, Long value2) { + addCriterion("achievement_id between", value1, value2, "achievementId"); + return (Criteria) this; + } + + public Criteria andAchievementIdNotBetween(Long value1, Long value2) { + addCriterion("achievement_id not between", value1, value2, "achievementId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Byte value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Byte value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Byte value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Byte value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Byte value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Byte value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Byte value1, Byte value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Byte value1, Byte value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + 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/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMember.java b/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMember.java index a4914b06..744f8bb6 100644 --- a/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMember.java +++ b/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMember.java @@ -28,7 +28,7 @@ public class KtsKtGroupMember implements Serializable { private Integer qualification; - private Integer title; + private String title; private Integer sort; @@ -152,12 +152,12 @@ public class KtsKtGroupMember implements Serializable { this.qualification = qualification; } - public Integer getTitle() { + public String getTitle() { return title; } - public void setTitle(Integer title) { - this.title = title; + public void setTitle(String title) { + this.title = title == null ? null : title.trim(); } public Integer getSort() { diff --git a/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMemberExample.java b/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMemberExample.java index f56fafca..9c008643 100644 --- a/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMemberExample.java +++ b/research-system/src/main/java/com/research/system/domain/po/KtsKtGroupMemberExample.java @@ -902,52 +902,62 @@ public class KtsKtGroupMemberExample { return (Criteria) this; } - public Criteria andTitleEqualTo(Integer value) { + public Criteria andTitleEqualTo(String value) { addCriterion("title =", value, "title"); return (Criteria) this; } - public Criteria andTitleNotEqualTo(Integer value) { + public Criteria andTitleNotEqualTo(String value) { addCriterion("title <>", value, "title"); return (Criteria) this; } - public Criteria andTitleGreaterThan(Integer value) { + public Criteria andTitleGreaterThan(String value) { addCriterion("title >", value, "title"); return (Criteria) this; } - public Criteria andTitleGreaterThanOrEqualTo(Integer value) { + public Criteria andTitleGreaterThanOrEqualTo(String value) { addCriterion("title >=", value, "title"); return (Criteria) this; } - public Criteria andTitleLessThan(Integer value) { + public Criteria andTitleLessThan(String value) { addCriterion("title <", value, "title"); return (Criteria) this; } - public Criteria andTitleLessThanOrEqualTo(Integer value) { + public Criteria andTitleLessThanOrEqualTo(String value) { addCriterion("title <=", value, "title"); return (Criteria) this; } - public Criteria andTitleIn(List values) { + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { addCriterion("title in", values, "title"); return (Criteria) this; } - public Criteria andTitleNotIn(List values) { + public Criteria andTitleNotIn(List values) { addCriterion("title not in", values, "title"); return (Criteria) this; } - public Criteria andTitleBetween(Integer value1, Integer value2) { + public Criteria andTitleBetween(String value1, String value2) { addCriterion("title between", value1, value2, "title"); return (Criteria) this; } - public Criteria andTitleNotBetween(Integer value1, Integer value2) { + public Criteria andTitleNotBetween(String value1, String value2) { addCriterion("title not between", value1, value2, "title"); return (Criteria) this; } diff --git a/research-system/src/main/java/com/research/system/domain/vo/GroupVO.java b/research-system/src/main/java/com/research/system/domain/vo/GroupVO.java index 5451119d..c840fce1 100644 --- a/research-system/src/main/java/com/research/system/domain/vo/GroupVO.java +++ b/research-system/src/main/java/com/research/system/domain/vo/GroupVO.java @@ -199,6 +199,8 @@ public class GroupVO { private Long ktGroupId; + private Long orgId; + private String parentMemberId; private String memberName; @@ -218,7 +220,7 @@ public class GroupVO { private Integer qualification; - private Integer title; + private String title = ""; private Integer sort; @@ -290,9 +292,14 @@ public class GroupVO { public static class Member { private Long orgId; private String orgName; + private int total; private int num; private int zdNum; private int byNum; + + public int getTotal() { + return num + zdNum + byNum; + } } @Data @@ -308,10 +315,88 @@ public class GroupVO { public static class Xl { private Long orgId; private String orgName; - private Integer bk;//本科 - private Integer bs;//博士 - private Integer ss;//硕士 + private int total; + private int bk;//本科 + private int bs;//博士 + private int ss;//硕士 + + public int getTotal() { + return bk + bs + ss; + } + } + } + + @Data + public static class WorkerStatistics { + private List titleList; + + + @Data + public static class Title { + private Long orgId; + private String orgName; + private int gj;//高级 + private int fg;//副高 + private int zj;//中级 + private int cj;//初级 + + private GjDto gjList; + + private FgjDto fgjList; + + private ZjDto zjList; + + private CjDto cjList; + + @Data + public static class GjDto{ + @ApiModelProperty("教授") + private int js; + @ApiModelProperty("研究员") + private int yjy; + @ApiModelProperty("主任") + private int zrys; + @ApiModelProperty("高级工程师") + private int gjgcs; + } + + @Data + public static class FgjDto{ + @ApiModelProperty("副教授") + private int fjs; + @ApiModelProperty("副研究员") + private int fyjy; + @ApiModelProperty("副主任") + private int fzrys; + @ApiModelProperty("副高级工程师") + private int fgjgcs; + } + + @Data + public static class ZjDto{ + @ApiModelProperty("讲师") + private int js; + @ApiModelProperty("主治医师") + private int zzys; + @ApiModelProperty("工程师") + private int gcs; + } + + @Data + public static class CjDto{ + @ApiModelProperty("助教") + private int zj; + @ApiModelProperty("助理研究员") + private int zlyjy; + @ApiModelProperty("住院医师") + private int zyys; + @ApiModelProperty("助理工程师") + private int zlgcs; + @ApiModelProperty("技术员") + private int jsy; + } } + } } diff --git a/research-system/src/main/java/com/research/system/domain/vo/OutcomeVo.java b/research-system/src/main/java/com/research/system/domain/vo/OutcomeVo.java index cc7c0d13..b28b0531 100644 --- a/research-system/src/main/java/com/research/system/domain/vo/OutcomeVo.java +++ b/research-system/src/main/java/com/research/system/domain/vo/OutcomeVo.java @@ -94,6 +94,7 @@ public class OutcomeVo { private Byte type; @ApiModelProperty("状态(0在研 1毕业)") private Byte status; + private List<AuthorResult> authorList; } @Data @@ -121,6 +122,10 @@ public class OutcomeVo { private List<CategoryResult> childList; } - - + @Data + public class AuthorResult { + private Long id; + private String name; + private Byte type; + } } diff --git a/research-system/src/main/java/com/research/system/persist/dao/KtsGroupDao.java b/research-system/src/main/java/com/research/system/persist/dao/KtsGroupDao.java index a4d285f6..82214b32 100644 --- a/research-system/src/main/java/com/research/system/persist/dao/KtsGroupDao.java +++ b/research-system/src/main/java/com/research/system/persist/dao/KtsGroupDao.java @@ -4,6 +4,7 @@ import com.research.system.domain.dto.CommonDto; import com.research.system.domain.dto.GroupDto; import com.research.system.domain.vo.GroupVO; import org.apache.ibatis.annotations.Param; +import org.springframework.security.core.parameters.P; import java.util.List; @@ -34,4 +35,13 @@ public interface KtsGroupDao { List<GroupVO.Statistics.Xl> queryZdXlStatistics(); List<GroupVO.Statistics.Xl> queryByXlStatistics(); + + GroupVO.WorkerStatistics.Title.GjDto queryGjTitleStatistics(@Param("orgId") Long orgId); + + GroupVO.WorkerStatistics.Title.FgjDto queryFgjTitleStatistics(@Param("orgId") Long orgId); + + GroupVO.WorkerStatistics.Title.CjDto queryCjTitleStatistics(@Param("orgId") Long orgId); + + GroupVO.WorkerStatistics.Title.ZjDto queryZjTitleStatistics(@Param("orgId") Long orgId); + } diff --git a/research-system/src/main/java/com/research/system/persist/mapper/AchPaperAuthorMapper.java b/research-system/src/main/java/com/research/system/persist/mapper/AchPaperAuthorMapper.java new file mode 100644 index 00000000..22b13104 --- /dev/null +++ b/research-system/src/main/java/com/research/system/persist/mapper/AchPaperAuthorMapper.java @@ -0,0 +1,28 @@ +package com.research.system.persist.mapper; + +import com.research.system.domain.po.AchPaperAuthor; +import com.research.system.domain.po.AchPaperAuthorExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface AchPaperAuthorMapper { + long countByExample(AchPaperAuthorExample example); + + int deleteByPrimaryKey(Long id); + + int insert(AchPaperAuthor record); + + int insertSelective(AchPaperAuthor record); + + List<AchPaperAuthor> selectByExample(AchPaperAuthorExample example); + + AchPaperAuthor selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") AchPaperAuthor record, @Param("example") AchPaperAuthorExample example); + + int updateByExample(@Param("record") AchPaperAuthor record, @Param("example") AchPaperAuthorExample example); + + int updateByPrimaryKeySelective(AchPaperAuthor record); + + int updateByPrimaryKey(AchPaperAuthor record); +} \ No newline at end of file diff --git a/research-system/src/main/java/com/research/system/service/KtsGroupService.java b/research-system/src/main/java/com/research/system/service/KtsGroupService.java index 08fa8eaa..f6b4d121 100644 --- a/research-system/src/main/java/com/research/system/service/KtsGroupService.java +++ b/research-system/src/main/java/com/research/system/service/KtsGroupService.java @@ -43,6 +43,8 @@ public interface KtsGroupService { void aduitMember(Long memberId, Byte status); + List<GroupVO.Result> queryMemberGroup(); + Integer configAdd(GroupDto.ConfigAdd dto); GroupVO.ConfigResult configQuery(); @@ -57,4 +59,6 @@ public interface KtsGroupService { GroupVO.Statistics statistics(); + + GroupVO.WorkerStatistics workerStatistics(); } diff --git a/research-system/src/main/java/com/research/system/service/impl/KtsGroupServiceImpl.java b/research-system/src/main/java/com/research/system/service/impl/KtsGroupServiceImpl.java index 95097074..9a064fec 100644 --- a/research-system/src/main/java/com/research/system/service/impl/KtsGroupServiceImpl.java +++ b/research-system/src/main/java/com/research/system/service/impl/KtsGroupServiceImpl.java @@ -16,10 +16,7 @@ import com.research.system.domain.vo.GroupVO; import com.research.system.domain.vo.HomeVo; import com.research.system.persist.dao.KtsGroupDao; import com.research.system.persist.mapper.*; -import com.research.system.service.ClientPrjProjInfoService; -import com.research.system.service.ISysUserService; -import com.research.system.service.KtsGroupService; -import com.research.system.service.TmsTenantUserService; +import com.research.system.service.*; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -55,6 +52,8 @@ public class KtsGroupServiceImpl implements KtsGroupService { private KtResearchContentMapper ktResearchContentMapper; @Resource private KtExpectedOutcomesMapper ktExpectedOutcomesMapper; + @Resource + private SysTitleMapper sysTitleMapper; @Override @@ -63,7 +62,7 @@ public class KtsGroupServiceImpl implements KtsGroupService { if (CollUtil.isNotEmpty(groupList)) { int sort = 0; for (GroupVO.Result result : groupList) { - sort+=1; + sort += 1; //查询内容 KtResearchContentExample ktResearchContentExample = new KtResearchContentExample(); ktResearchContentExample.createCriteria().andKtGroupIdEqualTo(result.getId()).andDelFlagEqualTo((byte) 0); @@ -206,7 +205,26 @@ public class KtsGroupServiceImpl implements KtsGroupService { @Override public List<GroupVO.MemberResult> queryMemberList(GroupDto.MemberQuery query) { - return ktsGroupDao.queryMemberList(query); + List<GroupVO.MemberResult> memberResults = ktsGroupDao.queryMemberList(query); + if (CollUtil.isNotEmpty(memberResults)) { + for (GroupVO.MemberResult memberResult : memberResults) { + String title = memberResult.getTitle(); + if (StrUtil.isNotEmpty(title)) { + String titleName = ""; + for (String s : title.split(",")) { + SysTitle sysTitle = sysTitleMapper.selectByPrimaryKey(Long.valueOf(s)); + if (sysTitle != null) { + titleName += sysTitle.getName() + ","; + } + } + //去掉最后一个, + if (StrUtil.isNotEmpty(titleName)) { + memberResult.setTitleName(titleName.substring(0, titleName.length() - 1)); + } + } + } + } + return memberResults; } @Override @@ -355,6 +373,16 @@ public class KtsGroupServiceImpl implements KtsGroupService { } } + @Override + public List<GroupVO.Result> queryMemberGroup() { + //根据手机号查询用户课题组 + KtsKtGroupMemberExample ktsKtGroupMemberExample = new KtsKtGroupMemberExample(); + ktsKtGroupMemberExample.createCriteria().andMemberPhoneEqualTo(SecurityUtils.getLoginUser().getUsername()); + List<KtsKtGroupMember> ktsKtGroupMembers = ktsKtGroupMemberMapper.selectByExample(ktsKtGroupMemberExample); + + return null; + } + @Override public Integer configAdd(GroupDto.ConfigAdd dto) { KtConfig ktConfig = BeanUtil.copyProperties(dto, KtConfig.class); @@ -459,5 +487,52 @@ public class KtsGroupServiceImpl implements KtsGroupService { return statistics; } + @Override + public GroupVO.WorkerStatistics workerStatistics() { + GroupVO.WorkerStatistics workerStatistics = new GroupVO.WorkerStatistics(); + //获取所有成员 + List<GroupVO.MemberResult> memberResults = queryMemberList(new GroupDto.MemberQuery()); + if (CollUtil.isNotEmpty(memberResults)) { + //按照组织分组 + Map<Long, List<GroupVO.MemberResult>> collect = memberResults.stream().collect(Collectors.groupingBy(GroupVO.MemberResult::getOrgId)); + for (Map.Entry<Long, List<GroupVO.MemberResult>> entry : collect.entrySet()) { + GroupVO.WorkerStatistics.Title title = new GroupVO.WorkerStatistics.Title(); + List<GroupVO.WorkerStatistics.Title> titleList = new ArrayList<>(); + title.setOrgId(entry.getKey()); + title.setOrgName(entry.getValue().get(0).getProjOrgName()); + //判断每个成员的数量 + for (GroupVO.MemberResult memberResult : entry.getValue()) { + if (StrUtil.isEmpty(memberResult.getTitle())) { + continue; + } + if (memberResult.getTitle().contains("1") || memberResult.getTitle().contains("5") || memberResult.getTitle().contains("8") || memberResult.getTitle().contains("12")) { + title.setGj(title.getGj() + 1); + continue; + } + if (memberResult.getTitle().contains("2") || memberResult.getTitle().contains("6") || memberResult.getTitle().contains("9") || memberResult.getTitle().contains("13")) { + title.setFg(title.getFg() + 1); + continue; + } + if (memberResult.getTitle().contains("3") || memberResult.getTitle().contains("10") || memberResult.getTitle().contains("14")) { + title.setZj(title.getZj() + 1); + continue; + } + if (memberResult.getTitle().contains("4") || memberResult.getTitle().contains("7") || memberResult.getTitle().contains("11") || memberResult.getTitle().contains("15") || memberResult.getTitle().contains("16")) { + title.setCj(title.getCj() + 1); + continue; + } + } + title.setGjList(ktsGroupDao.queryGjTitleStatistics(entry.getKey())); + title.setCjList(ktsGroupDao.queryCjTitleStatistics(entry.getKey())); + title.setZjList(ktsGroupDao.queryZjTitleStatistics(entry.getKey())); + title.setFgjList(ktsGroupDao.queryFgjTitleStatistics(entry.getKey())); + titleList.add(title); + workerStatistics.setTitleList(titleList); + } + } + + return workerStatistics; + } + } diff --git a/research-system/src/main/java/com/research/system/service/impl/OutcomeServiceImpl.java b/research-system/src/main/java/com/research/system/service/impl/OutcomeServiceImpl.java index 4b31f2ab..7813c49f 100644 --- a/research-system/src/main/java/com/research/system/service/impl/OutcomeServiceImpl.java +++ b/research-system/src/main/java/com/research/system/service/impl/OutcomeServiceImpl.java @@ -6,14 +6,12 @@ import cn.hutool.core.util.IdUtil; import com.research.common.utils.SecurityUtils; import com.research.system.domain.dto.CommonDto; import com.research.system.domain.dto.OutcomeDto; -import com.research.system.domain.po.AchAchievement; -import com.research.system.domain.po.AchAchievementCategory; -import com.research.system.domain.po.AchAchievementCategoryExample; -import com.research.system.domain.po.AchAchievementExample; +import com.research.system.domain.po.*; import com.research.system.domain.vo.OutcomeVo; import com.research.system.persist.dao.OutcomeDao; import com.research.system.persist.mapper.AchAchievementCategoryMapper; import com.research.system.persist.mapper.AchAchievementMapper; +import com.research.system.persist.mapper.AchPaperAuthorMapper; import com.research.system.service.OutcomeService; import org.springframework.stereotype.Service; @@ -35,10 +33,25 @@ public class OutcomeServiceImpl implements OutcomeService { private AchAchievementMapper achAchievementMapper; @Resource private AchAchievementCategoryMapper achAchievementCategoryMapper; + @Resource + private AchPaperAuthorMapper achPaperAuthorMapper; @Override public List<OutcomeVo.Result> queryList(OutcomeDto.Query query) { - return outcomeDao.queryList(query); + List<OutcomeVo.Result> results = outcomeDao.queryList(query); + if (CollUtil.isNotEmpty(results)) { + for (OutcomeVo.Result result : results) { + //查询作者 + AchPaperAuthorExample achPaperAuthorExample = new AchPaperAuthorExample(); + achPaperAuthorExample.createCriteria().andAchievementIdEqualTo(result.getId()); + List<AchPaperAuthor> achPaperAuthors = achPaperAuthorMapper.selectByExample(achPaperAuthorExample); + if (CollUtil.isNotEmpty(achPaperAuthors)) { + List<OutcomeVo.AuthorResult> authorResults = BeanUtil.copyToList(achPaperAuthors, OutcomeVo.AuthorResult.class); + result.setAuthorList(authorResults) ; + } + } + } + return results; } @Override @@ -54,6 +67,23 @@ public class OutcomeServiceImpl implements OutcomeService { achAchievement.setUpdateBy(SecurityUtils.getUsername()); achAchievement.setUpdateTime(new Date()); achAchievementMapper.updateByPrimaryKeySelective(achAchievement); + //修改先删除作者, 最后统一新增 + AchPaperAuthorExample achPaperAuthorExample = new AchPaperAuthorExample(); + achPaperAuthorExample.createCriteria().andAchievementIdEqualTo(achAchievement.getId()); + AchPaperAuthor achPaperAuthor = new AchPaperAuthor(); + achPaperAuthor.setDelFlag((byte) 1); + achPaperAuthorMapper.updateByExampleSelective(achPaperAuthor, achPaperAuthorExample); + } + + //添加作者 + if (CollUtil.isNotEmpty(dto.getAuthorList())) { + List<AchPaperAuthor> achPaperAuthors = BeanUtil.copyToList(dto.getAuthorList(), AchPaperAuthor.class); + for (AchPaperAuthor achPaperAuthor : achPaperAuthors) { + achPaperAuthor.setId(IdUtil.getSnowflakeNextId()); + achPaperAuthor.setAchievementId(achAchievement.getId()); + achPaperAuthor.setDelFlag((byte) 0); + achPaperAuthorMapper.insertSelective(achPaperAuthor); + } } } diff --git a/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml b/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml index 07cd0864..09a8d980 100644 --- a/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml +++ b/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml @@ -71,8 +71,8 @@ m.create_time as createTime, g.kt_group_name as ktGroupName, d1.dict_label as qualificationName, - d2.dict_label as titleName, o.org_name as projOrgName, + o.id as orgId, u.user_name as userName, u.nick_name as nickName, m.enroll_time as enrollmentTime, @@ -126,7 +126,7 @@ select o.id as orgId, o.org_name as orgName, SUM(CASE WHEN plan_status = '0' THEN 1 ELSE 0 END) AS jhn, - SUM(CASE WHEN plan_status = '1' THEN 1 ELSE 0 END) AS jhw + SUM(CASE WHEN plan_status = '1' THEN 1 ELSE 0 END) AS jhw, count(g.id) as total from prj_proj_org o left join @@ -217,4 +217,69 @@ where o.del_flag = 0 group by o.id </select> + + + <select id="queryGjTitleStatistics" resultType="com.research.system.domain.vo.GroupVO$WorkerStatistics$Title$GjDto"> + select o.id as orgId, + o.org_name as orgName, + SUM(CASE WHEN FIND_IN_SET('1', m.title) > 0 THEN 1 ELSE 0 END) AS js, + SUM(CASE WHEN FIND_IN_SET('5', m.title) > 0 THEN 1 ELSE 0 END) AS yjy, + SUM(CASE WHEN FIND_IN_SET('8', m.title) > 0 THEN 1 ELSE 0 END) AS zrys, + SUM(CASE WHEN FIND_IN_SET('12', m.title) > 0 THEN 1 ELSE 0 END) AS gjgcs + from prj_proj_org o + left join + kts_kt_group g on g.proj_org_id = o.id and g.del_flag = 0 + LEFT JOIN kts_kt_group_member m on m.kt_group_id = g.id + where o.del_flag = 0 + and o.id = #{orgId} + group by o.id + </select> + + <select id="queryFgjTitleStatistics" resultType="com.research.system.domain.vo.GroupVO$WorkerStatistics$Title$FgjDto"> + select o.id as orgId, + o.org_name as orgName, + SUM(CASE WHEN FIND_IN_SET('2', m.title) > 0 THEN 1 ELSE 0 END) AS fjs, + SUM(CASE WHEN FIND_IN_SET('6', m.title) > 0 THEN 1 ELSE 0 END) AS fyjy, + SUM(CASE WHEN FIND_IN_SET('8', m.title) > 0 THEN 1 ELSE 0 END) AS fzrys, + SUM(CASE WHEN FIND_IN_SET('13', m.title) > 0 THEN 1 ELSE 0 END) AS fgjgcs + from prj_proj_org o + left join + kts_kt_group g on g.proj_org_id = o.id and g.del_flag = 0 + LEFT JOIN kts_kt_group_member m on m.kt_group_id = g.id + where o.del_flag = 0 + and o.id = #{orgId} + group by o.id + </select> + + <select id="queryCjTitleStatistics" resultType="com.research.system.domain.vo.GroupVO$WorkerStatistics$Title$CjDto"> + select o.id as orgId, + o.org_name as orgName, + SUM(CASE WHEN FIND_IN_SET('4', m.title) > 0 THEN 1 ELSE 0 END) AS zj, + SUM(CASE WHEN FIND_IN_SET('7', m.title) > 0 THEN 1 ELSE 0 END) AS zlyjy, + SUM(CASE WHEN FIND_IN_SET('11', m.title) > 0 THEN 1 ELSE 0 END) AS zrys, + SUM(CASE WHEN FIND_IN_SET('15', m.title) > 0 THEN 1 ELSE 0 END) AS zlgcs, + SUM(CASE WHEN FIND_IN_SET('16', m.title) > 0 THEN 1 ELSE 0 END) AS jsy + from prj_proj_org o + left join + kts_kt_group g on g.proj_org_id = o.id and g.del_flag = 0 + LEFT JOIN kts_kt_group_member m on m.kt_group_id = g.id + where o.del_flag = 0 + and o.id = #{orgId} + group by o.id + </select> + + <select id="queryZjTitleStatistics" resultType="com.research.system.domain.vo.GroupVO$WorkerStatistics$Title$ZjDto"> + select o.id as orgId, + o.org_name as orgName, + SUM(CASE WHEN FIND_IN_SET('3', m.title) > 0 THEN 1 ELSE 0 END) AS js, + SUM(CASE WHEN FIND_IN_SET('10', m.title) > 0 THEN 1 ELSE 0 END) AS zzys, + SUM(CASE WHEN FIND_IN_SET('14', m.title) > 0 THEN 1 ELSE 0 END) AS gcs + from prj_proj_org o + left join + kts_kt_group g on g.proj_org_id = o.id and g.del_flag = 0 + LEFT JOIN kts_kt_group_member m on m.kt_group_id = g.id + where o.del_flag = 0 + and o.id = #{orgId} + group by o.id + </select> </mapper> diff --git a/research-system/src/main/resources/mapper/system/AchAchievementMapper.xml b/research-system/src/main/resources/mapper/system/AchAchievementMapper.xml index 312f1e0e..956f5c28 100644 --- a/research-system/src/main/resources/mapper/system/AchAchievementMapper.xml +++ b/research-system/src/main/resources/mapper/system/AchAchievementMapper.xml @@ -108,7 +108,7 @@ apply_date, publish_date, place, ach_type, source, paper_source_type, yskt_xmfzr, yskt_funds, yskt_lxpzwh, yskt_status, keywords, paper_link, pdf_download_url, commitment_letter_url, del_flag, create_by, create_time, update_by, update_time, remark, tx_authors, paper_doi, - partition, impact_factor, name, sex, age, projects, type, status + `partition`, impact_factor, name, sex, age, projects, type, status </sql> <sql id="Blob_Column_List"> abstracts @@ -166,7 +166,7 @@ pdf_download_url, commitment_letter_url, del_flag, create_by, create_time, update_by, update_time, remark, tx_authors, - paper_doi, partition, impact_factor, + paper_doi, `partition`, impact_factor, name, sex, age, projects, type, status, abstracts ) @@ -282,7 +282,7 @@ paper_doi, </if> <if test="partition != null"> - partition, + `partition`, </if> <if test="impactFactor != null"> impact_factor, @@ -535,7 +535,7 @@ paper_doi = #{record.paperDoi,jdbcType=VARCHAR}, </if> <if test="record.partition != null"> - partition = #{record.partition,jdbcType=VARCHAR}, + `partition` = #{record.partition,jdbcType=VARCHAR}, </if> <if test="record.impactFactor != null"> impact_factor = #{record.impactFactor,jdbcType=VARCHAR}, @@ -599,7 +599,7 @@ remark = #{record.remark,jdbcType=VARCHAR}, tx_authors = #{record.txAuthors,jdbcType=VARCHAR}, paper_doi = #{record.paperDoi,jdbcType=VARCHAR}, - partition = #{record.partition,jdbcType=VARCHAR}, + `partition` = #{record.partition,jdbcType=VARCHAR}, impact_factor = #{record.impactFactor,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR}, sex = #{record.sex,jdbcType=VARCHAR}, @@ -645,7 +645,7 @@ remark = #{record.remark,jdbcType=VARCHAR}, tx_authors = #{record.txAuthors,jdbcType=VARCHAR}, paper_doi = #{record.paperDoi,jdbcType=VARCHAR}, - partition = #{record.partition,jdbcType=VARCHAR}, + `partition` = #{record.partition,jdbcType=VARCHAR}, impact_factor = #{record.impactFactor,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR}, sex = #{record.sex,jdbcType=VARCHAR}, @@ -751,7 +751,7 @@ paper_doi = #{paperDoi,jdbcType=VARCHAR}, </if> <if test="partition != null"> - partition = #{partition,jdbcType=VARCHAR}, + `partition` = #{partition,jdbcType=VARCHAR}, </if> <if test="impactFactor != null"> impact_factor = #{impactFactor,jdbcType=VARCHAR}, @@ -812,7 +812,7 @@ remark = #{remark,jdbcType=VARCHAR}, tx_authors = #{txAuthors,jdbcType=VARCHAR}, paper_doi = #{paperDoi,jdbcType=VARCHAR}, - partition = #{partition,jdbcType=VARCHAR}, + `partition` = #{partition,jdbcType=VARCHAR}, impact_factor = #{impactFactor,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR}, @@ -855,7 +855,7 @@ remark = #{remark,jdbcType=VARCHAR}, tx_authors = #{txAuthors,jdbcType=VARCHAR}, paper_doi = #{paperDoi,jdbcType=VARCHAR}, - partition = #{partition,jdbcType=VARCHAR}, + `partition` = #{partition,jdbcType=VARCHAR}, impact_factor = #{impactFactor,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR}, diff --git a/research-system/src/main/resources/mapper/system/AchPaperAuthorMapper.xml b/research-system/src/main/resources/mapper/system/AchPaperAuthorMapper.xml new file mode 100644 index 00000000..05f71780 --- /dev/null +++ b/research-system/src/main/resources/mapper/system/AchPaperAuthorMapper.xml @@ -0,0 +1,285 @@ +<?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.research.system.persist.mapper.AchPaperAuthorMapper"> + <resultMap id="BaseResultMap" type="com.research.system.domain.po.AchPaperAuthor"> + <id column="id" jdbcType="BIGINT" property="id" /> + <result column="achievement_id" jdbcType="BIGINT" property="achievementId" /> + <result column="name" jdbcType="VARCHAR" property="name" /> + <result column="type" jdbcType="TINYINT" property="type" /> + <result column="del_flag" jdbcType="TINYINT" property="delFlag" /> + <result column="create_by" jdbcType="VARCHAR" property="createBy" /> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> + <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> + <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> + <result column="remark" jdbcType="VARCHAR" property="remark" /> + </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, achievement_id, name, type, del_flag, create_by, create_time, update_by, update_time, + remark + </sql> + <select id="selectByExample" parameterType="com.research.system.domain.po.AchPaperAuthorExample" resultMap="BaseResultMap"> + select + <if test="distinct"> + distinct + </if> + <include refid="Base_Column_List" /> + from ach_paper_author + <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 ach_paper_author + where id = #{id,jdbcType=BIGINT} + </select> + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> + delete from ach_paper_author + where id = #{id,jdbcType=BIGINT} + </delete> + <insert id="insert" parameterType="com.research.system.domain.po.AchPaperAuthor"> + insert into ach_paper_author (id, achievement_id, name, + type, del_flag, create_by, + create_time, update_by, update_time, + remark) + values (#{id,jdbcType=BIGINT}, #{achievementId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, + #{type,jdbcType=TINYINT}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{remark,jdbcType=VARCHAR}) + </insert> + <insert id="insertSelective" parameterType="com.research.system.domain.po.AchPaperAuthor"> + insert into ach_paper_author + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="achievementId != null"> + achievement_id, + </if> + <if test="name != null"> + name, + </if> + <if test="type != null"> + type, + </if> + <if test="delFlag != null"> + del_flag, + </if> + <if test="createBy != null"> + create_by, + </if> + <if test="createTime != null"> + create_time, + </if> + <if test="updateBy != null"> + update_by, + </if> + <if test="updateTime != null"> + update_time, + </if> + <if test="remark != null"> + remark, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id,jdbcType=BIGINT}, + </if> + <if test="achievementId != null"> + #{achievementId,jdbcType=BIGINT}, + </if> + <if test="name != null"> + #{name,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + #{type,jdbcType=TINYINT}, + </if> + <if test="delFlag != null"> + #{delFlag,jdbcType=TINYINT}, + </if> + <if test="createBy != null"> + #{createBy,jdbcType=VARCHAR}, + </if> + <if test="createTime != null"> + #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateBy != null"> + #{updateBy,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="remark != null"> + #{remark,jdbcType=VARCHAR}, + </if> + </trim> + </insert> + <select id="countByExample" parameterType="com.research.system.domain.po.AchPaperAuthorExample" resultType="java.lang.Long"> + select count(*) from ach_paper_author + <if test="_parameter != null"> + <include refid="Example_Where_Clause" /> + </if> + </select> + <update id="updateByExampleSelective" parameterType="map"> + update ach_paper_author + <set> + <if test="record.id != null"> + id = #{record.id,jdbcType=BIGINT}, + </if> + <if test="record.achievementId != null"> + achievement_id = #{record.achievementId,jdbcType=BIGINT}, + </if> + <if test="record.name != null"> + name = #{record.name,jdbcType=VARCHAR}, + </if> + <if test="record.type != null"> + type = #{record.type,jdbcType=TINYINT}, + </if> + <if test="record.delFlag != null"> + del_flag = #{record.delFlag,jdbcType=TINYINT}, + </if> + <if test="record.createBy != null"> + create_by = #{record.createBy,jdbcType=VARCHAR}, + </if> + <if test="record.createTime != null"> + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + </if> + <if test="record.updateBy != null"> + update_by = #{record.updateBy,jdbcType=VARCHAR}, + </if> + <if test="record.updateTime != null"> + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="record.remark != null"> + remark = #{record.remark,jdbcType=VARCHAR}, + </if> + </set> + <if test="_parameter != null"> + <include refid="Update_By_Example_Where_Clause" /> + </if> + </update> + <update id="updateByExample" parameterType="map"> + update ach_paper_author + set id = #{record.id,jdbcType=BIGINT}, + achievement_id = #{record.achievementId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=TINYINT}, + del_flag = #{record.delFlag,jdbcType=TINYINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + remark = #{record.remark,jdbcType=VARCHAR} + <if test="_parameter != null"> + <include refid="Update_By_Example_Where_Clause" /> + </if> + </update> + <update id="updateByPrimaryKeySelective" parameterType="com.research.system.domain.po.AchPaperAuthor"> + update ach_paper_author + <set> + <if test="achievementId != null"> + achievement_id = #{achievementId,jdbcType=BIGINT}, + </if> + <if test="name != null"> + name = #{name,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + type = #{type,jdbcType=TINYINT}, + </if> + <if test="delFlag != null"> + del_flag = #{delFlag,jdbcType=TINYINT}, + </if> + <if test="createBy != null"> + create_by = #{createBy,jdbcType=VARCHAR}, + </if> + <if test="createTime != null"> + create_time = #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateBy != null"> + update_by = #{updateBy,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + update_time = #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="remark != null"> + remark = #{remark,jdbcType=VARCHAR}, + </if> + </set> + where id = #{id,jdbcType=BIGINT} + </update> + <update id="updateByPrimaryKey" parameterType="com.research.system.domain.po.AchPaperAuthor"> + update ach_paper_author + set achievement_id = #{achievementId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + del_flag = #{delFlag,jdbcType=TINYINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + </update> +</mapper> \ No newline at end of file diff --git a/research-system/src/main/resources/mapper/system/KtsKtGroupMemberMapper.xml b/research-system/src/main/resources/mapper/system/KtsKtGroupMemberMapper.xml index 8a84d6e8..7e0c909b 100644 --- a/research-system/src/main/resources/mapper/system/KtsKtGroupMemberMapper.xml +++ b/research-system/src/main/resources/mapper/system/KtsKtGroupMemberMapper.xml @@ -14,7 +14,7 @@ <result column="type" jdbcType="TINYINT" property="type" /> <result column="category" jdbcType="TINYINT" property="category" /> <result column="qualification" jdbcType="INTEGER" property="qualification" /> - <result column="title" jdbcType="INTEGER" property="title" /> + <result column="title" jdbcType="VARCHAR" property="title" /> <result column="sort" jdbcType="INTEGER" property="sort" /> <result column="intro" jdbcType="VARCHAR" property="intro" /> <result column="audit_status" jdbcType="TINYINT" property="auditStatus" /> @@ -130,7 +130,7 @@ #{parentMemberId,jdbcType=VARCHAR}, #{memberName,jdbcType=VARCHAR}, #{memberPhone,jdbcType=VARCHAR}, #{memberEmail,jdbcType=VARCHAR}, #{memberGender,jdbcType=TINYINT}, #{memberBirth,jdbcType=DATE}, #{type,jdbcType=TINYINT}, #{category,jdbcType=TINYINT}, #{qualification,jdbcType=INTEGER}, - #{title,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{intro,jdbcType=VARCHAR}, + #{title,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{intro,jdbcType=VARCHAR}, #{auditStatus,jdbcType=TINYINT}, #{memberStatus,jdbcType=TINYINT}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{enrollTime,jdbcType=TIMESTAMP}, @@ -253,7 +253,7 @@ #{qualification,jdbcType=INTEGER}, </if> <if test="title != null"> - #{title,jdbcType=INTEGER}, + #{title,jdbcType=VARCHAR}, </if> <if test="sort != null"> #{sort,jdbcType=INTEGER}, @@ -339,7 +339,7 @@ qualification = #{record.qualification,jdbcType=INTEGER}, </if> <if test="record.title != null"> - title = #{record.title,jdbcType=INTEGER}, + title = #{record.title,jdbcType=VARCHAR}, </if> <if test="record.sort != null"> sort = #{record.sort,jdbcType=INTEGER}, @@ -396,7 +396,7 @@ type = #{record.type,jdbcType=TINYINT}, category = #{record.category,jdbcType=TINYINT}, qualification = #{record.qualification,jdbcType=INTEGER}, - title = #{record.title,jdbcType=INTEGER}, + title = #{record.title,jdbcType=VARCHAR}, sort = #{record.sort,jdbcType=INTEGER}, intro = #{record.intro,jdbcType=VARCHAR}, audit_status = #{record.auditStatus,jdbcType=TINYINT}, @@ -450,7 +450,7 @@ qualification = #{qualification,jdbcType=INTEGER}, </if> <if test="title != null"> - title = #{title,jdbcType=INTEGER}, + title = #{title,jdbcType=VARCHAR}, </if> <if test="sort != null"> sort = #{sort,jdbcType=INTEGER}, @@ -504,7 +504,7 @@ type = #{type,jdbcType=TINYINT}, category = #{category,jdbcType=TINYINT}, qualification = #{qualification,jdbcType=INTEGER}, - title = #{title,jdbcType=INTEGER}, + title = #{title,jdbcType=VARCHAR}, sort = #{sort,jdbcType=INTEGER}, intro = #{intro,jdbcType=VARCHAR}, audit_status = #{auditStatus,jdbcType=TINYINT},