dev:岗位管理去掉关联部门数据权限
parent
afe539b2f9
commit
bb0bec3639
|
|
@ -41,9 +41,9 @@ public class PostController {
|
||||||
cmd.setCorpinfoId(AuthContext.getTenantId());
|
cmd.setCorpinfoId(AuthContext.getTenantId());
|
||||||
cmd.setCorpinfoName(AuthContext.getName());
|
cmd.setCorpinfoName(AuthContext.getName());
|
||||||
// 监管端不用校验, 企业端必填
|
// 监管端不用校验, 企业端必填
|
||||||
if(cmd.getCorpFlag() == 2 && cmd.getSupervisionFlag() == null){
|
// if(cmd.getCorpFlag() == 2 && cmd.getSupervisionFlag() == null){
|
||||||
throw new BizException("是否监管岗位不能为空");
|
// throw new BizException("是否监管岗位不能为空");
|
||||||
}
|
// }
|
||||||
return postService.add(cmd);
|
return postService.add(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,9 +121,9 @@ public class PostController {
|
||||||
@PutMapping("/edit")
|
@PutMapping("/edit")
|
||||||
public SingleResponse edit(@Validated @RequestBody PostUpdateCmd cmd) {
|
public SingleResponse edit(@Validated @RequestBody PostUpdateCmd cmd) {
|
||||||
// 监管端不用校验, 企业端必填
|
// 监管端不用校验, 企业端必填
|
||||||
if(cmd.getCorpFlag() == 2 && cmd.getSupervisionFlag() == null){
|
// if(cmd.getCorpFlag() == 2 && cmd.getSupervisionFlag() == null){
|
||||||
throw new BizException("是否监管岗位不能为空");
|
// throw new BizException("是否监管岗位不能为空");
|
||||||
}
|
// }
|
||||||
postService.edit(cmd);
|
postService.edit(cmd);
|
||||||
return SingleResponse.buildSuccess();
|
return SingleResponse.buildSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ public class PostAddExe {
|
||||||
if(StrUtil.isNotBlank(cmd.getDepartmentIdString())){
|
if(StrUtil.isNotBlank(cmd.getDepartmentIdString())){
|
||||||
cmd.setDepartmentId(Long.valueOf(cmd.getDepartmentIdString()));
|
cmd.setDepartmentId(Long.valueOf(cmd.getDepartmentIdString()));
|
||||||
}
|
}
|
||||||
if(cmd.getDepartmentIdsString() != null && cmd.getDepartmentIdsString().length > 0){
|
// if(cmd.getDepartmentIdsString() != null && cmd.getDepartmentIdsString().length > 0){
|
||||||
cmd.setDepartmentIds(Arrays.stream(cmd.getDepartmentIdsString())
|
// cmd.setDepartmentIds(Arrays.stream(cmd.getDepartmentIdsString())
|
||||||
.filter(Objects::nonNull) // 过滤掉null
|
// .filter(Objects::nonNull) // 过滤掉null
|
||||||
.filter(str -> !str.trim().isEmpty()) // 过滤掉空字符串
|
// .filter(str -> !str.trim().isEmpty()) // 过滤掉空字符串
|
||||||
.map(Long::valueOf)
|
// .map(Long::valueOf)
|
||||||
.toArray(Long[]::new));
|
// .toArray(Long[]::new));
|
||||||
}
|
// }
|
||||||
|
|
||||||
PostE postE = new PostE();
|
PostE postE = new PostE();
|
||||||
BeanUtils.copyProperties(cmd, postE);
|
BeanUtils.copyProperties(cmd, postE);
|
||||||
|
|
@ -56,12 +56,12 @@ public class PostAddExe {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 岗位部门关联
|
// 岗位部门关联
|
||||||
if(res && cmd.getSupervisionFlag() != null && 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);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
|
|
@ -47,13 +47,13 @@ public class PostUpdateExe {
|
||||||
if(StrUtil.isNotBlank(postUpdateCmd.getDepartmentIdString())){
|
if(StrUtil.isNotBlank(postUpdateCmd.getDepartmentIdString())){
|
||||||
postUpdateCmd.setDepartmentId(Long.valueOf(postUpdateCmd.getDepartmentIdString()));
|
postUpdateCmd.setDepartmentId(Long.valueOf(postUpdateCmd.getDepartmentIdString()));
|
||||||
}
|
}
|
||||||
if(postUpdateCmd.getDepartmentIdsString() != null && postUpdateCmd.getDepartmentIdsString().length > 0){
|
// if(postUpdateCmd.getDepartmentIdsString() != null && postUpdateCmd.getDepartmentIdsString().length > 0){
|
||||||
postUpdateCmd.setDepartmentIds(Arrays.stream(postUpdateCmd.getDepartmentIdsString())
|
// postUpdateCmd.setDepartmentIds(Arrays.stream(postUpdateCmd.getDepartmentIdsString())
|
||||||
.filter(Objects::nonNull) // 过滤掉null
|
// .filter(Objects::nonNull) // 过滤掉null
|
||||||
.filter(str -> !str.trim().isEmpty()) // 过滤掉空字符串
|
// .filter(str -> !str.trim().isEmpty()) // 过滤掉空字符串
|
||||||
.map(Long::valueOf)
|
// .map(Long::valueOf)
|
||||||
.toArray(Long[]::new));
|
// .toArray(Long[]::new));
|
||||||
}
|
// }
|
||||||
|
|
||||||
PostDO postDO = postRepository.getById(postUpdateCmd.getId());
|
PostDO postDO = postRepository.getById(postUpdateCmd.getId());
|
||||||
if (postDO == null) {
|
if (postDO == null) {
|
||||||
|
|
@ -66,18 +66,18 @@ public class PostUpdateExe {
|
||||||
|
|
||||||
// 岗位关联部门
|
// 岗位关联部门
|
||||||
// 修改时如果改为不是监管岗位, 则删除岗位-部门关联表数据
|
// 修改时如果改为不是监管岗位, 则删除岗位-部门关联表数据
|
||||||
if(res){
|
// if(res){
|
||||||
if (postUpdateCmd.getSupervisionFlag() == null || postUpdateCmd.getSupervisionFlag() == 0){
|
// if (postUpdateCmd.getSupervisionFlag() == null || postUpdateCmd.getSupervisionFlag() == 0){
|
||||||
postDepartmentGateway.deletedPostDepartment(postE.getId());
|
// postDepartmentGateway.deletedPostDepartment(postE.getId());
|
||||||
}else if(postUpdateCmd.getSupervisionFlag() != null && postUpdateCmd.getSupervisionFlag() == 1){
|
// }else if(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);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
throw new BizException("修改失败");
|
throw new BizException("修改失败");
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public class PostQueryExe {
|
||||||
|
|
||||||
if (pageResponse == null || CollUtil.isEmpty(pageResponse.getData())) {
|
if (pageResponse == null || CollUtil.isEmpty(pageResponse.getData())) {
|
||||||
List<PostCO> postCOList = new ArrayList<>();
|
List<PostCO> postCOList = new ArrayList<>();
|
||||||
return PageResponse.of(postCOList, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
return PageResponse.of(postCOList, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Long[] departmentIds = pageResponse.getData().stream().map(PostDO::getDepartmentId).toArray(Long[]::new);
|
Long[] departmentIds = pageResponse.getData().stream().map(PostDO::getDepartmentId).toArray(Long[]::new);
|
||||||
|
|
@ -97,18 +97,18 @@ public class PostQueryExe {
|
||||||
if (postMRDO == null || CollUtil.isEmpty(postMRDO.getData())) {
|
if (postMRDO == null || CollUtil.isEmpty(postMRDO.getData())) {
|
||||||
return new MultiResponse<>();
|
return new MultiResponse<>();
|
||||||
}
|
}
|
||||||
Long[] postIds = postMRDO.getData().stream().map(PostDO::getId).toArray(Long[]::new);
|
// Long[] postIds = postMRDO.getData().stream().map(PostDO::getId).toArray(Long[]::new);
|
||||||
Long[] departmentIds = postMRDO.getData().stream().map(PostDO::getDepartmentId).toArray(Long[]::new);
|
Long[] departmentIds = postMRDO.getData().stream().map(PostDO::getDepartmentId).toArray(Long[]::new);
|
||||||
// 岗位部门集合
|
// 岗位部门集合
|
||||||
List<PostDepartmentDO> postDepartmentDOList = postDepartmentRepository.list(postIds);
|
// List<PostDepartmentDO> postDepartmentDOList = postDepartmentRepository.list(postIds);
|
||||||
List<DepartmentDO> departmentDOList = departmentRepository.listByIds(Arrays.asList(departmentIds));
|
List<DepartmentDO> departmentDOList = departmentRepository.listByIds(Arrays.asList(departmentIds));
|
||||||
|
|
||||||
// Map<岗位id, List<岗位部门对象>>
|
// Map<岗位id, List<岗位部门对象>>
|
||||||
Map<Long, List<PostDepartmentCO>> postDepartmentMap = new HashMap<>();
|
// Map<Long, List<PostDepartmentCO>> postDepartmentMap = new HashMap<>();
|
||||||
if (CollUtil.isNotEmpty(postDepartmentDOList)) {
|
// if (CollUtil.isNotEmpty(postDepartmentDOList)) {
|
||||||
List<PostDepartmentCO> postDepartmentCOList = postDepartmentCoConvertor.converDOsToCOs(postDepartmentDOList);
|
// List<PostDepartmentCO> postDepartmentCOList = postDepartmentCoConvertor.converDOsToCOs(postDepartmentDOList);
|
||||||
postDepartmentMap = postDepartmentCOList.stream().collect(Collectors.groupingBy(PostDepartmentCO::getPostId));
|
// postDepartmentMap = postDepartmentCOList.stream().collect(Collectors.groupingBy(PostDepartmentCO::getPostId));
|
||||||
}
|
// }
|
||||||
// Map<部门id, 部门名称>
|
// Map<部门id, 部门名称>
|
||||||
Map<Long, String> departmentMap = new HashMap<>();
|
Map<Long, String> departmentMap = new HashMap<>();
|
||||||
if (CollUtil.isNotEmpty(departmentDOList)) {
|
if (CollUtil.isNotEmpty(departmentDOList)) {
|
||||||
|
|
@ -121,9 +121,9 @@ public class PostQueryExe {
|
||||||
List<PostCO> postCOList = postCoConvertor.converDOsToCOs(postDOList);
|
List<PostCO> postCOList = postCoConvertor.converDOsToCOs(postDOList);
|
||||||
if (CollUtil.isNotEmpty(postCOList)) {
|
if (CollUtil.isNotEmpty(postCOList)) {
|
||||||
for (PostCO postCO : postCOList) {
|
for (PostCO postCO : postCOList) {
|
||||||
if (CollUtil.isNotEmpty(postDepartmentMap) && CollUtil.isNotEmpty(postDepartmentMap.get(postCO.getId()))) {
|
// if (CollUtil.isNotEmpty(postDepartmentMap) && CollUtil.isNotEmpty(postDepartmentMap.get(postCO.getId()))) {
|
||||||
postCO.setDepartmentList(postDepartmentMap.get(postCO.getId()));
|
// postCO.setDepartmentList(postDepartmentMap.get(postCO.getId()));
|
||||||
}
|
// }
|
||||||
if (CollUtil.isNotEmpty(departmentMap)) {
|
if (CollUtil.isNotEmpty(departmentMap)) {
|
||||||
postCO.setDepartmentName(departmentMap.get(postCO.getDepartmentId()));
|
postCO.setDepartmentName(departmentMap.get(postCO.getDepartmentId()));
|
||||||
}
|
}
|
||||||
|
|
@ -151,17 +151,19 @@ public class PostQueryExe {
|
||||||
|
|
||||||
// 查询部门名称
|
// 查询部门名称
|
||||||
DepartmentDO departmentDO = departmentRepository.getById(postDO.getData().getDepartmentId());
|
DepartmentDO departmentDO = departmentRepository.getById(postDO.getData().getDepartmentId());
|
||||||
postCO.getData().setDepartmentName(departmentDO.getName());
|
if(departmentDO != null) {
|
||||||
|
postCO.getData().setDepartmentName(departmentDO.getName());
|
||||||
|
}
|
||||||
|
|
||||||
// 岗位-部门权限关联代码
|
// 岗位-部门权限关联代码
|
||||||
if (co.getSupervisionFlag() == 1) {
|
// if (co.getSupervisionFlag() == 1) {
|
||||||
PostDepartmentPageQry qry = new PostDepartmentPageQry();
|
// PostDepartmentPageQry qry = new PostDepartmentPageQry();
|
||||||
qry.setEqPostId(id);
|
// qry.setEqPostId(id);
|
||||||
Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
// Map<String, Object> params = PageQueryHelper.toHashMap(qry);
|
||||||
List<PostDepartmentDO> postDepartmentDOS = postDepartmentRepository.list(params);
|
// List<PostDepartmentDO> postDepartmentDOS = postDepartmentRepository.list(params);
|
||||||
List<PostDepartmentCO> postDepartmentCOS = postDepartmentCoConvertor.converDOsToCOs(postDepartmentDOS);
|
// List<PostDepartmentCO> postDepartmentCOS = postDepartmentCoConvertor.converDOsToCOs(postDepartmentDOS);
|
||||||
postCO.getData().setDepartmentList(postDepartmentCOS);
|
// postCO.getData().setDepartmentList(postDepartmentCOS);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return postCO;
|
return postCO;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,24 +33,18 @@ public class PostAddCmd extends Command {
|
||||||
@NotEmpty(message = "岗位职责不能为空")
|
@NotEmpty(message = "岗位职责不能为空")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
// @ApiModelProperty(value = "状态 1-启用, 2-禁用", name = "status", required = true)
|
|
||||||
// @NotNull(message = "状态 1-启用, 2-禁用不能为空")
|
|
||||||
// private Integer status;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
||||||
// @NotNull(message = "企业id不能为空")
|
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业名称", name = "corpinfoName")
|
@ApiModelProperty(value = "企业名称", name = "corpinfoName")
|
||||||
// @NotEmpty(message = "企业名称不能为空")
|
|
||||||
private String corpinfoName;
|
private String corpinfoName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否监管岗位 0-否, 1-是", name = "supervisionFlag")
|
// @ApiModelProperty(value = "是否监管岗位 0-否, 1-是", name = "supervisionFlag")
|
||||||
private Integer supervisionFlag;
|
// private Integer supervisionFlag;
|
||||||
|
//
|
||||||
@ApiModelProperty(value = "岗位-部门权限", name = "departmentIdsString")
|
// @ApiModelProperty(value = "岗位-部门权限", name = "departmentIdsString")
|
||||||
private String[] departmentIdsString;
|
// private String[] departmentIdsString;
|
||||||
private Long[] departmentIds;
|
// private Long[] departmentIds;
|
||||||
|
|
||||||
@ApiModelProperty(value = "监管端/企业端标识,1-监管端, 2-企业端", name = "corpFlag", required = true)
|
@ApiModelProperty(value = "监管端/企业端标识,1-监管端, 2-企业端", name = "corpFlag", required = true)
|
||||||
@NotNull(message = "监管端/企业端标识不能为空")
|
@NotNull(message = "监管端/企业端标识不能为空")
|
||||||
|
|
|
||||||
|
|
@ -38,24 +38,18 @@ public class PostUpdateCmd extends Command {
|
||||||
@NotEmpty(message = "岗位职责不能为空")
|
@NotEmpty(message = "岗位职责不能为空")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
// @ApiModelProperty(value = "状态 1-启用, 2-禁用", name = "status", required = true)
|
|
||||||
// @NotNull(message = "状态 1-启用, 2-禁用不能为空")
|
|
||||||
// private Integer status;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
||||||
// @NotNull(message = "企业id不能为空")
|
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业名称", name = "corpinfoName")
|
@ApiModelProperty(value = "企业名称", name = "corpinfoName")
|
||||||
// @NotEmpty(message = "企业名称不能为空")
|
|
||||||
private String corpinfoName;
|
private String corpinfoName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否监管岗位 0-否, 1-是", name = "supervisionFlag")
|
// @ApiModelProperty(value = "是否监管岗位 0-否, 1-是", name = "supervisionFlag")
|
||||||
private Integer supervisionFlag;
|
// private Integer supervisionFlag;
|
||||||
|
//
|
||||||
@ApiModelProperty(value = "岗位 部门权限", name = "departmentIdsString")
|
// @ApiModelProperty(value = "岗位 部门权限", name = "departmentIdsString")
|
||||||
private String[] departmentIdsString;
|
// private String[] departmentIdsString;
|
||||||
private Long[] departmentIds;
|
// private Long[] departmentIds;
|
||||||
|
|
||||||
@ApiModelProperty(value = "监管端/企业端标识,1-监管端, 2-企业端", name = "corpFlag", required = true)
|
@ApiModelProperty(value = "监管端/企业端标识,1-监管端, 2-企业端", name = "corpFlag", required = true)
|
||||||
@NotNull(message = "监管端/企业端标识不能为空")
|
@NotNull(message = "监管端/企业端标识不能为空")
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,6 @@ public class PostCO extends ClientObject {
|
||||||
// 岗位职责
|
// 岗位职责
|
||||||
@ApiModelProperty(value = "岗位职责")
|
@ApiModelProperty(value = "岗位职责")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
//状态 1-启用, 2-禁用
|
|
||||||
// @ApiModelProperty(value = "状态 1-启用, 2-禁用")
|
|
||||||
// private Integer status;
|
|
||||||
//企业id
|
//企业id
|
||||||
@ApiModelProperty(value = "企业id")
|
@ApiModelProperty(value = "企业id")
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
|
|
@ -43,10 +40,10 @@ public class PostCO extends ClientObject {
|
||||||
@ApiModelProperty(value = "企业名称")
|
@ApiModelProperty(value = "企业名称")
|
||||||
private String corpinfoName;
|
private String corpinfoName;
|
||||||
//是否监管岗位 1-是, 2-不是
|
//是否监管岗位 1-是, 2-不是
|
||||||
@ApiModelProperty(value = "是否监管岗位0-否, 1-是")
|
// @ApiModelProperty(value = "是否监管岗位0-否, 1-是")
|
||||||
private Integer supervisionFlag;
|
// private Integer supervisionFlag;
|
||||||
@ApiModelProperty(value = "监管部门数据权限-部门列表")
|
// @ApiModelProperty(value = "监管部门数据权限-部门列表")
|
||||||
private List<PostDepartmentCO> departmentList;
|
// private List<PostDepartmentCO> departmentList;
|
||||||
|
|
||||||
//乐观锁
|
//乐观锁
|
||||||
@ApiModelProperty(value = "乐观锁")
|
@ApiModelProperty(value = "乐观锁")
|
||||||
|
|
|
||||||
|
|
@ -26,30 +26,28 @@ public class PostE extends BaseE {
|
||||||
private String postName;
|
private String postName;
|
||||||
//岗位职责
|
//岗位职责
|
||||||
private String remarks;
|
private String remarks;
|
||||||
//状态 1-启用, 2-禁用
|
|
||||||
// private Integer status;
|
|
||||||
//企业id
|
//企业id
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
//企业名称
|
//企业名称
|
||||||
private String corpinfoName;
|
private String corpinfoName;
|
||||||
//是否监管岗位 0-否, 1-是
|
//是否监管岗位 0-否, 1-是
|
||||||
private Integer supervisionFlag;
|
// private Integer supervisionFlag;
|
||||||
|
|
||||||
// 添加关联部门行为
|
// 添加关联部门行为
|
||||||
public List<PostDepartmentE> addDepartmentIds(Long postId, Long[] departmentIds) {
|
// public List<PostDepartmentE> addDepartmentIds(Long postId, Long[] departmentIds) {
|
||||||
if(Objects.isNull(departmentIds) || departmentIds.length == 0){
|
// if(Objects.isNull(departmentIds) || departmentIds.length == 0){
|
||||||
// 没有部门id集合, 可能是没有给部门权限
|
// // 没有部门id集合, 可能是没有给部门权限
|
||||||
return new ArrayList<>();
|
// return new ArrayList<>();
|
||||||
}
|
// }
|
||||||
List<PostDepartmentE> postDepartmentEList = new ArrayList<>();
|
// List<PostDepartmentE> postDepartmentEList = new ArrayList<>();
|
||||||
for (Long departmentId : departmentIds) {
|
// for (Long departmentId : departmentIds) {
|
||||||
PostDepartmentE e = new PostDepartmentE();
|
// PostDepartmentE e = new PostDepartmentE();
|
||||||
e.setPostDepartmentId(UuidUtil.get32UUID());
|
// e.setPostDepartmentId(UuidUtil.get32UUID());
|
||||||
e.setPostId(postId);
|
// e.setPostId(postId);
|
||||||
e.setDepartmentId(departmentId);
|
// e.setDepartmentId(departmentId);
|
||||||
postDepartmentEList.add(e);
|
// postDepartmentEList.add(e);
|
||||||
}
|
// }
|
||||||
return postDepartmentEList;
|
// return postDepartmentEList;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,9 +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){
|
// if(d.getSupervisionFlag() == null){
|
||||||
d.setSupervisionFlag(0);
|
// d.setSupervisionFlag(0);
|
||||||
}
|
// }
|
||||||
postRepository.save(d);
|
postRepository.save(d);
|
||||||
return d.getId();
|
return d.getId();
|
||||||
}
|
}
|
||||||
|
|
@ -65,9 +65,9 @@ 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){
|
// if(d.getSupervisionFlag() == null){
|
||||||
d.setSupervisionFlag(0);
|
// d.setSupervisionFlag(0);
|
||||||
}
|
// }
|
||||||
|
|
||||||
postRepository.updateById(d);
|
postRepository.updateById(d);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ public class PostDO extends BaseDO {
|
||||||
@ApiModelProperty(value = "企业名称")
|
@ApiModelProperty(value = "企业名称")
|
||||||
private String corpinfoName;
|
private String corpinfoName;
|
||||||
//是否监管岗位 1-是, 2-不是
|
//是否监管岗位 1-是, 2-不是
|
||||||
@ApiModelProperty(value = "是否监管岗位 0-否, 1-是")
|
// @ApiModelProperty(value = "是否监管岗位 0-否, 1-是")
|
||||||
private Integer supervisionFlag;
|
// private Integer supervisionFlag;
|
||||||
|
|
||||||
public PostDO(String postId) {
|
public PostDO(String postId) {
|
||||||
this.postId = postId;
|
this.postId = postId;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue