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
1505bee0
Commit
1505bee0
authored
Oct 09, 2024
by
xiao-hesheng
Browse files
流程五脚本提交
parent
e2d80585
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算_数据库验证.air/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算_数据库验证.py
View file @
1505bee0
...
@@ -458,7 +458,7 @@ def check_mcms_psi_batch_in(DR_ID, type, order_no, source_id1):
...
@@ -458,7 +458,7 @@ def check_mcms_psi_batch_in(DR_ID, type, order_no, source_id1):
batch_main_key
=
get_id
(
"select id from mcms_psi_batch where pid='%s' order by create_time desc LIMIT 1;"
%
DR_ID
)
batch_main_key
=
get_id
(
"select id from mcms_psi_batch where pid='%s' order by create_time desc LIMIT 1;"
%
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_dept_batch where pid='%s';" % DR_ID)
source_detail_id
=
source_id1
+
'0001'
source_detail_id
=
get_id
(
"select source_detail_id from mcms_psi_batch where id='%s';"
%
batch_main_key
)
pick_detail_id
=
None
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"
]
...
@@ -480,7 +480,7 @@ def check_mcms_psi_batch_in(DR_ID, type, order_no, source_id1):
...
@@ -480,7 +480,7 @@ def check_mcms_psi_batch_in(DR_ID, type, order_no, source_id1):
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
barcode_id
=
get_id
(
"select barcode_id from mcms_psi_batch where
p
id='%s';"
%
DR_ID
)
barcode_id
=
get_id
(
"select barcode_id from mcms_psi_batch where id='%s';"
%
batch_main_key
)
if
check_barcode_id
(
barcode_id
)
==
True
:
if
check_barcode_id
(
barcode_id
)
==
True
:
print
(
'ok'
)
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
...
@@ -976,8 +976,12 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
...
@@ -976,8 +976,12 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
# 从文件中获取条码信息
# 从文件中获取条码信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
list_a
=
info
[
'list_a'
]
bar_id
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
bar_id
=
get_id
(
"select bar_id from mcms_out_balance_detail where id='%s';"
%
(
bar_code
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
id
))
bar_code
=
get_id
(
"select bar_code from mcms_out_balance_detail where id='%s';"
%
(
id
))
# bar_id = commonFuc().analysis_json('id', list_a)
# bar_code = commonFuc().analysis_json('pkgCodeSee', list_a)
# from_id = get_id(
# 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))
# "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(
# from_order_no = get_id(
...
@@ -1003,7 +1007,7 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
...
@@ -1003,7 +1007,7 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
sub_prov_name
=
prov_name
sub_prov_name
=
prov_name
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
account_date
=
get_account_date1
(
"select account_date from mcms_out_balance_detail where id='%s';"
%
id
)
un_settle_id
=
get_id
(
un_settle_id
=
get_id
(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='
C
K_
TH
' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='
R
K_
YS
' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
hos_goods_id
))
branch_id
,
hos_goods_id
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_out_balance_detail_1009_1'
,
id
,
'check_mcms_out_balance_detail_1009_1'
,
id
,
...
@@ -1135,36 +1139,35 @@ sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a7流程五_
...
@@ -1135,36 +1139,35 @@ sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a7流程五_
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算.air'
)
from
a_a7流程五_中心库入库结算_正结算3_内网验收入库结算
import
check_accept_order
,
putaway
from
a_a7流程五_中心库入库结算_正结算3_内网验收入库结算
import
check_accept_order
,
putaway
try
:
try
:
# # # 验收
# # 验收
# check_accept_order(3) # 试剂
check_accept_order
(
3
)
# 试剂
# time.sleep(6)
time
.
sleep
(
6
)
# check_mcms_check(3)
check_mcms_check
(
3
)
# time.sleep(3)
time
.
sleep
(
3
)
# check_accept_order(2) # 高值
check_accept_order
(
2
)
# 高值
# time.sleep(6)
time
.
sleep
(
6
)
# check_mcms_check(2)
check_mcms_check
(
2
)
# time.sleep(3)
time
.
sleep
(
3
)
# check_accept_order(1) # 低值
check_accept_order
(
1
)
# 低值
# time.sleep(6)
time
.
sleep
(
6
)
# check_mcms_check(1)
check_mcms_check
(
1
)
# # 入库上架
# 入库上架
# putaway()
putaway
()
# time.sleep(6)
time
.
sleep
(
6
)
# check_mcms_psi(1)
check_mcms_psi
(
1
)
# putaway()
putaway
()
# time.sleep(6)
time
.
sleep
(
6
)
# check_mcms_psi(2)
check_mcms_psi
(
2
)
# putaway()
putaway
()
# time.sleep(6)
time
.
sleep
(
6
)
# check_mcms_psi(3)
check_mcms_psi
(
3
)
# time.sleep(3)
time
.
sleep
(
3
)
# OBD_ID = settle()# 生成结算单
OBD_ID
=
settle
()
# 生成结算单
# print(OBD_ID)
print
(
OBD_ID
)
# time.sleep(6)
time
.
sleep
(
6
)
OBD_ID
=
'OBh0347202410090005'
check_mcms_out_balance
(
1
,
OBD_ID
)
# 检查审批前的结算数据
# check_mcms_out_balance(1, OBD_ID) # 检查审批前的结算数据
# # 调用审批结算单
# # 调用审批结算单
#
approval_center(OBD_ID)
approval_center
(
OBD_ID
)
time
.
sleep
(
6
)
time
.
sleep
(
6
)
check_mcms_out_balance_approve_after
(
1
,
OBD_ID
)
# 检查审批后的结算数据
check_mcms_out_balance_approve_after
(
1
,
OBD_ID
)
# 检查审批后的结算数据
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
...
...
air_case/b6_spd3_core_business_flow_database_check/a_a8流程五_中心库入库结算_正结算3_外网开票_数据库验证.air/a_a8流程五_中心库入库结算_正结算3_外网开票_数据库验证.py
View file @
1505bee0
...
@@ -4,6 +4,7 @@ import traceback
...
@@ -4,6 +4,7 @@ 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.fileUtls
import
FileUtils
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
from
common.run_cmd_script
import
execute_command
...
@@ -26,365 +27,333 @@ import time
...
@@ -26,365 +27,333 @@ import time
module
=
"b6_spd3_core_business_flow_database_check"
module
=
"b6_spd3_core_business_flow_database_check"
def
invoice
():
def
check_mcms_invoice
():
# # 登录获取用户id等信息,使用创建的用户登录===========开始
print
(
'检查发票数据'
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"供货关系申请2"
,
'message'
)
prov_id
=
get_prov_id
()
# print(info)
# if type == 1:
username
=
info
[
'e_username'
]
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password1"
)
# elif type == 2:
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
)
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
# print(token, projectCode, uxid, corpId, info)
# else:
# 登录获取用户id等信息,使用创建的用户登录============结束
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
module
=
"a6_mdm3_si"
# 发票录入列表查询=================================================
sql
=
"select * from mcms_invoice where prov_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listGoodsPage_url"
)
prov_id
)
print
(
'发票录入列表查询url'
,
url
)
# 获取实际值
# 获取请求头信息
actual
=
check_mcms_pur_plan_sql
(
sql
)
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
print
(
'actual'
,
actual
)
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
sql
=
"select id from mcms_invoice where prov_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
projectCode
)
prov_id
)
id
=
get_id
(
sql
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload2_1_1"
,
get_hosid
(),
get_branch_id
())
hos_id
=
get_hosid
()
prov_name
=
get_prov_name
()
# print('request_body',request_body)
# 发送请求
create_user
=
get_login_user_uxid_bydb
(
i
=
1
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"供货关系申请2"
,
'message'
)[
'e_username'
])
while
True
:
# create_user = account_user_id
time
.
sleep
(
6
)
create_time
=
get_create_time
(
"select create_time from mcms_invoice where id='%s';"
%
id
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
last_modified
=
get_create_time
(
"select last_modified from mcms_invoice where id='%s';"
%
id
)
print
(
'result'
,
result
)
last_modified_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
try
:
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
year
,
month
=
dateUtils
().
get_year_month
(
dateUtils
().
get_current_time
())
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
month
<
10
:
if
total
==
0
:
month
=
"0"
+
str
(
month
)
print
(
'数据暂时未同步过来,或者内网没有生成结算单'
)
year_month
=
str
(
year
)
+
str
(
month
)
i
=
i
+
1
settle_months
=
year_month
if
i
>=
100
:
invoice_date
=
get_account_date1
(
"select invoice_date from mcms_invoice where id='%s';"
%
id
)
print
(
'600秒过去了,数据还未查询出来,调用一下内网结算函数'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
settle
()
'check_mcms_invoice_0924'
,
id
,
approval_center
()
hos_id
,
prov_id
,
prov_name
,
invoice_date
,
settle_months
,
create_user
,
continue
create_time
,
last_modified
,
last_modified_user
else
:
)
break
except
:
# 对比预期值和实际值是否一致z
continue
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
# 将发票信息写入文件
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
# print('actual_value2',actual_value2)
list_a
=
[]
print
(
'expected_value2'
)
list_b
=
[]
print
(
expected_value2
)
list_c
=
[]
print
(
'actual_value2'
)
list_a
.
append
(
data1
[
0
])
print
(
actual_value2
)
list_b
.
append
(
data1
[
0
])
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
list_c
.
append
(
data1
[
0
])
print
(
'result'
,
result
)
# print('list_a', len(list_a), list_a)
if
actual_value2
==
expected_value2
:
info
=
(
list_a
,
list_b
,
list_c
)
print
(
'ok'
)
titlename
=
(
'list_a'
,
'list_b'
,
'list_c'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
# 将发票信息写入文件
else
:
FileUtils
().
w_info8
(
info
,
module
,
'结算开票信息'
,
titlename
,
'message'
)
print
(
'error'
)
# 发票录入列表查询=================================================
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# ===========发票暂存=======================================
# 检查发票子表数据
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"saveCacheBatch_url"
)
check_mcms_invoice_detail
(
1
,
id
)
print
(
url
)
# check_mcms_invoice_detail2(1, id)
# 从文件中获取必要信息
info
=
FileUtils
().
r_info8
(
module
,
"结算开票信息"
,
'message'
)
# print('info', info)
def
check_mcms_invoice_detail
(
type
=
1
,
pid
=
""
):
list_a
=
info
[
'list_a'
]
print
(
'检查发票子表数据'
)
print
(
'list_a'
,
list_a
,
type
(
list_a
),
len
(
list_a
))
if
type
==
1
:
pid
=
'pid'
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
settleMonth
=
"settleMonth"
elif
type
==
2
:
hosGoodsId
=
'hosGoodsId'
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
batchCode
=
'batchCode'
else
:
distrDetailId
=
'distrDetailId'
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
distrId
=
'distrId'
branch_id
=
get_branch_id
()
distrOrderNo
=
'distrOrderNo'
sql
=
"select * from mcms_invoice_detail where pid='%s' order by id LIMIT 1;"
%
(
settlePrice
=
'settlePrice'
pid
)
maxSettleQty
=
'maxSettleQty'
# 获取实际值
maxSettleAmount
=
'maxSettleAmount'
actual
=
check_mcms_pur_plan_sql
(
sql
)
curSettleQty
=
'curSettleQty'
print
(
'actual'
,
actual
)
curSettleAmount
=
'curSettleAmount'
sql
=
"select id from mcms_invoice_detail where pid='%s' order by id LIMIT 1;"
%
(
leftSettleQty
=
'leftSettleQty'
pid
)
leftSettleAmount
=
'leftSettleAmount'
id
=
get_id
(
sql
)
hosId
=
'hosId'
hos_id
=
get_hosid
()
provId
=
'provId'
prov_id
=
get_prov_id
()
branchId
=
'branchId'
prov_name
=
get_prov_name
()
balanceDetId
=
'balanceDetId'
sub_prov_id
=
prov_id
purMode
=
'purMode'
settle_dept_id
=
None
barCode
=
'barCode'
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_balance_detail where id='%s';"
%
id
)
viewId
=
'viewId'
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
for
i
in
list_a
:
print
(
'ok'
)
pid
=
i
[
'pid'
]
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
settleMonth
=
i
[
'settleMonth'
]
else
:
hosGoodsId
=
i
[
'hosGoodsId'
]
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
detailList
=
i
[
'detailList'
]
hos_batch_id
=
get_id
(
"select hos_batch_id from mcms_out_balance_detail where id='%s';"
%
id
)
for
j
in
detailList
:
if
check_batch_id
(
hos_batch_id
)
==
True
:
batchCode
=
j
[
'batchCode'
]
print
(
'ok'
)
distrDetailId
=
j
[
'distrDetailId'
]
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
distrId
=
j
[
'distrId'
]
else
:
distrOrderNo
=
j
[
'distrOrderNo'
]
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
settlePrice
=
j
[
'settlePrice'
]
# maxSettleQty = j['leftSettleQty']
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
# maxSettleAmount = j['leftSettleAmount']
create_user
=
get_login_user_uxid_bydb
(
# curSettleQty = j['curSettleQty']
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"供货关系申请2"
,
'message'
)[
'e_username'
])
# curSettleAmount = j['curSettleAmount']
create_time
=
get_create_time
(
"select create_time from mcms_invoice_detail where id='%s';"
%
id
)
# leftSettleQty = j['leftSettleQty']
last_modified
=
get_create_time
(
"select last_modified from mcms_invoice_detail where id='%s';"
%
id
)
leftSettleAmount
=
j
[
'leftSettleAmount'
]
last_modified_user
=
create_user
hosId
=
j
[
'hosId'
]
provId
=
j
[
'provId'
]
year
,
month
=
dateUtils
().
get_year_month
(
dateUtils
().
get_current_time
())
branchId
=
j
[
'branchId'
]
if
month
<
10
:
balanceDetId
=
j
[
'balanceDetId'
]
month
=
"0"
+
str
(
month
)
purMode
=
j
[
'purMode'
]
settle_month
=
str
(
year
)
+
str
(
month
)
barCode
=
j
[
'barCode'
]
hobd_id
=
get_id
(
"select id from mcms_out_balance_detail where prov_id='%s' order by id desc LIMIT 1 OFFSET 1;"
%
(
viewId
=
j
[
'viewId'
]
prov_id
))
break
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
list2
=
[]
'check_mcms_invoice_detail_0919_1'
,
id
,
detailList
=
None
pid
,
hobd_id
,
branch_id
,
hos_goods_id
,
settle_month
,
create_user
,
for
i
in
list_a
:
create_time
,
last_modified
,
last_modified_user
,
hos_id
detailList
=
i
[
'detailList'
]
)
list2
=
detailList
for
k
in
list2
:
# 对比预期值和实际值是否一致
maxSettleQty
=
k
[
'leftSettleQty'
]
actual_value1
=
get_process_list2
(
actual
)
maxSettleAmount
=
k
[
'settlePrice'
]
expected_value1
=
get_process_list2
(
expected
)
curSettleQty
=
k
[
'curSettleQty'
]
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
curSettleAmount
=
k
[
'curSettleAmount'
]
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
leftSettleQty
=
k
[
'leftSettleQty'
]
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_1_1_1"
,
pid
,
settleMonth
,
hosGoodsId
,
batchCode
,
print
(
expected_value2
)
distrDetailId
,
distrId
,
distrOrderNo
,
settlePrice
,
maxSettleQty
,
print
(
'actual_value2'
)
maxSettleAmount
,
curSettleQty
,
curSettleAmount
,
leftSettleQty
,
print
(
actual_value2
)
leftSettleAmount
,
hosId
,
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
provId
,
print
(
'result'
,
result
)
branchId
,
balanceDetId
,
purMode
,
barCode
,
viewId
)
if
actual_value2
==
expected_value2
:
print
(
'request_body'
,
request_body
)
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
request_body_json
=
get_process_list
(
request_body
)
else
:
result
=
commonFuc
().
http_post
(
url
,
request_body_json
,
headers
)
print
(
'error'
)
print
(
'发票暂存result'
,
result
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# ===========发票暂存===============================================
# ==============发票缓存提交===========================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"submitCache_url"
)
def
check_mcms_invoice_detail2
(
type
=
1
,
pid
=
""
):
hosVersion
=
3
print
(
'检查发票子表数据'
)
hosName
=
commonFuc
().
get_business_data
(
module
,
'hosName'
)
if
type
==
1
:
invoiceQty
=
leftSettleQty
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
invoiceAmount
=
leftSettleAmount
elif
type
==
2
:
invoiceDate
=
timeUtils
().
get_time_hms
(
5
)
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_2_2_2_1"
,
hosName
,
invoiceQty
,
invoiceAmount
,
else
:
invoiceDate
,
hosId
,
provId
,
hosVersion
)
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
print
(
'发票缓存提交request_body'
,
request_body
)
branch_id
=
get_branch_id
()
# 发送请求
sql
=
"select * from mcms_invoice_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
pid
)
print
(
'发票缓存提交result'
,
result
)
# 获取实际值
VI_id
=
commonFuc
().
analysis_json
(
'billIds'
,
actual
=
check_mcms_pur_plan_sql
(
sql
)
commonFuc
().
analysis_json
(
'data'
,
result
))
print
(
'actual'
,
actual
)
VI_id
=
' '
.
join
(
VI_id
)
sql
=
"select id from mcms_invoice_detail where pid='%s' order by id LIMIT 1 OFFSET 1;"
%
(
print
(
'VI_id'
,
VI_id
)
pid
)
# ==============发票缓存提交===========================================
id
=
get_id
(
sql
)
# ===============预开票列表查询====================================
hos_id
=
get_hosid
()
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url1"
)
prov_id
=
get_prov_id
()
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_3_1"
)
prov_name
=
get_prov_name
()
print
(
'预开票列表查询request_body'
,
request_body
)
sub_prov_id
=
prov_id
# 发送请求
settle_dept_id
=
None
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
distr_detail_id
=
get_id
(
"select distr_detail_id from mcms_out_balance_detail where id='%s';"
%
id
)
print
(
'预开票列表查询'
,
'result'
,
result
)
if
check_distr_detail_id
(
distr_detail_id
)
==
True
:
print
(
'ok'
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
commonFuc
().
check_text_exist_result_text
(
'success'
,
'success'
)
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
else
:
sumAmount
=
commonFuc
().
analysis_json
(
'sumAmount'
,
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
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'
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsOutBalance_submitInvoice_url"
)
else
:
lastModified
=
timeUtils
().
get_time_hms
(
1
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'success'
)
createTime
=
timeUtils
().
get_time_hms
(
1
)
invoiceTitle
=
hosName
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
settleMonths
=
settleMonth
create_user
=
get_login_user_uxid_bydb
(
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_3_2"
,
VI_id
,
lastModified
,
createTime
,
uxid
,
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"供货关系申请2"
,
'message'
)[
'e_username'
])
get_hosid
(),
provId
,
provName
,
invoiceAmount
,
invoiceDate
,
create_time
=
get_create_time
(
"select create_time from mcms_invoice_detail where id='%s';"
%
id
)
settleMonths
,
invoiceQty
,
hosName
,
invoiceTitle
,
sumAmount
)
last_modified
=
get_create_time
(
"select last_modified from mcms_invoice_detail where id='%s';"
%
id
)
print
(
'预开票提交request_body'
,
request_body
)
last_modified_user
=
create_user
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
year
,
month
=
dateUtils
().
get_year_month
(
dateUtils
().
get_current_time
())
print
(
'预开票提交'
,
'result'
,
result
)
if
month
<
10
:
# ===============预开票提交====================================
month
=
"0"
+
str
(
month
)
# ===============发票确认列表查询
settle_month
=
str
(
year
)
+
str
(
month
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_url1"
)
hobd_id
=
get_id
(
"select id from mcms_out_balance_detail where prov_id='%s' order by id desc LIMIT 1;"
%
(
prov_id
))
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_3"
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_invoice_detail_0919_2'
,
id
,
# 发送请求
pid
,
hobd_id
,
branch_id
,
hos_goods_id
,
settle_month
,
create_user
,
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
create_time
,
last_modified
,
last_modified_user
,
hos_id
print
(
'发票确认列表查询result'
,
result
)
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
# 对比预期值和实际值是否一致
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
actual_value1
=
get_process_list2
(
actual
)
print
(
id1
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
# ===============发票确认列表查询
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# ===============发票确认
# print('actual_value2',actual_value2)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"invoiceUpdateStatus_url"
)
print
(
'expected_value2'
)
print
(
expected_value2
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_4"
,
id1
)
print
(
'actual_value2'
)
print
(
actual_value2
)
# 发送请求
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'发票确认result'
,
result
)
# ===============发票确认
# ==============内网发票核对============
module
=
"b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsInvoice_listVoPage_url"
)
print
(
'url'
,
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload9"
,
timeUtils
().
get_time_hms
(
5
),
timeUtils
().
get_time_hms
(
5
),
get_hosid
(),
get_hosid
())
print
(
'request_body'
,
request_body
)
# 发送请求
i
=
1
while
True
:
time
.
sleep
(
6
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
try
:
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
total
==
0
:
print
(
'数据暂时未同步过来'
)
i
=
i
+
1
if
i
>=
100
:
print
(
'600秒过去了,数据还未查询出来,检查一下脚本或者被测软件'
)
continue
else
:
break
except
:
continue
print
(
'result'
,
'内网发票核对'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
VI_id
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
print
(
'VI_id'
,
VI_id
)
# ==============发票列表查询
# ==============发票核对提交
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsInvoice_invoiceUpdateStatusList_url"
)
print
(
'url'
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
VI_id
,
get_hosid
())
print
(
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
print
(
'result'
,
result
)
# ==============发票核对提交
if
actual_value2
==
expected_value2
:
# ==============内网发票核对============
print
(
'ok'
)
# ==============内网发票提交开始
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
# 列表查询
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsInvoice_listVoPage_url"
)
print
(
'内网发票提交url'
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload11"
,
timeUtils
().
get_time_hms
(
5
),
timeUtils
().
get_time_hms
(
5
),
get_hosid
(),
get_hosid
())
print
(
'内网发票提交request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'内网发票提交列表查询结果'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
VI_id2
=
'VI_id2'
if
total
==
0
:
print
(
'检查被测程序,发票提交列表查询数据是否正确'
)
else
:
else
:
for
i
in
range
(
total
):
print
(
'error'
)
VI_id2
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
i
])
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
if
VI_id2
==
VI_id
:
break
print
(
'VI_id2'
,
VI_id2
)
def
check_mcms_invoice_ext
():
# ==============发票提交,下一步归档
print
(
'检查付款单数据'
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
prov_id
=
get_prov_id
()
"mcmsInvoice_invoiceUpdateStatusList_url"
)
# if type == 1:
print
(
'url'
,
url
)
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload12"
,
VI_id
,
get_hosid
())
# elif type == 2:
print
(
'request_body'
,
request_body
)
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# else:
print
(
'result'
,
'发票提交,下一步归档'
,
result
)
# hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
# ==============发票提交,下一步归档
# ==============发票归档列表查询
sql
=
"select * from mcms_invoice_ext where prov_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
prov_id
)
"mcmsInvoice_listVoPage_url"
)
# 获取实际值
print
(
'url'
,
url
)
actual
=
check_mcms_pur_plan_sql
(
sql
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload13"
,
timeUtils
().
get_time_hms
(
5
),
print
(
'actual'
,
actual
)
timeUtils
().
get_time_hms
(
5
),
get_hosid
(),
get_hosid
())
sql
=
"select id from mcms_invoice_ext where prov_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
print
(
'request_body'
,
request_body
)
prov_id
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
id
=
get_id
(
sql
)
print
(
'result'
,
'发票归档列表查询'
,
result
)
hos_id
=
get_hosid
()
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
prov_name
=
get_prov_name
()
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
VI_id3
=
'VI_id3'
create_user
=
get_login_user_uxid_bydb
(
if
total
==
0
:
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"供货关系申请2"
,
'message'
)[
'e_username'
])
print
(
'检查被测程序,发票归档列表查询查询数据是否正确'
)
# create_user = account_user_id
create_time
=
get_create_time
(
"select create_time from mcms_invoice_ext where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_invoice_ext where id='%s';"
%
id
)
last_modified_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_user
=
last_modified_user
year
,
month
=
dateUtils
().
get_year_month
(
dateUtils
().
get_current_time
())
if
month
<
10
:
month
=
"0"
+
str
(
month
)
year_month
=
str
(
year
)
+
str
(
month
)
settle_months
=
year_month
pay_date
=
get_account_date1
(
"select pay_date from mcms_invoice_ext where id='%s';"
%
id
)
pay_user
=
create_user
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_invoice_ext_0924'
,
id
,
hos_id
,
prov_id
,
prov_name
,
pay_date
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
pay_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
:
else
:
for
i
in
range
(
total
):
print
(
'error'
)
VI_id3
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
i
])
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
if
VI_id3
==
VI_id2
:
# 检查子表数据
break
check_mcms_invoice_ext_detail
(
1
,
id
)
print
(
'VI_id3'
,
VI_id3
)
# ==============发票归档列表查询
# ==================发票归档提交
def
check_mcms_invoice_ext_detail
(
type
=
1
,
pid
=
""
):
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
print
(
'检查付款单子表数据'
)
"mcmsInvoice_invoiceUpdateStatusList_url"
)
if
type
==
1
:
print
(
'url'
,
url
)
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload14"
,
VI_id
,
get_hosid
())
elif
type
==
2
:
print
(
'request_body'
,
request_body
)
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'发票归档提交,下一步付款'
,
result
)
# ==================发票归档提交
# ==================付款单列表查询
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsInvoice_listVoPage_url"
)
print
(
'url'
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload15"
,
get_hosid
(),
get_hosid
())
print
(
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'付款单列表查询'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
total
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
VI_id4
=
'VI_id4'
if
total
==
0
:
print
(
'检查被测程序,发票归档列表查询查询数据是否正确'
)
else
:
else
:
for
i
in
range
(
total
):
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
VI_id4
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
i
])
branch_id
=
get_branch_id
()
if
VI_id4
==
VI_id3
:
sql
=
"select * from mcms_invoice_ext_detail where pid='%s';"
%
(
break
pid
)
print
(
'VI_id4'
,
VI_id4
)
# 获取实际值
# ==================付款单列表查询
actual
=
check_mcms_pur_plan_sql
(
sql
)
# ==================付款提交
print
(
'actual'
,
actual
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
sql
=
"select id from mcms_invoice_ext_detail where pid='%s';"
%
(
"mcmsInvoice_genPaymentBills_url"
)
pid
)
print
(
'url'
,
url
)
id
=
get_id
(
sql
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload16"
,
VI_id
,
get_hosid
())
hos_id
=
get_hosid
()
print
(
'request_body'
,
request_body
)
prov_id
=
get_prov_id
()
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'付款提交'
,
result
)
account_user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
# 断言
create_user
=
account_user_id
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
create_time
=
get_create_time
(
"select create_time from mcms_invoice_ext_detail where id='%s';"
%
id
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
last_modified
=
get_create_time
(
"select last_modified from mcms_invoice_ext_detail where id='%s';"
%
id
)
if
code
==
0
and
data
==
1
:
last_modified_user
=
create_user
commonFuc
().
check_text_exist
(
0
,
result
)
invoice_id
=
get_id
(
"select id from mcms_invoice where prov_id='%s' order by CREATE_TIME desc LIMIT 1;"
%
(
prov_id
))
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_invoice_ext_detail_0919_1'
,
id
,
pid
,
invoice_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
:
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
print
(
'error'
)
# ==================付款提交
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# ==============内网发票提交
# ================发票查询列表页面验证
# ================发票查询列表页面验证
try
:
try
:
...
@@ -393,6 +362,11 @@ try:
...
@@ -393,6 +362,11 @@ try:
approval_center
(
OBH_ID
)
approval_center
(
OBH_ID
)
from
air_case.public1.public1.public1
import
*
from
air_case.public1.public1.public1
import
*
invoice
(
2
,
OBH_ID
)
invoice
(
2
,
OBH_ID
)
# 检查发票数据
check_mcms_invoice
()
time
.
sleep
(
3
)
# 检查付款单数据
check_mcms_invoice_ext
()
except
Exception
as
e
:
except
Exception
as
e
:
print
(
'脚本出现异常,请检查脚本或者数据'
)
print
(
'脚本出现异常,请检查脚本或者数据'
)
print
(
"发生异常:"
,
str
(
e
))
print
(
"发生异常:"
,
str
(
e
))
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
1505bee0
...
@@ -452,6 +452,15 @@
...
@@ -452,6 +452,15 @@
"check_mcms_out_balance_1008": '{"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("19999.980000"), "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("200.0000"), "check_user": None, "check_time": None}'
"check_mcms_out_balance_1008": '{"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("19999.980000"), "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("200.0000"), "check_user": None, "check_time": None}'
#手工采购计划入库_结算数据子表
#手工采购计划入库_结算数据子表
"check_mcms_out_balance_detail_1008_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_1008_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_1008_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_detail_1008_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"}'
\ No newline at end of file
#中心库退货出库_结算数据主表_审批后
"check_mcms_out_balance_1009": '{"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("19999.980000"), "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("200.0000"), "check_user": "%s", "check_time": %s}'
#中心库退货出库_结算数据子表_审批后
"check_mcms_out_balance_detail_1009_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": 11, "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_1009_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": 11, "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