Commit ad4f92eb authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent 2e420ba1
......@@ -40,18 +40,25 @@ request_body = commonFuc().get_business_data(module, "payload23")
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content)
# print(result)
# 查询需求单状态
sql = "SELECT t.orderStatus FROM `cmdc-order`.tc_demand t WHERE t.demandId = 40213"
mysql_handle.selectSql(host, port, user, pwd, "cmdc-order", sql)
result = {"orderStatus": mysql_handle.selectSql(host, port, user, pwd, "cmdc-order", sql)[0][0]}
# print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict23")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
print(result)
if result["success"]:
# 查询需求单状态
sql = "SELECT t.orderStatus FROM `cmdc-order`.tc_demand t WHERE t.demandId = 40213"
mysql_handle.selectSql(host, port, user, pwd, "cmdc-order", sql)
result = {"orderStatus": mysql_handle.selectSql(host, port, user, pwd, "cmdc-order", sql)[0][0]}
# print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict23")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
else:
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict23_1")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# 进行需求单状态调整为待审核操作
sql = "UPDATE `cmdc-order`.tc_demand t SET t.orderStatus = 102 WHERE t.demandId = 40213"
sql = "UPDATE `cmdc-order`.tc_demand t SET t.orderStatus = 102, t.auditStatus = 0 WHERE t.demandId = 40213"
mysql_handle.executeUpdate(host, port, user, pwd, "cmdc-order", sql)
\ No newline at end of file
......@@ -116,7 +116,7 @@ checkDict13_1: {"success":True,"code":"200"}
"url14": "/order/public/demandSub/detail"
"payload14": {"demandId":"%s"}
#预期结果
checkDict14: {"demandSubCode":"%s"}
checkDict14: {"demandId":"%s"}
checkDict14_1: {"success":True,"code":"200"}
......@@ -185,6 +185,7 @@ checkDict22: {"demandCode":"%s"}
"payload23": {"demandId":40213,"demandParentId":38196,"demandParentCode":"s2312120700012","demandCode":"17023358016932833","customerId":69,"customerName":"国药集团云南医疗器械有限公司","customerCode":1127254,"loginName":"BJ0621","realName":"郭红声","addressNumber":null,"mobile":"15887223281","productName":null,"productCode":null,"sellerCompanyName":"国药集团北京医疗器械有限公司","sellerCompanyCode":"00103","paymentType":0,"receiveBankName":"建设银行北京支行19","receiveBankAccount":"62231478523685414","paymentAmount":45,"productAmount":45,"payableAmount":0,"refundAmount":0,"cancelAmount":0,"discountAmount":0,"orderStatus":102,"refundStatus":null,"receiverName":"郭红声","receiverContact":"15887223281","receiverAddress":"云南省昆明市高新技术开发区产业基地B1-02-01地块物流园二期项目1号库M1-2-1,M1-2-2号","remark":null,"revokedReason":null,"auditById":null,"auditByName":null,"auditTime":null,"auditRemark":"测试","flhsStatus":0,"pushJdeStatus":null,"createTime":"2023-12-12 07:03:21","updateTime":"2023-12-12 07:03:21","submitTime":"2023-12-12 07:03:22","pushJdeTime":null,"successTime":null,"auditStatus":0,"deleteSign":0,"firstOrderFlag":0,"demandItems":[{"demandSkuId":201118,"demandId":40213,"distributionId":null,"companyCode":null,"demandCode":"17023358016932833","demandParentId":38196,"sellerCompanyId":3,"sellerCompanyName":"国药集团北京医疗器械有限公司","sellerCompanyCode":"00103","customerCode":1127254,"productLineCode":"","productLineName":"","propertyStr":null,"storageType":"999","suppDist":null,"productId":822,"productName":"医用防护口罩","productCode":"13295500","productNature":null,"brandName":null,"optionStr":"密合型拱形(13.5cm×12cm)","imageUrl":null,"lineNumber":1,"price":20,"rebateId":null,"rebateDetail":null,"useMaxLimit":null,"useLimitStart":null,"useBalance":null,"originalPrice":null,"biddingDiscountTax":null,"salesDiscountTax":null,"quantity":1,"sumQuantity":null,"sendQuantity":0,"lackQuantity":0,"cancelQuantity":0,"cancelAmount":0,"refundQuantity":0,"refundAmount":0,"discountQuantity":0,"discountAmount":0,"subtotal":20,"measuringUnit":"支","auxiliaryMeasuringUnit":null,"procurementMeasuringUnit":null,"pricingMeasuringUnit":null,"materialCode":"YYPS20210031","manufacturer":"北京中北博健科贸有限公司","produceRegisterNum":null,"riskRank":null,"productClassify":null,"createTime":"2023-12-11T23:03:21.000+0000","updateTime":"2023-12-11T23:03:21.000+0000","deleteSign":0,"calCancelFlag":0,"refundFlag":0,"discountRate":1,"realPay":20,"promotionPrice":0,"promotionTotalPrice":0,"demandParentCode":null,"regionId":null,"regionName":null,"spitSign":null,"activityAmount":0,"couponAmount":0,"activityUnitAmount":0,"couponUnitAmount":null,"activityBasicId":null,"couponSgin":null,"couponSgin2":null,"returnQuantity":0,"returnAmount":0,"customerId":null,"prescription":null,"specifications":null,"lineCodeDelete":null,"sdOutStorage":0,"licenseNo":"京食药监械生产许20020039号","demandCodes":null,"areaName":null,"agreementPriceId":null,"offerPrice":null,"orderMark":null,"totalPrice":null,"productLimitBuyList":null,"giftSign":0,"giftProductCode":"13295500","activityCarDataVoList":null,"productReplaceLogs":null,"orderSource":null,"receiverName":null,"receiverContact":null,"receiverAddress":null,"rebateTripId":null,"allSign":null,"replaceSgin":null,"salesReturn":null,"nowAmount":null,"taxSign":0,"plusMinuKey":null,"rebateRule":null,"areaPrice":null,"lockType":null,"estimatedDeliveryDate":null,"licenseInfoFeignDtos":[],"receivedQty":null,"rebateSign":null,"ippMiniPurchaseNum":null,"ippMultipleSign":null,"ippPurchaseMultiple":null,"ippStatus":null,"lineNumberOrg":1,"changeSgin":null,"addSgin":0,"ptbfa1":null,"ptbfa2":null,"ptbfa3":null,"ptbfa4":null,"ptbfa5":null,"yapeiPriceId":null,"ypLinePromotion":null,"yapeiPrice":null,"companyId":null,"buyerCartId":null,"userReceiveIdx":null,"userReceiveIdx2":null,"limitNum":null,"productLimitBuyId":null,"alreadyBuyNum":null,"limitBuySign":0,"proposeNum":null,"takeEffectRange":null,"takeEffectTime":null,"endTime1":null,"groupId":null,"fsGroupId":null,"proposalQuantity":null,"proposalSign":0,"manufacturerUserNo":null,"manufacturerUserDesc":null,"manufacturerProductNo":null,"manufacturerProductDesc":null,"manufacturerUserId":null,"manufacturerProductId":null,"busProductCode":null,"paidTime":null,"customerName":null,"paymentAmount":null,"specQuantity":null,"disQuantity":null,"fulfilledQuantity":0,"fulCancelQuantity":0,"couponId":null,"couponId2":null,"limitS":null,"starts":null,"ends":null,"userId":null,"productTax":null,"taxRate":null,"demandSplitSign":null,"hospitalHopeDate":null,"uniqueKey":null,"productType":null,"activityRuleId":null,"allowanceBeginTime":null,"allowanceEndTime":null,"sign":null,"differenceActivityUserId":null,"groupNumber":1,"groupName":null,"skuGroup":null,"subList":null,"dataJson":null,"skuMergeSign":null,"freseniusPriceId":null,"quantityAndGroupAll":null,"booleaTime":null,"spitSgin":0,"groupSpitSign":0,"sort":0,"circleArea":null,"purchaseEntryId":null,"mustInstallDate":false,"installedDate":null,"installedDateStr":null,"demandLines":null,"subLineNumber":null,"demandSubCode":null,"propertyName":null,"propertyVal":null,"propertyNote":null,"sendManualSign":0,"activityType":0,"giftSettlementMethod":null,"giftInitQuantity":null,"packageCode":null,"giftGroupQuantity":null,"siteCompanyCode":null,"hospitalOrderType":null,"isCollectionAllocation":null,"recDifferenceQty":null,"orderStatus":null,"distributionType":null,"groupCode":null,"groupProductType":null,"pSign":0,"backSign":0,"description":"","stockNumber":null,"priceChange":false,"rebate":false},{"demandSkuId":201119,"demandId":40213,"distributionId":null,"companyCode":null,"demandCode":"17023358016932833","demandParentId":38196,"sellerCompanyId":3,"sellerCompanyName":"国药集团北京医疗器械有限公司","sellerCompanyCode":"00103","customerCode":1127254,"productLineCode":"","productLineName":"","propertyStr":null,"storageType":"999","suppDist":null,"productId":160,"productName":"一次性使用手术衣","productCode":"10980792","productNature":null,"brandName":null,"optionStr":"普通型 M120cm×140cm","imageUrl":null,"lineNumber":2,"price":25,"rebateId":null,"rebateDetail":null,"useMaxLimit":null,"useLimitStart":null,"useBalance":null,"originalPrice":null,"biddingDiscountTax":null,"salesDiscountTax":null,"quantity":1,"sumQuantity":null,"sendQuantity":0,"lackQuantity":0,"cancelQuantity":0,"cancelAmount":0,"refundQuantity":0,"refundAmount":0,"discountQuantity":0,"discountAmount":0,"subtotal":25,"measuringUnit":"件","auxiliaryMeasuringUnit":null,"procurementMeasuringUnit":null,"pricingMeasuringUnit":null,"materialCode":"","manufacturer":"稳健医疗用品股份有限公司","produceRegisterNum":null,"riskRank":null,"productClassify":null,"createTime":"2023-12-11T23:03:21.000+0000","updateTime":"2023-12-11T23:03:21.000+0000","deleteSign":0,"calCancelFlag":0,"refundFlag":0,"discountRate":1,"realPay":25,"promotionPrice":0,"promotionTotalPrice":0,"demandParentCode":null,"regionId":null,"regionName":null,"spitSign":null,"activityAmount":0,"couponAmount":0,"activityUnitAmount":0,"couponUnitAmount":null,"activityBasicId":null,"couponSgin":null,"couponSgin2":null,"returnQuantity":0,"returnAmount":0,"customerId":null,"prescription":null,"specifications":null,"lineCodeDelete":null,"sdOutStorage":0,"licenseNo":"鄂食药监械生产许20100306号","demandCodes":null,"areaName":null,"agreementPriceId":null,"offerPrice":null,"orderMark":null,"totalPrice":null,"productLimitBuyList":null,"giftSign":0,"giftProductCode":"10980792","activityCarDataVoList":null,"productReplaceLogs":null,"orderSource":null,"receiverName":null,"receiverContact":null,"receiverAddress":null,"rebateTripId":null,"allSign":null,"replaceSgin":null,"salesReturn":null,"nowAmount":null,"taxSign":0,"plusMinuKey":null,"rebateRule":null,"areaPrice":null,"lockType":null,"estimatedDeliveryDate":null,"licenseInfoFeignDtos":[],"receivedQty":null,"rebateSign":null,"ippMiniPurchaseNum":null,"ippMultipleSign":null,"ippPurchaseMultiple":null,"ippStatus":null,"lineNumberOrg":2,"changeSgin":null,"addSgin":0,"ptbfa1":null,"ptbfa2":null,"ptbfa3":null,"ptbfa4":null,"ptbfa5":null,"yapeiPriceId":null,"ypLinePromotion":null,"yapeiPrice":null,"companyId":null,"buyerCartId":null,"userReceiveIdx":null,"userReceiveIdx2":null,"limitNum":null,"productLimitBuyId":null,"alreadyBuyNum":null,"limitBuySign":0,"proposeNum":null,"takeEffectRange":null,"takeEffectTime":null,"endTime1":null,"groupId":null,"fsGroupId":null,"proposalQuantity":null,"proposalSign":0,"manufacturerUserNo":null,"manufacturerUserDesc":null,"manufacturerProductNo":null,"manufacturerProductDesc":null,"manufacturerUserId":null,"manufacturerProductId":null,"busProductCode":null,"paidTime":null,"customerName":null,"paymentAmount":null,"specQuantity":null,"disQuantity":null,"fulfilledQuantity":0,"fulCancelQuantity":0,"couponId":null,"couponId2":null,"limitS":null,"starts":null,"ends":null,"userId":null,"productTax":null,"taxRate":null,"demandSplitSign":null,"hospitalHopeDate":null,"uniqueKey":null,"productType":null,"activityRuleId":null,"allowanceBeginTime":null,"allowanceEndTime":null,"sign":null,"differenceActivityUserId":null,"groupNumber":1,"groupName":null,"skuGroup":null,"subList":null,"dataJson":null,"skuMergeSign":null,"freseniusPriceId":null,"quantityAndGroupAll":null,"booleaTime":null,"spitSgin":0,"groupSpitSign":0,"sort":0,"circleArea":null,"purchaseEntryId":null,"mustInstallDate":false,"installedDate":null,"installedDateStr":null,"demandLines":null,"subLineNumber":null,"demandSubCode":null,"propertyName":null,"propertyVal":null,"propertyNote":null,"sendManualSign":0,"activityType":0,"giftSettlementMethod":null,"giftInitQuantity":null,"packageCode":null,"giftGroupQuantity":null,"siteCompanyCode":null,"hospitalOrderType":null,"isCollectionAllocation":null,"recDifferenceQty":null,"orderStatus":null,"distributionType":null,"groupCode":null,"groupProductType":null,"pSign":0,"backSign":0,"description":"","stockNumber":null,"priceChange":false,"rebate":false}],"expireDemandSkus":null,"demandSubItems":null,"rebateDetail":null,"rebateAmountList":null,"productLineCode":"","productLineName":"","auditLoginName":null,"showPurchaseNo":false,"isRebate":null,"isShowReate":null,"taxRate":0.13,"rebateType":0,"paymentAmountWholeLine":null,"discountAmountWholeLine":null,"payableAmountWholeLine":null,"discountRate":null,"singleRebateAmount":null,"isRebateEdit":0,"payCertUrl":null,"rebateAmount":0,"demandCance":0,"soAdd":0,"soCance":0,"orderReturn":0,"needCustomerConfirm":false,"measuringUnit":null,"productId":null,"version":null,"mainVersion":null,"agencyConfigId":null,"confirmSign":null,"replySign":null,"agencySign":null,"editIng":null,"editIngStr":null,"jdeType":0,"isElectronicSeal":null,"contractAgreementNo":null,"alesDepartmentNo":null,"alesDepartmentName":null,"salesPersonNo":null,"salesPersonName":null,"customerNote":null,"otherNote":null,"contractAgreementCode":null,"projectName":null,"projectCode":null,"regionId":null,"regionName":null,"productLineBindSign":null,"shipVia":1,"orderSource":1,"userBalance":null,"liquidCode":null,"shipmentTypeStr":null,"specifications":null,"pageStart":null,"pageSize":null,"changeSgin":0,"yapei":2,"companyId":3,"userReceiveId2":null,"preemptConfig":null,"productSpec":null,"secondAuditSign":0,"secondAuditById":null,"secondAuditByName":null,"secondAuditTime":null,"secondAuditRemark":null,"secondAuditStatus":null,"rebateRule":null,"rebateControlSign":0,"rebateId":null,"preferenceType":null,"preferenceName":null,"disPrice":null,"lineNum":0,"auditStaySign":0,"fileList":[],"imageUrls":null,"total":null,"submitTimeStr":"2023-12-12 07:03:22","updateTimeStr":"2023-12-12 07:03:21","auditTimeStr":null,"acceptTime":null,"acceptTimeStr":null,"paidTime":null,"paidTimeStr":null,"erpHandingTime":null,"erpHandingTimeStr":null,"partShippingTime":null,"partShippingTimeStr":null,"allShippingTime":null,"allShippingTimeStr":null,"pushJdeTimeStr":null,"successTimeStr":null,"onlinePaySuccessTime":null,"onlinePaySuccessTimeStr":null,"bankTransactionSerial":"","newIsTax":null,"countFormula":null,"countNumber":null,"noTaxRebateAmount":0,"isCollectionAllocation":0,"siteCompanyCode":null,"hospitalOrderType":null,"proofTime":null,"proofURL":null,"proofRemark":null,"proofSign":0,"customerCancelSign":null,"cancelRecords":null,"cancelCount":0,"updateNewTime":null,"updateNewTimeStr":null,"fsDedUseSign":0,"notice":null,"shareType":null,"singleRebateSign":null,"cf":false,"isPre":null,"showDemandAuditLineLabel":false,"orderType":null,"newDiscountRate":null,"oldOrderType":null,"oldNewDiscountRate":null,"pendding":null,"modifySign":null,"refuseType":1,"groupChangeSign":0,"custModify":0,"demandSubCode":null,"pushJdeStatusDemandSub":null,"circleGiftSign":0,"delay":0,"limitS":null,"starts":null,"ends":null,"completedS":null,"confirmDays":15,"remindS":null,"skuGroupList":null,"groupProductType":0,"purchaseId":null,"purchaseCode":null,"sdCancelTime":null,"sdTipSign":0,"receiverNote":"叶二娘","receiverPhoneNote":"13223233434","receiverAddressNote":"湖北省仙桃市嵩山少林室","flag":null,"sourceStr":null,"addressNoNote":0,"detailIsSpit":false,"spitSgin":null,"distributionType":null,"rebateValidity":null,"orderChangeType":null,"logoIcon":"0","detail":{"ypTotalPrice":"0","payableAmount":"0.0000","isChange":false,"rebateAmount":"0.00","returnPrice":"0","rebateChangePrice":"0","changePrice":"0","activityChangePrice":"0","ypPromotionTotal":"0","nowAmount":"0"},"changeBigType":null,"promotionType":1,"activityTotalAmount":0,"couponTotalAmount":0,"userReceiveId":null,"editSgin":0,"snSgin":0,"jdeOutAmount":null,"totalAllPaAmount":null,"diffShowSgin":0,"lineCodeDelete":null,"startTime":null,"endTime":null,"changeSign":null,"distributionId":null,"limitBuySign":0,"companyType":null,"afterSale":2,"csId":null,"sdStatusNodeParamList":null,"ypPromotionTotal":null,"acrossMainCode":"ac17023358014592533","forceApprovedSign":0,"circleGiftContinueSgin":0,"customerCharge":8,"onlinePaySign":0,"recodeDemandSkuList":null,"mergeDemandSkuList":null,"inventoryNode":null,"customCode":null,"terminalSource":1,"potentialClientsId":null,"settlementStatus":null,"firstOrderAuditStatus":null,"confirmReceiptSign":"0","confirmReceiptTime":null,"afterSaleDays":30,"deliveryCompletedTime":null,"taxSign":0,"orderSplitSign":0,"demandRebateSkuList":null,"confirmTime":null,"customerPurchaseNo":null,"mustInstallDate":false,"secondAddressList":[{"receiverNote":"叶二娘","receiverPhoneNote":"13223233434","receiverAddressNote":"湖北省仙桃市嵩山少林室"}],"splitOrMerge":0,"spitOrderSign":1,"productAmountWholeLine":null,"auditCompanyName":null,"auditCompanyNameCode":null,"edit":false,"proofURLList":[],"updateSgin":0,"soList":[]}
#预期结果
checkDict23: {"orderStatus":201}
checkDict23_1: {"success": False, "code": "demand", "message": "该订单已提交过,请稍后操作"}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment