更新站间运行等级也可修改距离

This commit is contained in:
DU 2021-01-25 15:44:10 +08:00
parent a4e4dd92cf
commit e33afe5a10
9 changed files with 9 additions and 561 deletions

View File

@ -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<PositionVO> getPositionsByCompanyId(@PathVariable Integer companyId) {
// return iOrgUserService.getPositionsByCompanyId(companyId);
// }
@ApiOperation(value = "添加单位成员关系信息")
@PostMapping("refUserInfo")
public void addCompanyUserInfo(@RequestAttribute @ApiIgnore UserVO user, @RequestBody UserDepartRelVO userDepartRelVO) {

View File

@ -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<CompanyPosition, Integer, CompanyPositionExample> {
}

View File

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

View File

@ -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<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public CompanyPositionExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> 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<Integer> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Integer> 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);
}
}
}

View File

@ -32,9 +32,9 @@ public interface IOrgUserService {
// void addManager(Integer companyId, List<Long> userIds, UserVO user);
/**
* 用户绑定单位
* 用户绑定单位管理员
*/
CompanyVO userScanCodeBindCompany(Long userId, Integer companyId);
CompanyVO userScanCodeBindCompanyManager(Long userId, Integer companyId);
// /**
// * 查询用户公司关联关系
@ -69,16 +69,6 @@ public interface IOrgUserService {
List<DepartmentVO> getDepartAndChild(Integer companyId, Integer deptId);
// PositionVO createPosition(PositionVO positionVO);
//
// void updatePositionInfo(Integer positionId, PositionVO positionVO);
//
// void deletePositionById(Integer positionId);
//
// PositionVO getPositionById(Integer positionId);
//
// List<PositionVO> getPositionsByCompanyId(Integer companyId);
List<UserDepartRelVO> getDepartRefByUserId(Long userId);
void addDepartUserInfo(UserVO user, UserDepartRelVO userDepartRelVO);

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -141,6 +141,7 @@ public class RunPlanRunlevelVO {
runLevel.setLevel3(l3);
runLevel.setLevel4(l4);
runLevel.setLevel5(l5);
runLevel.setDistance(distance);
}