|
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.winsea.svc.base.base.entity.CommonRole;
|
|
|
import com.winsea.svc.base.base.entity.CommonStaff;
|
|
|
import com.winsea.svc.base.base.entity.CommonStaffRole;
|
|
|
import com.winsea.svc.base.base.service.ICommonRoleResourceService;
|
|
|
+import com.winsea.svc.base.base.service.ICommonRoleService;
|
|
|
import com.winsea.svc.base.base.service.ICommonStaffRoleService;
|
|
|
import com.winsea.svc.base.base.service.ICommonStaffService;
|
|
|
import com.winsea.svc.base.security.util.AuthSecurityUtils;
|
|
@@ -84,6 +86,8 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
|
|
|
private IBatchReviewInfoService batchReviewInfoService;
|
|
|
@Autowired
|
|
|
private CacheComponent cacheComponent;
|
|
|
+ @Autowired
|
|
|
+ private ICommonRoleService commonRoleService;
|
|
|
/**
|
|
|
* 汽运调度分页列表查询
|
|
|
*
|
|
@@ -102,13 +106,28 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
|
|
|
pageView.put("searchType", tranProcessInfo.getSearchType());
|
|
|
pageView.put("startDate", tranProcessInfo.getStartDate());
|
|
|
pageView.put("endDate", tranProcessInfo.getEndDate());
|
|
|
- //只有指定的人才能看到需要反馈的数据 发货反馈(发货执行中1已完成2全部3)
|
|
|
- if("1".equals(tranProcessInfo.getFeedbackFlag())||"2".equals(tranProcessInfo.getFeedbackFlag())||"3".equals(tranProcessInfo.getFeedbackFlag())){
|
|
|
- tranProcessInfo.setSenderPhone(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone());
|
|
|
+ String staffId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffId();
|
|
|
+ List<CommonStaffRole> staffRoles = commonStaffRoleService.selectList(new EntityWrapper<CommonStaffRole>().eq("staff_id", staffId));
|
|
|
+ List<CommonRole> list = new ArrayList<>();
|
|
|
+ for (CommonStaffRole commonStaffRole : staffRoles) {
|
|
|
+ list.add(commonRoleService.selectById(commonStaffRole.getRoleId()));
|
|
|
+ }
|
|
|
+ boolean flag = true;
|
|
|
+ for (CommonRole commonRole : list) {
|
|
|
+ if (commonRole.getRoleName().contains("内勤") || commonRole.getRoleName().contains("决策人") || commonRole.getRoleName().contains("财务") || commonRole.getRoleName().contains("出纳") || commonRole.getRoleName().equals("系统管理员") || commonRole.getRoleName().contains("总"))
|
|
|
+ {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
}
|
|
|
- //收货反馈(收货执行中4已完成5全部6)
|
|
|
- if("4".equals(tranProcessInfo.getFeedbackFlag())||"5".equals(tranProcessInfo.getFeedbackFlag())||"6".equals(tranProcessInfo.getFeedbackFlag())){
|
|
|
- tranProcessInfo.setReceiverPhone(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone());
|
|
|
+ if(flag){
|
|
|
+ //只有指定的人才能看到需要反馈的数据 发货反馈(发货执行中1已完成2全部3)
|
|
|
+ if("1".equals(tranProcessInfo.getFeedbackFlag())||"2".equals(tranProcessInfo.getFeedbackFlag())||"3".equals(tranProcessInfo.getFeedbackFlag())){
|
|
|
+ tranProcessInfo.setSenderPhone(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone());
|
|
|
+ }
|
|
|
+ //收货反馈(收货执行中4已完成5全部6)
|
|
|
+ if("4".equals(tranProcessInfo.getFeedbackFlag())||"5".equals(tranProcessInfo.getFeedbackFlag())||"6".equals(tranProcessInfo.getFeedbackFlag())){
|
|
|
+ tranProcessInfo.setReceiverPhone(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffMobilePhone());
|
|
|
+ }
|
|
|
}
|
|
|
pageView.put("senderPhone", tranProcessInfo.getSenderPhone());
|
|
|
pageView.put("receiverPhone", tranProcessInfo.getReceiverPhone());
|