false true false server 127.0.0.1 = port 8085 = wh_id 424279481503974579 = system_key eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTczODMwMCwiaWF0IjoxNzIzMTc0NjE0LCJqdGkiOiI0MjUwNjkzNDczNTU0OTgwMDkifQ.YrDCJklGXn7-jssCTWyIASDWjQ_TiYKLHGkLh1pb3F20GhOzTP1uz9hEul9LhdArk6Z6QtJB8c-ZcbtznbjxMfMWQvpl3wFwNiXNVozGxE6guwBwFj3cDyUdkbvutK6piLQGqaR8S8cE9rA_2D2xwA-kKh79NbGkNh8sBzdqFWmhnYqZxZTYD-I-GTSVYRw_LW_--Se-jBVjDX5U63wx4gaZQBvG-3XQiYGAWqZ63ywZ62n2gXc4HvZavsYJnq9WhlVPIU1YvsRwd0yaSDTkEBxVjBTLaUmMoTMlMtvvAiuywFU8U66VRThsXW3TIRSvPYfLqTgcsWxK4UDJy6OFOg = poLineNum 5 = server 122.9.140.63 = port 8006 = wh_id 1000001 = system_key eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ5dmFuLXNlY3VyaXR5IiwiX191aWQiOiIzMTUwNzI4MTM1MDc1NDMwNDUiLCJhdWQiOiJ5dmFuLSoiLCJzdWIiOiJhZG1pbiIsImxvZ2luX2lkIjozMTYzNTczNDM4MTE5OTM2MDksImV4cCI6MTcyNTk5NzUwMCwiaWF0IjoxNzIzNDQ3NTA5LCJqdGkiOiI0MjczNTg1NTc3MjY4NDAzNjQifQ.g5JO8RAqDcipomhOs9pmpfuz-b_nznlssihFY0pCpSPBpkd3L6dr6_FAX8g-oD_EpBoK3Ng_Lh9eqI06Wg2LftxzPn0AagQHmKVtUlY_vDJOQweAmoZRGSFL57xV-UVGI2pgY47nWZVbWS0iFu8s5LgzbvfZABNKfiYYR8VlfN7xL63jfxyjX1uCKxLvGWtzpxDnKWtxJshpBazxyR1qgUci1s2Q_mD9Ljxc2hiwopaizhCuIVytBjAvwS6nYKGqGbyKEdnFt5SFu5EctYkwrEjuk8wtAlGgAiUoT1wb2_JwiS9d_zh24CFYchjiAWrKgmHRSeWekRlszJV_se-Mtw = poLineNum 1 = sequence_start_value 6 = continue false 3 1 1 false 300 0 true false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true whId ${wh_id} systemkey ${system_key} ./1001_user_data_config.csv UTF-8 staff_id false , false true false shareMode.group , UTF-8 ./1002_owner_data_config.csv false false true true owner_id ./1003_supplier_data_config.csv UTF-8 supplier_id false , false true false shareMode.group ${sequence_start_value} 1 sequence 000000 false com.JMeterUtil util = com.Yvan.init(vars, log, ctx); vars.put("soItemList", util.toJson(new ArrayList())); //vars.put("asn_code", "ASN24080900059"); false true ${poLineNum} , UTF-8 ./1004_item_data_config.csv false false true shareMode.group true item_id,pack_id true 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("yyyyMMdd"); java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd"); String lotNo = currentDate.format(formatter) + vars.get("sequence"); 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 soItemList = util.parseJson(vars.get("soItemList"), List.class); Map soItemParam = new HashMap(); int soLineNo = Integer.parseInt(vars.get("__jm__So Line Loop__idx")) + 1; soItemParam.put("so_line_no", soLineNo); soItemParam.put("item_id", vars.get("item_id")); //soItemParam.put("item_name", "杜仲平压片"); //soItemParam.put("item_code", "0137680"); soItemParam.put("pack_id", vars.get("pack_id")); //soItemParam.put("pack_name", "默认包装"); //soItemParam.put("pack_unit", "0001"); // 批准文号 soItemParam.put("lot08", "PW" + lotNo + soLineNo); // 厂家 soItemParam.put("lot09", "GALAXIS"); // 产地 soItemParam.put("lot10", "湖北省武汉市"); soItemParam.put("qty", "1"); // 逻辑仓 soItemParam.put("lot02", "01"); soItemList.add(soItemParam); vars.put("soItemList", util.toJson(soItemList)); //poItem.put("poLineNo", poLineNo); //poItem.put("itemId", vars.get("item_id")); //poItem.put("packId", vars.get("pack_id")); //poItem.put("price", defaultPrice); //poItem.put("poQty", defaultQty); //// 包装条码 //poItem.put("lot01", ""); //// 逻辑仓 //poItem.put("lot02", "01"); //// 越库单号 //poItem.put("lot03", ""); //// 生产日期 //poItem.put("lot04", defaultManufacture); //// 有效期 //poItem.put("lot05", defaultValidUntil); //// 批号 //poItem.put("lot06", "PNO" + lotNo + poLineNo); //// 规格 //poItem.put("lot07", ""); //// 批准文号 //poItem.put("lot08", "PW" + lotNo + poLineNo); //// 厂家 //poItem.put("lot09", "GALAXIS"); //// 产地 //poItem.put("lot10", "湖北省武汉市"); //poItemList.add(poItem); //vars.put("poItemList", util.toJson(poItemList)); java 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("yyyyMMdd"); java.time.format.DateTimeFormatter formatter2 = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd"); String lotNo = currentDate.format(formatter) + vars.get("sequence"); String bizCode = "SDOUT" + lotNo; String defaultOrderType = "0200"; String defaultOrderBizType = "0201"; Map soParam = new HashMap(); //po.put("wh_id", vars.get("wh_id")); //po.put("owner_id", vars.get("owner_id")); //po.put("supplier_id", vars.get("supplier_id")); //po.put("biz_code", bizCode); //po.put("order_type", defaultOrderType); //po.put("order_biz_type", defaultOrderBizType); //po.put("po_date", currentDate.format(formatter2)); //po.put("po_code", bizCode); //po.put("po_staff_id", vars.get("staff_id")); //po.put("remark", "压测数据"); soParam.put("so_code", bizCode); soParam.put("order_type", defaultOrderType); soParam.put("order_biz_type", defaultOrderBizType); soParam.put("customer_id", vars.get("supplier_id")); soParam.put("owner_id", vars.get("owner_id")); //soParam.put("owner_name", ""); //soParam.put("customer_name", ""); soParam.put("priority", "1"); soParam.put("parent_order_code", ""); soParam.put("dates", currentDate.format(formatter2)); soParam.put("collection_method", ""); soParam.put("biz_code", bizCode); soParam.put("contact", ""); soParam.put("telephone", ""); soParam.put("address", ""); soParam.put("remark", "压测数据"); vars.put("soParam", util.toJson(soParam)); //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 <= maxPoLine; i++) { // Map poItem = new HashMap(); // poItem.put("poLineNo", i); // poItem.put("itemId", vars.get("itemId_" + i)); // poItem.put("packId", vars.get("packId_" + i)); // poItem.put("price", defaultPrice); // poItem.put("poQty", defaultQty); // // 包装条码 // poItem.put("lot01", ""); // // 逻辑仓 // poItem.put("lot02", "01"); // // 越库单号 // poItem.put("lot03", ""); // // 生产日期 // poItem.put("lot04", defaultManufacture); // // 有效期 // poItem.put("lot05", defaultValidUntil); // // 批号 // poItem.put("lot06", "PNO" + lotNo + i); // // 规格 // poItem.put("lot07", ""); // // 批准文号 // poItem.put("lot08", "PW" + lotNo + i); // // 厂家 // poItem.put("lot09", "GALAXIS"); // // 产地 // poItem.put("lot10", "湖北省武汉市"); // poItemList.add(poItem); //} //vars.put("poId", util.toJson(po)); //vars.put("poItems", vars.get("poItemList")); false true false { "args": [ { "order": ${soParam}, "orderItemList": ${soItemList} } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/outbound/createOrder/CreateOrder@save POST false false true false HttpClient4 5000 5000 $.success true true false false false true false { "args": [ { "poIds": [ "${poId}" ] } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/inbound/asn/Asn@extractPo POST false false true false HttpClient4 5000 5000 $.success true true false false false poInfo $.data 1 asn_code $.data.poMaster.asn_code 1 ${__jexl3(${asn_code_matchNr} > 0)} false true com.JMeterUtil util = com.Yvan.init(vars, log, ctx); Map poMap = util.parseJson(vars.get("poInfo"), Map.class); Map poMasterMap = poMap.get("poMaster"); poMasterMap.put("staff_id", vars.get("staff_id")); poMasterMap.put("shipment_type", "0004"); List poDetails = poMap.get("poDetails"); for(int i = 0; i < poDetails.size(); i++){ Map poDetail = poDetails.get(i); poDetail.put("asn_qty", poDetail.get("po_qty")); } Map asnCommitParam = new HashMap(); asnCommitParam.put("asn", poMasterMap); asnCommitParam.put("asnItems", poDetails); asnCommitParam.put("withSubmit", true); vars.put("asnCommitParam", util.toJson(asnCommitParam)); false true false { "args": [ ${asnCommitParam} ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/inbound/asn/Asn@asnCommit POST false false true false HttpClient4 5000 5000 $.success true true false false false true ${poLineNum} true false { "args": [ { "asn_code": "${asn_code}", "lpn": null, "biz_code": null, "parent_code": null, "asn_id": 0, "asn_line_no": 0 } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/inbound/receipt/Receipt@queryAsnInfo POST false false true false HttpClient4 5000 5000 $.success true true false false false asn $.data.asn 1 asn_item $.data.asn_item 1 com.JMeterUtil util = com.Yvan.init(vars, log, ctx); Map asn = util.parseJson(vars.get("asn"), Map.class); vars.put("asn_id", String.valueOf(asn.get("asn_id"))); Map asnItem = util.parseJson(vars.get("asn_item"), Map.class); vars.put("item_id", String.valueOf(asnItem.get("item_id"))); false true false { "args": [ { "asn_id": "${asn_id}", "item_id": "${item_id}" } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/inbound/receipt/Receipt@isInspectByAsn POST false false true false HttpClient4 5000 5000 $.success true true false false false is_inspect $.data 1 import java.math.BigDecimal; import java.math.RoundingMode; com.JMeterUtil util = com.Yvan.init(vars, log, ctx); Map asn = util.parseJson(vars.get("asn"), Map.class); Map asnItem = util.parseJson(vars.get("asn_item"), Map.class); // log.info("asnItem > " + asnItem.get("asn_qty").getClass()); // ASN单数量 BigDecimal asnQty = new BigDecimal(asnItem.get("asn_qty")); // 已收货数量 BigDecimal receiptQty = new BigDecimal(asnItem.get("receipt_qty")); // 已拒收数量 BigDecimal receiptRejectQty = new BigDecimal(asnItem.get("receipt_reject_qty")); // 当前收货数量 = ASN单数量 - 已收货数量 - 已拒收数量 BigDecimal currentReceiptQty = asnQty.subtract(receiptQty).subtract(receiptRejectQty); // 包装数量 BigDecimal packMeas3 = new BigDecimal(String.valueOf(asnItem.get("pack_meas3"))); // 整件数 BigDecimal receiptPackQty = currentReceiptQty.divide(packMeas3, 0, RoundingMode.FLOOR); // 零散数 BigDecimal receiptUnpackQty = currentReceiptQty.subtract(receiptPackQty.multiply(packMeas3)); Map saveReceiptItemParam = new HashMap(); saveReceiptItemParam.put("asn_id", String.valueOf(asn.get("asn_id"))); saveReceiptItemParam.put("asn_line_no", String.valueOf(asnItem.get("asn_line_no"))); saveReceiptItemParam.put("item_id", String.valueOf(asnItem.get("item_id"))); saveReceiptItemParam.put("is_inspection", String.valueOf(vars.get("is_inspect"))); saveReceiptItemParam.put("is_shuttle", "0000"); saveReceiptItemParam.put("is_ctu", "0001"); saveReceiptItemParam.put("is_device", "0000"); //saveReceiptItemParam.put("is_chinese_medicine", "0001"); saveReceiptItemParam.put("pack_id", String.valueOf(asnItem.get("pack_id"))); saveReceiptItemParam.put("lot_id", String.valueOf(asnItem.get("lot_id"))); saveReceiptItemParam.put("current_receipt_qty", currentReceiptQty.toString()); saveReceiptItemParam.put("receipt_pack_qty", receiptPackQty.toString()); saveReceiptItemParam.put("pack_intent", "0001"); saveReceiptItemParam.put("receipt_unpack_qty", receiptUnpackQty.toString()); saveReceiptItemParam.put("unpack_intent", "0001"); vars.put("saveReceiptItemParam", util.toJson(saveReceiptItemParam)); false true false { "args": [ ${saveReceiptItemParam} ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/inbound/receipt/Receipt@saveReceiptItem GET false false true false HttpClient4 1500 5000 $.success true true false false false true false { "args": [ { "path": "/com/galaxis/wms/inbound/acceptance/Acceptance", "pagination": true, "sqlId": "tab1_grid1QueryData", "limit": 50, "page": 1, "start": 0, "receipt_code": "${asn_code}", "customer_id": null, "order_biz_type": null, "receipt_id": null, "in_status": null, "condition": [] } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid1QueryData POST false false true false HttpClient4 1500 5000 $.success true true false false false inspect_id $.data[*].inspect_id 1 ${__jexl3(${inspect_id_matchNr} > 0)} false true true false { "args": [ { "path": "/com/galaxis/wms/inbound/acceptance/Acceptance", "pagination": true, "sqlId": "tab1_grid2QueryData", "limit": 10000, "page": 1, "start": 0, "inspect_id": "${inspect_id}", "condition": [] } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/acceptance/Acceptance@tab1_grid2QueryData POST false false true false HttpClient4 1500 5000 $.success true true false false false inspect_item_list $.data.[*] -1 inspect_item_list inspect_item true 0 ${inspect_item_list_matchNr} import java.math.BigDecimal; import java.math.RoundingMode; com.JMeterUtil util = com.Yvan.init(vars, log, ctx); Map inspectItem = util.parseJson(vars.get("inspect_item"), Map.class); // 质检数量 BigDecimal qty = new BigDecimal(inspectItem.get("qty")); // 已质检数量 BigDecimal inspectQty = new BigDecimal(inspectItem.get("inspect_qty")); // 已拒收数量 BigDecimal receiptQty = new BigDecimal(inspectItem.get("reject_qty")); // 需质检数量 = 质检数量 - 已质检数量 - 已拒收数量 BigDecimal qualityQty = qty.subtract(inspectQty).subtract(receiptQty); // 包装数量 BigDecimal packMeas = new BigDecimal(String.valueOf(inspectItem.get("pack_meas"))); // 质检整件数 BigDecimal qualityWholeQty = qualityQty.divide(packMeas, 0, RoundingMode.FLOOR); // 质检零散数 BigDecimal qualityLessQty = qualityQty.subtract(qualityWholeQty.multiply(packMeas)); Map saveInspectParam = new HashMap(); saveInspectParam.put("inspect_id", String.valueOf(inspectItem.get("inspect_id"))); saveInspectParam.put("inspect_line_nos", String.valueOf(inspectItem.get("inspect_line_nos"))); saveInspectParam.put("item_id", String.valueOf(inspectItem.get("item_id"))); saveInspectParam.put("pack_id", String.valueOf(inspectItem.get("pack_id"))); saveInspectParam.put("lot_id", String.valueOf(inspectItem.get("lot_id"))); saveInspectParam.put("quality_reject_qty", "0"); saveInspectParam.put("is_chinese_medicine", String.valueOf(inspectItem.get("is_chinese_medicine"))); saveInspectParam.put("quality_less_qty", qualityLessQty.toString()); saveInspectParam.put("quality_whole_qty", qualityWholeQty.toString()); saveInspectParam.put("quality_qty", qualityQty.toString()); saveInspectParam.put("put_intent_less", "0001"); saveInspectParam.put("put_intent_whole", "0001"); saveInspectParam.put("quality_assert", "0001"); saveInspectParam.put("quality_staff_id1", vars.get("staff_id")); vars.put("saveInspectParam", util.toJson(saveInspectParam)); false true false { "args": [ { "form_data": ${saveInspectParam} } ] } = ${server} ${port} UTF-8 api/com/galaxis/wms/inbound/acceptance/Acceptance@inspectSave POST false false true false HttpClient4 1500 5000 $.success true true false false false true false { "args": [ { "path": "/com/galaxis/wms/inbound/putAway/PutAway", "pagination": true, "sqlId": "queryPut", "limit": 50, "page": 1, "start": 0, "start_time": null, "end_time": null, "order_biz_type": null, "owner_name": null, "put_code": "${asn_code}", "receipt_code": null, "asn_code": null, "condition": [] } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPut POST false false true false HttpClient4 1500 5000 $.success true true false false false put_id $.data[*].put_id 1 false true false ${__jexl3(${put_id_matchNr} > 0)} false true true false { "args": [ { "path": "/com/galaxis/wms/inbound/putAway/PutAway", "pagination": true, "sqlId": "queryPutItems", "limit": 10000, "page": 1, "start": 0, "put_id": "${put_id}", "condition": [] } ] } = ${server} ${port} UTF-8 /api/com/galaxis/wms/Dev@executeSQL?path=/com/galaxis/wms/inbound/putAway/PutAway@queryPutItems POST false false true false HttpClient4 1500 5000 $.success true true false false false put_item_list $.data.[*] -1 put_item_list put_item true 0 ${put_item_list_matchNr} com.JMeterUtil util = com.Yvan.init(vars, log, ctx); Map putItem = util.parseJson(vars.get("put_item"), Map.class); Map commitPutawayParam = new HashMap(); commitPutawayParam.put("put_id", String.valueOf(putItem.get("put_id"))); commitPutawayParam.put("put_line_no", String.valueOf(putItem.get("put_line_no"))); commitPutawayParam.put("item_id", String.valueOf(putItem.get("item_id"))); commitPutawayParam.put("lot_id", String.valueOf(putItem.get("lot_id"))); commitPutawayParam.put("pack_id", String.valueOf(putItem.get("pack_id"))); commitPutawayParam.put("qty", String.valueOf(putItem.get("qty"))); commitPutawayParam.put("put_pack_qty", String.valueOf(putItem.get("put_pack_qty"))); commitPutawayParam.put("put_unpack_qty", String.valueOf(putItem.get("put_unpack_qty"))); commitPutawayParam.put("put_code", String.valueOf(putItem.get("put_code"))); commitPutawayParam.put("lpn", String.valueOf(putItem.get("lpn"))); commitPutawayParam.put("loc_id", String.valueOf(putItem.get("loc_id"))); vars.put("commitPutawayParam", util.toJson(Collections.singleton(commitPutawayParam))); false true false { "args": [ { "put_details": ${commitPutawayParam} } ] } = ${server} ${port} UTF-8 api/com/galaxis/wms/inbound/putAway/PutAway@commit POST false false true false HttpClient4 1500 5000 $.success true true false false false