200_顺德WMS@出库之制单.jmx 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
  3. <hashTree>
  4. <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="顺德WMS@出库之出库制单" enabled="true">
  5. <stringProp name="TestPlan.comments"></stringProp>
  6. <boolProp name="TestPlan.functional_mode">false</boolProp>
  7. <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
  8. <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
  9. <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
  10. <collectionProp name="Arguments.arguments"/>
  11. </elementProp>
  12. <stringProp name="TestPlan.user_define_classpath"></stringProp>
  13. </TestPlan>
  14. <hashTree>
  15. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-本地环境" enabled="false">
  16. <collectionProp name="Arguments.arguments">
  17. <elementProp name="server" elementType="Argument">
  18. <stringProp name="Argument.name">server</stringProp>
  19. <stringProp name="Argument.value">127.0.0.1</stringProp>
  20. <stringProp name="Argument.metadata">=</stringProp>
  21. </elementProp>
  22. <elementProp name="port" elementType="Argument">
  23. <stringProp name="Argument.name">port</stringProp>
  24. <stringProp name="Argument.value">8085</stringProp>
  25. <stringProp name="Argument.metadata">=</stringProp>
  26. </elementProp>
  27. <elementProp name="wh_id" elementType="Argument">
  28. <stringProp name="Argument.name">wh_id</stringProp>
  29. <stringProp name="Argument.value">424279481503974579</stringProp>
  30. <stringProp name="Argument.metadata">=</stringProp>
  31. </elementProp>
  32. <elementProp name="system_key" elementType="Argument">
  33. <stringProp name="Argument.name">system_key</stringProp>
  34. <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTczODMwMCwiaWF0IjoxNzIzMTc0NjE0LCJqdGkiOiI0MjUwNjkzNDczNTU0OTgwMDkifQ.YrDCJklGXn7-jssCTWyIASDWjQ_TiYKLHGkLh1pb3F20GhOzTP1uz9hEul9LhdArk6Z6QtJB8c-ZcbtznbjxMfMWQvpl3wFwNiXNVozGxE6guwBwFj3cDyUdkbvutK6piLQGqaR8S8cE9rA_2D2xwA-kKh79NbGkNh8sBzdqFWmhnYqZxZTYD-I-GTSVYRw_LW_--Se-jBVjDX5U63wx4gaZQBvG-3XQiYGAWqZ63ywZ62n2gXc4HvZavsYJnq9WhlVPIU1YvsRwd0yaSDTkEBxVjBTLaUmMoTMlMtvvAiuywFU8U66VRThsXW3TIRSvPYfLqTgcsWxK4UDJy6OFOg</stringProp>
  35. <stringProp name="Argument.metadata">=</stringProp>
  36. </elementProp>
  37. <elementProp name="poLineNum" elementType="Argument">
  38. <stringProp name="Argument.name">poLineNum</stringProp>
  39. <stringProp name="Argument.value">5</stringProp>
  40. <stringProp name="Argument.metadata">=</stringProp>
  41. </elementProp>
  42. </collectionProp>
  43. </Arguments>
  44. <hashTree/>
  45. <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-测试环境" enabled="true">
  46. <collectionProp name="Arguments.arguments">
  47. <elementProp name="server" elementType="Argument">
  48. <stringProp name="Argument.name">server</stringProp>
  49. <stringProp name="Argument.value">122.9.140.63</stringProp>
  50. <stringProp name="Argument.metadata">=</stringProp>
  51. </elementProp>
  52. <elementProp name="port" elementType="Argument">
  53. <stringProp name="Argument.name">port</stringProp>
  54. <stringProp name="Argument.value">8006</stringProp>
  55. <stringProp name="Argument.metadata">=</stringProp>
  56. </elementProp>
  57. <elementProp name="wh_id" elementType="Argument">
  58. <stringProp name="Argument.name">wh_id</stringProp>
  59. <stringProp name="Argument.value">1000001</stringProp>
  60. <stringProp name="Argument.metadata">=</stringProp>
  61. </elementProp>
  62. <elementProp name="system_key" elementType="Argument">
  63. <stringProp name="Argument.name">system_key</stringProp>
  64. <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTk5NzUwMCwiaWF0IjoxNzIzNDQ3NTA5LCJqdGkiOiI0MjczNTg1NTc3MjY4NDAzNjQifQ.g5JO8RAqDcipomhOs9pmpfuz-b_nznlssihFY0pCpSPBpkd3L6dr6_FAX8g-oD_EpBoK3Ng_Lh9eqI06Wg2LftxzPn0AagQHmKVtUlY_vDJOQweAmoZRGSFL57xV-UVGI2pgY47nWZVbWS0iFu8s5LgzbvfZABNKfiYYR8VlfN7xL63jfxyjX1uCKxLvGWtzpxDnKWtxJshpBazxyR1qgUci1s2Q_mD9Ljxc2hiwopaizhCuIVytBjAvwS6nYKGqGbyKEdnFt5SFu5EctYkwrEjuk8wtAlGgAiUoT1wb2_JwiS9d_zh24CFYchjiAWrKgmHRSeWekRlszJV_se-Mtw</stringProp>
  65. <stringProp name="Argument.metadata">=</stringProp>
  66. </elementProp>
  67. <elementProp name="poLineNum" elementType="Argument">
  68. <stringProp name="Argument.name">poLineNum</stringProp>
  69. <stringProp name="Argument.value">1</stringProp>
  70. <stringProp name="Argument.metadata">=</stringProp>
  71. </elementProp>
  72. <elementProp name="sequence_start_value" elementType="Argument">
  73. <stringProp name="Argument.name">sequence_start_value</stringProp>
  74. <stringProp name="Argument.value">6</stringProp>
  75. <stringProp name="Argument.metadata">=</stringProp>
  76. </elementProp>
  77. </collectionProp>
  78. </Arguments>
  79. <hashTree/>
  80. <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="出库之出库制单" enabled="true">
  81. <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
  82. <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
  83. <boolProp name="LoopController.continue_forever">false</boolProp>
  84. <stringProp name="LoopController.loops">3</stringProp>
  85. </elementProp>
  86. <stringProp name="ThreadGroup.num_threads">1</stringProp>
  87. <stringProp name="ThreadGroup.ramp_time">1</stringProp>
  88. <boolProp name="ThreadGroup.scheduler">false</boolProp>
  89. <stringProp name="ThreadGroup.duration">300</stringProp>
  90. <stringProp name="ThreadGroup.delay">0</stringProp>
  91. <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
  92. </ThreadGroup>
  93. <hashTree>
  94. <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
  95. <boolProp name="ResultCollector.error_logging">false</boolProp>
  96. <objProp>
  97. <name>saveConfig</name>
  98. <value class="SampleSaveConfiguration">
  99. <time>true</time>
  100. <latency>true</latency>
  101. <timestamp>true</timestamp>
  102. <success>true</success>
  103. <label>true</label>
  104. <code>true</code>
  105. <message>true</message>
  106. <threadName>true</threadName>
  107. <dataType>true</dataType>
  108. <encoding>false</encoding>
  109. <assertions>true</assertions>
  110. <subresults>true</subresults>
  111. <responseData>false</responseData>
  112. <samplerData>false</samplerData>
  113. <xml>false</xml>
  114. <fieldNames>true</fieldNames>
  115. <responseHeaders>false</responseHeaders>
  116. <requestHeaders>false</requestHeaders>
  117. <responseDataOnError>false</responseDataOnError>
  118. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  119. <assertionsResultsToSave>0</assertionsResultsToSave>
  120. <bytes>true</bytes>
  121. <sentBytes>true</sentBytes>
  122. <url>true</url>
  123. <threadCounts>true</threadCounts>
  124. <idleTime>true</idleTime>
  125. <connectTime>true</connectTime>
  126. </value>
  127. </objProp>
  128. <stringProp name="filename"></stringProp>
  129. </ResultCollector>
  130. <hashTree/>
  131. <ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph" enabled="true">
  132. <boolProp name="ResultCollector.error_logging">false</boolProp>
  133. <objProp>
  134. <name>saveConfig</name>
  135. <value class="SampleSaveConfiguration">
  136. <time>true</time>
  137. <latency>true</latency>
  138. <timestamp>true</timestamp>
  139. <success>true</success>
  140. <label>true</label>
  141. <code>true</code>
  142. <message>true</message>
  143. <threadName>true</threadName>
  144. <dataType>true</dataType>
  145. <encoding>false</encoding>
  146. <assertions>true</assertions>
  147. <subresults>true</subresults>
  148. <responseData>false</responseData>
  149. <samplerData>false</samplerData>
  150. <xml>false</xml>
  151. <fieldNames>true</fieldNames>
  152. <responseHeaders>false</responseHeaders>
  153. <requestHeaders>false</requestHeaders>
  154. <responseDataOnError>false</responseDataOnError>
  155. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  156. <assertionsResultsToSave>0</assertionsResultsToSave>
  157. <bytes>true</bytes>
  158. <sentBytes>true</sentBytes>
  159. <url>true</url>
  160. <threadCounts>true</threadCounts>
  161. <idleTime>true</idleTime>
  162. <connectTime>true</connectTime>
  163. </value>
  164. </objProp>
  165. <stringProp name="filename"></stringProp>
  166. </ResultCollector>
  167. <hashTree/>
  168. <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
  169. <boolProp name="ResultCollector.error_logging">false</boolProp>
  170. <objProp>
  171. <name>saveConfig</name>
  172. <value class="SampleSaveConfiguration">
  173. <time>true</time>
  174. <latency>true</latency>
  175. <timestamp>true</timestamp>
  176. <success>true</success>
  177. <label>true</label>
  178. <code>true</code>
  179. <message>true</message>
  180. <threadName>true</threadName>
  181. <dataType>true</dataType>
  182. <encoding>false</encoding>
  183. <assertions>true</assertions>
  184. <subresults>true</subresults>
  185. <responseData>false</responseData>
  186. <samplerData>false</samplerData>
  187. <xml>false</xml>
  188. <fieldNames>true</fieldNames>
  189. <responseHeaders>false</responseHeaders>
  190. <requestHeaders>false</requestHeaders>
  191. <responseDataOnError>false</responseDataOnError>
  192. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  193. <assertionsResultsToSave>0</assertionsResultsToSave>
  194. <bytes>true</bytes>
  195. <sentBytes>true</sentBytes>
  196. <url>true</url>
  197. <threadCounts>true</threadCounts>
  198. <idleTime>true</idleTime>
  199. <connectTime>true</connectTime>
  200. </value>
  201. </objProp>
  202. <stringProp name="filename"></stringProp>
  203. </ResultCollector>
  204. <hashTree/>
  205. <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
  206. <boolProp name="ResultCollector.error_logging">false</boolProp>
  207. <objProp>
  208. <name>saveConfig</name>
  209. <value class="SampleSaveConfiguration">
  210. <time>true</time>
  211. <latency>true</latency>
  212. <timestamp>true</timestamp>
  213. <success>true</success>
  214. <label>true</label>
  215. <code>true</code>
  216. <message>true</message>
  217. <threadName>true</threadName>
  218. <dataType>true</dataType>
  219. <encoding>false</encoding>
  220. <assertions>true</assertions>
  221. <subresults>true</subresults>
  222. <responseData>false</responseData>
  223. <samplerData>false</samplerData>
  224. <xml>false</xml>
  225. <fieldNames>true</fieldNames>
  226. <responseHeaders>false</responseHeaders>
  227. <requestHeaders>false</requestHeaders>
  228. <responseDataOnError>false</responseDataOnError>
  229. <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
  230. <assertionsResultsToSave>0</assertionsResultsToSave>
  231. <bytes>true</bytes>
  232. <sentBytes>true</sentBytes>
  233. <url>true</url>
  234. <threadCounts>true</threadCounts>
  235. <idleTime>true</idleTime>
  236. <connectTime>true</connectTime>
  237. </value>
  238. </objProp>
  239. <stringProp name="filename"></stringProp>
  240. </ResultCollector>
  241. <hashTree/>
  242. <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
  243. <collectionProp name="HeaderManager.headers">
  244. <elementProp name="" elementType="Header">
  245. <stringProp name="Header.name">whId</stringProp>
  246. <stringProp name="Header.value">${wh_id}</stringProp>
  247. </elementProp>
  248. <elementProp name="" elementType="Header">
  249. <stringProp name="Header.name">systemkey</stringProp>
  250. <stringProp name="Header.value">${system_key}</stringProp>
  251. </elementProp>
  252. </collectionProp>
  253. </HeaderManager>
  254. <hashTree/>
  255. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="User Data Config" enabled="true">
  256. <stringProp name="filename">./1001_user_data_config.csv</stringProp>
  257. <stringProp name="fileEncoding">UTF-8</stringProp>
  258. <stringProp name="variableNames">staff_id</stringProp>
  259. <boolProp name="ignoreFirstLine">false</boolProp>
  260. <stringProp name="delimiter">,</stringProp>
  261. <boolProp name="quotedData">false</boolProp>
  262. <boolProp name="recycle">true</boolProp>
  263. <boolProp name="stopThread">false</boolProp>
  264. <stringProp name="shareMode">shareMode.group</stringProp>
  265. </CSVDataSet>
  266. <hashTree/>
  267. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Owner Data Config" enabled="true">
  268. <stringProp name="delimiter">,</stringProp>
  269. <stringProp name="fileEncoding">UTF-8</stringProp>
  270. <stringProp name="filename">./1002_owner_data_config.csv</stringProp>
  271. <boolProp name="ignoreFirstLine">false</boolProp>
  272. <boolProp name="quotedData">false</boolProp>
  273. <boolProp name="recycle">true</boolProp>
  274. <stringProp name="shareMode"></stringProp>
  275. <boolProp name="stopThread">true</boolProp>
  276. <stringProp name="variableNames">owner_id</stringProp>
  277. </CSVDataSet>
  278. <hashTree/>
  279. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Supplier Data Config" enabled="true">
  280. <stringProp name="filename">./1003_supplier_data_config.csv</stringProp>
  281. <stringProp name="fileEncoding">UTF-8</stringProp>
  282. <stringProp name="variableNames">supplier_id</stringProp>
  283. <boolProp name="ignoreFirstLine">false</boolProp>
  284. <stringProp name="delimiter">,</stringProp>
  285. <boolProp name="quotedData">false</boolProp>
  286. <boolProp name="recycle">true</boolProp>
  287. <boolProp name="stopThread">false</boolProp>
  288. <stringProp name="shareMode">shareMode.group</stringProp>
  289. </CSVDataSet>
  290. <hashTree/>
  291. <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Sequence Counter" enabled="true">
  292. <stringProp name="CounterConfig.start">${sequence_start_value}</stringProp>
  293. <stringProp name="CounterConfig.end"></stringProp>
  294. <stringProp name="CounterConfig.incr">1</stringProp>
  295. <stringProp name="CounterConfig.name">sequence</stringProp>
  296. <stringProp name="CounterConfig.format">000000</stringProp>
  297. <boolProp name="CounterConfig.per_user">false</boolProp>
  298. </CounterConfig>
  299. <hashTree/>
  300. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Init Param" enabled="true">
  301. <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  302. vars.put(&quot;soItemList&quot;, util.toJson(new ArrayList()));
  303. //vars.put(&quot;asn_code&quot;, &quot;ASN24080900059&quot;);</stringProp>
  304. <stringProp name="BeanShellSampler.filename"></stringProp>
  305. <stringProp name="BeanShellSampler.parameters"></stringProp>
  306. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  307. </BeanShellSampler>
  308. <hashTree/>
  309. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="So Line Loop" enabled="true">
  310. <boolProp name="LoopController.continue_forever">true</boolProp>
  311. <stringProp name="LoopController.loops">${poLineNum}</stringProp>
  312. </LoopController>
  313. <hashTree>
  314. <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Item Data Config" enabled="true">
  315. <stringProp name="delimiter">,</stringProp>
  316. <stringProp name="fileEncoding">UTF-8</stringProp>
  317. <stringProp name="filename">./1004_item_data_config.csv</stringProp>
  318. <boolProp name="ignoreFirstLine">false</boolProp>
  319. <boolProp name="quotedData">false</boolProp>
  320. <boolProp name="recycle">true</boolProp>
  321. <stringProp name="shareMode">shareMode.group</stringProp>
  322. <boolProp name="stopThread">true</boolProp>
  323. <stringProp name="variableNames">item_id,pack_id</stringProp>
  324. </CSVDataSet>
  325. <hashTree/>
  326. <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Build So Item Param" enabled="true">
  327. <stringProp name="cacheKey">true</stringProp>
  328. <stringProp name="filename"></stringProp>
  329. <stringProp name="parameters"></stringProp>
  330. <stringProp name="script">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  331. java.time.LocalDate currentDate = java.time.LocalDate.now();
  332. java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyyMMdd&quot;);
  333. java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd&quot;);
  334. String lotNo = currentDate.format(formatter) + vars.get(&quot;sequence&quot;);
  335. int defaultPrice = 100;
  336. int defaultQty = 1000;
  337. String defaultManufacture = java.time.LocalDate.of(2024, 1, 1).format(formatter2);
  338. String defaultValidUntil = java.time.LocalDate.of(2024, 12, 31).format(formatter2);
  339. List soItemList = util.parseJson(vars.get(&quot;soItemList&quot;), List.class);
  340. Map soItemParam = new HashMap();
  341. int soLineNo = Integer.parseInt(vars.get(&quot;__jm__So Line Loop__idx&quot;)) + 1;
  342. soItemParam.put(&quot;so_line_no&quot;, soLineNo);
  343. soItemParam.put(&quot;item_id&quot;, vars.get(&quot;item_id&quot;));
  344. //soItemParam.put(&quot;item_name&quot;, &quot;杜仲平压片&quot;);
  345. //soItemParam.put(&quot;item_code&quot;, &quot;0137680&quot;);
  346. soItemParam.put(&quot;pack_id&quot;, vars.get(&quot;pack_id&quot;));
  347. //soItemParam.put(&quot;pack_name&quot;, &quot;默认包装&quot;);
  348. //soItemParam.put(&quot;pack_unit&quot;, &quot;0001&quot;);
  349. // 批准文号
  350. soItemParam.put(&quot;lot08&quot;, &quot;PW&quot; + lotNo + soLineNo);
  351. // 厂家
  352. soItemParam.put(&quot;lot09&quot;, &quot;GALAXIS&quot;);
  353. // 产地
  354. soItemParam.put(&quot;lot10&quot;, &quot;湖北省武汉市&quot;);
  355. soItemParam.put(&quot;qty&quot;, &quot;1&quot;);
  356. // 逻辑仓
  357. soItemParam.put(&quot;lot02&quot;, &quot;01&quot;);
  358. soItemList.add(soItemParam);
  359. vars.put(&quot;soItemList&quot;, util.toJson(soItemList));
  360. //poItem.put(&quot;poLineNo&quot;, poLineNo);
  361. //poItem.put(&quot;itemId&quot;, vars.get(&quot;item_id&quot;));
  362. //poItem.put(&quot;packId&quot;, vars.get(&quot;pack_id&quot;));
  363. //poItem.put(&quot;price&quot;, defaultPrice);
  364. //poItem.put(&quot;poQty&quot;, defaultQty);
  365. //// 包装条码
  366. //poItem.put(&quot;lot01&quot;, &quot;&quot;);
  367. //// 逻辑仓
  368. //poItem.put(&quot;lot02&quot;, &quot;01&quot;);
  369. //// 越库单号
  370. //poItem.put(&quot;lot03&quot;, &quot;&quot;);
  371. //// 生产日期
  372. //poItem.put(&quot;lot04&quot;, defaultManufacture);
  373. //// 有效期
  374. //poItem.put(&quot;lot05&quot;, defaultValidUntil);
  375. //// 批号
  376. //poItem.put(&quot;lot06&quot;, &quot;PNO&quot; + lotNo + poLineNo);
  377. //// 规格
  378. //poItem.put(&quot;lot07&quot;, &quot;&quot;);
  379. //// 批准文号
  380. //poItem.put(&quot;lot08&quot;, &quot;PW&quot; + lotNo + poLineNo);
  381. //// 厂家
  382. //poItem.put(&quot;lot09&quot;, &quot;GALAXIS&quot;);
  383. //// 产地
  384. //poItem.put(&quot;lot10&quot;, &quot;湖北省武汉市&quot;);
  385. //poItemList.add(poItem);
  386. //vars.put(&quot;poItemList&quot;, util.toJson(poItemList));</stringProp>
  387. <stringProp name="scriptLanguage">java</stringProp>
  388. </JSR223Sampler>
  389. <hashTree/>
  390. </hashTree>
  391. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Save So Param" enabled="true">
  392. <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  393. java.time.LocalDate currentDate = java.time.LocalDate.now();
  394. java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyyMMdd&quot;);
  395. java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd&quot;);
  396. String lotNo = currentDate.format(formatter) + vars.get(&quot;sequence&quot;);
  397. String bizCode = &quot;SDOUT&quot; + lotNo;
  398. String defaultOrderType = &quot;0200&quot;;
  399. String defaultOrderBizType = &quot;0201&quot;;
  400. Map soParam = new HashMap();
  401. //po.put(&quot;wh_id&quot;, vars.get(&quot;wh_id&quot;));
  402. //po.put(&quot;owner_id&quot;, vars.get(&quot;owner_id&quot;));
  403. //po.put(&quot;supplier_id&quot;, vars.get(&quot;supplier_id&quot;));
  404. //po.put(&quot;biz_code&quot;, bizCode);
  405. //po.put(&quot;order_type&quot;, defaultOrderType);
  406. //po.put(&quot;order_biz_type&quot;, defaultOrderBizType);
  407. //po.put(&quot;po_date&quot;, currentDate.format(formatter2));
  408. //po.put(&quot;po_code&quot;, bizCode);
  409. //po.put(&quot;po_staff_id&quot;, vars.get(&quot;staff_id&quot;));
  410. //po.put(&quot;remark&quot;, &quot;压测数据&quot;);
  411. soParam.put(&quot;so_code&quot;, bizCode);
  412. soParam.put(&quot;order_type&quot;, defaultOrderType);
  413. soParam.put(&quot;order_biz_type&quot;, defaultOrderBizType);
  414. soParam.put(&quot;customer_id&quot;, vars.get(&quot;supplier_id&quot;));
  415. soParam.put(&quot;owner_id&quot;, vars.get(&quot;owner_id&quot;));
  416. //soParam.put(&quot;owner_name&quot;, &quot;&quot;);
  417. //soParam.put(&quot;customer_name&quot;, &quot;&quot;);
  418. soParam.put(&quot;priority&quot;, &quot;1&quot;);
  419. soParam.put(&quot;parent_order_code&quot;, &quot;&quot;);
  420. soParam.put(&quot;dates&quot;, currentDate.format(formatter2));
  421. soParam.put(&quot;collection_method&quot;, &quot;&quot;);
  422. soParam.put(&quot;biz_code&quot;, bizCode);
  423. soParam.put(&quot;contact&quot;, &quot;&quot;);
  424. soParam.put(&quot;telephone&quot;, &quot;&quot;);
  425. soParam.put(&quot;address&quot;, &quot;&quot;);
  426. soParam.put(&quot;remark&quot;, &quot;压测数据&quot;);
  427. vars.put(&quot;soParam&quot;, util.toJson(soParam));
  428. //int maxPoLine = 2;
  429. //int defaultPrice = 100;
  430. //int defaultQty = 1000;
  431. //String defaultManufacture = java.time.LocalDate.of(2024, 1, 1).format(formatter2);
  432. //String defaultValidUntil = java.time.LocalDate.of(2024, 12, 31).format(formatter2);
  433. //
  434. //List poItemList = new ArrayList();
  435. //for (int i = 1; i &lt;= maxPoLine; i++) {
  436. // Map poItem = new HashMap();
  437. // poItem.put(&quot;poLineNo&quot;, i);
  438. // poItem.put(&quot;itemId&quot;, vars.get(&quot;itemId_&quot; + i));
  439. // poItem.put(&quot;packId&quot;, vars.get(&quot;packId_&quot; + i));
  440. // poItem.put(&quot;price&quot;, defaultPrice);
  441. // poItem.put(&quot;poQty&quot;, defaultQty);
  442. // // 包装条码
  443. // poItem.put(&quot;lot01&quot;, &quot;&quot;);
  444. // // 逻辑仓
  445. // poItem.put(&quot;lot02&quot;, &quot;01&quot;);
  446. // // 越库单号
  447. // poItem.put(&quot;lot03&quot;, &quot;&quot;);
  448. // // 生产日期
  449. // poItem.put(&quot;lot04&quot;, defaultManufacture);
  450. // // 有效期
  451. // poItem.put(&quot;lot05&quot;, defaultValidUntil);
  452. // // 批号
  453. // poItem.put(&quot;lot06&quot;, &quot;PNO&quot; + lotNo + i);
  454. // // 规格
  455. // poItem.put(&quot;lot07&quot;, &quot;&quot;);
  456. // // 批准文号
  457. // poItem.put(&quot;lot08&quot;, &quot;PW&quot; + lotNo + i);
  458. // // 厂家
  459. // poItem.put(&quot;lot09&quot;, &quot;GALAXIS&quot;);
  460. // // 产地
  461. // poItem.put(&quot;lot10&quot;, &quot;湖北省武汉市&quot;);
  462. // poItemList.add(poItem);
  463. //}
  464. //vars.put(&quot;poId&quot;, util.toJson(po));
  465. //vars.put(&quot;poItems&quot;, vars.get(&quot;poItemList&quot;));</stringProp>
  466. <stringProp name="BeanShellSampler.filename"></stringProp>
  467. <stringProp name="BeanShellSampler.parameters"></stringProp>
  468. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  469. </BeanShellSampler>
  470. <hashTree/>
  471. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CreateOrder@save" enabled="true">
  472. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  473. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  474. <collectionProp name="Arguments.arguments">
  475. <elementProp name="" elementType="HTTPArgument">
  476. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  477. <stringProp name="Argument.value">{&#xd;
  478. &quot;args&quot;: [&#xd;
  479. {&#xd;
  480. &quot;order&quot;: ${soParam},&#xd;
  481. &quot;orderItemList&quot;: ${soItemList}&#xd;
  482. }&#xd;
  483. ]&#xd;
  484. }</stringProp>
  485. <stringProp name="Argument.metadata">=</stringProp>
  486. </elementProp>
  487. </collectionProp>
  488. </elementProp>
  489. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  490. <stringProp name="HTTPSampler.port">${port}</stringProp>
  491. <stringProp name="HTTPSampler.protocol"></stringProp>
  492. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  493. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/outbound/createOrder/CreateOrder@save</stringProp>
  494. <stringProp name="HTTPSampler.method">POST</stringProp>
  495. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  496. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  497. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  498. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  499. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  500. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  501. <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
  502. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  503. </HTTPSamplerProxy>
  504. <hashTree>
  505. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  506. <stringProp name="JSON_PATH">$.success</stringProp>
  507. <stringProp name="EXPECTED_VALUE">true</stringProp>
  508. <boolProp name="JSONVALIDATION">true</boolProp>
  509. <boolProp name="EXPECT_NULL">false</boolProp>
  510. <boolProp name="INVERT">false</boolProp>
  511. <boolProp name="ISREGEX">false</boolProp>
  512. </JSONPathAssertion>
  513. <hashTree/>
  514. </hashTree>
  515. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Asn@extractPo" enabled="false">
  516. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  517. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  518. <collectionProp name="Arguments.arguments">
  519. <elementProp name="" elementType="HTTPArgument">
  520. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  521. <stringProp name="Argument.value">{&#xd;
  522. &quot;args&quot;: [&#xd;
  523. {&#xd;
  524. &quot;poIds&quot;: [&#xd;
  525. &quot;${poId}&quot;&#xd;
  526. ]&#xd;
  527. }&#xd;
  528. ]&#xd;
  529. }</stringProp>
  530. <stringProp name="Argument.metadata">=</stringProp>
  531. </elementProp>
  532. </collectionProp>
  533. </elementProp>
  534. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  535. <stringProp name="HTTPSampler.port">${port}</stringProp>
  536. <stringProp name="HTTPSampler.protocol"></stringProp>
  537. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  538. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/asn/Asn@extractPo</stringProp>
  539. <stringProp name="HTTPSampler.method">POST</stringProp>
  540. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  541. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  542. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  543. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  544. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  545. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  546. <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
  547. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  548. </HTTPSamplerProxy>
  549. <hashTree>
  550. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  551. <stringProp name="JSON_PATH">$.success</stringProp>
  552. <stringProp name="EXPECTED_VALUE">true</stringProp>
  553. <boolProp name="JSONVALIDATION">true</boolProp>
  554. <boolProp name="EXPECT_NULL">false</boolProp>
  555. <boolProp name="INVERT">false</boolProp>
  556. <boolProp name="ISREGEX">false</boolProp>
  557. </JSONPathAssertion>
  558. <hashTree/>
  559. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Po Extractor" enabled="true">
  560. <stringProp name="JSONPostProcessor.referenceNames">poInfo</stringProp>
  561. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
  562. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  563. </JSONPostProcessor>
  564. <hashTree/>
  565. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Code Extractor" enabled="true">
  566. <stringProp name="JSONPostProcessor.referenceNames">asn_code</stringProp>
  567. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.poMaster.asn_code</stringProp>
  568. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  569. </JSONPostProcessor>
  570. <hashTree/>
  571. </hashTree>
  572. <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Has Asn Code Controller" enabled="false">
  573. <stringProp name="IfController.condition">${__jexl3(${asn_code_matchNr} &gt; 0)}</stringProp>
  574. <boolProp name="IfController.evaluateAll">false</boolProp>
  575. <boolProp name="IfController.useExpression">true</boolProp>
  576. </IfController>
  577. <hashTree>
  578. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Asn Commit Param" enabled="true">
  579. <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  580. Map poMap = util.parseJson(vars.get(&quot;poInfo&quot;), Map.class);
  581. Map poMasterMap = poMap.get(&quot;poMaster&quot;);
  582. poMasterMap.put(&quot;staff_id&quot;, vars.get(&quot;staff_id&quot;));
  583. poMasterMap.put(&quot;shipment_type&quot;, &quot;0004&quot;);
  584. List poDetails = poMap.get(&quot;poDetails&quot;);
  585. for(int i = 0; i &lt; poDetails.size(); i++){
  586. Map poDetail = poDetails.get(i);
  587. poDetail.put(&quot;asn_qty&quot;, poDetail.get(&quot;po_qty&quot;));
  588. }
  589. Map asnCommitParam = new HashMap();
  590. asnCommitParam.put(&quot;asn&quot;, poMasterMap);
  591. asnCommitParam.put(&quot;asnItems&quot;, poDetails);
  592. asnCommitParam.put(&quot;withSubmit&quot;, true);
  593. vars.put(&quot;asnCommitParam&quot;, util.toJson(asnCommitParam));</stringProp>
  594. <stringProp name="BeanShellSampler.filename"></stringProp>
  595. <stringProp name="BeanShellSampler.parameters"></stringProp>
  596. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  597. </BeanShellSampler>
  598. <hashTree/>
  599. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Asn@asnCommit" enabled="true">
  600. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  601. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  602. <collectionProp name="Arguments.arguments">
  603. <elementProp name="" elementType="HTTPArgument">
  604. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  605. <stringProp name="Argument.value">{&#xd;
  606. &quot;args&quot;: [&#xd;
  607. ${asnCommitParam}&#xd;
  608. ]&#xd;
  609. }</stringProp>
  610. <stringProp name="Argument.metadata">=</stringProp>
  611. </elementProp>
  612. </collectionProp>
  613. </elementProp>
  614. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  615. <stringProp name="HTTPSampler.port">${port}</stringProp>
  616. <stringProp name="HTTPSampler.protocol"></stringProp>
  617. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  618. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/asn/Asn@asnCommit</stringProp>
  619. <stringProp name="HTTPSampler.method">POST</stringProp>
  620. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  621. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  622. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  623. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  624. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  625. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  626. <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
  627. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  628. </HTTPSamplerProxy>
  629. <hashTree>
  630. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  631. <stringProp name="JSON_PATH">$.success</stringProp>
  632. <stringProp name="EXPECTED_VALUE">true</stringProp>
  633. <boolProp name="JSONVALIDATION">true</boolProp>
  634. <boolProp name="EXPECT_NULL">false</boolProp>
  635. <boolProp name="INVERT">false</boolProp>
  636. <boolProp name="ISREGEX">false</boolProp>
  637. </JSONPathAssertion>
  638. <hashTree/>
  639. </hashTree>
  640. <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Asn Line Loop" enabled="true">
  641. <boolProp name="LoopController.continue_forever">true</boolProp>
  642. <stringProp name="LoopController.loops">${poLineNum}</stringProp>
  643. </LoopController>
  644. <hashTree>
  645. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@queryAsnInfo" enabled="true">
  646. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  647. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  648. <collectionProp name="Arguments.arguments">
  649. <elementProp name="" elementType="HTTPArgument">
  650. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  651. <stringProp name="Argument.value">{&#xd;
  652. &quot;args&quot;: [&#xd;
  653. {&#xd;
  654. &quot;asn_code&quot;: &quot;${asn_code}&quot;,&#xd;
  655. &quot;lpn&quot;: null,&#xd;
  656. &quot;biz_code&quot;: null,&#xd;
  657. &quot;parent_code&quot;: null,&#xd;
  658. &quot;asn_id&quot;: 0,&#xd;
  659. &quot;asn_line_no&quot;: 0&#xd;
  660. }&#xd;
  661. ]&#xd;
  662. }</stringProp>
  663. <stringProp name="Argument.metadata">=</stringProp>
  664. </elementProp>
  665. </collectionProp>
  666. </elementProp>
  667. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  668. <stringProp name="HTTPSampler.port">${port}</stringProp>
  669. <stringProp name="HTTPSampler.protocol"></stringProp>
  670. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  671. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@queryAsnInfo</stringProp>
  672. <stringProp name="HTTPSampler.method">POST</stringProp>
  673. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  674. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  675. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  676. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  677. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  678. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  679. <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
  680. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  681. </HTTPSamplerProxy>
  682. <hashTree>
  683. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  684. <stringProp name="JSON_PATH">$.success</stringProp>
  685. <stringProp name="EXPECTED_VALUE">true</stringProp>
  686. <boolProp name="JSONVALIDATION">true</boolProp>
  687. <boolProp name="EXPECT_NULL">false</boolProp>
  688. <boolProp name="INVERT">false</boolProp>
  689. <boolProp name="ISREGEX">false</boolProp>
  690. </JSONPathAssertion>
  691. <hashTree/>
  692. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Extractor" enabled="true">
  693. <stringProp name="JSONPostProcessor.referenceNames">asn</stringProp>
  694. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.asn</stringProp>
  695. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  696. </JSONPostProcessor>
  697. <hashTree/>
  698. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Item Extractor" enabled="true">
  699. <stringProp name="JSONPostProcessor.referenceNames">asn_item</stringProp>
  700. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.asn_item</stringProp>
  701. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  702. </JSONPostProcessor>
  703. <hashTree/>
  704. </hashTree>
  705. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Is Inspect Param" enabled="true">
  706. <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  707. Map asn = util.parseJson(vars.get(&quot;asn&quot;), Map.class);
  708. vars.put(&quot;asn_id&quot;, String.valueOf(asn.get(&quot;asn_id&quot;)));
  709. Map asnItem = util.parseJson(vars.get(&quot;asn_item&quot;), Map.class);
  710. vars.put(&quot;item_id&quot;, String.valueOf(asnItem.get(&quot;item_id&quot;)));
  711. </stringProp>
  712. <stringProp name="BeanShellSampler.filename"></stringProp>
  713. <stringProp name="BeanShellSampler.parameters"></stringProp>
  714. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  715. </BeanShellSampler>
  716. <hashTree/>
  717. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@isInspectByAsn" enabled="true">
  718. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  719. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  720. <collectionProp name="Arguments.arguments">
  721. <elementProp name="" elementType="HTTPArgument">
  722. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  723. <stringProp name="Argument.value">{&#xd;
  724. &quot;args&quot;: [&#xd;
  725. {&#xd;
  726. &quot;asn_id&quot;: &quot;${asn_id}&quot;,&#xd;
  727. &quot;item_id&quot;: &quot;${item_id}&quot;&#xd;
  728. }&#xd;
  729. ]&#xd;
  730. }</stringProp>
  731. <stringProp name="Argument.metadata">=</stringProp>
  732. </elementProp>
  733. </collectionProp>
  734. </elementProp>
  735. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  736. <stringProp name="HTTPSampler.port">${port}</stringProp>
  737. <stringProp name="HTTPSampler.protocol"></stringProp>
  738. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  739. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@isInspectByAsn</stringProp>
  740. <stringProp name="HTTPSampler.method">POST</stringProp>
  741. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  742. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  743. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  744. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  745. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  746. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  747. <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
  748. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  749. </HTTPSamplerProxy>
  750. <hashTree>
  751. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  752. <stringProp name="JSON_PATH">$.success</stringProp>
  753. <stringProp name="EXPECTED_VALUE">true</stringProp>
  754. <boolProp name="JSONVALIDATION">true</boolProp>
  755. <boolProp name="EXPECT_NULL">false</boolProp>
  756. <boolProp name="INVERT">false</boolProp>
  757. <boolProp name="ISREGEX">false</boolProp>
  758. </JSONPathAssertion>
  759. <hashTree/>
  760. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Is Inspect Extractor" enabled="true">
  761. <stringProp name="JSONPostProcessor.referenceNames">is_inspect</stringProp>
  762. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
  763. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  764. </JSONPostProcessor>
  765. <hashTree/>
  766. </hashTree>
  767. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Save Receipt Item Param" enabled="true">
  768. <stringProp name="BeanShellSampler.query">import java.math.BigDecimal;
  769. import java.math.RoundingMode;
  770. com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  771. Map asn = util.parseJson(vars.get(&quot;asn&quot;), Map.class);
  772. Map asnItem = util.parseJson(vars.get(&quot;asn_item&quot;), Map.class);
  773. // log.info(&quot;asnItem &gt; &quot; + asnItem.get(&quot;asn_qty&quot;).getClass());
  774. // ASN单数量
  775. BigDecimal asnQty = new BigDecimal(asnItem.get(&quot;asn_qty&quot;));
  776. // 已收货数量
  777. BigDecimal receiptQty = new BigDecimal(asnItem.get(&quot;receipt_qty&quot;));
  778. // 已拒收数量
  779. BigDecimal receiptRejectQty = new BigDecimal(asnItem.get(&quot;receipt_reject_qty&quot;));
  780. // 当前收货数量 = ASN单数量 - 已收货数量 - 已拒收数量
  781. BigDecimal currentReceiptQty = asnQty.subtract(receiptQty).subtract(receiptRejectQty);
  782. // 包装数量
  783. BigDecimal packMeas3 = new BigDecimal(String.valueOf(asnItem.get(&quot;pack_meas3&quot;)));
  784. // 整件数
  785. BigDecimal receiptPackQty = currentReceiptQty.divide(packMeas3, 0, RoundingMode.FLOOR);
  786. // 零散数
  787. BigDecimal receiptUnpackQty = currentReceiptQty.subtract(receiptPackQty.multiply(packMeas3));
  788. Map saveReceiptItemParam = new HashMap();
  789. saveReceiptItemParam.put(&quot;asn_id&quot;, String.valueOf(asn.get(&quot;asn_id&quot;)));
  790. saveReceiptItemParam.put(&quot;asn_line_no&quot;, String.valueOf(asnItem.get(&quot;asn_line_no&quot;)));
  791. saveReceiptItemParam.put(&quot;item_id&quot;, String.valueOf(asnItem.get(&quot;item_id&quot;)));
  792. saveReceiptItemParam.put(&quot;is_inspection&quot;, String.valueOf(vars.get(&quot;is_inspect&quot;)));
  793. saveReceiptItemParam.put(&quot;is_shuttle&quot;, &quot;0000&quot;);
  794. saveReceiptItemParam.put(&quot;is_ctu&quot;, &quot;0001&quot;);
  795. saveReceiptItemParam.put(&quot;is_device&quot;, &quot;0000&quot;);
  796. //saveReceiptItemParam.put(&quot;is_chinese_medicine&quot;, &quot;0001&quot;);
  797. saveReceiptItemParam.put(&quot;pack_id&quot;, String.valueOf(asnItem.get(&quot;pack_id&quot;)));
  798. saveReceiptItemParam.put(&quot;lot_id&quot;, String.valueOf(asnItem.get(&quot;lot_id&quot;)));
  799. saveReceiptItemParam.put(&quot;current_receipt_qty&quot;, currentReceiptQty.toString());
  800. saveReceiptItemParam.put(&quot;receipt_pack_qty&quot;, receiptPackQty.toString());
  801. saveReceiptItemParam.put(&quot;pack_intent&quot;, &quot;0001&quot;);
  802. saveReceiptItemParam.put(&quot;receipt_unpack_qty&quot;, receiptUnpackQty.toString());
  803. saveReceiptItemParam.put(&quot;unpack_intent&quot;, &quot;0001&quot;);
  804. vars.put(&quot;saveReceiptItemParam&quot;, util.toJson(saveReceiptItemParam));
  805. </stringProp>
  806. <stringProp name="BeanShellSampler.filename"></stringProp>
  807. <stringProp name="BeanShellSampler.parameters"></stringProp>
  808. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  809. </BeanShellSampler>
  810. <hashTree/>
  811. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@saveReceiptItem" enabled="true">
  812. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  813. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  814. <collectionProp name="Arguments.arguments">
  815. <elementProp name="" elementType="HTTPArgument">
  816. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  817. <stringProp name="Argument.value">{&#xd;
  818. &quot;args&quot;: [&#xd;
  819. ${saveReceiptItemParam}&#xd;
  820. ]&#xd;
  821. }</stringProp>
  822. <stringProp name="Argument.metadata">=</stringProp>
  823. </elementProp>
  824. </collectionProp>
  825. </elementProp>
  826. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  827. <stringProp name="HTTPSampler.port">${port}</stringProp>
  828. <stringProp name="HTTPSampler.protocol"></stringProp>
  829. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  830. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@saveReceiptItem</stringProp>
  831. <stringProp name="HTTPSampler.method">GET</stringProp>
  832. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  833. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  834. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  835. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  836. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  837. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  838. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  839. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  840. </HTTPSamplerProxy>
  841. <hashTree>
  842. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  843. <stringProp name="JSON_PATH">$.success</stringProp>
  844. <stringProp name="EXPECTED_VALUE">true</stringProp>
  845. <boolProp name="JSONVALIDATION">true</boolProp>
  846. <boolProp name="EXPECT_NULL">false</boolProp>
  847. <boolProp name="INVERT">false</boolProp>
  848. <boolProp name="ISREGEX">false</boolProp>
  849. </JSONPathAssertion>
  850. <hashTree/>
  851. </hashTree>
  852. </hashTree>
  853. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@queryInspect" enabled="true">
  854. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  855. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  856. <collectionProp name="Arguments.arguments">
  857. <elementProp name="" elementType="HTTPArgument">
  858. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  859. <stringProp name="Argument.value">{&#xd;
  860. &quot;args&quot;: [&#xd;
  861. {&#xd;
  862. &quot;path&quot;: &quot;/com/galaxis/wms/inbound/acceptance/Acceptance&quot;,&#xd;
  863. &quot;pagination&quot;: true,&#xd;
  864. &quot;sqlId&quot;: &quot;tab1_grid1QueryData&quot;,&#xd;
  865. &quot;limit&quot;: 50,&#xd;
  866. &quot;page&quot;: 1,&#xd;
  867. &quot;start&quot;: 0,&#xd;
  868. &quot;receipt_code&quot;: &quot;${asn_code}&quot;,&#xd;
  869. &quot;customer_id&quot;: null,&#xd;
  870. &quot;order_biz_type&quot;: null,&#xd;
  871. &quot;receipt_id&quot;: null,&#xd;
  872. &quot;in_status&quot;: null,&#xd;
  873. &quot;condition&quot;: []&#xd;
  874. }&#xd;
  875. ]&#xd;
  876. }</stringProp>
  877. <stringProp name="Argument.metadata">=</stringProp>
  878. </elementProp>
  879. </collectionProp>
  880. </elementProp>
  881. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  882. <stringProp name="HTTPSampler.port">${port}</stringProp>
  883. <stringProp name="HTTPSampler.protocol"></stringProp>
  884. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  885. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid1QueryData</stringProp>
  886. <stringProp name="HTTPSampler.method">POST</stringProp>
  887. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  888. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  889. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  890. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  891. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  892. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  893. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  894. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  895. </HTTPSamplerProxy>
  896. <hashTree>
  897. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  898. <stringProp name="JSON_PATH">$.success</stringProp>
  899. <stringProp name="EXPECTED_VALUE">true</stringProp>
  900. <boolProp name="JSONVALIDATION">true</boolProp>
  901. <boolProp name="EXPECT_NULL">false</boolProp>
  902. <boolProp name="INVERT">false</boolProp>
  903. <boolProp name="ISREGEX">false</boolProp>
  904. </JSONPathAssertion>
  905. <hashTree/>
  906. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Inspect Id Extractor" enabled="true">
  907. <stringProp name="JSONPostProcessor.referenceNames">inspect_id</stringProp>
  908. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data[*].inspect_id</stringProp>
  909. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  910. </JSONPostProcessor>
  911. <hashTree/>
  912. </hashTree>
  913. <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Is Inspect Controller" enabled="true">
  914. <stringProp name="IfController.condition">${__jexl3(${inspect_id_matchNr} &gt; 0)}</stringProp>
  915. <boolProp name="IfController.evaluateAll">false</boolProp>
  916. <boolProp name="IfController.useExpression">true</boolProp>
  917. </IfController>
  918. <hashTree>
  919. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@queryInspectItem" enabled="true">
  920. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  921. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  922. <collectionProp name="Arguments.arguments">
  923. <elementProp name="" elementType="HTTPArgument">
  924. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  925. <stringProp name="Argument.value">{&#xd;
  926. &quot;args&quot;: [&#xd;
  927. {&#xd;
  928. &quot;path&quot;: &quot;/com/galaxis/wms/inbound/acceptance/Acceptance&quot;,&#xd;
  929. &quot;pagination&quot;: true,&#xd;
  930. &quot;sqlId&quot;: &quot;tab1_grid2QueryData&quot;,&#xd;
  931. &quot;limit&quot;: 10000,&#xd;
  932. &quot;page&quot;: 1,&#xd;
  933. &quot;start&quot;: 0,&#xd;
  934. &quot;inspect_id&quot;: &quot;${inspect_id}&quot;,&#xd;
  935. &quot;condition&quot;: []&#xd;
  936. }&#xd;
  937. ]&#xd;
  938. }</stringProp>
  939. <stringProp name="Argument.metadata">=</stringProp>
  940. </elementProp>
  941. </collectionProp>
  942. </elementProp>
  943. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  944. <stringProp name="HTTPSampler.port">${port}</stringProp>
  945. <stringProp name="HTTPSampler.protocol"></stringProp>
  946. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  947. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid2QueryData</stringProp>
  948. <stringProp name="HTTPSampler.method">POST</stringProp>
  949. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  950. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  951. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  952. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  953. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  954. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  955. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  956. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  957. </HTTPSamplerProxy>
  958. <hashTree>
  959. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  960. <stringProp name="JSON_PATH">$.success</stringProp>
  961. <stringProp name="EXPECTED_VALUE">true</stringProp>
  962. <boolProp name="JSONVALIDATION">true</boolProp>
  963. <boolProp name="EXPECT_NULL">false</boolProp>
  964. <boolProp name="INVERT">false</boolProp>
  965. <boolProp name="ISREGEX">false</boolProp>
  966. </JSONPathAssertion>
  967. <hashTree/>
  968. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Inspect Item Extractor" enabled="true">
  969. <stringProp name="JSONPostProcessor.referenceNames">inspect_item_list</stringProp>
  970. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.[*]</stringProp>
  971. <stringProp name="JSONPostProcessor.match_numbers">-1</stringProp>
  972. </JSONPostProcessor>
  973. <hashTree/>
  974. </hashTree>
  975. <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="Acceptance ForEach" enabled="true">
  976. <stringProp name="ForeachController.inputVal">inspect_item_list</stringProp>
  977. <stringProp name="ForeachController.returnVal">inspect_item</stringProp>
  978. <boolProp name="ForeachController.useSeparator">true</boolProp>
  979. <stringProp name="ForeachController.startIndex">0</stringProp>
  980. <stringProp name="ForeachController.endIndex">${inspect_item_list_matchNr}</stringProp>
  981. </ForeachController>
  982. <hashTree>
  983. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Acceptance Param Sampler" enabled="true">
  984. <stringProp name="BeanShellSampler.query">import java.math.BigDecimal;
  985. import java.math.RoundingMode;
  986. com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  987. Map inspectItem = util.parseJson(vars.get(&quot;inspect_item&quot;), Map.class);
  988. // 质检数量
  989. BigDecimal qty = new BigDecimal(inspectItem.get(&quot;qty&quot;));
  990. // 已质检数量
  991. BigDecimal inspectQty = new BigDecimal(inspectItem.get(&quot;inspect_qty&quot;));
  992. // 已拒收数量
  993. BigDecimal receiptQty = new BigDecimal(inspectItem.get(&quot;reject_qty&quot;));
  994. // 需质检数量 = 质检数量 - 已质检数量 - 已拒收数量
  995. BigDecimal qualityQty = qty.subtract(inspectQty).subtract(receiptQty);
  996. // 包装数量
  997. BigDecimal packMeas = new BigDecimal(String.valueOf(inspectItem.get(&quot;pack_meas&quot;)));
  998. // 质检整件数
  999. BigDecimal qualityWholeQty = qualityQty.divide(packMeas, 0, RoundingMode.FLOOR);
  1000. // 质检零散数
  1001. BigDecimal qualityLessQty = qualityQty.subtract(qualityWholeQty.multiply(packMeas));
  1002. Map saveInspectParam = new HashMap();
  1003. saveInspectParam.put(&quot;inspect_id&quot;, String.valueOf(inspectItem.get(&quot;inspect_id&quot;)));
  1004. saveInspectParam.put(&quot;inspect_line_nos&quot;, String.valueOf(inspectItem.get(&quot;inspect_line_nos&quot;)));
  1005. saveInspectParam.put(&quot;item_id&quot;, String.valueOf(inspectItem.get(&quot;item_id&quot;)));
  1006. saveInspectParam.put(&quot;pack_id&quot;, String.valueOf(inspectItem.get(&quot;pack_id&quot;)));
  1007. saveInspectParam.put(&quot;lot_id&quot;, String.valueOf(inspectItem.get(&quot;lot_id&quot;)));
  1008. saveInspectParam.put(&quot;quality_reject_qty&quot;, &quot;0&quot;);
  1009. saveInspectParam.put(&quot;is_chinese_medicine&quot;, String.valueOf(inspectItem.get(&quot;is_chinese_medicine&quot;)));
  1010. saveInspectParam.put(&quot;quality_less_qty&quot;, qualityLessQty.toString());
  1011. saveInspectParam.put(&quot;quality_whole_qty&quot;, qualityWholeQty.toString());
  1012. saveInspectParam.put(&quot;quality_qty&quot;, qualityQty.toString());
  1013. saveInspectParam.put(&quot;put_intent_less&quot;, &quot;0001&quot;);
  1014. saveInspectParam.put(&quot;put_intent_whole&quot;, &quot;0001&quot;);
  1015. saveInspectParam.put(&quot;quality_assert&quot;, &quot;0001&quot;);
  1016. saveInspectParam.put(&quot;quality_staff_id1&quot;, vars.get(&quot;staff_id&quot;));
  1017. vars.put(&quot;saveInspectParam&quot;, util.toJson(saveInspectParam));</stringProp>
  1018. <stringProp name="BeanShellSampler.filename"></stringProp>
  1019. <stringProp name="BeanShellSampler.parameters"></stringProp>
  1020. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  1021. </BeanShellSampler>
  1022. <hashTree/>
  1023. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@inspectSave" enabled="true">
  1024. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  1025. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  1026. <collectionProp name="Arguments.arguments">
  1027. <elementProp name="" elementType="HTTPArgument">
  1028. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  1029. <stringProp name="Argument.value">{&#xd;
  1030. &quot;args&quot;: [&#xd;
  1031. {&#xd;
  1032. &quot;form_data&quot;: ${saveInspectParam}&#xd;
  1033. }&#xd;
  1034. ]&#xd;
  1035. }</stringProp>
  1036. <stringProp name="Argument.metadata">=</stringProp>
  1037. </elementProp>
  1038. </collectionProp>
  1039. </elementProp>
  1040. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  1041. <stringProp name="HTTPSampler.port">${port}</stringProp>
  1042. <stringProp name="HTTPSampler.protocol"></stringProp>
  1043. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  1044. <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/acceptance/Acceptance@inspectSave</stringProp>
  1045. <stringProp name="HTTPSampler.method">POST</stringProp>
  1046. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  1047. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  1048. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  1049. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  1050. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  1051. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  1052. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  1053. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  1054. </HTTPSamplerProxy>
  1055. <hashTree>
  1056. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  1057. <stringProp name="JSON_PATH">$.success</stringProp>
  1058. <stringProp name="EXPECTED_VALUE">true</stringProp>
  1059. <boolProp name="JSONVALIDATION">true</boolProp>
  1060. <boolProp name="EXPECT_NULL">false</boolProp>
  1061. <boolProp name="INVERT">false</boolProp>
  1062. <boolProp name="ISREGEX">false</boolProp>
  1063. </JSONPathAssertion>
  1064. <hashTree/>
  1065. </hashTree>
  1066. </hashTree>
  1067. </hashTree>
  1068. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@queryPut" enabled="true">
  1069. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  1070. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  1071. <collectionProp name="Arguments.arguments">
  1072. <elementProp name="" elementType="HTTPArgument">
  1073. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  1074. <stringProp name="Argument.value">{&#xd;
  1075. &quot;args&quot;: [&#xd;
  1076. {&#xd;
  1077. &quot;path&quot;: &quot;/com/galaxis/wms/inbound/putAway/PutAway&quot;,&#xd;
  1078. &quot;pagination&quot;: true,&#xd;
  1079. &quot;sqlId&quot;: &quot;queryPut&quot;,&#xd;
  1080. &quot;limit&quot;: 50,&#xd;
  1081. &quot;page&quot;: 1,&#xd;
  1082. &quot;start&quot;: 0,&#xd;
  1083. &quot;start_time&quot;: null,&#xd;
  1084. &quot;end_time&quot;: null,&#xd;
  1085. &quot;order_biz_type&quot;: null,&#xd;
  1086. &quot;owner_name&quot;: null,&#xd;
  1087. &quot;put_code&quot;: &quot;${asn_code}&quot;,&#xd;
  1088. &quot;receipt_code&quot;: null,&#xd;
  1089. &quot;asn_code&quot;: null,&#xd;
  1090. &quot;condition&quot;: []&#xd;
  1091. }&#xd;
  1092. ]&#xd;
  1093. }</stringProp>
  1094. <stringProp name="Argument.metadata">=</stringProp>
  1095. </elementProp>
  1096. </collectionProp>
  1097. </elementProp>
  1098. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  1099. <stringProp name="HTTPSampler.port">${port}</stringProp>
  1100. <stringProp name="HTTPSampler.protocol"></stringProp>
  1101. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  1102. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPut</stringProp>
  1103. <stringProp name="HTTPSampler.method">POST</stringProp>
  1104. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  1105. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  1106. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  1107. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  1108. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  1109. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  1110. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  1111. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  1112. </HTTPSamplerProxy>
  1113. <hashTree>
  1114. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  1115. <stringProp name="JSON_PATH">$.success</stringProp>
  1116. <stringProp name="EXPECTED_VALUE">true</stringProp>
  1117. <boolProp name="JSONVALIDATION">true</boolProp>
  1118. <boolProp name="EXPECT_NULL">false</boolProp>
  1119. <boolProp name="INVERT">false</boolProp>
  1120. <boolProp name="ISREGEX">false</boolProp>
  1121. </JSONPathAssertion>
  1122. <hashTree/>
  1123. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="put Id Extractor" enabled="true">
  1124. <stringProp name="JSONPostProcessor.referenceNames">put_id</stringProp>
  1125. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data[*].put_id</stringProp>
  1126. <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
  1127. </JSONPostProcessor>
  1128. <hashTree/>
  1129. </hashTree>
  1130. <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="false">
  1131. <boolProp name="displayJMeterProperties">false</boolProp>
  1132. <boolProp name="displayJMeterVariables">true</boolProp>
  1133. <boolProp name="displaySystemProperties">false</boolProp>
  1134. </DebugSampler>
  1135. <hashTree/>
  1136. <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Has Put Id Controller" enabled="true">
  1137. <stringProp name="IfController.condition">${__jexl3(${put_id_matchNr} &gt; 0)}</stringProp>
  1138. <boolProp name="IfController.evaluateAll">false</boolProp>
  1139. <boolProp name="IfController.useExpression">true</boolProp>
  1140. </IfController>
  1141. <hashTree>
  1142. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@queryPutItems" enabled="true">
  1143. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  1144. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  1145. <collectionProp name="Arguments.arguments">
  1146. <elementProp name="" elementType="HTTPArgument">
  1147. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  1148. <stringProp name="Argument.value">{&#xd;
  1149. &quot;args&quot;: [&#xd;
  1150. {&#xd;
  1151. &quot;path&quot;: &quot;/com/galaxis/wms/inbound/putAway/PutAway&quot;,&#xd;
  1152. &quot;pagination&quot;: true,&#xd;
  1153. &quot;sqlId&quot;: &quot;queryPutItems&quot;,&#xd;
  1154. &quot;limit&quot;: 10000,&#xd;
  1155. &quot;page&quot;: 1,&#xd;
  1156. &quot;start&quot;: 0,&#xd;
  1157. &quot;put_id&quot;: &quot;${put_id}&quot;,&#xd;
  1158. &quot;condition&quot;: []&#xd;
  1159. }&#xd;
  1160. ]&#xd;
  1161. }</stringProp>
  1162. <stringProp name="Argument.metadata">=</stringProp>
  1163. </elementProp>
  1164. </collectionProp>
  1165. </elementProp>
  1166. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  1167. <stringProp name="HTTPSampler.port">${port}</stringProp>
  1168. <stringProp name="HTTPSampler.protocol"></stringProp>
  1169. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  1170. <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPutItems</stringProp>
  1171. <stringProp name="HTTPSampler.method">POST</stringProp>
  1172. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  1173. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  1174. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  1175. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  1176. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  1177. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  1178. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  1179. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  1180. </HTTPSamplerProxy>
  1181. <hashTree>
  1182. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  1183. <stringProp name="JSON_PATH">$.success</stringProp>
  1184. <stringProp name="EXPECTED_VALUE">true</stringProp>
  1185. <boolProp name="JSONVALIDATION">true</boolProp>
  1186. <boolProp name="EXPECT_NULL">false</boolProp>
  1187. <boolProp name="INVERT">false</boolProp>
  1188. <boolProp name="ISREGEX">false</boolProp>
  1189. </JSONPathAssertion>
  1190. <hashTree/>
  1191. <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Put Item Extractor" enabled="true">
  1192. <stringProp name="JSONPostProcessor.referenceNames">put_item_list</stringProp>
  1193. <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.[*]</stringProp>
  1194. <stringProp name="JSONPostProcessor.match_numbers">-1</stringProp>
  1195. </JSONPostProcessor>
  1196. <hashTree/>
  1197. </hashTree>
  1198. <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="Put ForEach" enabled="true">
  1199. <stringProp name="ForeachController.inputVal">put_item_list</stringProp>
  1200. <stringProp name="ForeachController.returnVal">put_item</stringProp>
  1201. <boolProp name="ForeachController.useSeparator">true</boolProp>
  1202. <stringProp name="ForeachController.startIndex">0</stringProp>
  1203. <stringProp name="ForeachController.endIndex">${put_item_list_matchNr}</stringProp>
  1204. </ForeachController>
  1205. <hashTree>
  1206. <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Put Param Sampler" enabled="true">
  1207. <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);
  1208. Map putItem = util.parseJson(vars.get(&quot;put_item&quot;), Map.class);
  1209. Map commitPutawayParam = new HashMap();
  1210. commitPutawayParam.put(&quot;put_id&quot;, String.valueOf(putItem.get(&quot;put_id&quot;)));
  1211. commitPutawayParam.put(&quot;put_line_no&quot;, String.valueOf(putItem.get(&quot;put_line_no&quot;)));
  1212. commitPutawayParam.put(&quot;item_id&quot;, String.valueOf(putItem.get(&quot;item_id&quot;)));
  1213. commitPutawayParam.put(&quot;lot_id&quot;, String.valueOf(putItem.get(&quot;lot_id&quot;)));
  1214. commitPutawayParam.put(&quot;pack_id&quot;, String.valueOf(putItem.get(&quot;pack_id&quot;)));
  1215. commitPutawayParam.put(&quot;qty&quot;, String.valueOf(putItem.get(&quot;qty&quot;)));
  1216. commitPutawayParam.put(&quot;put_pack_qty&quot;, String.valueOf(putItem.get(&quot;put_pack_qty&quot;)));
  1217. commitPutawayParam.put(&quot;put_unpack_qty&quot;, String.valueOf(putItem.get(&quot;put_unpack_qty&quot;)));
  1218. commitPutawayParam.put(&quot;put_code&quot;, String.valueOf(putItem.get(&quot;put_code&quot;)));
  1219. commitPutawayParam.put(&quot;lpn&quot;, String.valueOf(putItem.get(&quot;lpn&quot;)));
  1220. commitPutawayParam.put(&quot;loc_id&quot;, String.valueOf(putItem.get(&quot;loc_id&quot;)));
  1221. vars.put(&quot;commitPutawayParam&quot;, util.toJson(Collections.singleton(commitPutawayParam)));</stringProp>
  1222. <stringProp name="BeanShellSampler.filename"></stringProp>
  1223. <stringProp name="BeanShellSampler.parameters"></stringProp>
  1224. <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
  1225. </BeanShellSampler>
  1226. <hashTree/>
  1227. <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@commit" enabled="true">
  1228. <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  1229. <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  1230. <collectionProp name="Arguments.arguments">
  1231. <elementProp name="" elementType="HTTPArgument">
  1232. <boolProp name="HTTPArgument.always_encode">false</boolProp>
  1233. <stringProp name="Argument.value">{&#xd;
  1234. &quot;args&quot;: [&#xd;
  1235. {&#xd;
  1236. &quot;put_details&quot;: ${commitPutawayParam}&#xd;
  1237. }&#xd;
  1238. ]&#xd;
  1239. }</stringProp>
  1240. <stringProp name="Argument.metadata">=</stringProp>
  1241. </elementProp>
  1242. </collectionProp>
  1243. </elementProp>
  1244. <stringProp name="HTTPSampler.domain">${server}</stringProp>
  1245. <stringProp name="HTTPSampler.port">${port}</stringProp>
  1246. <stringProp name="HTTPSampler.protocol"></stringProp>
  1247. <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
  1248. <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/putAway/PutAway@commit</stringProp>
  1249. <stringProp name="HTTPSampler.method">POST</stringProp>
  1250. <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
  1251. <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  1252. <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  1253. <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  1254. <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  1255. <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
  1256. <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
  1257. <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
  1258. </HTTPSamplerProxy>
  1259. <hashTree>
  1260. <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
  1261. <stringProp name="JSON_PATH">$.success</stringProp>
  1262. <stringProp name="EXPECTED_VALUE">true</stringProp>
  1263. <boolProp name="JSONVALIDATION">true</boolProp>
  1264. <boolProp name="EXPECT_NULL">false</boolProp>
  1265. <boolProp name="INVERT">false</boolProp>
  1266. <boolProp name="ISREGEX">false</boolProp>
  1267. </JSONPathAssertion>
  1268. <hashTree/>
  1269. </hashTree>
  1270. </hashTree>
  1271. </hashTree>
  1272. </hashTree>
  1273. </hashTree>
  1274. </hashTree>
  1275. </hashTree>
  1276. </jmeterTestPlan>