Commit 31f1d700 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化脚本

parent af536952
...@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils ...@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
""" """
case_tag:api,mdm-web,注册医院审核通过,id2249,id2249-3,sit,on,20230907 case_tag:api,mdm-web,注册医院审核通过,id2249,id2249-4,sit,on,20230907
主数据平台:注册医院审核通过 主数据平台:注册医院审核通过
""" """
from common.common_func import commonFuc from common.common_func import commonFuc
......
...@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils ...@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
""" """
case_tag:api,mdm-web,注册医院审核驳回,id2249,id2249-4,sit,on,202309072 case_tag:api,mdm-web,注册医院审核驳回,id2249,id2249-5,sit,on,202309072
主数据平台:注册医院审核驳回 主数据平台:注册医院审核驳回
""" """
from common.common_func import commonFuc from common.common_func import commonFuc
......
# -*- encoding=utf8 -*- # -*- encoding=utf8 -*-
from common.timeUtils import timeUtils from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
__author__ = "xiaohesheng" __author__ = "xiaohesheng"
""" """
...@@ -35,7 +35,7 @@ def Enterprise_audit(): ...@@ -35,7 +35,7 @@ def Enterprise_audit():
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
print(username, password) print(username, password)
# 获取token和projectCode # 获取token和projectCode
token, projectCode, uxid, corpId = login_system(username, password).get_token() token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 获取请求头信息 # 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2", headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token, commonFuc().get_business_data(module, "json_contentType"), token,
...@@ -108,7 +108,7 @@ def p_m_a(): ...@@ -108,7 +108,7 @@ def p_m_a():
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
print(username, password) print(username, password)
# 获取token和projectCode # 获取token和projectCode
token, projectCode, uxid, corpId = login_system(username, password).get_token() token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# 分页查询供应商产品数据接口 # 分页查询供应商产品数据接口
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url")
...@@ -224,6 +224,5 @@ def p_m_a(): ...@@ -224,6 +224,5 @@ def p_m_a():
print('username',username) print('username',username)
return username,goodsName,module return username,goodsName,module
# p_m_a() # p_m_a()
from common.timeUtils import timeUtils
from common.fileUtls import FileUtils
FileUtils().w_info(p_m_a(),'产品新增') FileUtils().w_info(p_m_a(),'产品新增')
...@@ -17,23 +17,34 @@ module = "mdm3-pim" ...@@ -17,23 +17,34 @@ module = "mdm3-pim"
# 登录 # 登录
info = FileUtils().r_info(module,'产品新增') info = FileUtils().r_info(module,'产品新增')
username=info['username'] username=info['username']
goodsname=info['goodsname']
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
print(username, password) print(username, password)
# 获取token和projectCode # 获取token和projectCode
token, projectCode, uxid, corpId = login_system(username, password).get_token() token, projectCode, uxid, corpId,info = login_system(username, password).get_token()
# # 分页查询供应商产品数据接口 # 查询已添加产品数据
# url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "listVoPage_url")
# #
# # 获取请求头信息 # # 获取请求头信息
# headers = commonFuc().get_business_data(module, "json_headers2", headers = commonFuc().get_business_data(module, "json_headers2",
# commonFuc().get_business_data(module, "json_contentType"), token, commonFuc().get_business_data(module, "json_contentType"), token,
# projectCode) projectCode)
# request_body = commonFuc().get_business_data(module, "payload", corpId) request_body = commonFuc().get_business_data(module, "payload10", corpId,goodsname)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('查询已添加产品信息',result)
MGID=commonFuc().analysis_json('id',commonFuc().analysis_json('data',result))
#产品规格申报===============================================
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "submitGoodsSpecsRegist_url")
# #
# # 发送请求 # # 获取请求头信息
# result = commonFuc().http_post(url, request_body, headers) headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
request_body = commonFuc().get_business_data(module, "payload11", MGID,goodsname)
print('request_body',request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('产品规格申报',result)
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById" "updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById"
"getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/" "getGoodsRegistBillDetail_url": "/test2api/mdmService/goodsRegistBill/getGoodsRegistBillDetail/"
"handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/" "handleAuditGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/handleAuditGoodsRegist/"
"submitGoodsSpecsRegist_url": "/test2api/mdmService/goodsRegistBill/submitGoodsSpecsRegist/"
"username": "1679886114521" "username": "1679886114521"
"password": "a123456!" "password": "a123456!"
...@@ -301,7 +302,41 @@ json_headers2: { ...@@ -301,7 +302,41 @@ json_headers2: {
}, },
"version": 1 "version": 1
} }
"payload10": {
"pageNum": 1,
"pageSize": 20,
"queryObject": {
"pid": "",
"provId": "%s",
"goodsName": "%s",
"goodsMfrsName": "",
"isAbroad": "",
"purpose": "",
"mgrLevel": "",
"status": 0
}
}
"payload11": {
"registSourceProject": "h0347",
"goodsRegistVO": {
"id": "%s",
"goodsMfrsId": "p56a4",
"goodsName": "%s"
},
"goodsSpecsRegistVOList": [
{
"goodsGg": "20ml",
"miGoodsGg": "20ml",
"miGoodsXh": "20ml",
"goodsUseUnit": "支",
"mi27code": "123456789012243454",
"udiCode": "12345678901234",
"diType":"0",
"rowNum": 1
}
]
}
"name1": "一次性注射器" "name1": "一次性注射器"
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}} checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None} checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
......
产品新增: 产品新增:
username: 国药集团公司&ms2w username: 国药集团公司T)^Qj
goodsname: 一次性注射器jtwfK goodsname: 一次性注射器uP^fo
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<tr width="600"> <tr width="600">
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分1</td> <td class='details-col-elapsed'>0分0</td>
<td class="details-col-elapsed">100.0%</td> <td class="details-col-elapsed">100.0%</td>
</tr> </tr>
</table> </table>
...@@ -72,9 +72,9 @@ ...@@ -72,9 +72,9 @@
</tr> </tr>
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/注册企业锁定认领审核流程/log.html' target='_blank'>注册企业锁定认领审核流程</a></td> <td class="details-col-elapsed"><a href='../log/产品规格新增和审核通过/log.html' target='_blank'>产品规格新增和审核通过</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">1.268</td> <td class="details-col-elapsed">0.833</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </tr>
......
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