Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
eb1d058f
Commit
eb1d058f
authored
Sep 19, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
e3b2d16c
84eae508
Changes
6
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b0流程七_中心库入库结算_正负结算.air/a_b0流程七_中心库入库结算_正负结算.py
View file @
eb1d058f
...
@@ -220,6 +220,7 @@ def center_warehouse_return():
...
@@ -220,6 +220,7 @@ def center_warehouse_return():
def
main
():
def
main
():
try
:
try
:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
1
))
# 设置登录账号默认权限是1级库
# test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# 先查询所有的部门信息写入文件
# 先查询所有的部门信息写入文件
dept_query_all
()
dept_query_all
()
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b0流程七_中心库入库结算_正负结算_数据库验证.air/a_b0流程七_中心库入库结算_正负结算_数据库验证.py
View file @
eb1d058f
...
@@ -4,6 +4,8 @@ import traceback
...
@@ -4,6 +4,8 @@ import traceback
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
air_case.public1.public1.public1
import
*
from
air_case.public1.public1.public1
import
*
from
common.dateUtils
import
dateUtils
from
common.db.sql.sql_tools
import
get_id
from
common.fileUtls
import
FileUtils
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
from
common.run_cmd_script
import
execute_command
...
@@ -18,6 +20,7 @@ case_tag:api,b6_spd3_core_business_flow_database_check,a_b0流程七_中心库
...
@@ -18,6 +20,7 @@ case_tag:api,b6_spd3_core_business_flow_database_check,a_b0流程七_中心库
python runner_test.py tag id2303-10 debug mdm3
python runner_test.py tag id2303-10 debug mdm3
"""
"""
def
check_mcms_psi_out
(
type
=
2
):
def
check_mcms_psi_out
(
type
=
2
):
print
(
'检查中心库出库单'
)
print
(
'检查中心库出库单'
)
if
type
==
1
:
if
type
==
1
:
...
@@ -39,20 +42,21 @@ def check_mcms_psi_out(type=2):
...
@@ -39,20 +42,21 @@ def check_mcms_psi_out(type=2):
branch_id
,
bill_mode
)
branch_id
,
bill_mode
)
order_no
=
get_id
(
sql
)
order_no
=
get_id
(
sql
)
target_corp_id
=
get_hosid
()
target_corp_id
=
get_hosid
()
target_branch_id
=
get_branch_id
()
target_branch_id
=
None
target_dept_id
=
FileUtils
().
r_info8
(
"b
2_herp3_bs"
,
"所有科室id
"
,
'message
6
'
)[
'
deptid1
'
]
target_dept_id
=
FileUtils
().
r_info8
(
"b
5_spd3_core_business_flow"
,
"供货关系申请2
"
,
'message'
)[
'
e_corpId
'
]
target_dept_name
=
FileUtils
().
r_info8
(
"b
2_herp3_bs"
,
"所有科室name
"
,
'message
6
'
)[
'
deptid1
'
]
target_dept_name
=
FileUtils
().
r_info8
(
"b
5_spd3_core_business_flow"
,
"供货关系申请2
"
,
'message'
)[
'
e_username
'
]
stock_name
=
get_branch_name
()
+
"中心库房"
stock_name
=
get_branch_name
()
+
"中心库房"
target_stock_id
=
get_stockId_fromdb
(
get_branch_name
()
+
'中心库房'
)
target_stock_id
=
get_stockId_fromdb
(
get_branch_name
()
+
'中心库房'
)
target_area_code
=
get_stockAreaId_new_fromDb
(
target_dept_name
,
1
)
target_area_code
=
get_stockAreaId_new_fromDb
(
target_dept_name
,
1
)
source_id
=
get_id
(
"select id from mcms_psi_dept where target_branch_id='%s' and stock_kind='CK_TK' order by CREATE_TIME desc LIMIT 1;"
%
branch_id
)
source_id
=
get_id
(
"select id from mcms_psi_dept where target_branch_id='%s' and stock_kind='CK_TK' order by CREATE_TIME desc LIMIT 1;"
%
branch_id
)
source_no
=
None
source_no
=
None
source_repl_id
=
None
source_repl_id
=
None
source_corp_id
=
get_hosid
()
source_corp_id
=
get_hosid
()
source_branch_id
=
get_branch_id
()
source_branch_id
=
get_branch_id
()
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
source_stock_id
=
get_stockId_fromdb
(
source_dept_name
+
'库房'
)
source_stock_id
=
get_stockId_fromdb
(
source_dept_name
+
'库房'
)
source_area_code
=
get_stockAreaId_new_fromDb
(
source_dept_name
,
2
)
source_area_code
=
get_stockAreaId_new_fromDb
(
source_dept_name
,
2
)
accounter
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
accounter
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
account_date
=
get_create_time
(
"select account_date from mcms_psi where id='%s';"
%
id
)
account_date
=
get_create_time
(
"select account_date from mcms_psi where id='%s';"
%
id
)
...
@@ -64,11 +68,12 @@ def check_mcms_psi_out(type=2):
...
@@ -64,11 +68,12 @@ def check_mcms_psi_out(type=2):
else
:
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
pickBillId
=
get_PICK_id_KS_TK
(
branch_id
,
bill_mode
)
pickBillId
=
get_PICK_id_KS_TK
(
branch_id
,
bill_mode
)
pickOrderNo
=
get_id
(
"select order_no from mcms_pick where id='%s';"
%
pickBillId
)
pickOrderNo
=
get_id
(
"select order_no from mcms_pick where id='%s';"
%
pickBillId
)
planBillId
=
get_planBillId
(
hos_goods_id
)
planBillId
=
get_planBillId
(
hos_goods_id
)
psiOutBillId
=
get_id
(
"select id from mcms_psi_dept where target_branch_id='%s' and stock_kind='CK_TK' order by CREATE_TIME desc LIMIT 1;"
%
branch_id
)
psiOutBillId
=
get_id
(
psiOutOrderNo
=
get_id
(
"select order_no from mcms_psi_dept where id='%s';"
%
psiOutBillId
)
"select id from mcms_psi_dept where target_branch_id='%s' and stock_kind='CK_TK' order by CREATE_TIME desc LIMIT 1;"
%
branch_id
)
psiOutOrderNo
=
get_id
(
"select order_no from mcms_psi_dept where id='%s';"
%
psiOutBillId
)
buyOrderNo
=
get_buyOrderNo
(
branch_id
,
bill_mode
)
buyOrderNo
=
get_buyOrderNo
(
branch_id
,
bill_mode
)
purOrderNo
=
get_purOrderNo
(
branch_id
,
bill_mode
)
purOrderNo
=
get_purOrderNo
(
branch_id
,
bill_mode
)
...
@@ -87,16 +92,15 @@ def check_mcms_psi_out(type=2):
...
@@ -87,16 +92,15 @@ def check_mcms_psi_out(type=2):
last_modified
=
get_create_time
(
"select last_modified from mcms_psi where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi where id='%s';"
%
id
)
last_modified_user
=
create_user
last_modified_user
=
create_user
check_mcms_psi_batch_out2
(
id
,
type
,
order_no
,
source_id
)
check_mcms_psi_batch_out2
(
id
,
type
,
order_no
,
source_id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_psi_out_091
3
'
,
id
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_psi_out_091
8
'
,
id
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
order_no
,
target_corp_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
accounter
,
account_date
,
,
source_stock_id
,
source_area_code
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
pickOrderNo
,
pickBillId
,
psiOutBillId
,
psiOutOrderNo
,
psiInBillId
,
psiInOrderNo
,
psiOutBillId
,
psiOutOrderNo
,
psiInBillId
,
psiInOrderNo
,
create_user
create_user
,
create_time
,
last_modified
,
last_modified_user
)
,
create_time
,
last_modified
,
last_modified_user
)
...
@@ -134,17 +138,17 @@ def check_mcms_psi_batch_out2(DR_ID, type, order_no, source_id1):
...
@@ -134,17 +138,17 @@ def check_mcms_psi_batch_out2(DR_ID, type, order_no, source_id1):
print
(
'actual'
,
actual
)
print
(
'actual'
,
actual
)
batch_main_key
=
get_id
(
"select id from mcms_psi_batch where pid='%s';"
%
DR_ID
)
batch_main_key
=
get_id
(
"select id from mcms_psi_batch where pid='%s';"
%
DR_ID
)
pid
=
DR_ID
pid
=
DR_ID
# order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
order_no
=
get_id
(
"select order_no from mcms_psi_batch where id='%s';"
%
batch_main_key
)
sql
=
"select id from mcms_psi_dept where target_branch_id='%s' and stock_kind='CK_TK' order by CREATE_TIME desc LIMIT 1;"
%
branch_id
source_detail_id
=
get_id
(
sql
)
source_detail_id
=
source_detail_id
+
'0001'
pick_detail_id
=
None
if
type
==
1
:
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
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'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
sql
=
"select id from mcms_pick_detail where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
hos_goods_id
source_detail_id
=
get_id
(
sql
)
pick_detail_id
=
source_detail_id
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
pkg_def_id
=
get_pkg_def_id
(
hos_goods_id
)
pkg_def_id
=
get_pkg_def_id
(
hos_goods_id
)
...
@@ -169,17 +173,17 @@ def check_mcms_psi_batch_out2(DR_ID, type, order_no, source_id1):
...
@@ -169,17 +173,17 @@ def check_mcms_psi_batch_out2(DR_ID, type, order_no, source_id1):
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_time
=
get_create_time
(
"select create_time from mcms_psi_batch where pid='%s';"
%
DR_ID
)
create_time
=
get_create_time
(
"select create_time from mcms_psi_batch where pid='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_batch where pid='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_batch where pid='%s';"
%
DR_ID
)
last_modified_user
=
None
last_modified_user
=
create_user
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_batch_out_0913'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
'mcms_psi_batch_out_0918'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
last_modified_user
last_modified
,
last_modified_user
)
)
print
(
'expected'
,
expected
)
print
(
'expected'
,
expected
)
print
(
'aaaaaaaaaaaaaaaaa'
)
print
(
'aaaaaaaaaaaaaaaaa'
)
actual_value1
=
get_process_list2
(
actual
)
actual_value1
=
get_process_list2
(
actual
)
...
@@ -200,6 +204,670 @@ def check_mcms_psi_batch_out2(DR_ID, type, order_no, source_id1):
...
@@ -200,6 +204,670 @@ def check_mcms_psi_batch_out2(DR_ID, type, order_no, source_id1):
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_out_un_balance
(
type
=
1
):
print
(
'===检查待结算数据,如果没有数据,说明结算点功能有问题===='
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
sql
=
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
)
id
=
get_id
(
sql
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
sub_prov_id
=
prov_id
settle_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_un_balance where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_un_balance where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
from_id
=
get_id
(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
account_date
=
get_account_date1
(
"select account_date from mcms_out_un_balance where id='%s';"
%
id
)
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_un_balance where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_un_balance where id='%s';"
%
id
)
last_modified_user
=
create_user
goods_code
=
get_goods_code1
(
hos_goods_id
)
charge_dept_id
=
settle_dept_id
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_un_balance_0918'
,
id
,
hos_id
,
branch_id
,
prov_id
,
sub_prov_id
,
settle_dept_id
,
distr_detail_id
,
hos_batch_id
,
bar_id
,
bar_code
,
from_id
,
from_order_no
,
account_date
,
account_user_id
,
hos_goods_id
,
goods_code
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
charge_dept_id
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_out_balance
(
type
=
1
,
OBh_ID
=
""
):
print
(
'===检查结算数据======'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_balance where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
sql
=
"select id from mcms_out_balance where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
)
id
=
get_id
(
sql
)
if
id
==
OBh_ID
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
order_no
=
get_id
(
"select order_no from mcms_out_balance where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
))
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
prov_name
=
get_prov_name
()
sub_prov_id
=
prov_id
settle_dept_id
=
None
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_un_balance where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_un_balance where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
from_id
=
get_id
(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
settle_start_time
=
get_account_date1
(
"select settle_start_time from mcms_out_balance where id='%s';"
%
id
)
settle_end_time
=
get_account_date1
(
"select settle_end_time from mcms_out_balance where id='%s';"
%
id
)
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_balance where id='%s';"
%
id
)
last_modified_user
=
create_user
goods_code
=
get_goods_code1
(
hos_goods_id
)
charge_dept_id
=
settle_dept_id
settle_month
=
get_id
(
"select settle_month from mcms_out_balance where id='%s';"
%
id
)
year
,
month
=
dateUtils
().
get_year_month
(
dateUtils
().
get_current_time
())
if
month
<
10
:
month
=
"0"
+
str
(
month
)
year_month
=
str
(
year
)
+
str
(
month
)
if
year_month
==
settle_month
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_0918'
,
id
,
order_no
,
branch_id
,
hos_id
,
prov_id
,
prov_name
,
settle_month
,
settle_start_time
,
settle_end_time
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# 检查结算表子表数据
check_mcms_out_balance_detail
(
type
,
id
)
check_mcms_out_balance_detail2
(
type
,
id
)
def
check_mcms_out_balance_detail
(
type
=
1
,
pid
=
""
):
print
(
'===检查结算数据子表======'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;;"
%
(
pid
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
sql
=
"select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;"
%
(
pid
)
id
=
get_id
(
sql
)
sql
=
"select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
pid
)
id2
=
get_id
(
sql
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
prov_name
=
get_prov_name
()
sub_prov_id
=
prov_id
settle_dept_id
=
None
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
from_id
=
get_id
(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified_user
=
create_user
# goods_code = get_goods_code1(hos_goods_id)
# charge_dept_id = settle_dept_id
# settle_month = get_id("select settle_month from mcms_out_balance where id='%s';" % id)
# year, month = dateUtils().get_year_month(dateUtils().get_current_time())
out_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
out_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid1'
]
sub_prov_name
=
prov_name
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
un_settle_id
=
get_id
(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_0918_1'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
hos_id
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_out_balance_detail2
(
type
=
1
,
pid
=
""
):
print
(
'===检查结算数据子表======'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_balance_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
pid
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
# sql = "select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;" % (
# pid)
# id = get_id(sql)
sql
=
"select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
pid
)
id
=
get_id
(
sql
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
prov_name
=
get_prov_name
()
sub_prov_id
=
prov_id
settle_dept_id
=
None
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
get_id
(
"select bar_id from mcms_out_balance_detail where id='%s';"
%
(
id
))
bar_code
=
get_id
(
"select bar_code from mcms_out_balance_detail where id='%s';"
%
(
id
))
from_id
=
get_id
(
"select from_id from mcms_out_balance_detail where id='%s';"
%
(
id
))
if
check_batch_id
(
from_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where id='%s';"
%
(
from_id
))
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified_user
=
create_user
out_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
out_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid1'
]
sub_prov_name
=
prov_name
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
un_settle_id
=
get_id
(
"select un_settle_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_un_balance_id
(
un_settle_id
):
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_0918_2'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
hos_id
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_out_balance_approve_after
(
type
=
1
,
OBh_ID
=
""
):
print
(
'===检查结算数据======'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_balance where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
sql
=
"select id from mcms_out_balance where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
)
id
=
get_id
(
sql
)
if
id
==
OBh_ID
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
order_no
=
get_id
(
"select order_no from mcms_out_balance where branch_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
))
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
prov_name
=
get_prov_name
()
sub_prov_id
=
prov_id
settle_dept_id
=
None
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_un_balance where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_un_balance where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
from_id
=
get_id
(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
settle_start_time
=
get_account_date1
(
"select settle_start_time from mcms_out_balance where id='%s';"
%
id
)
settle_end_time
=
get_account_date1
(
"select settle_end_time from mcms_out_balance where id='%s';"
%
id
)
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_balance where id='%s';"
%
id
)
last_modified_user
=
create_user
goods_code
=
get_goods_code1
(
hos_goods_id
)
charge_dept_id
=
settle_dept_id
settle_month
=
get_id
(
"select settle_month from mcms_out_balance where id='%s';"
%
id
)
year
,
month
=
dateUtils
().
get_year_month
(
dateUtils
().
get_current_time
())
if
month
<
10
:
month
=
"0"
+
str
(
month
)
year_month
=
str
(
year
)
+
str
(
month
)
if
year_month
==
settle_month
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
check_user
=
create_user
check_time
=
get_create_time
(
"select check_time from mcms_out_balance where id='%s';"
%
id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_0919'
,
id
,
order_no
,
branch_id
,
hos_id
,
prov_id
,
prov_name
,
settle_month
,
settle_start_time
,
settle_end_time
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
check_user
,
check_time
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# 检查结算表子表数据
check_mcms_out_balance_detail_approve_after
(
type
,
id
)
check_mcms_out_balance_detail_approve_after2
(
type
,
id
)
def
check_mcms_out_balance_detail_approve_after
(
type
=
1
,
pid
=
""
):
print
(
'===检查结算数据子表======'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;;"
%
(
pid
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
sql
=
"select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;"
%
(
pid
)
id
=
get_id
(
sql
)
sql
=
"select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
pid
)
id2
=
get_id
(
sql
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
prov_name
=
get_prov_name
()
sub_prov_id
=
prov_id
settle_dept_id
=
None
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
from_id
=
get_id
(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
hos_goods_id
))
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified_user
=
create_user
# goods_code = get_goods_code1(hos_goods_id)
# charge_dept_id = settle_dept_id
# settle_month = get_id("select settle_month from mcms_out_balance where id='%s';" % id)
# year, month = dateUtils().get_year_month(dateUtils().get_current_time())
out_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
out_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid1'
]
sub_prov_name
=
prov_name
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
un_settle_id
=
get_id
(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_0919_1'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
hos_id
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_out_balance_detail_approve_after2
(
type
=
1
,
pid
=
""
):
print
(
'===检查结算数据子表======'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
branch_id
=
get_branch_id
()
sql
=
"select * from mcms_out_balance_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
pid
)
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
print
(
'actual'
,
actual
)
# sql = "select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;" % (
# pid)
# id = get_id(sql)
sql
=
"select id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
pid
)
id
=
get_id
(
sql
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
prov_name
=
get_prov_name
()
sub_prov_id
=
prov_id
settle_dept_id
=
None
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_batch_id
(
hos_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
bar_id
=
get_id
(
"select bar_id from mcms_out_balance_detail where id='%s';"
%
(
id
))
bar_code
=
get_id
(
"select bar_code from mcms_out_balance_detail where id='%s';"
%
(
id
))
from_id
=
get_id
(
"select from_id from mcms_out_balance_detail where id='%s';"
%
(
id
))
if
check_batch_id
(
from_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
from_order_no
=
get_id
(
"select order_no from mcms_psi_batch where id='%s';"
%
(
from_id
))
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_out_balance_detail where id='%s';"
%
id
)
last_modified_user
=
create_user
out_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
out_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid1'
]
sub_prov_name
=
prov_name
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
un_settle_id
=
get_id
(
"select un_settle_id from mcms_out_balance_detail where id='%s';"
%
id
)
if
check_un_balance_id
(
un_settle_id
):
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_0919_2'
,
id
,
pid
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
out_dept_id
,
out_dept_name
,
account_date
,
from_id
,
from_order_no
,
hos_goods_id
,
bar_id
,
bar_code
,
distr_detail_id
,
hos_batch_id
,
un_settle_id
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
hos_id
)
# 对比预期值和实际值是否一致
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
pro_path
=
commonFuc
().
get_pro_path2
()
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
print
(
'pro_path'
,
pro_path
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b0流程七_中心库入库结算_正负结算.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b0流程七_中心库入库结算_正负结算.air'
)
...
@@ -207,23 +875,31 @@ using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b0流程七_中心库
...
@@ -207,23 +875,31 @@ using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b0流程七_中心库
from
a_b0流程七_中心库入库结算_正负结算
import
center_warehouse_return
from
a_b0流程七_中心库入库结算_正负结算
import
center_warehouse_return
try
:
try
:
# test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是1级库
# 先查询所有的部门信息写入文件
# # 先查询所有的部门信息写入文件
dept_query_all
()
# dept_query_all()
# 设置库房人员,根据传入的科室id和科室名称来设置库房
# # 设置库房人员,根据传入的科室id和科室名称来设置库房
# 中心库type=1 二级type=2三级type=3
# # 参数说明:中心库type=1 二级库type=2三级库type=3
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid3'
],
3
)
# FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2)
center_warehouse_return
()
#中心库退货
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],
time
.
sleep
(
6
)
# FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'], 3)
check_mcms_psi_out
(
1
)
#验证出库单数据据数据(低值)
# center_warehouse_return() # 中心库退货
OBh_ID
=
settle
()
# 生成结算单
# # 检查待结算数据
# check_mcms_out_un_balance()
# time.sleep(6)
# OBh_ID = settle() # 生成结算单
# print(OBh_ID)
# print(OBh_ID)
# 调用审批结算单
# time.sleep(6)
approval_center
(
OBh_ID
)
# check_mcms_out_balance(1, OBh_ID)#结算审批前的结算数据
invoice
(
3
,
OBh_ID
)
#type=2 传递结算单号,外网查询开票
# # 调用审批结算单
# approval_center(OBh_ID)
# time.sleep(6)
check_mcms_out_balance_approve_after
(
1
,
'OBh0347202409190004'
)
# 结算审批后的结算数据
time
.
sleep
(
3
)
invoice
(
3
,
OBh_ID
)
# type=2 传递结算单号,外网查询开票
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
Exception
as
e
:
except
Exception
as
e
:
# 打印错误信息
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
print
(
f
"发生错误:
{
e
}
"
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
\ No newline at end of file
air_case/public1/public1/public1.py
View file @
eb1d058f
...
@@ -145,8 +145,10 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
...
@@ -145,8 +145,10 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
if
code
>
=
0
:
if
code
=
=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
commonFuc
().
check_text_exist
(
0
,
result
)
elif
code
==
'14070024'
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
else
:
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
approval_allProcessPage
(
OBH_ID
=
'OBhxxxxxxxxxxxxxxx'
):
def
approval_allProcessPage
(
OBH_ID
=
'OBhxxxxxxxxxxxxxxx'
):
...
@@ -274,7 +276,7 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
...
@@ -274,7 +276,7 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
if
code
>
=
0
:
if
code
=
=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
commonFuc
().
check_text_exist
(
0
,
result
)
elif
code
==
'14070024'
:
elif
code
==
'14070024'
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
commonFuc
().
check_text_exist
(
'error'
,
result
)
...
@@ -379,13 +381,20 @@ def settle(): # 结算相关
...
@@ -379,13 +381,20 @@ def settle(): # 结算相关
branch_id
=
FileUtils
().
r_info
(
'b2_herp3_bs'
,
'院区新增'
)[
"branch_id"
]
branch_id
=
FileUtils
().
r_info
(
'b2_herp3_bs'
,
'院区新增'
)[
"branch_id"
]
hosId
=
branch_id
[
0
:
5
]
hosId
=
branch_id
[
0
:
5
]
provId
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_corpId"
]
provId
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_corpId"
]
accountDate1
=
timeUtils
().
get_time_hms
(
5
)
# accountDate1 = timeUtils().get_time_hms(5)
accountDate1
=
timeUtils
().
get_time_add
(
-
30
,
2
)
accountDate2
=
timeUtils
().
get_time_hms
(
5
)
accountDate2
=
timeUtils
().
get_time_hms
(
5
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload7"
,
provId
,
accountDate1
,
accountDate2
,
hosId
,
hosId
)
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload7"
,
hos_goods_id
,
provId
,
accountDate1
,
accountDate2
,
hosId
,
hosId
)
print
(
'生成结算单列表查询request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
print
(
'
生成结算单列表查询
result'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
total
<
2
:
print
(
'待结算数据小于两条,检查待结算数据,暂时返回'
)
return
# 取结算单id
# 取结算单id
list_a
=
[]
list_a
=
[]
for
i
in
data1
:
for
i
in
data1
:
...
...
common/db/sql/sql_tools.py
View file @
eb1d058f
...
@@ -194,7 +194,19 @@ def get_account_date(sql):
...
@@ -194,7 +194,19 @@ def get_account_date(sql):
db
.
close
()
db
.
close
()
return
new_str1
return
new_str1
def
get_account_date1
(
sql
):
db
,
cursor
=
get_sql_conn
()
cursor
.
execute
(
sql
)
results
=
cursor
.
fetchone
()
str1
=
str
(
results
)
new_str1
=
str1
.
replace
(
',)'
,
''
)
new_str1
=
new_str1
.
replace
(
'(d'
,
'd'
)
# new_str1 = new_str1.replace(',', '')
# new_str1 = new_str1.replace("'", '')
# print(new_str1)
cursor
.
close
()
db
.
close
()
return
new_str1
def
set_goods_coding_type
(
branch_id
):
# 设置科室产品为赋码管理0为赋码管理1是非赋码
def
set_goods_coding_type
(
branch_id
):
# 设置科室产品为赋码管理0为赋码管理1是非赋码
db
,
cursor
=
get_sql_conn
()
db
,
cursor
=
get_sql_conn
()
sql
=
"UPDATE mcms_dept_goods_info SET coding_type = 0 WHERE branch_id=%s;"
sql
=
"UPDATE mcms_dept_goods_info SET coding_type = 0 WHERE branch_id=%s;"
...
@@ -418,7 +430,17 @@ def check_batch_id(source_batch_id):
...
@@ -418,7 +430,17 @@ def check_batch_id(source_batch_id):
else
:
else
:
return
False
return
False
def
check_distr_detail_id
(
source_distr_detail_id
):
db
,
cursor
=
get_sql_conn
()
cursor
.
execute
(
"select id from hdi_distr_detail where id='%s'"
%
(
source_distr_detail_id
))
results1
=
cursor
.
fetchall
()
cursor
.
close
()
db
.
close
()
batch_id
=
process_tuple
(
results1
)
if
batch_id
!=
None
:
return
True
else
:
return
False
def
check_barcode_id
(
barcode_id
):
def
check_barcode_id
(
barcode_id
):
db
,
cursor
=
get_sql_conn
()
db
,
cursor
=
get_sql_conn
()
cursor
.
execute
(
"select id from hdi_barcode where id='%s'"
%
(
barcode_id
))
cursor
.
execute
(
"select id from hdi_barcode where id='%s'"
%
(
barcode_id
))
...
@@ -430,7 +452,17 @@ def check_barcode_id(barcode_id):
...
@@ -430,7 +452,17 @@ def check_barcode_id(barcode_id):
return
True
return
True
else
:
else
:
return
False
return
False
def
check_un_balance_id
(
un_balance_id
):
db
,
cursor
=
get_sql_conn
()
cursor
.
execute
(
"select id from mcms_out_un_balance where id='%s'"
%
(
un_balance_id
))
results1
=
cursor
.
fetchall
()
cursor
.
close
()
db
.
close
()
batch_id
=
process_tuple
(
results1
)
if
batch_id
!=
None
:
return
True
else
:
return
False
def
get_PICK_id
(
branch_id
,
bill_mode
):
def
get_PICK_id
(
branch_id
,
bill_mode
):
sql
=
"select id from mcms_pick where branch_id='%s' and bill_mode='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
sql
=
"select id from mcms_pick where branch_id='%s' and bill_mode='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
...
...
data/b5_spd3_core_business_flow/data
View file @
eb1d058f
...
@@ -96,7 +96,7 @@ json_headers2: {
...
@@ -96,7 +96,7 @@ json_headers2: {
"payload5": {"batchList":[{"viewId":"%s","shelfCode":"%s"}],"sourceId":"%s","sourceType":"%s","sourceVersion":"%s","targetDeptId":"%s","targetDeptName":"%s","targetAreaCode":"%s","targetAreaName":"%s","pkgTaskId":null}
"payload5": {"batchList":[{"viewId":"%s","shelfCode":"%s"}],"sourceId":"%s","sourceType":"%s","sourceVersion":"%s","targetDeptId":"%s","targetDeptName":"%s","targetAreaCode":"%s","targetAreaName":"%s","pkgTaskId":null}
"payload6": {"pageNum":1,"pageSize":50,"orderBy":"","queryObject":{"branchId":"%s","taskType":0,"stockKind":"","sourceOrgName":"","hosId":"%s"}}
"payload6": {"pageNum":1,"pageSize":50,"orderBy":"","queryObject":{"branchId":"%s","taskType":0,"stockKind":"","sourceOrgName":"","hosId":"%s"}}
"payload7": {"pageNum":1,"pageSize":50,"queryObject":{"goodsInfo":"","provId":"%s",barCodeInfo":"","fromOrderNo":"","purModeList":["10"],"accountDate1":"%s","accountDate2":"%s","tbStatus":0,"hosId":"%s"},"hosId":"%s"}
"payload7": {"pageNum":1,"pageSize":50,"queryObject":{"goodsInfo":"
%s
","provId":"%s",barCodeInfo":"","fromOrderNo":"","purModeList":["10"],"accountDate1":"%s","accountDate2":"%s","tbStatus":0,"hosId":"%s"},"hosId":"%s"}
"payload8": {"genTypeEnum":"0","queryInfo":{"pageNum":1,"pageSize":50,"queryObject":{"goodsInfo":"","barCodeInfo":"","fromOrderNo":"","purModeList":[],"accountDate1":"","accountDate2":"","tbStatus":0,"hosId":"%s"}},"idList":["%s","%s"],"hosId":"%s"}
"payload8": {"genTypeEnum":"0","queryInfo":{"pageNum":1,"pageSize":50,"queryObject":{"goodsInfo":"","barCodeInfo":"","fromOrderNo":"","purModeList":[],"accountDate1":"","accountDate2":"","tbStatus":0,"hosId":"%s"}},"idList":["%s","%s"],"hosId":"%s"}
"payload9": {"pageNum":1,"pageSize":50,"queryObject":{"invoiceNumber":"","invoiceDate1":"%s","invoiceDate2":"%s","tbStatus":"10","hosId":"%s"},"hosId":"%s"}
"payload9": {"pageNum":1,"pageSize":50,"queryObject":{"invoiceNumber":"","invoiceDate1":"%s","invoiceDate2":"%s","tbStatus":"10","hosId":"%s"},"hosId":"%s"}
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
eb1d058f
...
@@ -346,7 +346,35 @@
...
@@ -346,7 +346,35 @@
"mcms_psi_dept_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","rec_type":"YND","psi_flag":-1,"psi_kind":"203","stock_kind":"CK_TK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"自动化测试","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":null,"tb_status":40,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":2,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
"mcms_psi_dept_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","rec_type":"YND","psi_flag":-1,"psi_kind":"203","stock_kind":"CK_TK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"自动化测试","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":null,"tb_status":40,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":2,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
#跟台中心库出库子表
#跟台中心库出库子表
"mcms_psi_batch_out_0913": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":%s,"pur_mode":
2
0,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":%s,"version":0}'
"mcms_psi_batch_out_0913": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":%s,"pur_mode":
1
0,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":%s,"version":0}'
#跟台中心库出库主表
#跟台中心库出库主表
"check_mcms_psi_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","rec_type":"YND","psi_flag":1,"psi_kind":"103","stock_kind":"RK_TK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"自动化测试","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","remark":null,"tb_status":30,"accounter":"%s","account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}","reject_time":null,"reject_remark":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_user":null,"initial_order":null,"source_type":"SG","reject_reason":null,"receipt_status":0}'
"check_mcms_psi_out_0913": '{"id":"%s","order_no":"%s","bill_mode":"25","rec_type":"YND","psi_flag":1,"psi_kind":"103","stock_kind":"RK_TK","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"自动化测试","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","remark":null,"tb_status":30,"accounter":"%s","account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}","reject_time":null,"reject_remark":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_user":null,"initial_order":null,"source_type":"SG","reject_reason":null,"receipt_status":0}'
#中心库退货出库子表
"mcms_psi_batch_out_0918": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":"%s","pur_mode":10,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("100.00"),"unit_name":"100支/100","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":1,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":0}'
#中心库退货出库主表
"check_mcms_psi_out_0918": '{"id":"%s","order_no":"%s","bill_mode":"16","rec_type":"YND","psi_flag":-1,"psi_kind":"299","stock_kind":"CK_TH","target_corp_id":"%s","target_branch_id":null,"target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":null,"target_area_name":null,"source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"%s","remark":"","tb_status":%s,"accounter":"%s","account_date":%s,"bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}","reject_time":null,"reject_remark":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_user":null,"initial_order":null,"source_type":"SG","reject_reason":null,"receipt_status":1}'
#中心库退货出库_待结算数据主表
"check_mcms_out_un_balance_0918": '{"id": "%s", "hos_id": "%s", "branch_id": "%s", "tb_status": 0, "prov_id": "%s", "sub_prov_id": "%s", "settle_dept_id": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "bar_id": "%s", "bar_code": "%s", "pur_mode": 10, "from_id": "%s", "from_order_no": "%s", "from_table": "mcms_psi_batch", "from_kind": "CK_TH", "account_date": %s, "account_user_id": "%s", "hos_goods_id": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "settle_un_qty": Decimal("-100.00"), "settle_amount": Decimal("-9999.990000"), "hos_unit": "支", "contract_id": None, "normal_contract_id": None, "normal_detail_id": None, "confirm_status": 0, "temp_purchase": 0, "settle_type": 1, "settle_way": 0, "fcat_id": None, "fcat_name": None, "charging_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "online_kind": "10", "charge_dept_id": "%s"}'
#中心库退货出库_结算数据主表
"check_mcms_out_balance_0918": '{"id": "%s", "order_no": "%s", "branch_id": "%s", "hos_id": "%s", "prov_id": "%s", "prov_name": "%s", "settle_dept_id": None, "tb_status": 0, "sum_row": 2, "settle_amount": Decimal("0.000000"), "settle_way": 0, "settle_month": "%s", "settle_start_time": %s, "settle_end_time": %s, "remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "check_msg": None, "settle_qty": Decimal("0.0000"), "check_user": None, "check_time": None}'
#中心库退货出库_结算数据子表
"check_mcms_out_balance_detail_0918_1": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("-100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("-9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
"check_mcms_out_balance_detail_0918_2": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
#中心库退货出库_结算数据主表_审批后
"check_mcms_out_balance_0919": '{"id": "%s", "order_no": "%s", "branch_id": "%s", "hos_id": "%s", "prov_id": "%s", "prov_name": "%s", "settle_dept_id": None, "tb_status": 20, "sum_row": 2, "settle_amount": Decimal("0.000000"), "settle_way": 0, "settle_month": "%s", "settle_start_time": %s, "settle_end_time": %s, "remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "check_msg": "22", "settle_qty": Decimal("0.0000"), "check_user": "%s", "check_time": %s}'
#中心库退货出库_结算数据子表_审批后
"check_mcms_out_balance_detail_0919_1": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("-100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("-9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
"check_mcms_out_balance_detail_0919_2": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment