|
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import cn.com.ctop.common.module.entity.UserCompany;
|
|
|
import cn.com.ctop.common.module.mapper.MailLogMapper;
|
|
|
import cn.com.ctop.common.module.mapper.SysUserMapper;
|
|
|
+import cn.com.ctop.common.module.service.ISysUserService;
|
|
|
import cn.com.ctop.common.module.service.IUserCompanyService;
|
|
|
import cn.com.ctop.common.module.utils.CorpWexinUtils;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
@@ -85,6 +86,8 @@ public class CwjsPolicyInfoController {
|
|
|
CorpWexinUtils corpWexinUtils;
|
|
|
@Resource
|
|
|
MailLogMapper mailLogMapper;
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService sysUserService;
|
|
|
|
|
|
@GetMapping(value = "/queryApprovalRejectReason")
|
|
|
public Result<CwjsPolicyApprovalLog> queryApprovalRejectReason(@RequestParam(name="id",required=true) Integer id){
|
|
@@ -277,10 +280,24 @@ public class CwjsPolicyInfoController {
|
|
|
String roleCode = roleService.getRoleCodeByUserId(userId);
|
|
|
List<JSONObject> allSaleList;
|
|
|
if("admin".equalsIgnoreCase(roleCode) || "finance".equalsIgnoreCase(roleCode)){
|
|
|
- allSaleList = cwjsPolicyInfoService.getAllSale();
|
|
|
+ allSaleList = cwjsPolicyInfoService.getAllSale(); //所有销售角色和管理员
|
|
|
}else{
|
|
|
allSaleList = cwjsPolicyInfoService.getAllSaleByUserId(userId);
|
|
|
+ List<JSONObject> allSubordinate = cwjsPolicyInfoService.getAllSubordinate2(userId);
|
|
|
+ if(!Check.isNull(allSubordinate)){
|
|
|
+ allSaleList.addAll(allSubordinate);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ if(Check.isNull(allSaleList)){
|
|
|
+ allSaleList = new ArrayList<>();
|
|
|
+ SysUser sysUser = sysUserService.getById(userId);
|
|
|
+ JSONObject jo = new JSONObject();
|
|
|
+ jo.put("userId",sysUser.getId());
|
|
|
+ jo.put("userName",sysUser.getRealname());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return Result.OK(allSaleList);
|
|
|
}
|
|
|
|