|
@@ -366,7 +366,7 @@ public class WxCorpInfoController {
|
|
|
JSONArray departments = value.getJSONArray("departments");
|
|
|
String openapi_id = departments.getJSONObject(0).getString("openapi_id");
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotEmpty(openapi_id)){
|
|
|
- Optional<Department> first1 = departmentList.stream().filter(d -> d.getCorpwxDeptid().equals(Integer.valueOf(openapi_id))).findFirst();
|
|
|
+ Optional<Department> first1 = departmentList.stream().filter(d ->d.getCorpwxDeptid()!=null&&Integer.valueOf(openapi_id).equals(d.getCorpwxDeptid())).findFirst();
|
|
|
if(first1.isPresent()){
|
|
|
plan.setStationId(first1.get().getDepartmentId());
|
|
|
plan.setStationName(first1.get().getDepartmentName());
|