Commit d4a49064 authored by 肖 和生's avatar 肖 和生
Browse files

Merge remote-tracking branch 'remotes/origin/master' into core_flow

parents 3671452b cbc26e24
...@@ -52,5 +52,15 @@ def branch_goods_add(): ...@@ -52,5 +52,15 @@ def branch_goods_add():
# total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result)) # total=commonFuc().analysis_json('total',commonFuc().analysis_json('data',result))
# checkDict=commonFuc().get_business_data(module,'checkDict14') # checkDict=commonFuc().get_business_data(module,'checkDict14')
# data=commonFuc().analysis_json('data',result) # data=commonFuc().analysis_json('data',result)
commonFuc().check_text_exist('spd3:cache:herp:progress:branch-goods-import',result) # commonFuc().check_text_exist('spd3:cache:herp:progress:branch-goods-import',result)
code=commonFuc().analysis_json('code',result)
if code==14030007:
print('院区产品正在导入中,请勿重复导入')
elif code==0:
print('产品导入成功')
commonFuc().check_text_exist_result_text('succees', 'succees')
elif code==14030011:
print('没有可导入的产')
else:
commonFuc().check_text_exist_result_text('error', 'succees')
branch_goods_add() branch_goods_add()
...@@ -391,6 +391,8 @@ def main(): ...@@ -391,6 +391,8 @@ def main():
# delData().Del_reporter_data() # 删除报表数据 # delData().Del_reporter_data() # 删除报表数据
#==============删除业务数据和报表数据 #==============删除业务数据和报表数据
test1()#参数2是新增院区后缀为6位数的参数1是老模式 test1()#参数2是新增院区后缀为6位数的参数1是老模式
#20241018,外网导入产品默认为停用状态,设置了一个参数
#select * from sys_config t where t.id ='goodsCheckAuditSpd3';
test2()# 科室添加产品信息(产品是从外网同步过来的) test2()# 科室添加产品信息(产品是从外网同步过来的)
dept_query_all()# 科室查询,将科室id写入文件中 dept_query_all()# 科室查询,将科室id写入文件中
grants_user()#给用户授权 grants_user()#给用户授权
......
...@@ -19,18 +19,27 @@ import sys ...@@ -19,18 +19,27 @@ import sys
def check_mcms_goods_info(type=1): def check_mcms_goods_info(type=1):
print('检查审批前的产品信息') print('检查审批前的产品信息')
if type == 1: try:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] if type == 1:
elif type == 2: hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] elif type == 2:
elif type == 3: hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] elif type == 3:
elif type == 4: hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message4')["hosGoodsId"] elif type == 4:
elif type == 5: hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message4')["hosGoodsId"]
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message5')["hosGoodsId"] elif type == 5:
else: hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message5')["hosGoodsId"]
else:
hos_goods_id = 'hos_goods_id'
if hos_goods_id==None:
print('产品信息还未写入文件,请检查脚本')
sys.exit(0)
print('产品id是',hos_goods_id)
except Exception as e:
print("发生异常:", str(e))
hos_goods_id = 'hos_goods_id' hos_goods_id = 'hos_goods_id'
sys.exit(0)
branch_id = get_branch_id() branch_id = get_branch_id()
sql1 = "select * from spd_ybtest_hdi.mcms_goods_info where id='%s';" % hos_goods_id sql1 = "select * from spd_ybtest_hdi.mcms_goods_info where id='%s';" % hos_goods_id
actual = check_mcms_pur_sql(sql1) actual = check_mcms_pur_sql(sql1)
...@@ -158,24 +167,24 @@ try: ...@@ -158,24 +167,24 @@ try:
add_goods() # 直销高值 add_goods() # 直销高值
select1('message1') select1('message1')
time.sleep(6) time.sleep(6)
check_mcms_goods_info(1)#审核前的产品信息 # check_mcms_goods_info(1)#审核前的产品信息
apply()#审批产品 apply()#审批产品
time.sleep(6) time.sleep(6)
check_mcms_goods_info_after_approval(1) #审核后的产品信息 # check_mcms_goods_info_after_approval(1) #审核后的产品信息
add_goods1() # 直销低值 add_goods1() # 直销低值
select1('message2') select1('message2')
time.sleep(6) time.sleep(6)
check_mcms_goods_info(2) # 审核前的产品信息 # check_mcms_goods_info(2) # 审核前的产品信息
apply() apply()
time.sleep(6) time.sleep(6)
check_mcms_goods_info_after_approval(2) #审核后的产品信息 # check_mcms_goods_info_after_approval(2) #审核后的产品信息
add_goods2() # 直销试剂 add_goods2() # 直销试剂
select1('message3') select1('message3')
time.sleep(6) time.sleep(6)
check_mcms_goods_info(3) # 审核前的产品信息 # check_mcms_goods_info(3) # 审核前的产品信息
apply() apply()
time.sleep(6) time.sleep(6)
check_mcms_goods_info_after_approval(3) # 审核后的产品信息 # check_mcms_goods_info_after_approval(3) # 审核后的产品信息
add_goods3() # 集配 add_goods3() # 集配
select1('message4') select1('message4')
apply() apply()
...@@ -184,6 +193,12 @@ try: ...@@ -184,6 +193,12 @@ try:
apply() apply()
# 20240618外网在配送的时候增加了DI验证,加入维护di的脚本 # 20240618外网在配送的时候增加了DI验证,加入维护di的脚本
supplyProvHosGoods_add_DI() supplyProvHosGoods_add_DI()
# 202410.18因脚本运行时到检查产品数据库数据时,未知原因脚本出现错乱问题
#修改为检查审批后的产品信息
# 审核后的产品信息
check_mcms_goods_info_after_approval(1)
check_mcms_goods_info_after_approval(2)
check_mcms_goods_info_after_approval(3)
# ==============分割线 暂时注释=============== # ==============分割线 暂时注释===============
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except Exception as e: except Exception as e:
......
...@@ -541,3 +541,5 @@ try: ...@@ -541,3 +541,5 @@ try:
except Exception as e: except Exception as e:
print("发生异常:", str(e)) print("发生异常:", str(e))
commonFuc().check_text_exist_result_text('succees', 'error') commonFuc().check_text_exist_result_text('succees', 'error')
print('基础设置出现问题,后续脚本必然无法走通,检查脚本或者数据')
sys.exit(0)
...@@ -68,12 +68,13 @@ class commonFuc(object): ...@@ -68,12 +68,13 @@ class commonFuc(object):
if env == 'on': if env == 'on':
url = 'https://m.meitun.com' url = 'https://m.meitun.com'
elif env == 'pre': elif env == 'pre':
url = 'http://pre-m.meitun.com' url = 'http://220.181.78.12:801'
elif env == 'sita': elif env == 'sita':
url = 'http://sita-m.meitun.com' url = 'http://sita-m.meitun.com'
elif env == "mdm3": # mdm3.0 elif env == "mdm3": # mdm3.0
# url = 'http://sit-m.meitun.com' # url = 'http://sit-m.meitun.com'
url = 'http://spdtest.cmic.com.cn' url = 'http://spdtest.cmic.com.cn'
# url = 'http://220.181.78.12:801'
elif env == "spd2": # spd2.0 elif env == "spd2": # spd2.0
url = "" url = ""
elif env == "od": # 骨科 elif env == "od": # 骨科
......
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