rev:向飞书推送图片,添加领导对应区域
This commit is contained in:
@@ -416,7 +416,9 @@ public class AutoSendSalesIvt {
|
|||||||
// 调用接口传送图片名称
|
// 调用接口传送图片名称
|
||||||
JSONObject resultParam = lmsToMesService.sendSalesIvtMsg(fileName);
|
JSONObject resultParam = lmsToMesService.sendSalesIvtMsg(fileName);
|
||||||
|
|
||||||
// 查询此区域的所有业务员
|
/*
|
||||||
|
* 查询此区域的所有业务员
|
||||||
|
*/
|
||||||
String area = result.getString("value");
|
String area = result.getString("value");
|
||||||
|
|
||||||
List<JSONObject> areaList = WQLObject.getWQLObject("md_cs_areasalesinfo")
|
List<JSONObject> areaList = WQLObject.getWQLObject("md_cs_areasalesinfo")
|
||||||
@@ -431,6 +433,27 @@ public class AutoSendSalesIvt {
|
|||||||
})
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 查询领导对用区域
|
||||||
|
String region_boss = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("REGION_PIC_BOSS").getValue();
|
||||||
|
|
||||||
|
// 截取编码
|
||||||
|
String[] userArr = region_boss.split(",");
|
||||||
|
|
||||||
|
for (String user : userArr) {
|
||||||
|
// 人员编码
|
||||||
|
String user_code = user.substring(0, user.indexOf("-"));
|
||||||
|
// 对应的区域编码
|
||||||
|
String area_code = user.substring(user.indexOf("-") + 1,user.length());
|
||||||
|
|
||||||
|
// 判断是包含此区域
|
||||||
|
if (area_code.contains(area)) {
|
||||||
|
JSONObject jsonUser = new JSONObject();
|
||||||
|
jsonUser.put("User",user_code);
|
||||||
|
userList.add(jsonUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 调用接口返回飞书
|
// 调用接口返回飞书
|
||||||
JSONObject paramFeiShu = new JSONObject();
|
JSONObject paramFeiShu = new JSONObject();
|
||||||
paramFeiShu.put("UserList", userList);
|
paramFeiShu.put("UserList", userList);
|
||||||
|
|||||||
Reference in New Issue
Block a user