<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="顺德WMS@入库之全流程" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-本地环境" enabled="false">
        <collectionProp name="Arguments.arguments">
          <elementProp name="server" elementType="Argument">
            <stringProp name="Argument.name">server</stringProp>
            <stringProp name="Argument.value">127.0.0.1</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="port" elementType="Argument">
            <stringProp name="Argument.name">port</stringProp>
            <stringProp name="Argument.value">8085</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="wh_id" elementType="Argument">
            <stringProp name="Argument.name">wh_id</stringProp>
            <stringProp name="Argument.value">424279481503974579</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="system_key" elementType="Argument">
            <stringProp name="Argument.name">system_key</stringProp>
            <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTczODMwMCwiaWF0IjoxNzIzMTc0NjE0LCJqdGkiOiI0MjUwNjkzNDczNTU0OTgwMDkifQ.YrDCJklGXn7-jssCTWyIASDWjQ_TiYKLHGkLh1pb3F20GhOzTP1uz9hEul9LhdArk6Z6QtJB8c-ZcbtznbjxMfMWQvpl3wFwNiXNVozGxE6guwBwFj3cDyUdkbvutK6piLQGqaR8S8cE9rA_2D2xwA-kKh79NbGkNh8sBzdqFWmhnYqZxZTYD-I-GTSVYRw_LW_--Se-jBVjDX5U63wx4gaZQBvG-3XQiYGAWqZ63ywZ62n2gXc4HvZavsYJnq9WhlVPIU1YvsRwd0yaSDTkEBxVjBTLaUmMoTMlMtvvAiuywFU8U66VRThsXW3TIRSvPYfLqTgcsWxK4UDJy6OFOg</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="poLineNum" elementType="Argument">
            <stringProp name="Argument.name">poLineNum</stringProp>
            <stringProp name="Argument.value">5</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
        </collectionProp>
      </Arguments>
      <hashTree/>
      <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-SD测试" enabled="true">
        <collectionProp name="Arguments.arguments">
          <elementProp name="server" elementType="Argument">
            <stringProp name="Argument.name">server</stringProp>
            <stringProp name="Argument.value">wms-system.test.sdl.com</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="port" elementType="Argument">
            <stringProp name="Argument.name">port</stringProp>
            <stringProp name="Argument.value">8000</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="wh_id" elementType="Argument">
            <stringProp name="Argument.name">wh_id</stringProp>
            <stringProp name="Argument.value">1000001</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="system_key" elementType="Argument">
            <stringProp name="Argument.name">system_key</stringProp>
            <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNjg2MTUwMCwiaWF0IjoxNzI0MzEyMDgxLCJqdGkiOiI0MzQ2MTExMDkwMTkyNjA0NzgifQ.Vor5psK98IdvpxcN1LNV2L0bXNnLHx6b5R4cKS2VwbywoWyfaUtHCXh1xv3qeCphy5GuSeXrvepTsQdXkt81l7Gx_4Lg-qUXs32mYhaclpFlvjhprcAx6cKm8_PgtSNWSEiWZ5gKP5dH3GWlaSxNQPviIY1SXIGdChUGkhwlFN-EXBBQTtJbMYHxhXjJwd3HCKfyH6qP1RYK4MN_lFd_mQRWnS3lCFrU4pd1aWaeqCowy8PNP4alAnzYQRbVL9yL8gItp2i6hIJggtDG83T5tBBE6euamN3jvXOM8O0tflxDL5oRVCX2I59Qo_F-LkrWsmm5pqBlegaWdlG8Ue1aEg</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="poLineNum" elementType="Argument">
            <stringProp name="Argument.name">poLineNum</stringProp>
            <stringProp name="Argument.value">100</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="sequence_start_value" elementType="Argument">
            <stringProp name="Argument.name">sequence_start_value</stringProp>
            <stringProp name="Argument.value">4000</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
        </collectionProp>
      </Arguments>
      <hashTree/>
      <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="环境变量-华为云" enabled="false">
        <collectionProp name="Arguments.arguments">
          <elementProp name="server" elementType="Argument">
            <stringProp name="Argument.name">server</stringProp>
            <stringProp name="Argument.value">122.9.140.63</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="port" elementType="Argument">
            <stringProp name="Argument.name">port</stringProp>
            <stringProp name="Argument.value">8006</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="wh_id" elementType="Argument">
            <stringProp name="Argument.name">wh_id</stringProp>
            <stringProp name="Argument.value">1000001</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="system_key" elementType="Argument">
            <stringProp name="Argument.name">system_key</stringProp>
            <stringProp name="Argument.value">eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTk5NzUwMCwiaWF0IjoxNzIzNDQ3NTA5LCJqdGkiOiI0MjczNTg1NTc3MjY4NDAzNjQifQ.g5JO8RAqDcipomhOs9pmpfuz-b_nznlssihFY0pCpSPBpkd3L6dr6_FAX8g-oD_EpBoK3Ng_Lh9eqI06Wg2LftxzPn0AagQHmKVtUlY_vDJOQweAmoZRGSFL57xV-UVGI2pgY47nWZVbWS0iFu8s5LgzbvfZABNKfiYYR8VlfN7xL63jfxyjX1uCKxLvGWtzpxDnKWtxJshpBazxyR1qgUci1s2Q_mD9Ljxc2hiwopaizhCuIVytBjAvwS6nYKGqGbyKEdnFt5SFu5EctYkwrEjuk8wtAlGgAiUoT1wb2_JwiS9d_zh24CFYchjiAWrKgmHRSeWekRlszJV_se-Mtw</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="poLineNum" elementType="Argument">
            <stringProp name="Argument.name">poLineNum</stringProp>
            <stringProp name="Argument.value">2</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="sequence_start_value" elementType="Argument">
            <stringProp name="Argument.name">sequence_start_value</stringProp>
            <stringProp name="Argument.value">103</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
        </collectionProp>
      </Arguments>
      <hashTree/>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="入库之全流程" enabled="true">
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">10</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">15</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration">300</stringProp>
        <stringProp name="ThreadGroup.delay">0</stringProp>
        <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
      </ThreadGroup>
      <hashTree>
        <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>false</xml>
              <fieldNames>true</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
              <sentBytes>true</sentBytes>
              <url>true</url>
              <threadCounts>true</threadCounts>
              <idleTime>true</idleTime>
              <connectTime>true</connectTime>
            </value>
          </objProp>
          <stringProp name="filename"></stringProp>
        </ResultCollector>
        <hashTree/>
        <ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>false</xml>
              <fieldNames>true</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
              <sentBytes>true</sentBytes>
              <url>true</url>
              <threadCounts>true</threadCounts>
              <idleTime>true</idleTime>
              <connectTime>true</connectTime>
            </value>
          </objProp>
          <stringProp name="filename"></stringProp>
        </ResultCollector>
        <hashTree/>
        <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>false</xml>
              <fieldNames>true</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
              <sentBytes>true</sentBytes>
              <url>true</url>
              <threadCounts>true</threadCounts>
              <idleTime>true</idleTime>
              <connectTime>true</connectTime>
            </value>
          </objProp>
          <stringProp name="filename"></stringProp>
        </ResultCollector>
        <hashTree/>
        <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>false</xml>
              <fieldNames>true</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
              <sentBytes>true</sentBytes>
              <url>true</url>
              <threadCounts>true</threadCounts>
              <idleTime>true</idleTime>
              <connectTime>true</connectTime>
            </value>
          </objProp>
          <stringProp name="filename"></stringProp>
        </ResultCollector>
        <hashTree/>
        <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
          <collectionProp name="HeaderManager.headers">
            <elementProp name="" elementType="Header">
              <stringProp name="Header.name">whId</stringProp>
              <stringProp name="Header.value">${wh_id}</stringProp>
            </elementProp>
            <elementProp name="" elementType="Header">
              <stringProp name="Header.name">systemkey</stringProp>
              <stringProp name="Header.value">${system_key}</stringProp>
            </elementProp>
          </collectionProp>
        </HeaderManager>
        <hashTree/>
        <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="User Data Config" enabled="true">
          <stringProp name="filename">./1001_user_data_config.csv</stringProp>
          <stringProp name="fileEncoding">UTF-8</stringProp>
          <stringProp name="variableNames">staff_id</stringProp>
          <boolProp name="ignoreFirstLine">false</boolProp>
          <stringProp name="delimiter">,</stringProp>
          <boolProp name="quotedData">false</boolProp>
          <boolProp name="recycle">true</boolProp>
          <boolProp name="stopThread">false</boolProp>
          <stringProp name="shareMode">shareMode.group</stringProp>
        </CSVDataSet>
        <hashTree/>
        <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Owner Data Config" enabled="true">
          <stringProp name="delimiter">,</stringProp>
          <stringProp name="fileEncoding">UTF-8</stringProp>
          <stringProp name="filename">./1002_owner_data_config.csv</stringProp>
          <boolProp name="ignoreFirstLine">false</boolProp>
          <boolProp name="quotedData">false</boolProp>
          <boolProp name="recycle">true</boolProp>
          <stringProp name="shareMode"></stringProp>
          <boolProp name="stopThread">true</boolProp>
          <stringProp name="variableNames">owner_id</stringProp>
        </CSVDataSet>
        <hashTree/>
        <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Supplier Data Config" enabled="true">
          <stringProp name="filename">./1003_supplier_data_config.csv</stringProp>
          <stringProp name="fileEncoding">UTF-8</stringProp>
          <stringProp name="variableNames">supplier_id</stringProp>
          <boolProp name="ignoreFirstLine">false</boolProp>
          <stringProp name="delimiter">,</stringProp>
          <boolProp name="quotedData">false</boolProp>
          <boolProp name="recycle">true</boolProp>
          <boolProp name="stopThread">false</boolProp>
          <stringProp name="shareMode">shareMode.group</stringProp>
        </CSVDataSet>
        <hashTree/>
        <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Sequence Counter" enabled="true">
          <stringProp name="CounterConfig.start">${sequence_start_value}</stringProp>
          <stringProp name="CounterConfig.end"></stringProp>
          <stringProp name="CounterConfig.incr">1</stringProp>
          <stringProp name="CounterConfig.name">sequence</stringProp>
          <stringProp name="CounterConfig.format">000000</stringProp>
          <boolProp name="CounterConfig.per_user">false</boolProp>
        </CounterConfig>
        <hashTree/>
        <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Init Param" enabled="true">
          <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

vars.put(&quot;poItemList&quot;, util.toJson(new ArrayList()));


//vars.put(&quot;asn_code&quot;, &quot;ASN24080900059&quot;);</stringProp>
          <stringProp name="BeanShellSampler.filename"></stringProp>
          <stringProp name="BeanShellSampler.parameters"></stringProp>
          <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
        </BeanShellSampler>
        <hashTree/>
        <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Po Line Loop" enabled="true">
          <boolProp name="LoopController.continue_forever">true</boolProp>
          <stringProp name="LoopController.loops">${poLineNum}</stringProp>
        </LoopController>
        <hashTree>
          <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Item Data Config" enabled="true">
            <stringProp name="delimiter">,</stringProp>
            <stringProp name="fileEncoding">UTF-8</stringProp>
            <stringProp name="filename">./1004_item_data_config.csv</stringProp>
            <boolProp name="ignoreFirstLine">false</boolProp>
            <boolProp name="quotedData">false</boolProp>
            <boolProp name="recycle">true</boolProp>
            <stringProp name="shareMode">shareMode.group</stringProp>
            <boolProp name="stopThread">true</boolProp>
            <stringProp name="variableNames">item_id,pack_id,qty</stringProp>
          </CSVDataSet>
          <hashTree/>
          <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Build Po Item Param" enabled="true">
            <stringProp name="cacheKey">true</stringProp>
            <stringProp name="filename"></stringProp>
            <stringProp name="parameters"></stringProp>
            <stringProp name="script">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

java.time.LocalDate currentDate = java.time.LocalDate.now();
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyyMMdd&quot;);
java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd&quot;);

String lotNo = currentDate.format(formatter) + vars.get(&quot;sequence&quot;);

int defaultPrice = 100;
int defaultQty = vars.get(&quot;qty&quot;);
String defaultManufacture = java.time.LocalDate.of(2024, 1, 1).format(formatter2);
String defaultValidUntil = java.time.LocalDate.of(2024, 12, 31).format(formatter2);

List poItemList = util.parseJson(vars.get(&quot;poItemList&quot;), List.class);
Map poItem = new HashMap();
int poLineNo = Integer.parseInt(vars.get(&quot;__jm__Po Line Loop__idx&quot;)) + 1;
poItem.put(&quot;poLineNo&quot;, poLineNo);
poItem.put(&quot;itemId&quot;, vars.get(&quot;item_id&quot;));
poItem.put(&quot;packId&quot;, vars.get(&quot;pack_id&quot;));
poItem.put(&quot;price&quot;, defaultPrice);
poItem.put(&quot;poQty&quot;, defaultQty);
// 包装条码
poItem.put(&quot;lot01&quot;, &quot;&quot;);
// 逻辑仓
poItem.put(&quot;lot02&quot;, &quot;01&quot;);
// 越库单号
poItem.put(&quot;lot03&quot;, &quot;&quot;);
// 生产日期
poItem.put(&quot;lot04&quot;, defaultManufacture);
// 有效期
poItem.put(&quot;lot05&quot;, defaultValidUntil);
// 批号
poItem.put(&quot;lot06&quot;, &quot;PNO&quot; + lotNo + poLineNo);
// 规格
poItem.put(&quot;lot07&quot;, &quot;&quot;);
// 批准文号
poItem.put(&quot;lot08&quot;, &quot;PW&quot; + lotNo + poLineNo); 
// 厂家
poItem.put(&quot;lot09&quot;, &quot;GALAXIS&quot;);
// 产地
poItem.put(&quot;lot10&quot;, &quot;湖北省武汉市&quot;);
poItemList.add(poItem);

vars.put(&quot;poItemList&quot;, util.toJson(poItemList));</stringProp>
            <stringProp name="scriptLanguage">java</stringProp>
          </JSR223Sampler>
          <hashTree/>
        </hashTree>
        <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Save Po Param" enabled="true">
          <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

java.time.LocalDate currentDate = java.time.LocalDate.now();
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyyMMdd&quot;);
java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern(&quot;yyyy-MM-dd&quot;);

String lotNo = currentDate.format(formatter) + vars.get(&quot;sequence&quot;);

String bizCode = &quot;SDIN&quot; + lotNo;

String defaultOrderType = &quot;0100&quot;;
String defaultOrderBizType = &quot;C&quot;;

Map po = new HashMap();
po.put(&quot;wh_id&quot;, vars.get(&quot;wh_id&quot;));
po.put(&quot;owner_id&quot;, vars.get(&quot;owner_id&quot;));
po.put(&quot;supplier_id&quot;, vars.get(&quot;supplier_id&quot;));
po.put(&quot;biz_code&quot;, bizCode);
po.put(&quot;order_type&quot;, defaultOrderType);
po.put(&quot;order_biz_type&quot;, defaultOrderBizType);
po.put(&quot;po_date&quot;, currentDate.format(formatter2));
po.put(&quot;po_code&quot;, bizCode);
po.put(&quot;po_staff_id&quot;, vars.get(&quot;staff_id&quot;));
po.put(&quot;remark&quot;, &quot;压测数据&quot;);


//int maxPoLine = 2;
//int defaultPrice = 100;
//int defaultQty = 1000;
//String defaultManufacture = java.time.LocalDate.of(2024, 1, 1).format(formatter2);
//String defaultValidUntil = java.time.LocalDate.of(2024, 12, 31).format(formatter2);
//
//List poItemList = new ArrayList();
//for (int i = 1; i &lt;= maxPoLine; i++) {
//  Map poItem = new HashMap();
//  poItem.put(&quot;poLineNo&quot;, i);
//  poItem.put(&quot;itemId&quot;, vars.get(&quot;itemId_&quot; + i));
//  poItem.put(&quot;packId&quot;, vars.get(&quot;packId_&quot; + i));
//  poItem.put(&quot;price&quot;, defaultPrice);
//  poItem.put(&quot;poQty&quot;, defaultQty);
//  // 包装条码
//  poItem.put(&quot;lot01&quot;, &quot;&quot;);
//  // 逻辑仓
//  poItem.put(&quot;lot02&quot;, &quot;01&quot;);
//  // 越库单号
//  poItem.put(&quot;lot03&quot;, &quot;&quot;);
//  // 生产日期
//  poItem.put(&quot;lot04&quot;, defaultManufacture);
//  // 有效期
//  poItem.put(&quot;lot05&quot;, defaultValidUntil);
//  // 批号
//  poItem.put(&quot;lot06&quot;, &quot;PNO&quot; + lotNo + i);
//  // 规格
//  poItem.put(&quot;lot07&quot;, &quot;&quot;);
//  // 批准文号
//  poItem.put(&quot;lot08&quot;, &quot;PW&quot; + lotNo + i); 
//  // 厂家
//  poItem.put(&quot;lot09&quot;, &quot;GALAXIS&quot;);
//  // 产地
//  poItem.put(&quot;lot10&quot;, &quot;湖北省武汉市&quot;);
//  poItemList.add(poItem);
//}
vars.put(&quot;poId&quot;, util.toJson(po));
vars.put(&quot;po&quot;, util.toJson(po));
//vars.put(&quot;poItems&quot;, vars.get(&quot;poItemList&quot;));</stringProp>
          <stringProp name="BeanShellSampler.filename"></stringProp>
          <stringProp name="BeanShellSampler.parameters"></stringProp>
          <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
        </BeanShellSampler>
        <hashTree/>
        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Po@poSave8" enabled="true">
          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
            <collectionProp name="Arguments.arguments">
              <elementProp name="" elementType="HTTPArgument">
                <boolProp name="HTTPArgument.always_encode">false</boolProp>
                <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;po&quot;: ${po},&#xd;
      &quot;poItems&quot;: ${poItemList}&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="HTTPSampler.domain">${server}</stringProp>
          <stringProp name="HTTPSampler.port">${port}</stringProp>
          <stringProp name="HTTPSampler.protocol"></stringProp>
          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
          <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/poOrderManagement/Po@poSave</stringProp>
          <stringProp name="HTTPSampler.method">POST</stringProp>
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
          <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
          <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
        </HTTPSamplerProxy>
        <hashTree>
          <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
            <stringProp name="JSON_PATH">$.success</stringProp>
            <stringProp name="EXPECTED_VALUE">true</stringProp>
            <boolProp name="JSONVALIDATION">true</boolProp>
            <boolProp name="EXPECT_NULL">false</boolProp>
            <boolProp name="INVERT">false</boolProp>
            <boolProp name="ISREGEX">false</boolProp>
          </JSONPathAssertion>
          <hashTree/>
          <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Po Id Extractor" enabled="true">
            <stringProp name="JSONPostProcessor.referenceNames"> poId</stringProp>
            <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
            <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
          </JSONPostProcessor>
          <hashTree/>
        </hashTree>
        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Asn@extractPo" enabled="true">
          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
            <collectionProp name="Arguments.arguments">
              <elementProp name="" elementType="HTTPArgument">
                <boolProp name="HTTPArgument.always_encode">false</boolProp>
                <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;poIds&quot;: [&#xd;
        &quot;${poId}&quot;&#xd;
      ]&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="HTTPSampler.domain">${server}</stringProp>
          <stringProp name="HTTPSampler.port">${port}</stringProp>
          <stringProp name="HTTPSampler.protocol"></stringProp>
          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
          <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/asn/Asn@extractPo</stringProp>
          <stringProp name="HTTPSampler.method">POST</stringProp>
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
          <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
          <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
        </HTTPSamplerProxy>
        <hashTree>
          <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
            <stringProp name="JSON_PATH">$.success</stringProp>
            <stringProp name="EXPECTED_VALUE">true</stringProp>
            <boolProp name="JSONVALIDATION">true</boolProp>
            <boolProp name="EXPECT_NULL">false</boolProp>
            <boolProp name="INVERT">false</boolProp>
            <boolProp name="ISREGEX">false</boolProp>
          </JSONPathAssertion>
          <hashTree/>
          <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Po Extractor" enabled="true">
            <stringProp name="JSONPostProcessor.referenceNames">poInfo</stringProp>
            <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
            <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
          </JSONPostProcessor>
          <hashTree/>
          <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Code Extractor" enabled="true">
            <stringProp name="JSONPostProcessor.referenceNames">asn_code</stringProp>
            <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.poMaster.asn_code</stringProp>
            <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
          </JSONPostProcessor>
          <hashTree/>
        </hashTree>
        <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Has Asn Code Controller" enabled="true">
          <stringProp name="IfController.condition">${__jexl3(${asn_code_matchNr} &gt; 0)}</stringProp>
          <boolProp name="IfController.evaluateAll">false</boolProp>
          <boolProp name="IfController.useExpression">true</boolProp>
        </IfController>
        <hashTree>
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Asn Commit Param" enabled="true">
            <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

Map poMap = util.parseJson(vars.get(&quot;poInfo&quot;), Map.class);

Map poMasterMap = poMap.get(&quot;poMaster&quot;);
poMasterMap.put(&quot;staff_id&quot;, vars.get(&quot;staff_id&quot;));
poMasterMap.put(&quot;shipment_type&quot;, &quot;0004&quot;);

List poDetails = poMap.get(&quot;poDetails&quot;);

for(int i = 0; i &lt; poDetails.size(); i++){
	Map poDetail = poDetails.get(i);
	poDetail.put(&quot;asn_qty&quot;, poDetail.get(&quot;po_qty&quot;));
}

Map asnCommitParam = new HashMap();
asnCommitParam.put(&quot;asn&quot;, poMasterMap);
asnCommitParam.put(&quot;asnItems&quot;, poDetails);
asnCommitParam.put(&quot;withSubmit&quot;, true);

vars.put(&quot;asnCommitParam&quot;, util.toJson(asnCommitParam));</stringProp>
            <stringProp name="BeanShellSampler.filename"></stringProp>
            <stringProp name="BeanShellSampler.parameters"></stringProp>
            <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
          </BeanShellSampler>
          <hashTree/>
          <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Asn@asnCommit" enabled="true">
            <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
              <collectionProp name="Arguments.arguments">
                <elementProp name="" elementType="HTTPArgument">
                  <boolProp name="HTTPArgument.always_encode">false</boolProp>
                  <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    ${asnCommitParam}&#xd;
  ]&#xd;
}</stringProp>
                  <stringProp name="Argument.metadata">=</stringProp>
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="HTTPSampler.domain">${server}</stringProp>
            <stringProp name="HTTPSampler.port">${port}</stringProp>
            <stringProp name="HTTPSampler.protocol"></stringProp>
            <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
            <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/asn/Asn@asnCommit</stringProp>
            <stringProp name="HTTPSampler.method">POST</stringProp>
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
            <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
            <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
            <stringProp name="HTTPSampler.response_timeout">15000</stringProp>
          </HTTPSamplerProxy>
          <hashTree>
            <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
              <stringProp name="JSON_PATH">$.success</stringProp>
              <stringProp name="EXPECTED_VALUE">true</stringProp>
              <boolProp name="JSONVALIDATION">true</boolProp>
              <boolProp name="EXPECT_NULL">false</boolProp>
              <boolProp name="INVERT">false</boolProp>
              <boolProp name="ISREGEX">false</boolProp>
            </JSONPathAssertion>
            <hashTree/>
          </hashTree>
          <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Asn Line Loop" enabled="true">
            <boolProp name="LoopController.continue_forever">true</boolProp>
            <stringProp name="LoopController.loops">${poLineNum}</stringProp>
          </LoopController>
          <hashTree>
            <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@queryAsnInfo" enabled="true">
              <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                <collectionProp name="Arguments.arguments">
                  <elementProp name="" elementType="HTTPArgument">
                    <boolProp name="HTTPArgument.always_encode">false</boolProp>
                    <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;asn_code&quot;: &quot;${asn_code}&quot;,&#xd;
      &quot;lpn&quot;: null,&#xd;
      &quot;biz_code&quot;: null,&#xd;
      &quot;parent_code&quot;: null,&#xd;
      &quot;asn_id&quot;: 0,&#xd;
      &quot;asn_line_no&quot;: 0&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                    <stringProp name="Argument.metadata">=</stringProp>
                  </elementProp>
                </collectionProp>
              </elementProp>
              <stringProp name="HTTPSampler.domain">${server}</stringProp>
              <stringProp name="HTTPSampler.port">${port}</stringProp>
              <stringProp name="HTTPSampler.protocol"></stringProp>
              <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
              <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@queryAsnInfo</stringProp>
              <stringProp name="HTTPSampler.method">POST</stringProp>
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
              <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
              <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
              <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
              <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
            </HTTPSamplerProxy>
            <hashTree>
              <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                <stringProp name="JSON_PATH">$.success</stringProp>
                <stringProp name="EXPECTED_VALUE">true</stringProp>
                <boolProp name="JSONVALIDATION">true</boolProp>
                <boolProp name="EXPECT_NULL">false</boolProp>
                <boolProp name="INVERT">false</boolProp>
                <boolProp name="ISREGEX">false</boolProp>
              </JSONPathAssertion>
              <hashTree/>
              <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Extractor" enabled="true">
                <stringProp name="JSONPostProcessor.referenceNames">asn</stringProp>
                <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.asn</stringProp>
                <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
              </JSONPostProcessor>
              <hashTree/>
              <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Asn Item Extractor" enabled="true">
                <stringProp name="JSONPostProcessor.referenceNames">asn_item</stringProp>
                <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.asn_item</stringProp>
                <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
              </JSONPostProcessor>
              <hashTree/>
            </hashTree>
            <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Is Inspect Param" enabled="true">
              <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

Map asn = util.parseJson(vars.get(&quot;asn&quot;), Map.class);
vars.put(&quot;asn_id&quot;, String.valueOf(asn.get(&quot;asn_id&quot;)));

Map asnItem = util.parseJson(vars.get(&quot;asn_item&quot;), Map.class);
vars.put(&quot;item_id&quot;, String.valueOf(asnItem.get(&quot;item_id&quot;)));


</stringProp>
              <stringProp name="BeanShellSampler.filename"></stringProp>
              <stringProp name="BeanShellSampler.parameters"></stringProp>
              <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
            </BeanShellSampler>
            <hashTree/>
            <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@isInspectByAsn" enabled="true">
              <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                <collectionProp name="Arguments.arguments">
                  <elementProp name="" elementType="HTTPArgument">
                    <boolProp name="HTTPArgument.always_encode">false</boolProp>
                    <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;asn_id&quot;: &quot;${asn_id}&quot;,&#xd;
      &quot;item_id&quot;: &quot;${item_id}&quot;&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                    <stringProp name="Argument.metadata">=</stringProp>
                  </elementProp>
                </collectionProp>
              </elementProp>
              <stringProp name="HTTPSampler.domain">${server}</stringProp>
              <stringProp name="HTTPSampler.port">${port}</stringProp>
              <stringProp name="HTTPSampler.protocol"></stringProp>
              <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
              <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@isInspectByAsn</stringProp>
              <stringProp name="HTTPSampler.method">POST</stringProp>
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
              <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
              <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
              <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
              <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
            </HTTPSamplerProxy>
            <hashTree>
              <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                <stringProp name="JSON_PATH">$.success</stringProp>
                <stringProp name="EXPECTED_VALUE">true</stringProp>
                <boolProp name="JSONVALIDATION">true</boolProp>
                <boolProp name="EXPECT_NULL">false</boolProp>
                <boolProp name="INVERT">false</boolProp>
                <boolProp name="ISREGEX">false</boolProp>
              </JSONPathAssertion>
              <hashTree/>
              <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Is Inspect Extractor" enabled="true">
                <stringProp name="JSONPostProcessor.referenceNames">is_inspect</stringProp>
                <stringProp name="JSONPostProcessor.jsonPathExprs">$.data</stringProp>
                <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
              </JSONPostProcessor>
              <hashTree/>
            </hashTree>
            <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Build Save Receipt Item Param" enabled="true">
              <stringProp name="BeanShellSampler.query">import java.math.BigDecimal;
import java.math.RoundingMode;

com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

Map asn = util.parseJson(vars.get(&quot;asn&quot;), Map.class);

Map asnItem = util.parseJson(vars.get(&quot;asn_item&quot;), Map.class);
// log.info(&quot;asnItem &gt; &quot; + asnItem.get(&quot;asn_qty&quot;).getClass());

// ASN单数量
BigDecimal asnQty = new BigDecimal(asnItem.get(&quot;asn_qty&quot;));
// 已收货数量
BigDecimal receiptQty = new BigDecimal(asnItem.get(&quot;receipt_qty&quot;));
// 已拒收数量
BigDecimal receiptRejectQty = new BigDecimal(asnItem.get(&quot;receipt_reject_qty&quot;));

// 当前收货数量 = ASN单数量 - 已收货数量 - 已拒收数量
BigDecimal currentReceiptQty = asnQty.subtract(receiptQty).subtract(receiptRejectQty);

// 包装数量
BigDecimal packMeas3 = new BigDecimal(String.valueOf(asnItem.get(&quot;pack_meas3&quot;)));

// 整件数
BigDecimal receiptPackQty = currentReceiptQty.divide(packMeas3, 0, RoundingMode.FLOOR);
// 零散数
BigDecimal receiptUnpackQty = currentReceiptQty.subtract(receiptPackQty.multiply(packMeas3));

Map saveReceiptItemParam = new HashMap();
saveReceiptItemParam.put(&quot;asn_id&quot;, String.valueOf(asn.get(&quot;asn_id&quot;)));
saveReceiptItemParam.put(&quot;asn_line_no&quot;, String.valueOf(asnItem.get(&quot;asn_line_no&quot;)));
saveReceiptItemParam.put(&quot;item_id&quot;, String.valueOf(asnItem.get(&quot;item_id&quot;)));
saveReceiptItemParam.put(&quot;is_inspection&quot;, String.valueOf(vars.get(&quot;is_inspect&quot;)));
saveReceiptItemParam.put(&quot;is_shuttle&quot;, &quot;0000&quot;);
saveReceiptItemParam.put(&quot;is_ctu&quot;,  &quot;0001&quot;);
saveReceiptItemParam.put(&quot;is_device&quot;,  &quot;0000&quot;);
//saveReceiptItemParam.put(&quot;is_chinese_medicine&quot;, &quot;0001&quot;);
saveReceiptItemParam.put(&quot;pack_id&quot;, String.valueOf(asnItem.get(&quot;pack_id&quot;)));
saveReceiptItemParam.put(&quot;lot_id&quot;, String.valueOf(asnItem.get(&quot;lot_id&quot;)));
saveReceiptItemParam.put(&quot;current_receipt_qty&quot;, currentReceiptQty.toString());
saveReceiptItemParam.put(&quot;receipt_pack_qty&quot;, receiptPackQty.toString());
saveReceiptItemParam.put(&quot;pack_intent&quot;, &quot;0001&quot;);
saveReceiptItemParam.put(&quot;receipt_unpack_qty&quot;, receiptUnpackQty.toString());
saveReceiptItemParam.put(&quot;unpack_intent&quot;, &quot;0001&quot;);

vars.put(&quot;saveReceiptItemParam&quot;, util.toJson(saveReceiptItemParam));


</stringProp>
              <stringProp name="BeanShellSampler.filename"></stringProp>
              <stringProp name="BeanShellSampler.parameters"></stringProp>
              <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
            </BeanShellSampler>
            <hashTree/>
            <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Receipt@saveReceiptItem" enabled="true">
              <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                <collectionProp name="Arguments.arguments">
                  <elementProp name="" elementType="HTTPArgument">
                    <boolProp name="HTTPArgument.always_encode">false</boolProp>
                    <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    ${saveReceiptItemParam}&#xd;
  ]&#xd;
}</stringProp>
                    <stringProp name="Argument.metadata">=</stringProp>
                  </elementProp>
                </collectionProp>
              </elementProp>
              <stringProp name="HTTPSampler.domain">${server}</stringProp>
              <stringProp name="HTTPSampler.port">${port}</stringProp>
              <stringProp name="HTTPSampler.protocol"></stringProp>
              <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
              <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/inbound/receipt/Receipt@saveReceiptItem</stringProp>
              <stringProp name="HTTPSampler.method">GET</stringProp>
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
              <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
              <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
              <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
              <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
            </HTTPSamplerProxy>
            <hashTree>
              <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                <stringProp name="JSON_PATH">$.success</stringProp>
                <stringProp name="EXPECTED_VALUE">true</stringProp>
                <boolProp name="JSONVALIDATION">true</boolProp>
                <boolProp name="EXPECT_NULL">false</boolProp>
                <boolProp name="INVERT">false</boolProp>
                <boolProp name="ISREGEX">false</boolProp>
              </JSONPathAssertion>
              <hashTree/>
            </hashTree>
          </hashTree>
          <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@queryInspect" enabled="false">
            <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
              <collectionProp name="Arguments.arguments">
                <elementProp name="" elementType="HTTPArgument">
                  <boolProp name="HTTPArgument.always_encode">false</boolProp>
                  <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;path&quot;: &quot;/com/galaxis/wms/inbound/acceptance/Acceptance&quot;,&#xd;
      &quot;pagination&quot;: true,&#xd;
      &quot;sqlId&quot;: &quot;tab1_grid1QueryData&quot;,&#xd;
      &quot;limit&quot;: 50,&#xd;
      &quot;page&quot;: 1,&#xd;
      &quot;start&quot;: 0,&#xd;
      &quot;receipt_code&quot;: &quot;${asn_code}&quot;,&#xd;
      &quot;customer_id&quot;: null,&#xd;
      &quot;order_biz_type&quot;: null,&#xd;
      &quot;receipt_id&quot;: null,&#xd;
      &quot;in_status&quot;: null,&#xd;
      &quot;condition&quot;: []&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                  <stringProp name="Argument.metadata">=</stringProp>
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="HTTPSampler.domain">${server}</stringProp>
            <stringProp name="HTTPSampler.port">${port}</stringProp>
            <stringProp name="HTTPSampler.protocol"></stringProp>
            <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
            <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid1QueryData</stringProp>
            <stringProp name="HTTPSampler.method">POST</stringProp>
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
            <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
            <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
            <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
          </HTTPSamplerProxy>
          <hashTree>
            <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
              <stringProp name="JSON_PATH">$.success</stringProp>
              <stringProp name="EXPECTED_VALUE">true</stringProp>
              <boolProp name="JSONVALIDATION">true</boolProp>
              <boolProp name="EXPECT_NULL">false</boolProp>
              <boolProp name="INVERT">false</boolProp>
              <boolProp name="ISREGEX">false</boolProp>
            </JSONPathAssertion>
            <hashTree/>
            <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Inspect Id Extractor" enabled="true">
              <stringProp name="JSONPostProcessor.referenceNames">inspect_id</stringProp>
              <stringProp name="JSONPostProcessor.jsonPathExprs">$.data[*].inspect_id</stringProp>
              <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
            </JSONPostProcessor>
            <hashTree/>
          </hashTree>
          <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Is Inspect Controller" enabled="false">
            <stringProp name="IfController.condition">${__jexl3(${inspect_id_matchNr} &gt; 0)}</stringProp>
            <boolProp name="IfController.evaluateAll">false</boolProp>
            <boolProp name="IfController.useExpression">true</boolProp>
          </IfController>
          <hashTree>
            <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@queryInspectItem" enabled="true">
              <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                <collectionProp name="Arguments.arguments">
                  <elementProp name="" elementType="HTTPArgument">
                    <boolProp name="HTTPArgument.always_encode">false</boolProp>
                    <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;path&quot;: &quot;/com/galaxis/wms/inbound/acceptance/Acceptance&quot;,&#xd;
      &quot;pagination&quot;: true,&#xd;
      &quot;sqlId&quot;: &quot;tab1_grid2QueryData&quot;,&#xd;
      &quot;limit&quot;: 10000,&#xd;
      &quot;page&quot;: 1,&#xd;
      &quot;start&quot;: 0,&#xd;
      &quot;inspect_id&quot;: &quot;${inspect_id}&quot;,&#xd;
      &quot;condition&quot;: []&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                    <stringProp name="Argument.metadata">=</stringProp>
                  </elementProp>
                </collectionProp>
              </elementProp>
              <stringProp name="HTTPSampler.domain">${server}</stringProp>
              <stringProp name="HTTPSampler.port">${port}</stringProp>
              <stringProp name="HTTPSampler.protocol"></stringProp>
              <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
              <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid2QueryData</stringProp>
              <stringProp name="HTTPSampler.method">POST</stringProp>
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
              <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
              <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
              <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
              <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
            </HTTPSamplerProxy>
            <hashTree>
              <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                <stringProp name="JSON_PATH">$.success</stringProp>
                <stringProp name="EXPECTED_VALUE">true</stringProp>
                <boolProp name="JSONVALIDATION">true</boolProp>
                <boolProp name="EXPECT_NULL">false</boolProp>
                <boolProp name="INVERT">false</boolProp>
                <boolProp name="ISREGEX">false</boolProp>
              </JSONPathAssertion>
              <hashTree/>
              <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Inspect Item Extractor" enabled="true">
                <stringProp name="JSONPostProcessor.referenceNames">inspect_item_list</stringProp>
                <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.[*]</stringProp>
                <stringProp name="JSONPostProcessor.match_numbers">-1</stringProp>
              </JSONPostProcessor>
              <hashTree/>
            </hashTree>
            <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="Acceptance ForEach" enabled="true">
              <stringProp name="ForeachController.inputVal">inspect_item_list</stringProp>
              <stringProp name="ForeachController.returnVal">inspect_item</stringProp>
              <boolProp name="ForeachController.useSeparator">true</boolProp>
              <stringProp name="ForeachController.startIndex">0</stringProp>
              <stringProp name="ForeachController.endIndex">${inspect_item_list_matchNr}</stringProp>
            </ForeachController>
            <hashTree>
              <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Acceptance Param Sampler" enabled="true">
                <stringProp name="BeanShellSampler.query">import java.math.BigDecimal;
import java.math.RoundingMode;

com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

Map inspectItem = util.parseJson(vars.get(&quot;inspect_item&quot;), Map.class);

// 质检数量
BigDecimal qty = new BigDecimal(inspectItem.get(&quot;qty&quot;));
// 已质检数量
BigDecimal inspectQty = new BigDecimal(inspectItem.get(&quot;inspect_qty&quot;));
// 已拒收数量
BigDecimal receiptQty = new BigDecimal(inspectItem.get(&quot;reject_qty&quot;));

// 需质检数量 = 质检数量 - 已质检数量 - 已拒收数量
BigDecimal qualityQty = qty.subtract(inspectQty).subtract(receiptQty);

// 包装数量
BigDecimal packMeas = new BigDecimal(String.valueOf(inspectItem.get(&quot;pack_meas&quot;)));

// 质检整件数
BigDecimal qualityWholeQty = qualityQty.divide(packMeas, 0, RoundingMode.FLOOR);
// 质检零散数
BigDecimal qualityLessQty = qualityQty.subtract(qualityWholeQty.multiply(packMeas));



Map saveInspectParam = new HashMap();
saveInspectParam.put(&quot;inspect_id&quot;, String.valueOf(inspectItem.get(&quot;inspect_id&quot;)));
saveInspectParam.put(&quot;inspect_line_nos&quot;, String.valueOf(inspectItem.get(&quot;inspect_line_nos&quot;)));
saveInspectParam.put(&quot;item_id&quot;, String.valueOf(inspectItem.get(&quot;item_id&quot;)));
saveInspectParam.put(&quot;pack_id&quot;, String.valueOf(inspectItem.get(&quot;pack_id&quot;)));
saveInspectParam.put(&quot;lot_id&quot;, String.valueOf(inspectItem.get(&quot;lot_id&quot;)));
saveInspectParam.put(&quot;quality_reject_qty&quot;, &quot;0&quot;);
saveInspectParam.put(&quot;is_chinese_medicine&quot;, String.valueOf(inspectItem.get(&quot;is_chinese_medicine&quot;)));
saveInspectParam.put(&quot;quality_less_qty&quot;, qualityLessQty.toString());
saveInspectParam.put(&quot;quality_whole_qty&quot;, qualityWholeQty.toString());
saveInspectParam.put(&quot;quality_qty&quot;, qualityQty.toString());
saveInspectParam.put(&quot;put_intent_less&quot;, &quot;0001&quot;);
saveInspectParam.put(&quot;put_intent_whole&quot;, &quot;0001&quot;);
saveInspectParam.put(&quot;quality_assert&quot;, &quot;0001&quot;);
saveInspectParam.put(&quot;quality_staff_id1&quot;, vars.get(&quot;staff_id&quot;));

vars.put(&quot;saveInspectParam&quot;, util.toJson(saveInspectParam));</stringProp>
                <stringProp name="BeanShellSampler.filename"></stringProp>
                <stringProp name="BeanShellSampler.parameters"></stringProp>
                <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
              </BeanShellSampler>
              <hashTree/>
              <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Acceptance@inspectSave" enabled="true">
                <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
                <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                  <collectionProp name="Arguments.arguments">
                    <elementProp name="" elementType="HTTPArgument">
                      <boolProp name="HTTPArgument.always_encode">false</boolProp>
                      <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;form_data&quot;: ${saveInspectParam}&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                      <stringProp name="Argument.metadata">=</stringProp>
                    </elementProp>
                  </collectionProp>
                </elementProp>
                <stringProp name="HTTPSampler.domain">${server}</stringProp>
                <stringProp name="HTTPSampler.port">${port}</stringProp>
                <stringProp name="HTTPSampler.protocol"></stringProp>
                <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
                <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/acceptance/Acceptance@inspectSave</stringProp>
                <stringProp name="HTTPSampler.method">POST</stringProp>
                <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
                <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
                <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
                <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
                <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
                <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
                <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
                <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
              </HTTPSamplerProxy>
              <hashTree>
                <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                  <stringProp name="JSON_PATH">$.success</stringProp>
                  <stringProp name="EXPECTED_VALUE">true</stringProp>
                  <boolProp name="JSONVALIDATION">true</boolProp>
                  <boolProp name="EXPECT_NULL">false</boolProp>
                  <boolProp name="INVERT">false</boolProp>
                  <boolProp name="ISREGEX">false</boolProp>
                </JSONPathAssertion>
                <hashTree/>
              </hashTree>
            </hashTree>
          </hashTree>
          <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@queryPut" enabled="false">
            <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
              <collectionProp name="Arguments.arguments">
                <elementProp name="" elementType="HTTPArgument">
                  <boolProp name="HTTPArgument.always_encode">false</boolProp>
                  <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;path&quot;: &quot;/com/galaxis/wms/inbound/putAway/PutAway&quot;,&#xd;
      &quot;pagination&quot;: true,&#xd;
      &quot;sqlId&quot;: &quot;queryPut&quot;,&#xd;
      &quot;limit&quot;: 50,&#xd;
      &quot;page&quot;: 1,&#xd;
      &quot;start&quot;: 0,&#xd;
      &quot;start_time&quot;: null,&#xd;
      &quot;end_time&quot;: null,&#xd;
      &quot;order_biz_type&quot;: null,&#xd;
      &quot;owner_name&quot;: null,&#xd;
      &quot;put_code&quot;: &quot;${asn_code}&quot;,&#xd;
      &quot;receipt_code&quot;: null,&#xd;
      &quot;asn_code&quot;: null,&#xd;
      &quot;condition&quot;: []&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                  <stringProp name="Argument.metadata">=</stringProp>
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="HTTPSampler.domain">${server}</stringProp>
            <stringProp name="HTTPSampler.port">${port}</stringProp>
            <stringProp name="HTTPSampler.protocol"></stringProp>
            <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
            <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPut</stringProp>
            <stringProp name="HTTPSampler.method">POST</stringProp>
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
            <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
            <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
            <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
          </HTTPSamplerProxy>
          <hashTree>
            <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
              <stringProp name="JSON_PATH">$.success</stringProp>
              <stringProp name="EXPECTED_VALUE">true</stringProp>
              <boolProp name="JSONVALIDATION">true</boolProp>
              <boolProp name="EXPECT_NULL">false</boolProp>
              <boolProp name="INVERT">false</boolProp>
              <boolProp name="ISREGEX">false</boolProp>
            </JSONPathAssertion>
            <hashTree/>
            <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="put Id Extractor" enabled="true">
              <stringProp name="JSONPostProcessor.referenceNames">put_id</stringProp>
              <stringProp name="JSONPostProcessor.jsonPathExprs">$.data[*].put_id</stringProp>
              <stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
            </JSONPostProcessor>
            <hashTree/>
          </hashTree>
          <DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="false">
            <boolProp name="displayJMeterProperties">false</boolProp>
            <boolProp name="displayJMeterVariables">true</boolProp>
            <boolProp name="displaySystemProperties">false</boolProp>
          </DebugSampler>
          <hashTree/>
          <IfController guiclass="IfControllerPanel" testclass="IfController" testname="Has Put Id Controller" enabled="false">
            <stringProp name="IfController.condition">${__jexl3(${put_id_matchNr} &gt; 0)}</stringProp>
            <boolProp name="IfController.evaluateAll">false</boolProp>
            <boolProp name="IfController.useExpression">true</boolProp>
          </IfController>
          <hashTree>
            <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@queryPutItems" enabled="true">
              <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                <collectionProp name="Arguments.arguments">
                  <elementProp name="" elementType="HTTPArgument">
                    <boolProp name="HTTPArgument.always_encode">false</boolProp>
                    <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;path&quot;: &quot;/com/galaxis/wms/inbound/putAway/PutAway&quot;,&#xd;
      &quot;pagination&quot;: true,&#xd;
      &quot;sqlId&quot;: &quot;queryPutItems&quot;,&#xd;
      &quot;limit&quot;: 10000,&#xd;
      &quot;page&quot;: 1,&#xd;
      &quot;start&quot;: 0,&#xd;
      &quot;put_id&quot;: &quot;${put_id}&quot;,&#xd;
      &quot;condition&quot;: []&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                    <stringProp name="Argument.metadata">=</stringProp>
                  </elementProp>
                </collectionProp>
              </elementProp>
              <stringProp name="HTTPSampler.domain">${server}</stringProp>
              <stringProp name="HTTPSampler.port">${port}</stringProp>
              <stringProp name="HTTPSampler.protocol"></stringProp>
              <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
              <stringProp name="HTTPSampler.path">/api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPutItems</stringProp>
              <stringProp name="HTTPSampler.method">POST</stringProp>
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
              <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
              <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
              <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
              <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
            </HTTPSamplerProxy>
            <hashTree>
              <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                <stringProp name="JSON_PATH">$.success</stringProp>
                <stringProp name="EXPECTED_VALUE">true</stringProp>
                <boolProp name="JSONVALIDATION">true</boolProp>
                <boolProp name="EXPECT_NULL">false</boolProp>
                <boolProp name="INVERT">false</boolProp>
                <boolProp name="ISREGEX">false</boolProp>
              </JSONPathAssertion>
              <hashTree/>
              <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Put Item Extractor" enabled="true">
                <stringProp name="JSONPostProcessor.referenceNames">put_item_list</stringProp>
                <stringProp name="JSONPostProcessor.jsonPathExprs">$.data.[*]</stringProp>
                <stringProp name="JSONPostProcessor.match_numbers">-1</stringProp>
              </JSONPostProcessor>
              <hashTree/>
            </hashTree>
            <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="Put ForEach" enabled="true">
              <stringProp name="ForeachController.inputVal">put_item_list</stringProp>
              <stringProp name="ForeachController.returnVal">put_item</stringProp>
              <boolProp name="ForeachController.useSeparator">true</boolProp>
              <stringProp name="ForeachController.startIndex">0</stringProp>
              <stringProp name="ForeachController.endIndex">${put_item_list_matchNr}</stringProp>
            </ForeachController>
            <hashTree>
              <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="Put Param Sampler" enabled="true">
                <stringProp name="BeanShellSampler.query">com.JMeterUtil util = com.Yvan.init(vars, log, ctx);

Map putItem = util.parseJson(vars.get(&quot;put_item&quot;), Map.class);

Map commitPutawayParam = new HashMap();
commitPutawayParam.put(&quot;put_id&quot;, String.valueOf(putItem.get(&quot;put_id&quot;)));
commitPutawayParam.put(&quot;put_line_no&quot;, String.valueOf(putItem.get(&quot;put_line_no&quot;)));
commitPutawayParam.put(&quot;item_id&quot;, String.valueOf(putItem.get(&quot;item_id&quot;)));
commitPutawayParam.put(&quot;lot_id&quot;, String.valueOf(putItem.get(&quot;lot_id&quot;)));
commitPutawayParam.put(&quot;pack_id&quot;, String.valueOf(putItem.get(&quot;pack_id&quot;)));
commitPutawayParam.put(&quot;qty&quot;, String.valueOf(putItem.get(&quot;qty&quot;)));
commitPutawayParam.put(&quot;put_pack_qty&quot;, String.valueOf(putItem.get(&quot;put_pack_qty&quot;)));
commitPutawayParam.put(&quot;put_unpack_qty&quot;, String.valueOf(putItem.get(&quot;put_unpack_qty&quot;)));
commitPutawayParam.put(&quot;put_code&quot;, String.valueOf(putItem.get(&quot;put_code&quot;)));
commitPutawayParam.put(&quot;lpn&quot;, String.valueOf(putItem.get(&quot;lpn&quot;)));
commitPutawayParam.put(&quot;loc_id&quot;, String.valueOf(putItem.get(&quot;loc_id&quot;)));

vars.put(&quot;commitPutawayParam&quot;, util.toJson(Collections.singleton(commitPutawayParam)));</stringProp>
                <stringProp name="BeanShellSampler.filename"></stringProp>
                <stringProp name="BeanShellSampler.parameters"></stringProp>
                <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
              </BeanShellSampler>
              <hashTree/>
              <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PutAway@commit" enabled="true">
                <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
                <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
                  <collectionProp name="Arguments.arguments">
                    <elementProp name="" elementType="HTTPArgument">
                      <boolProp name="HTTPArgument.always_encode">false</boolProp>
                      <stringProp name="Argument.value">{&#xd;
  &quot;args&quot;: [&#xd;
    {&#xd;
      &quot;put_details&quot;: ${commitPutawayParam}&#xd;
    }&#xd;
  ]&#xd;
}</stringProp>
                      <stringProp name="Argument.metadata">=</stringProp>
                    </elementProp>
                  </collectionProp>
                </elementProp>
                <stringProp name="HTTPSampler.domain">${server}</stringProp>
                <stringProp name="HTTPSampler.port">${port}</stringProp>
                <stringProp name="HTTPSampler.protocol"></stringProp>
                <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
                <stringProp name="HTTPSampler.path">api/com/galaxis/wms/inbound/putAway/PutAway@commit</stringProp>
                <stringProp name="HTTPSampler.method">POST</stringProp>
                <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
                <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
                <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
                <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
                <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
                <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
                <stringProp name="HTTPSampler.connect_timeout">1500</stringProp>
                <stringProp name="HTTPSampler.response_timeout">5000</stringProp>
              </HTTPSamplerProxy>
              <hashTree>
                <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="success" enabled="true">
                  <stringProp name="JSON_PATH">$.success</stringProp>
                  <stringProp name="EXPECTED_VALUE">true</stringProp>
                  <boolProp name="JSONVALIDATION">true</boolProp>
                  <boolProp name="EXPECT_NULL">false</boolProp>
                  <boolProp name="INVERT">false</boolProp>
                  <boolProp name="ISREGEX">false</boolProp>
                </JSONPathAssertion>
                <hashTree/>
              </hashTree>
            </hashTree>
          </hashTree>
        </hashTree>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>
