jmeter高阶系列--beanshell返回值中提取参数
1 准备环境
- jmeter版本: ** ,JDK:1.8
- 将json.jar包置于…\apache-jmeter-5.1\lib\下;否则会报:Typed variable declaration : Class: JSONObject not found in namespace的错误;
- 处理器:Beanshell处理器,import org.json.*;(一般习惯使用到什么import什么,如:import org.json.JSONObject、import org.json.JSONAarry;)
- json.jar包地址: 链接:https://pan.baidu.com/s/12a5hClYvhwxS-kZvJnG4Fg 密码:3t19
2 思路
- 1 获取请求的返回值,即Json响应;
String response_data = prev.getResponseDataAsString(); //注意此处获取到的是String类型;
- 2 利用上一步获取的字符串形式的JSON,结合Java处理Json的方法,将需要的键值提取出来;需要利用JSONObject或者JSONArray构造JSON对象。
JSONObject JsonData = new JSONObject(StrData);
- 3 替换某些需要变更的字段值,再将新的JSON处理为Jmeter的参数,用于下一个请求的参数化值;
JsonData.put(“status”, “CLOSED”);
String NewData = JsonData.toString();
vars.put(“NewStrData”,NewData);
示例1 JSONObject对象
获取到JSON对象,需要提取其中的userid值;
示例2 JSONArray对象
需要提取返回值中,每一个对象数组中的每一个 uuid 及 id 的键值:获取JSON对象,再提取data数组内容并获取data数组长度,最后循环提取每一个 uuid 及 id 的键值;备注:1个客服同时与10个客户聊天,在聊天开始之前,需要捞取到这10个客户的uuid(uuid)及conversationId(id);
import org.json.JSONObject;
import org.json.JSONArray;/** 本脚本实现,jmeter从返回值中提取值,并传给参数* 返回是json* 返回是Array
*//*返回数据--参考如下
{"pub":{"status":0,"userId":"7015","apiVersion":"3.9.2.3061","subPline":"2","clientAgent":"svnVer_1909111613","channelCode":"Google","appCode":"f002","model":"ALP-AL00","imsi":"dz_1567753187746","imei":"dz_1567753187746","screen":"720x1206","os":"android28","pname":"com.ishugui","apn":"wifi","ip":"192.168.150.212","province":"北京市","city":"北京"},"pri":{"f7":{"data":[{"color_pressed":"706ec5","tab":"shelf","color":"868686","icon_normal":"http://obzf2cyui.bkt.clouddn.com/1532939283635邀请1.png","icon_pressed":"http://obzf2cyui.bkt.clouddn.com/1532939283843邀请1.png","title":"书架"},{"color_pressed":"706ec5","tab":"store","color":"868686","icon_normal":"http://obzf2cyui.bkt.clouddn.com/1532939325789分享赠送1.png","icon_pressed":"http://obzf2cyui.bkt.clouddn.com/1532939325962分享赠送1.png","title":"书城"},{"color_pressed":"706ec5","tab":"discover","color":"868686","icon_normal":"http://obzf2cyui.bkt.clouddn.com/1532939356992任务1.png","icon_pressed":"http://obzf2cyui.bkt.clouddn.com/1532939357142任务1.png","title":"发现"},{"color_pressed":"706ec5","tab":"sort","color":"868686","icon_normal":"http://obzf2cyui.bkt.clouddn.com/1532939424772活动1.png","icon_pressed":"http://obzf2cyui.bkt.clouddn.com/1532939424922活动1.png","title":"分类"},{"color_pressed":"706ec5","tab":"personal","color":"868686","icon_normal":"http://obzf2cyui.bkt.clouddn.com/1532939389362热门1.png","icon_pressed":"http://obzf2cyui.bkt.clouddn.com/1532939389518热门1.png","title":"我的"}],"default_enter":"shelf","default_out":"shelf","status":0},"f9":{"status":1},"f10":{"showType":1,"status":0,"limitChapterShow":8,"everyFewPages":3},"f11":{"isListening":0,"status":1},"f1":{"reloadNumM":"1","reloadNumS":"10","user_avater":"","pirceUnit":"看点","remainSum":"0","channelFee":"Google","userId":"7015","status":0},"f2":{"isNewVersion":"1","status":0},"f3":{"vip_channel_id":45,"signin_tip":"任务送好礼","infoFlowUrl":"http://oethdsqcd.bkt.clouddn.com/8/8/found.html?t=1533092799617","agreementUrl":"http://bookstore.kzread.cn/protocol/agreement.html","signin_vipurl":"/php/vipsign","is_super_vip":"0","vip_action_title":"立即开通","levelNo":"Lv1","comment_sum":"0","awardStatus":0,"free_url":"http://oethdsqcd.bkt.clouddn.com/8/free.html?t=1533092812703","awardCenterUrl":"http://192.168.0.20:3080/php/user/awardcenter","read_num":"0","urls":{"storeurl_girl":"http://oethdsqcd.bkt.clouddn.com/8/girl_index5.html?t=1533092824547","storeurl_default":"http://oethdsqcd.bkt.clouddn.com/8/index.html?t=1533092804426","storeurl_boy":"http://oethdsqcd.bkt.clouddn.com/8/boy_index4.html?t=1533092814971"},"isOpenSign":"1","appPayWay":2,"isRechargeSucLogin":0,"h_wdmsg":0,"page_style":2,"comment_login":"0","unsignin_tip":"签到领现金","user_avater":"","loginList":[{"appid":"1630884126","type":3,"key":"SINA"},{"appid":"PHONE_NUM_VERIFY","type":5,"key":"PHONE_NUM_VERIFY"},{"appid":"wx2d567f33ab16a8b8","type":1,"key":"WECHAT"},{"appid":"101366226","type":2,"key":"QQ"}],"is_vip":"0","vip_title":"VIP会员","ip":"","levelName":"草民","my_vip_url":"http://103.121.164.211:23080/php/vip/viphome_latest/","isInitTinker":"1","signin_url":"/asg/portal/sign/signlist.do","featuredUrl":"http://oethdsqcd.bkt.clouddn.com/8/index.html?t=1533092804426","afu":0,"inu":true,"isSignTody":1,"show_type":2,"secretUrl":"http://bookstore.kzread.cn/protocol/privacy_policy.html","has_coupon":1,"rechargetip":"充值赠送的代金券存在有效期,有效期为:自领取时间起,15天有效;消费时优先扣除赠送代金券。","classifyUrl":"http://oethdsqcd.bkt.clouddn.com/8/classify.html?t=1533092820649","vip_sub_title":"免费书库/全场8折/每月礼包","reading_recom_num":"5","status":0},"f4":{"loginQQAward":15,"loginCmccAward":2,"loginFacebookAward":30,"loginSinaAward":11,"appraisalAmount":"17","dzTicketAmount":"0.66代金券","loginPhoneAward":23,"loginOppoAward":0,"loginGoogleAward":30,"ownAmount":"66看点","loginWxAward":20,"doTaskAmount":"16","status":0},"f5":{"czip":"","lastModify":"","downloadUrls":"","status":0}}}
*///获取上一个请求的返回
code=prev.getResponseCode();
//打印信息
log.info("code==="+code);//1.获取请求返回值,此处值获得String类型
String response = prev.getResponseDataAsString();
//2.将string类型的返回值转换为jsond对象
JSONObject responseJson = new JSONObject(response);
//3.获取返回值中的pub数据,string类型
String strdata = responseJson.get("pub").toString();//打印信息
log.info("response======="+response);
log.info("responseJson======="+responseJson);
log.info("strdata======="+strdata);//将4.获取到的pub字符串转为json对象
JSONObject JsonData=new JSONObject(strdata);
log.info("JsonData======="+JsonData);//5.pub中添加先的数据
JsonData.put("message","成功返回");
log.info("JsonData======="+JsonData);//6.将json对象保存为string类型,Jmeter中的请求的参数均以字符串的形式传递;
String NewData=JsonData.toString();
//7.将string类型的数据,存放到变量NewStrData,其他的请求可以引用${NewStrData}
vars.put("NewStrData",NewData);
//打印变量
log.info("NewStrData==="+NewData);//8.获取pub.userId
String id = responseJson.get("pub").get("userId").toString();
//9.把值保存到jmeter变量myid中,引用${myid}
vars.put("myid",id);
//10.用get取myid值
String getId=vars.get("myid");
log.info("取到的myid===="+getId);//11.获取数组pri.f7.data
JSONArray dataAarray = responseJson.get("pri").get("f7").getJSONArray("data"); //data为数组
log.info("提取数组===="+dataAarray);
//len数组长度
int len=dataAarray.length();
String strlen = Integer.toString(len);
vars.put("MessageNum",strlen);
log.info("数组长度 strlen===="+strlen);//循环取值
int i=0;
for(i=0;i<len;i++){//获取data[i] 数组对象JSONObject jsonTemp=(JSONObject)dataAarray.getJSONObject(i);log.info("jsonTemp======="+jsonTemp);//log.info("i----------"+i);//log.info("jsonTemp======="+jsonTemp.get("title"));//log.info("jsonTemp======="+jsonTemp.get("title").toString());//提取titletitle = jsonTemp.getString("title");//打印log.info("title===="+title);//存储变量vars.put("title_"+i, jsonTemp.getString("title"));//get 变量值String getTitle=vars.get("title_"+i);log.info("取到的title_"+i+" : "+getTitle);}
示例3 直接是JSONArray对象
import org.json.JSONObject;
import org.json.JSONArray;/** 本脚本实现,jmeter从返回值中提取值,并传给参数* 返回是json* 返回是Array
*//*返回数据--参考如下
[{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"17f936bd-a8c6-4364-a07b-00fe5f0628e9","WC005_PREID":"","WC005_RUNPROCESS":"93b44714-d7cc-4643-8d7b-ce5cc4ca9c68","WC005_PREPROCESS":null,"WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":2,"WC005_DEADLINE":"2023-03-09 14:55:22","WC005_UPDATETIME":"2023-03-02 14:55:22","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":"2023-03-02 14:56:54","WC005_HANDLEPERSON":"B25D9FC8-B472-43E3-98C8-1C78CF7B1F98","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":"2201","WC005_HANDLECONTENT":"同意","WC005_ORDER":100,"WC005_SIGNIMG":null,"WC005_SIGNID":"23030214573660","WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":1,"WC011_CONTENTTYPE":2,"WC011_CONTENT":"f031f988-1eae-40f9-9416-e0f1be7f94e2","WC005_PREACTFLAG":1,"GC002_USERCODE":"500A3179","GC002_USERNAME":"王鹏","DW":"济南公司","BM":"市场客户部","GC005_POSTNAME":"二级单位市场部经理","GC005_POSTCODE":"2040101","posttype":"2","GC015_NAME":"同意","WC002_NAME":"二级单位市场部","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_SC_B.html?","MPREACTURL":"","PREACTPAGENAME":"总包合同评审(二级单位市场)","WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":1,"WC002_ALLADDNODE_AFTER":1,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"ejdwscb","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null},{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"8a9fdb8a-2169-47ab-b712-47180394669a","WC005_PREID":"17f936bd-a8c6-4364-a07b-00fe5f0628e9","WC005_RUNPROCESS":"4976d534-e58d-4ced-bf31-bc5695b69b05","WC005_PREPROCESS":null,"WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":2,"WC005_DEADLINE":"2023-03-09 14:55:22","WC005_UPDATETIME":"2023-03-02 14:55:22","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":"2023-03-02 15:03:23","WC005_HANDLEPERSON":"D4A64A0F-C892-45C5-9CFF-42D7C3F263F9","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":"2201","WC005_HANDLECONTENT":"同意","WC005_ORDER":200,"WC005_SIGNIMG":null,"WC005_SIGNID":"23030215034519","WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":1,"WC011_CONTENTTYPE":2,"WC011_CONTENT":"bc42571c-310c-4d07-85f5-ab90659137ca","WC005_PREACTFLAG":1,"GC002_USERCODE":"500A2286","GC002_USERNAME":"秦永江","DW":"济南公司","BM":"工程管理部","GC005_POSTNAME":"二级单位工程管理部经理","GC005_POSTCODE":"2080101","posttype":"2","GC015_NAME":"同意","WC002_NAME":"二级单位工程管理部","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_SG_B.html?","MPREACTURL":"","PREACTPAGENAME":"总包合同评审(二级单位施工管理部)","WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":1,"WC002_ALLADDNODE_AFTER":1,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"ejdwgcglb","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null},{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"9903fda8-e2d5-483f-b47b-87fa3596f2b1","WC005_PREID":"8a9fdb8a-2169-47ab-b712-47180394669a","WC005_RUNPROCESS":"43b3f1f1-9d72-47f5-acbe-c56bc0703791","WC005_PREPROCESS":null,"WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":2,"WC005_DEADLINE":"2023-03-09 14:55:22","WC005_UPDATETIME":"2023-03-02 14:55:22","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":"2023-03-02 15:09:27","WC005_HANDLEPERSON":"9331F01E-7433-4F66-96D0-FAFD071059F0","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":"2201","WC005_HANDLECONTENT":"同意","WC005_ORDER":300,"WC005_SIGNIMG":null,"WC005_SIGNID":"23030215094935","WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":1,"WC011_CONTENTTYPE":2,"WC011_CONTENT":"267ffa6b-bb23-4bb1-b7dc-e9658245abe3","WC005_PREACTFLAG":1,"GC002_USERCODE":"500A2894","GC002_USERNAME":"冯翔","DW":"济南公司","BM":"领导班子","GC005_POSTNAME":"二级单位总会计师","GC005_POSTCODE":"2010501","posttype":"2","GC015_NAME":"同意","WC002_NAME":"二级单位财务资金部","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_CW_B.html?","MPREACTURL":"","PREACTPAGENAME":"总包合同评审(二级单位财务部)","WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":1,"WC002_ALLADDNODE_AFTER":1,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"ejdwcwzjb","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null},{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"0eb77ea5-eb38-4399-ae34-6a48f703b556","WC005_PREID":"9903fda8-e2d5-483f-b47b-87fa3596f2b1","WC005_RUNPROCESS":"2ba6bca0-759f-4e01-9402-86447bb2c65e","WC005_PREPROCESS":null,"WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":2,"WC005_DEADLINE":"2023-03-09 14:55:22","WC005_UPDATETIME":"2023-03-02 14:55:22","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":"2023-03-02 15:11:51","WC005_HANDLEPERSON":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":"2201","WC005_HANDLECONTENT":"同意","WC005_ORDER":400,"WC005_SIGNIMG":null,"WC005_SIGNID":"23030215123360","WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":1,"WC011_CONTENTTYPE":2,"WC011_CONTENT":"cac923c3-ea26-40a8-a018-73ab7d1fda7f","WC005_PREACTFLAG":1,"GC002_USERCODE":"500A6607","GC002_USERNAME":"闫素洁","DW":"济南公司","BM":"商务法务部","GC005_POSTNAME":"二级单位商务法务部见习生","GC005_POSTCODE":"null","posttype":"2","GC015_NAME":"同意","WC002_NAME":"二级单位法律顾问","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_HY_B.html?","MPREACTURL":"","PREACTPAGENAME":"总包合同评审(二级单位法律顾问)","WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":1,"WC002_ALLADDNODE_AFTER":1,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"e5ae","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null},{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"e9802fba-fb5a-4bea-8d4a-299afba18478","WC005_PREID":"0eb77ea5-eb38-4399-ae34-6a48f703b556","WC005_RUNPROCESS":"ea8e0acb-b34e-46f5-9336-4a65e09dffad","WC005_PREPROCESS":"2ba6bca0-759f-4e01-9402-86447bb2c65e,43b3f1f1-9d72-47f5-acbe-c56bc0703791,4976d534-e58d-4ced-bf31-bc5695b69b05,93b44714-d7cc-4643-8d7b-ce5cc4ca9c68","WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":2,"WC005_DEADLINE":"2023-03-09 15:12:33","WC005_UPDATETIME":"2023-03-02 15:12:33","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":"2023-03-02 15:24:50","WC005_HANDLEPERSON":"5EE5AA52-C2FD-4DB8-B804-5E31C2810B38","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":"2201","WC005_HANDLECONTENT":"同意","WC005_ORDER":500,"WC005_SIGNIMG":null,"WC005_SIGNID":"23030215253290","WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":1,"WC011_CONTENTTYPE":2,"WC011_CONTENT":"b65748a0-57af-498a-87f3-cc0467a0c3a6","WC005_PREACTFLAG":1,"GC002_USERCODE":"500A2595","GC002_USERNAME":"叶田雨","DW":"济南公司","BM":"商务法务部","GC005_POSTNAME":"二级单位商务法务部经理","GC005_POSTCODE":"2050101","posttype":"2","GC015_NAME":"同意","WC002_NAME":"二级单位商务法务部","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_SW_B.html?","MPREACTURL":"","PREACTPAGENAME":"总包合同评审(二级单位商务部)","WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":1,"WC002_ALLADDNODE_AFTER":1,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"309e5760-bf75-48ec-9fb1-59e9d664c15f,f0f12b15-71df-465c-9fce-aae0a4a05595","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"ejdwswglb","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null},{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"8f4aee61-e0b4-4d47-9ac2-069b2909073a","WC005_PREID":"e9802fba-fb5a-4bea-8d4a-299afba18478","WC005_RUNPROCESS":"0d1a39a9-aa5b-4198-ab04-4e1734a84c49","WC005_PREPROCESS":"ea8e0acb-b34e-46f5-9336-4a65e09dffad","WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":2,"WC005_DEADLINE":"2023-03-09 15:25:32","WC005_UPDATETIME":"2023-03-02 15:25:32","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":"2023-03-02 15:29:01","WC005_HANDLEPERSON":"39242c59-4a55-4fba-b5e1-60b47f5f43ec","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":"2201","WC005_HANDLECONTENT":"22112122122221","WC005_ORDER":600,"WC005_SIGNIMG":null,"WC005_SIGNID":"23030215292332","WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":null,"WC011_CONTENTTYPE":null,"WC011_CONTENT":null,"WC005_PREACTFLAG":null,"GC002_USERCODE":"500Y0005","GC002_USERNAME":"李杰英","DW":"济南公司","BM":"副副职","GC005_POSTNAME":"二级单位法务总监","GC005_POSTCODE":"2020801","posttype":"2","GC015_NAME":"同意","WC002_NAME":"二级单位法务总监","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":null,"MPREACTURL":null,"PREACTPAGENAME":null,"WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":0,"WC002_ALLADDNODE_AFTER":0,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"40f0","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null},{"WC004_ID":"678ef1fb-3aa6-40a0-ac66-173ed2c63886","WC004_NAME":"中国中医科学院广安门医院济南医院项目工程总承包(EPC)--总包合同评审-初稿","WC001_ID":"e8685e32-727c-4303-982f-cf629cff4d8d","WC004_RUNNAME":"总包合同评审","WC004_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f,","WC004_ATTACHIDS":null,"WC004_ENDTIME":null,"WC004_STATUS":1,"WC004_CREATETIME":"2023-03-02 14:55:22","WC004_RUNNER":"26aefc9c-f793-11eb-894e-12eee00a7031","WC004_DATAID":"697bf6c6-7318-46dc-8fe7-42f6ca58d84d","WC004_LASTDATAID":null,"WC005_ID":"2b0d1226-443a-4559-a64c-587355eeffd1","WC005_PREID":"8f4aee61-e0b4-4d47-9ac2-069b2909073a","WC005_RUNPROCESS":"52e88667-5822-4404-81b6-158675ebc67f","WC005_PREPROCESS":"0d1a39a9-aa5b-4198-ab04-4e1734a84c49","WC005_REMARK":null,"WC005_ISSIGN":0,"WC005_STATUS":1,"WC005_DEADLINE":"2023-03-09 15:29:23","WC005_UPDATETIME":"2023-03-02 15:29:23","WC005_CREATETIME":"2023-03-02 14:55:22","WC005_HANDLETIME":null,"WC005_HANDLEPERSON":"0F7AD9F6-3866-4B41-B6F7-18A02F1F2022","WC005_ADDMAN":"26aefc9c-f793-11eb-894e-12eee00a7031","WC005_REPLACEMAN":null,"WC005_HANDLERESULT":null,"WC005_HANDLECONTENT":null,"WC005_ORDER":700,"WC005_SIGNIMG":null,"WC005_SIGNID":null,"WC005_CHECKTYPE":1,"WC005_BACKFROM":null,"WC011_TYPE":null,"WC011_CONTENTTYPE":null,"WC011_CONTENT":null,"WC005_PREACTFLAG":null,"GC002_USERCODE":"500A0504","GC002_USERNAME":"张道超","DW":"济南公司","BM":"领导班子","GC005_POSTNAME":"二级单位总经济师","GC005_POSTCODE":"2010401","posttype":"2","GC015_NAME":null,"WC002_NAME":"二级单位总经济师","WC001_NAME":"总包合同评审-初稿","WC001_BH":"HYT021_GENERALCONTRACTAUDIT_LD_CG","WC001_VERSYS":1,"WC003_PAGEURL":"/SiteManage/HY/HYT021_GeneralContractAudit/HYT021_GeneralContractAudit_Details.html?","WC003_MPAGEURL":"","WC004_RUNNERCODE":"500A6607","WC004_RUNNERNAME":"闫素洁","WC004_RUNNERDEPT":"济南公司","WC004_RUNNERPROJ":"10010305","WC004_RUNNERPROJNAME":"商务法务部","PREACTURL":null,"MPREACTURL":null,"PREACTPAGENAME":null,"WC002_AUTOPERSON":3,"WC002_ALLCHGPERSON":1,"WC002_ALLADDNODE":0,"WC002_ALLADDNODE_AFTER":1,"WC002_ALLCHGPERSON_AFTER":0,"WC002_ALLWARN":0,"WC002_ALLPRIORITY":0,"WC002_ALTERNATIVENODE":0,"WC002_ALTERNATIVENODES":"","WC002_ALLOWADDNODES":"","WC002_NAMESHOW":1,"WC002_ATTACHNUM":0,"WC002_BH":"1577","WC005_LASTHANDLECONTENT":null,"WC005_BACKHANDLECONTENT":null}]
*/ //获取上一个请求的返回
code=prev.getResponseCode();
//打印信息
log.info("code==="+code);//1.获取请求返回值,此处值获得String类型
String response = prev.getResponseDataAsString();
log.info("response======="+response);
//2.将string类型的返回值转换为jsonArray对象
JSONArray responseJson = new JSONArray(response);
//3.打印第0个数组对象
log.info("responseJson======="+responseJson.getJSONObject(0));
//4.获取第0个数组的参数WC005_ADDMAN,并打印。
String WC005_ADDMAN = responseJson.getJSONObject(0).get("WC005_ADDMAN");
log.info("WC005_ADDMAN======="+WC005_ADDMAN);
相关文章:
jmeter高阶系列--beanshell返回值中提取参数
1 准备环境 jmeter版本: ** ,JDK:1.8将json.jar包置于…\apache-jmeter-5.1\lib\下;否则会报:Typed variable declaration : Class: JSONObject not found in namespace的错误;处理器:Beanshel…...
面向对象
面向对象面向对象一、什么是对象二、什么是面向对象三、对象四、什么是类五、实例变量六、实例方法七、方法重载(overload)八、构造方法九、对象的创建过程十、构造方法重载十一、this关键字面向对象 一、什么是对象 万物皆对象。 二、什么是面向对象 面向对象是一种编程思想。…...
mpi4py 运行过程中出现Read -1, expected xxx, errno = 1 解决方案
目录 问题描述 代码1(串行) 代码2(并行) 代码2执行时所用指令 错误信息 解决方案 解决方案1 解决方案2 问题描述 今天正在学习使用mpi4py,在对比运行以下2个代码时疯狂报错: 代码1(串…...
PMP考前冲刺3.07 | 2023新征程,一举拿证
题目1-2:1.某公司启动了一个新型智能家电研发敏捷项目,组织上聘请了一位敏捷管理专业人士。在项目执行过程中,敏捷团队反馈用户故事包含的信息不足,无法理解需求,敏捷管理专业人应该怎么做?A.教导产品负责人…...
60条Python日常工作中的高频写法,收藏
一、 数字 1 求绝对值 绝对值或复数的模 In [1]: abs(-6) Out[1]: 62 进制转化 十进制转换为二进制: In [2]: bin(10) Out[2]: 0b1010十进制转换为八进制: In [3]: oct(9) Out[3]: 0o11十进制转换为十六进制: In [4]: hex(15) Out[4]:…...
(小甲鱼python)函数笔记合集七 函数(XI)总结 python函数的函数文档、类型注释、内省详解
一、基础复习 函数的基本用法 创建和调用函数 函数的形参与实参等等函数的几种参数 位置参数、关键字参数、默认参数等函数的收集参数*args **args 解包参数详解函数中参数的作用域 局部作用域 全局作用域 global语句 嵌套函数 nonlocal语句等详解函数的闭包(工厂函…...
Leetcode是什么
力扣(LeetCode)是领扣网络旗下专注于程序员技术成长和企业技术人才服务的品牌。源自美国硅谷,力扣为全球程序员提供了专业的IT 技术职业化提升平台,有效帮助程序员实现快速进步和长期成长。 此外,力扣(Leet…...
2023-03-07 MySQL—基于规则优化-子查询优化
简介 在使用MySQL编写查询语句时,有时候无法避免的会写出一些执行起来十分耗时、耗性能的语句,但是MySQL在执行这些语句的时候,还是会竭尽全力的做出一些优化,把这个很糟糕的语句转换成某种可以比较高效执行的形式,这个过程也可以被称作查询重写 条件化简 我们编写查询…...
Rocketmq技术详解
Rocketmq技术详解 运维部署 docker-compose.yml version: 3.5 services:rmqnamesrv:image: foxiswho/rocketmq:servercontainer_name: rmqnamesrvports:- 9876:9876volumes:- ./logs:/opt/logs- ./store:/opt/storenetworks:rmq:aliases:- rmqnamesrvrmqbroker:image: foxisw…...
TeeChart VCL/FMX v2023 crack
TeeChart VCL/FMX v2023 crack TeeChart Pro VCL允许您为所有领域(包括商业、工程、金融、统计、科学、医疗、实时和网络)创建通用和专用图表和绘图应用程序。TeeChart Pro VCL具有多种图表类型的图表库,包括2D或3D线条、条形图、水平条、区域、点、饼图、箭头、气泡…...
[Java·算法·困难]LeetCode32. 最长有效括号
每天一题,防止痴呆题目示例分析思路1题解1分析思路2题解2分析思路3题解3👉️ 力扣原文 题目 给你一个只包含 ( 和 ) 的字符串,找出最长有效(格式正确且连续)括号子串的长度。 示例 输入:s "(()&q…...
pytorch如何搭建一个最简单的模型,
一、搭建模型的步骤 在 PyTorch 中,可以使用 torch.nn 模块来搭建深度学习模型。具体步骤如下: 定义一个继承自 torch.nn.Module 的类,这个类将作为我们自己定义的模型。 在类的构造函数 __init__() 中定义网络的各个层和参数。可以使用 to…...
JS实现css的hover效果,兼容移动端
Hi I’m Shendi JS实现css的hover效果,兼容移动端 功能概述 CSS的hover即触碰时触发,在电脑端鼠标触碰,移动端手指触摸 有的时候光靠css实现不了一些效果,例如元素触发hover,其他元素触发动画效果,所以需要…...
企业微信的后台怎么进入和管理?
企业微信管理后台,只有企业的管理员才可以进企业微信后台,普通员工想要进入后台、可以联系管理员将你设置为后台管理员。 一、怎么进入企业微信后台 管理员进入企业微信后台有两种路径; 路径一: 企业管理员直接在浏览器搜索企…...
【2223sW2】LOG2
写在前面 好好学习,走出宿舍,走向毕设! 一些心路历程记录,很少有代码出现 因为鬼知道哪条代码到时候变成毕设的一部分了咧,还是不要给自己的查重挖坑罢了 23.3.2 检验FFT 早上师兄帮忙看了一眼我画的丑图ÿ…...
buuctf-web-[SUCTF 2018]MultiSQL1
打开界面,全部点击一遍,只有注册和登录功能可以使用注册一个账号,注册admin提示用户存在,可能有二次注入,注册admin自动加了一个字符,无法二次注入,点击其他功能点换浏览器重新登录后࿰…...
GitLab创建仓库分配权限
文章目录创建仓库分配权限参考资料创建仓库 点击“New project”创建新项目 分配权限 点击左侧菜单栏“Members”成员,菜单 “Invite member”邀请成员,添加人员;“Invite group”邀请组织,添加一个组织所有成员下面输入框搜索…...
代码随想录-51-110.平衡二叉树
目录前言题目1.求高度和深度的区别节点的高度节点的深度2. 本题思路分析:3. 算法实现4. pop函数的算法复杂度5. 算法坑点前言 在本科毕设结束后,我开始刷卡哥的“代码随想录”,每天一节。自己的总结笔记均会放在“算法刷题-代码随想录”该专…...
项目实战典型案例27——对生产环境以及生产数据的敬畏之心
对生产环境以及生产数据的敬畏之心一:背景介绍总结升华一:背景介绍 本篇博客是对项目开发中出现的对生产环境以及生产数据的敬畏之心行的总结并进行的改进。目的是将经历转变为自己的经验。通过博客的方式分享给大家,大家一起共同进步和提高…...
如何查找你的IP地址?通过IP地址能直接定位到你家!
我们ip地址分为A、B、C、D、E共5类,每一类地址范围不同,从A到Eip地址范围依次递减,其中哦,D和E是保留地址,我们用不了。A、B、C3类地址很多都被美国这样的西方国家分走了,而留给我们的就剩有限的地址了&…...
Containers--array类
Array 类 简介 Array 类是一个固定大小的数组,它的大小在编译时就已经确定了。Array 类的大小是固定的,因此它的大小不能改变。 数组是固定大小的序列容器:它们以严格的线性顺序保存特定数量的元素。 在内部,数组除了包含的元素之外不保留…...
LinqConnect兼容性并支持Visual Studio 2022版本
LinqConnect兼容性并支持Visual Studio 2022版本 现在支持Microsoft Visual Studio 2022版本17.5预览版。 添加了Microsoft.NET 7兼容性。 共享代码-共享相同的代码,以便在不同的平台上处理数据。LinqConnect是一种数据库连接解决方案,适用于不同的基于.…...
流量监管与整形
流量监管与整形概览流量监管介绍流量监管令牌桶流量监管的具体实现单桶单速流量监管双桶单速流量监管双桶双速流量监管流量整形介绍GTS(Generic Traffic Shaping)LR(Line Rate)流量整形与流量监管的区别概览 流量整形是对报文的速…...
详解init 容器
什么是init容器 init 容器是一种特殊容器,在 Pod 内的应用容器启动之前运行。Init 容器可以包括一些应用镜像中不存在的实用工具和安装脚本。 你可以在 Pod 的规约中与用来描述应用容器的 containers 数组平行的位置指定 Init 容器 每个 Pod 中可以包含多个容器&…...
RequestResponseBodyMethodProcessor
既是一个参数解析器,也是一个返回结果处理器。 1.持有消息转换器的集合 protected final List<HttpMessageConverter<?>> messageConverters;2.作为参数解析器,例如对RequestBody标识的参数进行解析 判断是否支持当前类型的参数 Overrid…...
函数的极限
目录 函数的极限 函数极限的定义: 例题: 左右极限: 自变量趋于无穷大时函数的极限: 例题: 函数极限的性质: 函数极限与数列极限之间的关系: 函数的极限 函数极限的定义: 一句…...
dnf命令使用
1. 简介 DNF是新一代的rpm软件包管理器。他首先出现在 Fedora 18 这个发行版中。而最近,它取代了yum,正式成为 Fedora 22 的包管理器 DNF包管理器克服了YUM包管理器的一些瓶颈,提升了包括用户体验,内存占用,依赖分析…...
CLIP CLAP
文章目录CLIPabstractintroCLAP: LEARNING AUDIO CONCEPTS FROM NATURAL LANGUAGE SUPERVISIONabstractmethodCLIP open AI2021.2代码&预训练模型 abstract 原有的基于有监督数据训练的计算机分类任务,在面对新的分类目标时泛化性和可用性都会变差࿱…...
Debezium报错处理系列之五十二:解决Sql Server数据库安装后修改主机名导致sqlserver数据库实例名称没有修改从而无法设置CDC的问题
Debezium报错处理系列之五十二:解决Sql Server数据库安装后修改主机名导致sqlserver数据库实例名称没有修改从而无法设置CDC的问题 一、完整报错二、错误原因三、解决方法Debezium报错处理系列一:The db history topic is missing. Debezium报错处理系列二:Make sure that t…...
scratch老鹰捉小鸡 电子学会图形化编程scratch等级考试二级真题和答案解析2022年12月
目录 scratch老鹰捉小鸡 一、题目要求 1、准备工作 2、功能实现 二、案例分析 <...
海尔网站建设水平/一键seo提交收录
方案(模式)是一个属于某个用户的所有对象的统称。 当你建立表空间、用户,并且建立了对象(如表、存储过程...)后,你就有了方案。 也就是这些对象的统称。 我曾经测试过oracle自带的hr方案,用system/manage连接,呵呵,当…...
wordpress 主题 对比/网络营销方案范文
ELK 5.X 环境搭建与常用插件安装 环境介绍: ip: 192.168.250.131 os: CentOS 7.1.1503 (Core) 内存不要给的太低,至少4G吧,否则elasticsearch启动会报错。 软件及其版本 这里软件包都解压在了/opt下,注意! logstash-5.…...
舟山网站制作公司/百度搜索一下
包括企业管理软件、协作与通讯以及企业门户 http://www.chinajava.net/learn/applications/tryanddownload.html http://www.chinajava.net/learn/applications/index.html...
重庆网站建设网站制作/武汉seo楚天
1. 编译单元,一个.cc,或.cpp作为一个编译单元.生成.o 2. 普通数据类型的定义,声明,函数的定义声明(类函数是一样的) extern int x; //变量是声明,并未实际分配地址,未产生实际目标代码void pr…...
分析苏宁易购的网站建设/网站排名查询工具有哪些
~~~题面~~~ 题解: 这是一道强题emmmm,做法非常巧妙,,,我也是看了好久大佬题解才看明白一点 首先考虑没有限制的情况,即n个老鼠可以在同…...
南京浦口做网站点/产品推广计划方案
kubectl 命令格式: 常用查看命令: # 获取节点和服务版本信息 kubectl get nodes # 获取节点和服务版本信息,并查看附加信息 kubectl get nodes -o wide# 获取pod信息,默认是default名称空间 kubectl get pod # 获取pod信息&#…...