Commit afbc1bd1 authored by lanjiali's avatar lanjiali

校区费用预警-查询

parent d597600f
......@@ -19,10 +19,11 @@
<select />
</component>
<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$/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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -247,7 +248,14 @@
<option name="project" value="LOCAL" />
<updated>1619609772900</updated>
</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 />
</component>
<component name="Vcs.Log.Tabs.Properties">
......@@ -270,7 +278,8 @@
<MESSAGE value="学生费用预警查询" />
<MESSAGE value="学生费用预警查询-学生信息对比" />
<MESSAGE value="校区费用预警查询" />
<option name="LAST_COMMIT_MESSAGE" value="校区费用预警查询" />
<MESSAGE value="学生费用预警查询-分页" />
<option name="LAST_COMMIT_MESSAGE" value="学生费用预警查询-分页" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......
......@@ -3,7 +3,7 @@ import os
if __name__ == '__main__':
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",
"--host", "http://192.168.32.31",
"--account", "b",
......
......@@ -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":"大区"
}
]
......@@ -4,7 +4,7 @@ import allure
import pytest
import jsonpath
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.default_header import jyy_header
......@@ -43,8 +43,90 @@ class Test_select_school_expense_warning():
assert res['code'] == 0
@allure.step("校区费用预警-组合筛选")
@pytest.mark.parametrize("")
def test_select_all(self):
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment