Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
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
王衍超
cloud-fb
Commits
2e250086
Commit
2e250086
authored
Dec 17, 2021
by
shiwenbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计sql,计算本年预付款总额时不需要联查销售台账
parent
7c3611f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
AdvancePaymentBalanceSumDaoImpl.java
...tistics/internal/dao/AdvancePaymentBalanceSumDaoImpl.java
+14
-14
No files found.
backend/xyst.dinas.statistics/src/main/java/com/xyst/dinas/statistics/internal/dao/AdvancePaymentBalanceSumDaoImpl.java
View file @
2e250086
...
...
@@ -86,13 +86,13 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum
"LEFT JOIN xyst_dinas_contract_master as CONTRACT ON CONTRACT.purchase_sand_Unit_id = PURCHASESANDUNIT.id "
+
" AND ( CONTRACT.contract_state = 'EXECUTING' or CONTRACT.contract_state = 'COMPLETED' or CONTRACT.contract_state = 'MODIFIED' ) "
);
// 合同
hql
.
append
(
"LEFT JOIN xyst_dinas_project_filed as PROJECT on CONTRACT.project_id = PROJECT.id "
);
// 项目
hql
.
append
(
"LEFT JOIN xyst_dinas_sales_record AS SALESRECODE ON SALESRECODE.project_id = PROJECT.id "
)
.
append
(
"AND SALESRECODE.regional_company_id = REGIONALCOMPANY.id "
)
.
append
(
"AND SALESRECODE.contract_id = CONTRACT.id "
);
if
(
starDate
!=
null
&&
!(
starDate
.
isEmpty
()))
hql
.
append
(
"AND SALESRECODE.sync_time >= :starDate "
);
if
(
nowDate
!=
null
&&
!(
nowDate
.
isEmpty
()))
hql
.
append
(
" AND SALESRECODE.sync_time < :nowDate "
);
// 銷售台账
//
hql.append("LEFT JOIN xyst_dinas_sales_record AS SALESRECODE ON SALESRECODE.project_id = PROJECT.id ")
//
.append("AND SALESRECODE.regional_company_id = REGIONALCOMPANY.id ")
//
.append("AND SALESRECODE.contract_id = CONTRACT.id ");
//
if (starDate != null && !(starDate.isEmpty()))
//
hql.append("AND SALESRECODE.sync_time >= :starDate ");
//
if (nowDate != null && !(nowDate.isEmpty()))
//
hql.append(" AND SALESRECODE.sync_time < :nowDate ");// 銷售台账
hql
.
append
(
"LEFT JOIN xyst_dinas_finance_artificial_recharge AS ARTIFICIAL ON ARTIFICIAL.regional_company = REGIONALCOMPANY.id "
)
.
append
(
" AND ARTIFICIAL.contract = CONTRACT.id "
)
...
...
@@ -132,13 +132,13 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum
"LEFT JOIN xyst_dinas_contract_master as CONTRACT ON CONTRACT.purchase_sand_Unit_id = PURCHASESANDUNIT.id "
+
" AND ( CONTRACT.contract_state = 'EXECUTING' or CONTRACT.contract_state = 'COMPLETED' or CONTRACT.contract_state = 'MODIFIED' ) "
);
// 合同
hql
.
append
(
"LEFT JOIN xyst_dinas_project_filed as PROJECT on CONTRACT.project_id = PROJECT.id "
);
// 项目
hql
.
append
(
"LEFT JOIN xyst_dinas_sales_record AS SALESRECODE ON SALESRECODE.project_id = PROJECT.id "
)
.
append
(
"AND SALESRECODE.regional_company_id = REGIONALCOMPANY.id "
)
.
append
(
"AND SALESRECODE.contract_id = CONTRACT.id "
);
if
(
starDate
!=
null
&&
!(
starDate
.
isEmpty
()))
hql
.
append
(
"AND SALESRECODE.sync_time >= :starDate "
);
if
(
nowDate
!=
null
&&
!(
nowDate
.
isEmpty
()))
hql
.
append
(
" AND SALESRECODE.sync_time < :nowDate "
);
// 銷售台账
//
hql.append("LEFT JOIN xyst_dinas_sales_record AS SALESRECODE ON SALESRECODE.project_id = PROJECT.id ")
//
.append("AND SALESRECODE.regional_company_id = REGIONALCOMPANY.id ")
//
.append("AND SALESRECODE.contract_id = CONTRACT.id ");
//
if (starDate != null && !(starDate.isEmpty()))
//
hql.append("AND SALESRECODE.sync_time >= :starDate ");
//
if (nowDate != null && !(nowDate.isEmpty()))
//
hql.append(" AND SALESRECODE.sync_time < :nowDate ");// 銷售台账
hql
.
append
(
"LEFT JOIN xyst_dinas_finance_refund AS REFUND ON REFUND.regional_company = REGIONALCOMPANY.id "
)
.
append
(
" AND REFUND.contract = CONTRACT.id "
)
.
append
(
" AND REFUND.purchase_sand_company = PURCHASESANDUNIT.id "
);
...
...
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