Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
afbc1bd1
Commit
afbc1bd1
authored
Apr 29, 2021
by
lanjiali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校区费用预警-查询
parent
d597600f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
8 deletions
+112
-8
workspace.xml
.idea/workspace.xml
+13
-4
run.py
run.py
+1
-1
report_config.py
..._yun_ying_pc/lanjiali_report/data_config/report_config.py
+14
-1
test_school_expense.py
script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
+84
-2
No files found.
.idea/workspace.xml
View file @
afbc1bd1
...
@@ -19,10 +19,11 @@
...
@@ -19,10 +19,11 @@
<select
/>
<select
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"
校区费用预警查询
"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"
学生费用预警查询-分页
"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_demo.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_demo.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/data_config/report_config.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/data_config/report_config.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -247,7 +248,14 @@
...
@@ -247,7 +248,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1619609772900
</updated>
<updated>
1619609772900
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"9"
/>
<task
id=
"LOCAL-00009"
summary=
"学生费用预警查询-分页"
>
<created>
1619611092963
</created>
<option
name=
"number"
value=
"00009"
/>
<option
name=
"presentableId"
value=
"LOCAL-00009"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1619611092963
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"10"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
<component
name=
"Vcs.Log.Tabs.Properties"
>
...
@@ -270,7 +278,8 @@
...
@@ -270,7 +278,8 @@
<MESSAGE
value=
"学生费用预警查询"
/>
<MESSAGE
value=
"学生费用预警查询"
/>
<MESSAGE
value=
"学生费用预警查询-学生信息对比"
/>
<MESSAGE
value=
"学生费用预警查询-学生信息对比"
/>
<MESSAGE
value=
"校区费用预警查询"
/>
<MESSAGE
value=
"校区费用预警查询"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"校区费用预警查询"
/>
<MESSAGE
value=
"学生费用预警查询-分页"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"学生费用预警查询-分页"
/>
</component>
</component>
<component
name=
"XDebuggerManager"
>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
<breakpoint-manager>
...
...
run.py
View file @
afbc1bd1
...
@@ -3,7 +3,7 @@ import os
...
@@ -3,7 +3,7 @@ import os
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
run_config
=
[
run_config
=
[
"-s"
,
"./script/ji_yun_ying_pc/lanjiali_report/test_
demo.py
"
,
"-s"
,
"./script/ji_yun_ying_pc/lanjiali_report/test_
school_expense.py::Test_select_school_expense_warning::test_schoolExtend_total
"
,
"--alluredir"
,
"./report/xml"
,
"--alluredir"
,
"./report/xml"
,
"--host"
,
"http://192.168.32.31"
,
"--host"
,
"http://192.168.32.31"
,
"--account"
,
"b"
,
"--account"
,
"b"
,
...
...
script/ji_yun_ying_pc/lanjiali_report/data_config/report_config.py
View file @
afbc1bd1
...
@@ -111,4 +111,17 @@ classTypes = [
...
@@ -111,4 +111,17 @@ classTypes = [
]
]
#汇总方式
#汇总方式
groups
=
[{
""
:
"school_area_id"
},
"big_area_id"
,
"area_id"
]
groups
=
[
{
"group"
:
"school_area_id"
,
"group_type"
:
"校区"
},
{
"group"
:
"big_area_id"
,
"group_type"
:
"区域"
},
{
"group"
:
"area_id"
,
"group_type"
:
"大区"
}
]
script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
View file @
afbc1bd1
...
@@ -4,7 +4,7 @@ import allure
...
@@ -4,7 +4,7 @@ import allure
import
pytest
import
pytest
import
jsonpath
import
jsonpath
from
script
import
public_asserts
from
script
import
public_asserts
from
script.base_api
import
report_finance_school_expense_warning_post
from
script.base_api
import
report_finance_school_expense_warning_post
,
report_finance_student_expense_warning_post
from
script.ji_yun_ying_pc.lanjiali_report.data_config.report_config
import
*
from
script.ji_yun_ying_pc.lanjiali_report.data_config.report_config
import
*
from
script.default_header
import
jyy_header
from
script.default_header
import
jyy_header
...
@@ -43,8 +43,90 @@ class Test_select_school_expense_warning():
...
@@ -43,8 +43,90 @@ class Test_select_school_expense_warning():
assert
res
[
'code'
]
==
0
assert
res
[
'code'
]
==
0
@allure.step
(
"校区费用预警-组合筛选"
)
@allure.step
(
"校区费用预警-组合筛选"
)
@pytest.mark.parametrize
(
""
)
def
test_select_all
(
self
):
def
test_select_all
(
self
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageSize"
:
10
,
"year"
:
2021
,
"term"
:
"春"
,
"subjects"
:
[
"数学"
],
"grades"
:
[
"三年级"
],
"classTypes"
:
[
"极趣班"
],
"schoolAreaIds"
:
school_areas
,
"groups"
:
[
"school_area_id"
]
}
res
=
report_finance_school_expense_warning_post
(
header
=
jyy_header
,
body
=
data
)
assert
res
[
'msg'
]
==
'成功'
assert
res
[
'code'
]
==
0
@allure.step
(
"校区费用预警-汇总数据校验"
)
def
test_schoolExtend_total
(
self
):
data
=
{
"pageNum"
:
1
,
"pageSize"
:
10
,
"year"
:
select_year
(),
"term"
:
select_term
(),
"subjects"
:
[
"数学"
],
"grades"
:
[
"三年级"
],
"classTypes"
:
[
"极趣班"
],
"schoolAreaIds"
:
school_areas
,
"groups"
:
[
"school_area_id"
]
}
schoolextend_res
=
report_finance_school_expense_warning_post
(
header
=
jyy_header
,
body
=
data
)
#获取学生费用预警汇总数据
student_expense_data
=
{
"pageNum"
:
1
,
"pageSize"
:
10000
,
"year"
:
select_year
(),
"term"
:
select_term
(),
"subjects"
:
[
"数学"
],
"grades"
:
[
"三年级"
],
"classTypes"
:
[
"极趣班"
],
"schoolAreaIds"
:
school_areas
,
"studentStatuses"
:
[
1110
,
1140
,
1150
,
1120
,
1130
,
1160
]
}
}
studentexpense_res
=
report_finance_student_expense_warning_post
(
header
=
jyy_header
,
body
=
student_expense_data
)
if
schoolextend_res
[
'data'
][
'list'
]
!=
''
:
#校区汇总的预收课时总数与学生预收课时总数判断
school_prepaidNum_total
=
round
(
schoolextend_res
[
'data'
][
'extend'
][
'prepaidNum'
],
2
)
student_prepaidNum_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'prepaidNum'
],
2
)
assert
school_prepaidNum_total
==
student_prepaidNum_total
print
(
school_prepaidNum_total
)
#校区汇总的预收课程净额
school_prepaidAmount_total
=
round
(
schoolextend_res
[
'data'
][
'extend'
][
'prepaidAmount'
],
2
)
student_prepaidAmount_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'prepaidAmount'
],
2
)
assert
school_prepaidAmount_total
==
student_prepaidAmount_total
print
(
school_prepaidAmount_total
)
#校区汇总的课消课时数
school_attendanceNum_total
=
round
(
schoolextend_res
[
'data'
][
'extend'
][
'attendanceNum'
],
2
)
student_attendanceNum_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'attendanceNum'
],
2
)
assert
school_attendanceNum_total
==
student_attendanceNum_total
print
(
school_attendanceNum_total
)
#校区汇总的溢价
school_premium_total
=
round
(
schoolextend_res
[
'data'
][
'extend'
][
'premium'
],
2
)
student_premium_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'premium'
],
2
)
print
(
school_premium_total
)
assert
school_premium_total
==
student_premium_total
#校区汇总的其他抵扣
school_otherDeduction_total
=
round
(
schoolextend_res
[
'data'
][
'extend'
][
'otherDeduction'
],
2
)
student_otherDeduction_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'otherDeduction'
],
2
)
print
(
school_otherDeduction_total
)
assert
school_otherDeduction_total
==
student_otherDeduction_total
#校区差异调整汇总 imbalanceAmount
school_imbalanceAmount_total
=
round
(
schoolextend_res
[
'data'
][
'extend'
][
'imbalanceAmount'
],
2
)
student_imbalanceAmount_total
=
round
(
studentexpense_res
[
'data'
][
'extend'
][
'imbalanceAmount'
],
2
)
assert
school_imbalanceAmount_total
==
student_imbalanceAmount_total
print
(
school_imbalanceAmount_total
)
else
:
assert
schoolextend_res
[
'msg'
]
==
'成功'
assert
schoolextend_res
[
'code'
]
==
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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