Merge remote-tracking branch 'origin/main'
commit
661c37a0c7
|
|
@ -24,7 +24,7 @@ public class ZcloudUserFacadeImpl implements ZcloudUserFacade {
|
||||||
return MultiResponse.of(objects);
|
return MultiResponse.of(objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
public SingleResponse<ZcloudUserCo> getInfoByUserId(Long aLong) {
|
public SingleResponse<ZcloudUserCo> getInfoByUserId(Long aLong) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ public class DepartmentController {
|
||||||
@ApiOperation("新增部门")
|
@ApiOperation("新增部门")
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public SingleResponse<DepartmentCO> add(@Validated @RequestBody DepartmentAddCmd cmd) {
|
public SingleResponse<DepartmentCO> add(@Validated @RequestBody DepartmentAddCmd cmd) {
|
||||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
|
||||||
return departmentService.add(cmd);
|
return departmentService.add(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import com.alibaba.cola.dto.MultiResponse;
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
import com.alibaba.cola.dto.Response;
|
import com.alibaba.cola.dto.Response;
|
||||||
import com.alibaba.cola.dto.SingleResponse;
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
|
||||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -17,11 +16,10 @@ import lombok.AllArgsConstructor;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web-adapter
|
* web-adapter
|
||||||
*
|
* 岗位管理
|
||||||
* @Author SondonYong
|
* @Author SondonYong
|
||||||
* @Date 2025-10-31 17:24:04
|
* @Date 2025-10-31 17:24:04
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
package com.zcloud.basic.info.command;
|
package com.zcloud.basic.info.command;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Response;
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import com.jjb.saas.system.client.tenant.facade.TenantFacade;
|
||||||
|
import com.jjb.saas.system.client.tenant.request.OtaTenantAddCmd;
|
||||||
|
import com.zcloud.basic.info.domain.enums.CorpTypeEnum;
|
||||||
import com.zcloud.basic.info.domain.gateway.CorpInfoGateway;
|
import com.zcloud.basic.info.domain.gateway.CorpInfoGateway;
|
||||||
import com.zcloud.basic.info.domain.model.CorpInfoE;
|
import com.zcloud.basic.info.domain.model.CorpInfoE;
|
||||||
import com.zcloud.basic.info.dto.CorpInfoAddCmd;
|
import com.zcloud.basic.info.dto.CorpInfoAddCmd;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -18,14 +24,36 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@Slf4j
|
||||||
public class CorpInfoAddExe {
|
public class CorpInfoAddExe {
|
||||||
private final CorpInfoGateway corpInfoGateway;
|
private final CorpInfoGateway corpInfoGateway;
|
||||||
|
@DubboReference
|
||||||
|
private TenantFacade tenantFacade;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long execute(CorpInfoAddCmd cmd) {
|
public Long execute(CorpInfoAddCmd cmd) {
|
||||||
CorpInfoE examTypeE = new CorpInfoE();
|
CorpInfoE examTypeE = new CorpInfoE();
|
||||||
BeanUtils.copyProperties(cmd, examTypeE);
|
BeanUtils.copyProperties(cmd, examTypeE);
|
||||||
return corpInfoGateway.add(examTypeE);
|
|
||||||
|
Long corpInfoId ;
|
||||||
|
try {
|
||||||
|
corpInfoId = corpInfoGateway.add(examTypeE);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
if (corpInfoId == null) {
|
||||||
|
throw new BizException("保存失败");
|
||||||
|
}
|
||||||
|
OtaTenantAddCmd otaTenantAddCmd = new OtaTenantAddCmd();
|
||||||
|
otaTenantAddCmd.setAccount(examTypeE.getCorpName());
|
||||||
|
otaTenantAddCmd.setTenantId(corpInfoId);
|
||||||
|
otaTenantAddCmd.setTenantName(examTypeE.getCorpName());
|
||||||
|
otaTenantAddCmd.setPassword("Aa@123456789");
|
||||||
|
log.info("CorpInfoXgfAddExe,新增企业调用GBS请求:{}",otaTenantAddCmd.toString());
|
||||||
|
//TODO 企业推送gbs报错解密失败
|
||||||
|
// Response response = tenantFacade.addOtaTenant(otaTenantAddCmd);
|
||||||
|
//log.info("CorpInfoXgfAddExe,新增企业调用GBS返回:{}",response.toString());
|
||||||
|
return corpInfoId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.zcloud.basic.info.command;
|
||||||
|
|
||||||
import com.alibaba.cola.dto.Response;
|
import com.alibaba.cola.dto.Response;
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
import com.jjb.saas.system.client.dept.facade.DeptFacade;
|
import com.jjb.saas.system.client.dept.facade.DeptFacade;
|
||||||
import com.jjb.saas.system.client.dept.request.FacadeAddDeptCmd;
|
import com.jjb.saas.system.client.dept.request.FacadeAddDeptCmd;
|
||||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||||
|
|
@ -36,12 +37,10 @@ public class DepartmentAddExe {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean execute(DepartmentAddCmd cmd) {
|
public boolean execute(DepartmentAddCmd cmd) {
|
||||||
DepartmentE examTypeE = new DepartmentE();
|
DepartmentE examTypeE = new DepartmentE();
|
||||||
|
/* if(examTypeE.getParentId()==null){
|
||||||
|
examTypeE.setParentId(AuthContext.getTenantId());
|
||||||
|
}*/
|
||||||
BeanUtils.copyProperties(cmd, examTypeE);
|
BeanUtils.copyProperties(cmd, examTypeE);
|
||||||
|
|
||||||
//a
|
|
||||||
// userFacade.addUser(new FacadeUserAddCmd());
|
|
||||||
// C = examTypeE.add(a,b,c);
|
|
||||||
|
|
||||||
Long id = null;
|
Long id = null;
|
||||||
try {
|
try {
|
||||||
id = departmentGateway.add(examTypeE);
|
id = departmentGateway.add(examTypeE);
|
||||||
|
|
@ -56,10 +55,12 @@ public class DepartmentAddExe {
|
||||||
FacadeAddDeptCmd deptCmd = new FacadeAddDeptCmd();
|
FacadeAddDeptCmd deptCmd = new FacadeAddDeptCmd();
|
||||||
deptCmd.setLinkId(id);
|
deptCmd.setLinkId(id);
|
||||||
deptCmd.setLinkName(examTypeE.getName());
|
deptCmd.setLinkName(examTypeE.getName());
|
||||||
|
|
||||||
deptCmd.setParentId(examTypeE.getParentId());
|
deptCmd.setParentId(examTypeE.getParentId());
|
||||||
deptCmd.setDeptTypeEnum(DeptTypeEnum.DEPARTMENT.getValue());
|
deptCmd.setDeptTypeEnum(DeptTypeEnum.DEPARTMENT.getValue());
|
||||||
Response response = deptFacade.addDept(deptCmd);
|
//TODO gbs部门表 sys_dept tenant_id,parent_ids,add_type_enum,存储错误,导致gbs页面看不到,参数还没有,待定
|
||||||
log.info("DepartmentAddExe,新增部门调用GBS返回:"+response.toString());
|
// Response response = deptFacade.addDept(deptCmd);
|
||||||
|
// log.info("DepartmentAddExe,新增部门调用GBS返回:"+response.toString());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class PostAddExe {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 岗位部门关联
|
// 岗位部门关联
|
||||||
if(res && cmd.getSupervisionFlag() == 1) {
|
if(res && cmd.getSupervisionFlag() != null && cmd.getSupervisionFlag() == 1) {
|
||||||
List<PostDepartmentE> postDepartmentEList = postE.addDepartmentIds(postId, cmd.getDepartmentIds());
|
List<PostDepartmentE> postDepartmentEList = postE.addDepartmentIds(postId, cmd.getDepartmentIds());
|
||||||
if(CollUtil.isNotEmpty(postDepartmentEList)){
|
if(CollUtil.isNotEmpty(postDepartmentEList)){
|
||||||
res = postDepartmentGateway.addList(postDepartmentEList);
|
res = postDepartmentGateway.addList(postDepartmentEList);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.zcloud.basic.info.domain.gateway.PostDepartmentGateway;
|
import com.zcloud.basic.info.domain.gateway.PostDepartmentGateway;
|
||||||
import com.zcloud.basic.info.domain.gateway.PostGateway;
|
import com.zcloud.basic.info.domain.gateway.PostGateway;
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
import com.zcloud.basic.info.domain.gateway.UserGateway;
|
|
||||||
import com.zcloud.basic.info.persistence.dataobject.UserDO;
|
import com.zcloud.basic.info.persistence.dataobject.UserDO;
|
||||||
import com.zcloud.basic.info.persistence.repository.UserRepository;
|
import com.zcloud.basic.info.persistence.repository.UserRepository;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
@ -29,7 +28,7 @@ public class PostRemoveExe {
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean execute(Long id) {
|
public boolean execute(Long id) {
|
||||||
// 校验是否有人员使用该岗位
|
// 这段代码后续放到user的方法中, 校验是否有人员使用该岗位
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.eq("post_id", id);
|
queryWrapper.eq("post_id", id);
|
||||||
queryWrapper.eq("delete_enum", "FALSE");
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
|
@ -53,7 +52,7 @@ public class PostRemoveExe {
|
||||||
throw new BizException("岗位ID不能为空");
|
throw new BizException("岗位ID不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 校验是否有人员使用该岗位
|
// 这段代码后续放到user的方法中, 校验是否有人员使用该岗位
|
||||||
QueryWrapper<UserDO> queryWrapper = new QueryWrapper();
|
QueryWrapper<UserDO> queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.in("post_id", ids);
|
queryWrapper.in("post_id", ids);
|
||||||
queryWrapper.eq("delete_enum", "FALSE");
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,24 @@ public class PostUpdateExe {
|
||||||
boolean res = postGateway.update(postE);
|
boolean res = postGateway.update(postE);
|
||||||
|
|
||||||
// 岗位关联部门
|
// 岗位关联部门
|
||||||
if(res && postUpdateCmd.getSupervisionFlag() == 1){
|
if(res && postUpdateCmd.getSupervisionFlag() != null && postUpdateCmd.getSupervisionFlag() == 1){
|
||||||
postDepartmentGateway.deletedPostDepartment(postE.getId());
|
postDepartmentGateway.deletedPostDepartment(postE.getId());
|
||||||
List<PostDepartmentE> postDepartmentEList = postE.addDepartmentIds(postE.getId(), postUpdateCmd.getDepartmentIds());
|
List<PostDepartmentE> postDepartmentEList = postE.addDepartmentIds(postE.getId(), postUpdateCmd.getDepartmentIds());
|
||||||
if(CollUtil.isNotEmpty(postDepartmentEList)){
|
if(CollUtil.isNotEmpty(postDepartmentEList)){
|
||||||
res = postDepartmentGateway.addList(postDepartmentEList);
|
res = postDepartmentGateway.addList(postDepartmentEList);
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
// 修改时如果改为不是监管岗位, 则删除岗位-部门关联表数据
|
||||||
|
if(res && postUpdateCmd.getSupervisionFlag() != null && postUpdateCmd.getSupervisionFlag() == 0){
|
||||||
|
postDepartmentGateway.deletedPostDepartment(postE.getId());
|
||||||
}
|
}
|
||||||
|
if(res && postUpdateCmd.getSupervisionFlag() == null){
|
||||||
|
postDepartmentGateway.deletedPostDepartment(postE.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
throw new BizException("修改失败");
|
throw new BizException("修改失败");
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,11 @@ public class PostQueryExe {
|
||||||
return PageResponse.of(postCOList, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
return PageResponse.of(postCOList, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询集合
|
||||||
|
* @param qry
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public MultiResponse<PostCO> execute(PostListQry qry) {
|
public MultiResponse<PostCO> execute(PostListQry qry) {
|
||||||
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
||||||
|
|
||||||
|
|
@ -132,6 +137,11 @@ public class PostQueryExe {
|
||||||
return postCOResponse;
|
return postCOResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询单条
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public SingleResponse<PostCO> execute(Long id) {
|
public SingleResponse<PostCO> execute(Long id) {
|
||||||
SingleResponse<PostDO> postDO = postRepository.getInfoById(id);
|
SingleResponse<PostDO> postDO = postRepository.getInfoById(id);
|
||||||
SingleResponse<PostCO> postCO = new SingleResponse<>();
|
SingleResponse<PostCO> postCO = new SingleResponse<>();
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ public class PostServiceImpl implements PostServiceI {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResponse<PostCO> listPage(PostPageQry qry) {
|
public PageResponse<PostCO> listPage(PostPageQry qry) {
|
||||||
|
|
||||||
return postQueryExe.execute(qry);
|
return postQueryExe.execute(qry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,13 +44,11 @@ public class PostServiceImpl implements PostServiceI {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse<PostCO> getInfoById(Long id) {
|
public SingleResponse<PostCO> getInfoById(Long id) {
|
||||||
|
|
||||||
return postQueryExe.execute(id);
|
return postQueryExe.execute(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse add(PostAddCmd cmd) {
|
public SingleResponse add(PostAddCmd cmd) {
|
||||||
|
|
||||||
postAddExe.execute(cmd);
|
postAddExe.execute(cmd);
|
||||||
return SingleResponse.buildSuccess();
|
return SingleResponse.buildSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ public class CorpInfoAddCmd extends Command {
|
||||||
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
||||||
private String corpinfoId;
|
private String corpinfoId;
|
||||||
@ApiModelProperty(value = "企业名称", name = "corpName", required = true)
|
@ApiModelProperty(value = "企业名称", name = "corpName", required = true)
|
||||||
|
@NotEmpty(message = "企业名称不能为空")
|
||||||
private String corpName;
|
private String corpName;
|
||||||
@ApiModelProperty(value = "企业类型(0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位)", name = "type", required = true)
|
@ApiModelProperty(value = "企业类型(0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位)", name = "type", required = true)
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
@ -39,6 +40,7 @@ public class CorpInfoAddCmd extends Command {
|
||||||
@ApiModelProperty(value = "是否启用,1:启用,0:关闭", name = "useFlag", required = true)
|
@ApiModelProperty(value = "是否启用,1:启用,0:关闭", name = "useFlag", required = true)
|
||||||
private Integer useFlag;
|
private Integer useFlag;
|
||||||
@ApiModelProperty(value = "统一社会信用代码", name = "code", required = true)
|
@ApiModelProperty(value = "统一社会信用代码", name = "code", required = true)
|
||||||
|
@NotEmpty(message = "统一社会信用代码不能为空")
|
||||||
private String code;
|
private String code;
|
||||||
@ApiModelProperty(value = "通讯地址", name = "address", required = true)
|
@ApiModelProperty(value = "通讯地址", name = "address", required = true)
|
||||||
private String address;
|
private String address;
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,13 @@ public class DepartmentAddCmd extends Command {
|
||||||
@ApiModelProperty(value = "所属企业", name = "corpinfoId", required = true)
|
@ApiModelProperty(value = "所属企业", name = "corpinfoId", required = true)
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
@ApiModelProperty(value = "部门级别编码", name = "level", required = true)
|
@ApiModelProperty(value = "部门级别编码", name = "level", required = true)
|
||||||
|
@NotEmpty(message = "部门级别编码不能为空")
|
||||||
private String level;
|
private String level;
|
||||||
@ApiModelProperty(value = "部门级别名称,汉字30以内", name = "levelName", required = true)
|
@ApiModelProperty(value = "部门级别名称,汉字30以内", name = "levelName", required = true)
|
||||||
|
@NotEmpty(message = "部门级别名称不能为空")
|
||||||
private String levelName;
|
private String levelName;
|
||||||
@ApiModelProperty(value = "部门排序", name = "depOrder", required = true)
|
@ApiModelProperty(value = "部门排序", name = "depOrder", required = true)
|
||||||
|
@NotNull(message = "部门排序不能为空")
|
||||||
private Integer depOrder;
|
private Integer depOrder;
|
||||||
@ApiModelProperty(value = "是否监管部门 0-否 1-是", name = "superviseFlag", required = true)
|
@ApiModelProperty(value = "是否监管部门 0-否 1-是", name = "superviseFlag", required = true)
|
||||||
private Integer superviseFlag;
|
private Integer superviseFlag;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.zcloud.basic.info.dto;
|
package com.zcloud.basic.info.dto;
|
||||||
|
|
||||||
import com.alibaba.cola.dto.PageQuery;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -41,7 +40,7 @@ public class PostListQry {
|
||||||
// 部门id
|
// 部门id
|
||||||
private Long departmentId;
|
private Long departmentId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业id", name = "eqCorpinfoId", required = true)
|
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
||||||
// 企业id
|
// 企业id
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,21 +27,21 @@ public class PostPageQry extends PageQuery {
|
||||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ApiModelProperty(value = "监管端/企业端标识,1-监管端, 2-企业端", name = "departmentId", required = true)
|
@ApiModelProperty(value = "监管端/企业端标识,1-监管端, 2-企业端", name = "corpFlag", required = true)
|
||||||
@NotNull(message = "监管端/企业端标识不能为空")
|
@NotNull(message = "监管端/企业端标识不能为空")
|
||||||
// 监管端/企业端标识,1-监管端, 2-企业端
|
// 监管端/企业端标识,1-监管端, 2-企业端
|
||||||
private Integer corpFlag;
|
private Integer corpFlag;
|
||||||
|
|
||||||
@ApiModelProperty(value = "部门id", name = "departmentId", required = true)
|
@ApiModelProperty(value = "部门id", name = "eqDepartmentId", required = true)
|
||||||
@NotNull(message = "部门id不能为空")
|
@NotNull(message = "部门id不能为空")
|
||||||
// 部门id
|
// 部门id
|
||||||
private Long eqDepartmentId;
|
private Long eqDepartmentId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业id", name = "departmentId")
|
@ApiModelProperty(value = "企业id", name = "eqCorpinfoId")
|
||||||
// 企业id
|
// 企业id
|
||||||
private Long eqCorpinfoId;
|
private Long eqCorpinfoId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "岗位名称", name = "departmentId")
|
@ApiModelProperty(value = "岗位名称", name = "likePostName")
|
||||||
// 岗位名称
|
// 岗位名称
|
||||||
private String likePostName;
|
private String likePostName;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import com.zcloud.gbscommon.utils.UuidUtil;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -44,6 +43,9 @@ public class PostGatewayImpl implements PostGateway {
|
||||||
if(StringUtils.isEmpty(d.getPostId())){
|
if(StringUtils.isEmpty(d.getPostId())){
|
||||||
d.setPostId(UuidUtil.get32UUID());
|
d.setPostId(UuidUtil.get32UUID());
|
||||||
}
|
}
|
||||||
|
if(d.getSupervisionFlag() == null){
|
||||||
|
d.setSupervisionFlag(0);
|
||||||
|
}
|
||||||
postRepository.save(d);
|
postRepository.save(d);
|
||||||
return d.getId();
|
return d.getId();
|
||||||
}
|
}
|
||||||
|
|
@ -63,6 +65,10 @@ public class PostGatewayImpl implements PostGateway {
|
||||||
|
|
||||||
PostDO d = new PostDO();
|
PostDO d = new PostDO();
|
||||||
BeanUtils.copyProperties(postE, d);
|
BeanUtils.copyProperties(postE, d);
|
||||||
|
if(d.getSupervisionFlag() == null){
|
||||||
|
d.setSupervisionFlag(0);
|
||||||
|
}
|
||||||
|
|
||||||
postRepository.updateById(d);
|
postRepository.updateById(d);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ public class DepartmentRepositoryImpl extends BaseRepositoryImpl<DepartmentMappe
|
||||||
public List<DepartmentDO> listTree(Map<String, Object> parmas) {
|
public List<DepartmentDO> listTree(Map<String, Object> parmas) {
|
||||||
QueryWrapper<DepartmentDO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<DepartmentDO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||||
// SSOUser ssoUser = AuthContext.getCurrentUser();
|
|
||||||
// queryWrapper.eq("tenant_id",ssoUser.getTenantId());
|
|
||||||
queryWrapper.orderByDesc("dep_order");
|
queryWrapper.orderByDesc("dep_order");
|
||||||
List<DepartmentDO> departmentDOList = departmentMapper.selectList(queryWrapper);
|
List<DepartmentDO> departmentDOList = departmentMapper.selectList(queryWrapper);
|
||||||
if (CollUtil.isEmpty(departmentDOList)) {
|
if (CollUtil.isEmpty(departmentDOList)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue