修改物料编码规则
This commit is contained in:
parent
8487a73d45
commit
3eee98f142
|
@ -240,30 +240,7 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
}
|
||||
}
|
||||
}
|
||||
private JSONObject getUser(String usercode,String access_token) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String url = "https://swoa.sunwave.com.cn:9999/seeyon/rest/orgMembers/code/"+usercode+"?pageNo=0&pageSize=100";
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
headers.put("token",access_token);
|
||||
|
||||
String returndata = sendGet(url, headers);
|
||||
if (returndata != null && JSONArray.isValidArray(returndata)) {
|
||||
JSONArray dataJson = JSONObject.parseArray(returndata);
|
||||
if(dataJson != null && dataJson.size() > 0){
|
||||
for (int i = 0; i < dataJson.size(); i++) {
|
||||
if(dataJson.getJSONObject(i).getString("code") != null && !"".equals(dataJson.getJSONObject(i).getString("code"))
|
||||
&& usercode.toLowerCase().equals(dataJson.getJSONObject(i).getString("code").toLowerCase())){
|
||||
jsonObject.put("telNumber",dataJson.getJSONObject(i).getString("telNumber"));
|
||||
jsonObject.put("orgDepartmentName",dataJson.getJSONObject(i).getString("orgDepartmentName"));
|
||||
jsonObject.put("orgPostName",dataJson.getJSONObject(i).getString("orgPostName"));
|
||||
jsonObject.put("name",dataJson.getJSONObject(i).getString("name"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return jsonObject;
|
||||
}
|
||||
private String getOAToken(String name) {
|
||||
String url = "https://swoa.sunwave.com.cn:9999/seeyon/rest/token";
|
||||
Map<String, String> headers = null;
|
||||
|
|
Loading…
Reference in New Issue