From 44af712773747bc79c6375a3aaac05156a7ace1f Mon Sep 17 00:00:00 2001 From: ccsens_zhengzhichuan Date: Fri, 19 Dec 2025 09:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E9=A2=98=E7=BB=84?= =?UTF-8?q?=EF=BC=8C=20=E6=B7=BB=E5=8A=A0=E8=81=8C=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/project/GroupController.java | 1 + .../client/project/SysTitleController.java | 54 + research-generator/src/main/resources/mbg.xml | 3 +- .../research/system/domain/po/SysTitle.java | 139 +++ .../system/domain/po/SysTitleExample.java | 931 ++++++++++++++++++ .../research/system/domain/vo/GroupVO.java | 50 +- .../system/persist/dao/KtsGroupDao.java | 4 + .../system/persist/mapper/SysTitleMapper.java | 28 + .../system/service/SysTitleService.java | 22 + .../service/impl/KtsGroupServiceImpl.java | 13 + .../service/impl/SysTitleServiceImpl.java | 55 ++ .../main/resources/mapper/dao/KtsGroupDao.xml | 35 +- .../mapper/system/SysTitleMapper.xml | 300 ++++++ 13 files changed, 1622 insertions(+), 13 deletions(-) create mode 100644 research-admin/src/main/java/com/research/web/controller/client/project/SysTitleController.java create mode 100644 research-system/src/main/java/com/research/system/domain/po/SysTitle.java create mode 100644 research-system/src/main/java/com/research/system/domain/po/SysTitleExample.java create mode 100644 research-system/src/main/java/com/research/system/persist/mapper/SysTitleMapper.java create mode 100644 research-system/src/main/java/com/research/system/service/SysTitleService.java create mode 100644 research-system/src/main/java/com/research/system/service/impl/SysTitleServiceImpl.java create mode 100644 research-system/src/main/resources/mapper/system/SysTitleMapper.xml 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 fdc144b4..3dd5aadf 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 @@ -31,6 +31,7 @@ import com.research.system.service.ISysUserService; import com.research.system.service.KtsGroupService; import com.research.system.service.TmsLoginService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; import liquibase.pro.packaged.J; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; diff --git a/research-admin/src/main/java/com/research/web/controller/client/project/SysTitleController.java b/research-admin/src/main/java/com/research/web/controller/client/project/SysTitleController.java new file mode 100644 index 00000000..b7b560d4 --- /dev/null +++ b/research-admin/src/main/java/com/research/web/controller/client/project/SysTitleController.java @@ -0,0 +1,54 @@ +package com.research.web.controller.client.project; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.research.common.core.domain.BaseDto; +import com.research.common.core.domain.JsonResponse; +import com.research.system.domain.dto.DocumentDto; +import com.research.system.domain.dto.SessionDto; +import com.research.system.domain.po.SysTitle; +import com.research.system.service.SysTitleService; +import io.swagger.annotations.Api; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @Author zzc + * @Package com.research.web.controller.client.project + * @Date 2025/12/18 17:58 + * @description: + */ +@Slf4j +@Api(tags = "职称") +@RestController +@RequestMapping("/title") +public class SysTitleController { + + @Resource + private SysTitleService sysTitleService; + @PostMapping("/query") + public JsonResponse> queryList(@RequestBody @Validated BaseDto dto){ + if (dto.getPageNum() > 0) { + PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); + } + return JsonResponse.ok(new PageInfo<>(sysTitleService.queryList())); + } + + @PostMapping("/add") + public JsonResponse add(@RequestBody @Validated SysTitle sysTitle){ + return JsonResponse.ok(sysTitleService.add(sysTitle)); + } + + @PostMapping("/del") + public JsonResponse del(@RequestBody @Validated SessionDto.Delete dto){ + return JsonResponse.ok(sysTitleService.del(dto.getIdList())); + } + +} diff --git a/research-generator/src/main/resources/mbg.xml b/research-generator/src/main/resources/mbg.xml index 1f895f39..e899e2ed 100644 --- a/research-generator/src/main/resources/mbg.xml +++ b/research-generator/src/main/resources/mbg.xml @@ -62,7 +62,8 @@ - +
+ diff --git a/research-system/src/main/java/com/research/system/domain/po/SysTitle.java b/research-system/src/main/java/com/research/system/domain/po/SysTitle.java new file mode 100644 index 00000000..7f44fc80 --- /dev/null +++ b/research-system/src/main/java/com/research/system/domain/po/SysTitle.java @@ -0,0 +1,139 @@ +package com.research.system.domain.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysTitle implements Serializable { + private Long id; + + private String code; + + private String name; + + private String level; + + private String apply; + + private String remark; + + private Byte delFlag; + + private String createBy; + + private Date createTime; + + private String updateBy; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level == null ? null : level.trim(); + } + + public String getApply() { + return apply; + } + + public void setApply(String apply) { + this.apply = apply == null ? null : apply.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + 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; + } + + @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(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", level=").append(level); + sb.append(", apply=").append(apply); + sb.append(", remark=").append(remark); + 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("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/research-system/src/main/java/com/research/system/domain/po/SysTitleExample.java b/research-system/src/main/java/com/research/system/domain/po/SysTitleExample.java new file mode 100644 index 00000000..7e862f38 --- /dev/null +++ b/research-system/src/main/java/com/research/system/domain/po/SysTitleExample.java @@ -0,0 +1,931 @@ +package com.research.system.domain.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysTitleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysTitleExample() { + 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 andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + 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 andLevelIsNull() { + addCriterion("level is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("level is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(String value) { + addCriterion("level =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(String value) { + addCriterion("level <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(String value) { + addCriterion("level >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(String value) { + addCriterion("level >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(String value) { + addCriterion("level <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(String value) { + addCriterion("level <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLike(String value) { + addCriterion("level like", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotLike(String value) { + addCriterion("level not like", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("level in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("level not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(String value1, String value2) { + addCriterion("level between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(String value1, String value2) { + addCriterion("level not between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andApplyIsNull() { + addCriterion("apply is null"); + return (Criteria) this; + } + + public Criteria andApplyIsNotNull() { + addCriterion("apply is not null"); + return (Criteria) this; + } + + public Criteria andApplyEqualTo(String value) { + addCriterion("apply =", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyNotEqualTo(String value) { + addCriterion("apply <>", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyGreaterThan(String value) { + addCriterion("apply >", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyGreaterThanOrEqualTo(String value) { + addCriterion("apply >=", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyLessThan(String value) { + addCriterion("apply <", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyLessThanOrEqualTo(String value) { + addCriterion("apply <=", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyLike(String value) { + addCriterion("apply like", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyNotLike(String value) { + addCriterion("apply not like", value, "apply"); + return (Criteria) this; + } + + public Criteria andApplyIn(List values) { + addCriterion("apply in", values, "apply"); + return (Criteria) this; + } + + public Criteria andApplyNotIn(List values) { + addCriterion("apply not in", values, "apply"); + return (Criteria) this; + } + + public Criteria andApplyBetween(String value1, String value2) { + addCriterion("apply between", value1, value2, "apply"); + return (Criteria) this; + } + + public Criteria andApplyNotBetween(String value1, String value2) { + addCriterion("apply not between", value1, value2, "apply"); + 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 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 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/vo/GroupVO.java b/research-system/src/main/java/com/research/system/domain/vo/GroupVO.java index 8906b3da..5451119d 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 @@ -2,6 +2,7 @@ package com.research.system.domain.vo; import cn.hutool.core.util.StrUtil; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.research.system.domain.po.KtsKtGroup; import com.research.system.domain.po.KtsKtGroupMember; import io.swagger.annotations.ApiModelProperty; @@ -19,7 +20,7 @@ import java.util.List; public class GroupVO { @Data - public static class Result{ + public static class Result { private Long id; private Long projId; @@ -42,7 +43,7 @@ public class GroupVO { private Date createTime; private String projOrgName; - private String completionPercentage= "0"; + private String completionPercentage = "0"; @ApiModelProperty("负责人手机号") private String phone; @@ -79,29 +80,34 @@ public class GroupVO { private Integer cgTotal; private Long cgIng; + } @Data - public static class GroupNumResult{ + public static class GroupNumResult { private Integer total; private List list; } + @Data - public static class Num{ + public static class Num { private Long orgId; private String orgName; private Integer num; } + @Data - public static class Num1{ + public static class Num1 { private Long orgId; private String orgName; private Integer jhn; private Integer total; + + private Integer jhw; } @Data - public static class Num2{ + public static class Num2 { private Long orgId; private String orgName; private Integer befor; @@ -248,25 +254,49 @@ public class GroupVO { } return userName; } + + /** + * 毕业状态 + * + * @return 0-在读 1-毕业 + */ + public Byte getByStatus() { + if (graduationTime != null) { + return System.currentTimeMillis() >= graduationTime.getTime() ? (byte) 1 : 0; + } + return 0; + } } @Data public static class Statistics { + @ApiModelProperty("总人数") private Integer total; + @ApiModelProperty("在读人数") + private Integer zdNum; + @ApiModelProperty("毕业人数") + private Integer byNum; + private List memberList; private List zcList; private List xlList; + @ApiModelProperty("毕业学生统计") + private List byList; + @ApiModelProperty("在读学生统计") + private List zdList; @Data - public static class Member{ + public static class Member { private Long orgId; private String orgName; - private Integer num; + private int num; + private int zdNum; + private int byNum; } @Data - public static class Zc{ + public static class Zc { private Long orgId; private String orgName; private Integer js;//教授 @@ -275,7 +305,7 @@ public class GroupVO { } @Data - public static class Xl{ + public static class Xl { private Long orgId; private String orgName; private Integer bk;//本科 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 f7ada5b7..a4d285f6 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 @@ -30,4 +30,8 @@ public interface KtsGroupDao { List queryZcStatistics(); List queryXlStatistics(); + + List queryZdXlStatistics(); + + List queryByXlStatistics(); } diff --git a/research-system/src/main/java/com/research/system/persist/mapper/SysTitleMapper.java b/research-system/src/main/java/com/research/system/persist/mapper/SysTitleMapper.java new file mode 100644 index 00000000..67963729 --- /dev/null +++ b/research-system/src/main/java/com/research/system/persist/mapper/SysTitleMapper.java @@ -0,0 +1,28 @@ +package com.research.system.persist.mapper; + +import com.research.system.domain.po.SysTitle; +import com.research.system.domain.po.SysTitleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysTitleMapper { + long countByExample(SysTitleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysTitle record); + + int insertSelective(SysTitle record); + + List selectByExample(SysTitleExample example); + + SysTitle selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysTitle record, @Param("example") SysTitleExample example); + + int updateByExample(@Param("record") SysTitle record, @Param("example") SysTitleExample example); + + int updateByPrimaryKeySelective(SysTitle record); + + int updateByPrimaryKey(SysTitle record); +} \ No newline at end of file diff --git a/research-system/src/main/java/com/research/system/service/SysTitleService.java b/research-system/src/main/java/com/research/system/service/SysTitleService.java new file mode 100644 index 00000000..150e0b05 --- /dev/null +++ b/research-system/src/main/java/com/research/system/service/SysTitleService.java @@ -0,0 +1,22 @@ +package com.research.system.service; + +import com.research.system.domain.po.SysTitle; + +import java.util.List; + +/** + * @Author zzc + * @Package com.research.system.service + * @Date 2025/12/18 17:58 + * @description: + */ +public interface SysTitleService { + + List queryList(); + + Integer add(SysTitle sysTitle); + + Integer del(List idList); + + +} 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 fd88cfea..95097074 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 @@ -61,7 +61,9 @@ public class KtsGroupServiceImpl implements KtsGroupService { public List queryGroupList(GroupDto.Query query) { List groupList = ktsGroupDao.queryGroupList(query); if (CollUtil.isNotEmpty(groupList)) { + int sort = 0; for (GroupVO.Result result : groupList) { + sort+=1; //查询内容 KtResearchContentExample ktResearchContentExample = new KtResearchContentExample(); ktResearchContentExample.createCriteria().andKtGroupIdEqualTo(result.getId()).andDelFlagEqualTo((byte) 0); @@ -78,6 +80,13 @@ public class KtsGroupServiceImpl implements KtsGroupService { result.setCgTotal(ktExpectedOutcomes.size()); result.setCgIng(ktExpectedOutcomes.stream().filter(ktExpectedOutcomes1 -> ktExpectedOutcomes1.getStatus() == 1).count()); } + if (CollUtil.isNotEmpty(result.getChildrenList())) { + result.setPlanTotal(result.getChildrenList().stream().mapToInt(GroupVO.Result::getPlanTotal).sum()); + result.setPlanIng(result.getChildrenList().stream().mapToLong(GroupVO.Result::getPlanIng).sum()); + result.setCgTotal(result.getChildrenList().stream().mapToInt(GroupVO.Result::getCgTotal).sum()); + result.setPlanIng(result.getChildrenList().stream().mapToLong(GroupVO.Result::getPlanIng).sum()); + } + result.setSort(sort); } } return groupList; @@ -440,8 +449,12 @@ public class KtsGroupServiceImpl implements KtsGroupService { statistics.setMemberList(members); statistics.setZcList(ktsGroupDao.queryZcStatistics()); statistics.setXlList(ktsGroupDao.queryXlStatistics()); + statistics.setZdList(ktsGroupDao.queryZdXlStatistics()); + statistics.setByList(ktsGroupDao.queryByXlStatistics()); if (CollUtil.isNotEmpty(members)) { statistics.setTotal(members.stream().map(GroupVO.Statistics.Member::getNum).mapToInt(Integer::intValue).sum()); + statistics.setZdNum(members.stream().map(GroupVO.Statistics.Member::getZdNum).mapToInt(Integer::intValue).sum()); + statistics.setByNum(members.stream().map(GroupVO.Statistics.Member::getByNum).mapToInt(Integer::intValue).sum()); } return statistics; } diff --git a/research-system/src/main/java/com/research/system/service/impl/SysTitleServiceImpl.java b/research-system/src/main/java/com/research/system/service/impl/SysTitleServiceImpl.java new file mode 100644 index 00000000..49a9cc20 --- /dev/null +++ b/research-system/src/main/java/com/research/system/service/impl/SysTitleServiceImpl.java @@ -0,0 +1,55 @@ +package com.research.system.service.impl; + +import cn.hutool.core.util.IdUtil; +import com.research.common.utils.SecurityUtils; +import com.research.system.domain.po.SysTitle; +import com.research.system.domain.po.SysTitleExample; +import com.research.system.persist.mapper.SysTitleMapper; +import com.research.system.service.SysTitleService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @Author zzc + * @Package com.research.system.service.impl + * @Date 2025/12/18 17:59 + * @description: + */ +@Service +public class SysTitleServiceImpl implements SysTitleService { + + @Resource + private SysTitleMapper sysTitleMapper; + + @Override + public List queryList() { + SysTitleExample sysTitleExample = new SysTitleExample(); + return sysTitleMapper.selectByExample(sysTitleExample); + } + + @Override + public Integer add(SysTitle sysTitle) { + if (sysTitle.getId() == null) { + sysTitle.setId(IdUtil.getSnowflakeNextId()); + sysTitle.setCreateBy(SecurityUtils.getUsername()); + sysTitle.setCreateTime(new Date()); + return sysTitleMapper.insertSelective(sysTitle); + } else { + sysTitle.setUpdateBy(SecurityUtils.getUsername()); + sysTitle.setUpdateTime(new Date()); + return sysTitleMapper.updateByPrimaryKeySelective(sysTitle); + } + } + + @Override + public Integer del(List idList) { + SysTitleExample sysTitleExample = new SysTitleExample(); + sysTitleExample.createCriteria().andIdIn(idList); + SysTitle sysTitle = new SysTitle(); + sysTitle.setDelFlag((byte) 1); + return sysTitleMapper.updateByExampleSelective(sysTitle, sysTitleExample); + } +} diff --git a/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml b/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml index 54fcd5fb..07cd0864 100644 --- a/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml +++ b/research-system/src/main/resources/mapper/dao/KtsGroupDao.xml @@ -126,6 +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 count(g.id) as total from prj_proj_org o left join @@ -150,7 +151,9 @@ + + + + diff --git a/research-system/src/main/resources/mapper/system/SysTitleMapper.xml b/research-system/src/main/resources/mapper/system/SysTitleMapper.xml new file mode 100644 index 00000000..a365a0c5 --- /dev/null +++ b/research-system/src/main/resources/mapper/system/SysTitleMapper.xml @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, code, name, level, apply, remark, del_flag, create_by, create_time, update_by, + update_time + + + + + delete from sys_title + where id = #{id,jdbcType=BIGINT} + + + insert into sys_title (id, code, name, + level, apply, remark, + del_flag, create_by, create_time, + update_by, update_time) + values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{level,jdbcType=VARCHAR}, #{apply,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}) + + + insert into sys_title + + + id, + + + code, + + + name, + + + level, + + + apply, + + + remark, + + + del_flag, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{code,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{level,jdbcType=VARCHAR}, + + + #{apply,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=TINYINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + + update sys_title + + + id = #{record.id,jdbcType=BIGINT}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + level = #{record.level,jdbcType=VARCHAR}, + + + apply = #{record.apply,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + 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}, + + + + + + + + update sys_title + set id = #{record.id,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + level = #{record.level,jdbcType=VARCHAR}, + apply = #{record.apply,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + 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} + + + + + + update sys_title + + + code = #{code,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=VARCHAR}, + + + apply = #{apply,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + 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}, + + + where id = #{id,jdbcType=BIGINT} + + + update sys_title + set code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + level = #{level,jdbcType=VARCHAR}, + apply = #{apply,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + 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} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file