|
|
@@ -12,7 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@Service
|
|
|
public class CpClientImpl implements CpClient {
|
|
|
@@ -139,11 +141,12 @@ public class CpClientImpl implements CpClient {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public Map getCpBoList(String schemaCode, Map queryCondition,int page, int size, String userId){
|
|
|
+ public Map getCpBoList(String schemaCode, Map queryCondition, Map options,int page, int size, String userId){
|
|
|
Map body = new HashMap();
|
|
|
|
|
|
body.put("queryCondition",queryCondition);
|
|
|
body.put("schemaCode",schemaCode);
|
|
|
+ body.put("options",options);
|
|
|
body.put("page",page);
|
|
|
body.put("size",size);
|
|
|
body.put("showTotal",true);
|
|
|
@@ -163,6 +166,43 @@ public class CpClientImpl implements CpClient {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 云枢分页查询用户详情
|
|
|
+ * @param corpId
|
|
|
+ * @param departmentIds
|
|
|
+ * @param ids
|
|
|
+ * @param mobile
|
|
|
+ * @param name
|
|
|
+ * @param page
|
|
|
+ * @param size
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<Map> getCpUserInfo(String corpId, List<String> departmentIds, List<String> ids, String mobile, String name, int page, int size) {
|
|
|
+ Map body = new HashMap();
|
|
|
+ if (Objects.nonNull(corpId)) body.put("corpId",corpId);
|
|
|
+ if (Objects.nonNull(departmentIds)) body.put("departmentIds",departmentIds);
|
|
|
+ if (Objects.nonNull(ids)) body.put("ids",ids);
|
|
|
+ if (Objects.nonNull(mobile)) body.put("mobile",mobile);
|
|
|
+ if (Objects.nonNull(name)) body.put("name",name);
|
|
|
+
|
|
|
+ body.put("page",page);
|
|
|
+ body.put("size",size);
|
|
|
+
|
|
|
+ String s = UtilHttp.doPost(cloudpivotConfig.getRedirectUri() + "openapi/v3/organization/user/detail/query", CloudpivotConfig.initTokenHeader(getCpAccessToken()), null, body);
|
|
|
+
|
|
|
+ Map result = (Map) JSONObject.parse(s);
|
|
|
+
|
|
|
+ isSuccess(result);
|
|
|
+
|
|
|
+ Map data = UtilMap.getMap(result, "data");
|
|
|
+
|
|
|
+ List<Map> content = UtilMap.getList(data, "content");
|
|
|
+
|
|
|
+ return content;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//获取云枢表单详情返回结果中单据字段值
|
|
|
@Override
|
|
|
public Map getCpBoResultData(Map result){
|