工作组项目操作权限优化

This commit is contained in:
梁琦涛
2021-10-13 11:19:50 +08:00
parent a8f5ffa5f3
commit 213134b262
3 changed files with 20 additions and 0 deletions
@@ -104,4 +104,12 @@ public class PayProjectCommon {
* 需要发票(1:增值税普通发票,2:增值税专用发票,0:否,3:需要发票(小程序需要))
*/
public final static Integer NEED_INVOICE3 = 3;
/**
* 当前登录人是否可以操作(1为可操作,2为不可操作)
*/
public final static Integer CHECKOUT_OPERATION1 = 1;
/**
* 当前登录人是否可以操作(1为可操作,2为不可操作)
*/
public final static Integer CHECKOUT_OPERATION2 = 2;
}
@@ -81,9 +81,17 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
}
IPage<PayWorkingGroupVO> pageList = payWorkingGroupService.queryPageList(page, payWorkingGroup);
if(!Objects.isNull(pageList)){
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<PayWorkingGroupVO> listPayWorkingGroupVO = pageList.getRecords();
if(!CollectionUtils.isEmpty(listPayWorkingGroupVO)){
setPayWorkingGroupSubItem(listPayWorkingGroupVO);
listPayWorkingGroupVO.forEach(p->{
if(Objects.equals(p.getPrincipalIdB(),sysUser.getId())){
p.setCheckoutOperation(PayProjectCommon.CHECKOUT_OPERATION2);
}else{
p.setCheckoutOperation(PayProjectCommon.CHECKOUT_OPERATION1);
}
});
pageList.setRecords(listPayWorkingGroupVO);
}
}
@@ -19,4 +19,8 @@ public class PayWorkingGroupVO extends PayWorkingGroup implements Serializable {
* 项目id
*/
private String projectId;
/**
* 当前登录人是否可以操作(1为可操作,2为不可操作)
*/
private Integer checkoutOperation;
}