From e33afe5a103b136a3db8c4d00c2a5acfaaa434db Mon Sep 17 00:00:00 2001 From: DU Date: Mon, 25 Jan 2021 15:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AB=99=E9=97=B4=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E7=AD=89=E7=BA=A7=E4=B9=9F=E5=8F=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=B7=9D=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/controller/OrgController.java | 35 +- .../joylink/rtss/dao/CompanyPositionDAO.java | 12 - .../joylink/rtss/entity/CompanyPosition.java | 88 ---- .../rtss/entity/CompanyPositionExample.java | 412 ------------------ .../rtss/services/IOrgUserService.java | 14 +- .../rtss/services/ISysUserService.java | 2 +- .../joylink/rtss/services/OrgUserService.java | 4 +- .../joylink/rtss/services/SysUserService.java | 2 +- .../runplan/user/RunPlanRunlevelVO.java | 1 + 9 files changed, 9 insertions(+), 561 deletions(-) delete mode 100644 src/main/java/club/joylink/rtss/dao/CompanyPositionDAO.java delete mode 100644 src/main/java/club/joylink/rtss/entity/CompanyPosition.java delete mode 100644 src/main/java/club/joylink/rtss/entity/CompanyPositionExample.java diff --git a/src/main/java/club/joylink/rtss/controller/OrgController.java b/src/main/java/club/joylink/rtss/controller/OrgController.java index 23b35f82a..891f1b6d8 100644 --- a/src/main/java/club/joylink/rtss/controller/OrgController.java +++ b/src/main/java/club/joylink/rtss/controller/OrgController.java @@ -75,10 +75,10 @@ public class OrgController { // iOrgUserService.removeManager(companyId, userIds, user); // } - @ApiOperation(value = "微信小程用户绑定单位") + @ApiOperation(value = "微信小程用户绑定为单位管理员") @PutMapping(path = "/bind/company") public CompanyVO userScanCodeBindCompany(Long userId, @NotBlank Integer companyId) { - return iOrgUserService.userScanCodeBindCompany(userId, companyId); + return iOrgUserService.userScanCodeBindCompanyManager(userId, companyId); } @ApiOperation(value = "添加部门信息") @@ -132,37 +132,6 @@ public class OrgController { iOrgUserService.updateDepartInfo(id, departmentVO); } -// @ApiOperation(value = "添加职位信息") -// @PostMapping(path = "/position") -// public PositionVO createPosition(@RequestBody @Validated PositionVO positionVO) { -// PositionVO vo = iOrgUserService.createPosition(positionVO); -// return vo; -// } -// -// @ApiOperation(value = "更新职位信息") -// @PutMapping("/position/{id}") -// public void updatePositionInfo(@PathVariable Integer id, @RequestBody @Validated PositionVO positionVO) { -// iOrgUserService.updatePositionInfo(id, positionVO); -// } -// -// @ApiOperation(value = "删除职位信息") -// @DeleteMapping("/position/{id}") -// public void deletePosition( @PathVariable Integer id) { -// iOrgUserService.deletePositionById(id); -// } -// -// @ApiOperation(value = "查询职位信息") -// @GetMapping("/position/{id}") -// public PositionVO getPositionById( @PathVariable Integer id) { -// return iOrgUserService.getPositionById(id); -// } -// -// @ApiOperation(value = "查询单位所属的职位信息") -// @GetMapping("{companyId}/position") -// public List getPositionsByCompanyId(@PathVariable Integer companyId) { -// return iOrgUserService.getPositionsByCompanyId(companyId); -// } - @ApiOperation(value = "添加单位成员关系信息") @PostMapping("refUserInfo") public void addCompanyUserInfo(@RequestAttribute @ApiIgnore UserVO user, @RequestBody UserDepartRelVO userDepartRelVO) { diff --git a/src/main/java/club/joylink/rtss/dao/CompanyPositionDAO.java b/src/main/java/club/joylink/rtss/dao/CompanyPositionDAO.java deleted file mode 100644 index 7a00d1f4e..000000000 --- a/src/main/java/club/joylink/rtss/dao/CompanyPositionDAO.java +++ /dev/null @@ -1,12 +0,0 @@ -package club.joylink.rtss.dao; - -import club.joylink.rtss.entity.CompanyPosition; -import club.joylink.rtss.entity.CompanyPositionExample; -import org.springframework.stereotype.Repository; - -/** - * CompanyPositionDAO继承基类 - */ -@Repository -public interface CompanyPositionDAO extends MyBatisBaseDao { -} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompanyPosition.java b/src/main/java/club/joylink/rtss/entity/CompanyPosition.java deleted file mode 100644 index a675f4498..000000000 --- a/src/main/java/club/joylink/rtss/entity/CompanyPosition.java +++ /dev/null @@ -1,88 +0,0 @@ -package club.joylink.rtss.entity; - -import java.io.Serializable; - -/** - * company_position - * @author - */ -public class CompanyPosition implements Serializable { - private Integer id; - - /** - * 职位名称 - */ - private String name; - - /** - * 单位id - */ - private Integer companyId; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getCompanyId() { - return companyId; - } - - public void setCompanyId(Integer companyId) { - this.companyId = companyId; - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - CompanyPosition other = (CompanyPosition) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) - && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); - result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); - return result; - } - - @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(", name=").append(name); - sb.append(", companyId=").append(companyId); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompanyPositionExample.java b/src/main/java/club/joylink/rtss/entity/CompanyPositionExample.java deleted file mode 100644 index 1b87e932e..000000000 --- a/src/main/java/club/joylink/rtss/entity/CompanyPositionExample.java +++ /dev/null @@ -1,412 +0,0 @@ -package club.joylink.rtss.entity; - -import java.util.ArrayList; -import java.util.List; - -public class CompanyPositionExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private Integer limit; - - private Long offset; - - public CompanyPositionExample() { - 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; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Long offset) { - this.offset = offset; - } - - public Long getOffset() { - return offset; - } - - 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(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - 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 andCompanyIdIsNull() { - addCriterion("company_id is null"); - return (Criteria) this; - } - - public Criteria andCompanyIdIsNotNull() { - addCriterion("company_id is not null"); - return (Criteria) this; - } - - public Criteria andCompanyIdEqualTo(Integer value) { - addCriterion("company_id =", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotEqualTo(Integer value) { - addCriterion("company_id <>", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdGreaterThan(Integer value) { - addCriterion("company_id >", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) { - addCriterion("company_id >=", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdLessThan(Integer value) { - addCriterion("company_id <", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdLessThanOrEqualTo(Integer value) { - addCriterion("company_id <=", value, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdIn(List values) { - addCriterion("company_id in", values, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotIn(List values) { - addCriterion("company_id not in", values, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdBetween(Integer value1, Integer value2) { - addCriterion("company_id between", value1, value2, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) { - addCriterion("company_id not between", value1, value2, "companyId"); - 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/src/main/java/club/joylink/rtss/services/IOrgUserService.java b/src/main/java/club/joylink/rtss/services/IOrgUserService.java index 0b9400ebe..2f8e61270 100644 --- a/src/main/java/club/joylink/rtss/services/IOrgUserService.java +++ b/src/main/java/club/joylink/rtss/services/IOrgUserService.java @@ -32,9 +32,9 @@ public interface IOrgUserService { // void addManager(Integer companyId, List userIds, UserVO user); /** - * 用户绑定单位 + * 用户绑定为单位管理员 */ - CompanyVO userScanCodeBindCompany(Long userId, Integer companyId); + CompanyVO userScanCodeBindCompanyManager(Long userId, Integer companyId); // /** // * 查询用户公司关联关系 @@ -69,16 +69,6 @@ public interface IOrgUserService { List getDepartAndChild(Integer companyId, Integer deptId); -// PositionVO createPosition(PositionVO positionVO); -// -// void updatePositionInfo(Integer positionId, PositionVO positionVO); -// -// void deletePositionById(Integer positionId); -// -// PositionVO getPositionById(Integer positionId); -// -// List getPositionsByCompanyId(Integer companyId); - List getDepartRefByUserId(Long userId); void addDepartUserInfo(UserVO user, UserDepartRelVO userDepartRelVO); diff --git a/src/main/java/club/joylink/rtss/services/ISysUserService.java b/src/main/java/club/joylink/rtss/services/ISysUserService.java index 36b253231..ac5e2db78 100644 --- a/src/main/java/club/joylink/rtss/services/ISysUserService.java +++ b/src/main/java/club/joylink/rtss/services/ISysUserService.java @@ -283,7 +283,7 @@ public interface ISysUserService { */ void userBindWm(String code, Long userId); - CompanyVO userScanCodeBindCompany(Long userId, Integer companyId); + CompanyVO userScanCodeBindCompanyManager(Long userId, Integer companyId); UserVO getUserBaseInfoById(Long id); diff --git a/src/main/java/club/joylink/rtss/services/OrgUserService.java b/src/main/java/club/joylink/rtss/services/OrgUserService.java index e23b373fa..4db0966b6 100644 --- a/src/main/java/club/joylink/rtss/services/OrgUserService.java +++ b/src/main/java/club/joylink/rtss/services/OrgUserService.java @@ -72,8 +72,8 @@ public class OrgUserService implements IOrgUserService { } @Override - public CompanyVO userScanCodeBindCompany(Long userId, Integer companyId) { - return iSysUserService.userScanCodeBindCompany(userId, companyId); + public CompanyVO userScanCodeBindCompanyManager(Long userId, Integer companyId) { + return iSysUserService.userScanCodeBindCompanyManager(userId, companyId); } @Override diff --git a/src/main/java/club/joylink/rtss/services/SysUserService.java b/src/main/java/club/joylink/rtss/services/SysUserService.java index 8f3904f76..ed6f29bec 100644 --- a/src/main/java/club/joylink/rtss/services/SysUserService.java +++ b/src/main/java/club/joylink/rtss/services/SysUserService.java @@ -348,7 +348,7 @@ public class SysUserService implements ISysUserService { @Override @Transactional - public CompanyVO userScanCodeBindCompany(Long userId, Integer companyId) { + public CompanyVO userScanCodeBindCompanyManager(Long userId, Integer companyId) { Org company = companyDAO.selectByPrimaryKey(companyId); BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(company, "不存在此单位"); SysUser sysUser = sysUserDAO.selectByPrimaryKey(userId); diff --git a/src/main/java/club/joylink/rtss/vo/client/runplan/user/RunPlanRunlevelVO.java b/src/main/java/club/joylink/rtss/vo/client/runplan/user/RunPlanRunlevelVO.java index 05897446f..3af5fb064 100644 --- a/src/main/java/club/joylink/rtss/vo/client/runplan/user/RunPlanRunlevelVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/runplan/user/RunPlanRunlevelVO.java @@ -141,6 +141,7 @@ public class RunPlanRunlevelVO { runLevel.setLevel3(l3); runLevel.setLevel4(l4); runLevel.setLevel5(l5); + runLevel.setDistance(distance); }