Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
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
reyun
manager
Commits
af0d3bd1
Commit
af0d3bd1
authored
Sep 22, 2021
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
验收金额
parent
0201c49f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
Contract.java
src/main/java/common/model/Contract.java
+10
-0
DmpIncomeRepository.java
src/main/java/common/repository/DmpIncomeRepository.java
+2
-0
PdIncomeRepository.java
src/main/java/common/repository/PdIncomeRepository.java
+3
-0
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+15
-0
No files found.
src/main/java/common/model/Contract.java
View file @
af0d3bd1
...
@@ -111,6 +111,7 @@ public class Contract {
...
@@ -111,6 +111,7 @@ public class Contract {
private
String
agreementTypeName
;
//协议类型 1 普通协议 2 框架协议
private
String
agreementTypeName
;
//协议类型 1 普通协议 2 框架协议
private
String
productType
;
//产品类型
private
String
productType
;
//产品类型
private
String
acceptanceAmount
;
//验收金额
@Id
@Id
...
@@ -822,4 +823,13 @@ public class Contract {
...
@@ -822,4 +823,13 @@ public class Contract {
public
void
setProductType
(
String
productType
)
{
public
void
setProductType
(
String
productType
)
{
this
.
productType
=
productType
;
this
.
productType
=
productType
;
}
}
@Transient
public
String
getAcceptanceAmount
()
{
return
acceptanceAmount
;
}
public
void
setAcceptanceAmount
(
String
acceptanceAmount
)
{
this
.
acceptanceAmount
=
acceptanceAmount
;
}
}
}
src/main/java/common/repository/DmpIncomeRepository.java
View file @
af0d3bd1
...
@@ -16,4 +16,6 @@ public interface DmpIncomeRepository extends JpaRepository<DmpIncome, Long> {
...
@@ -16,4 +16,6 @@ public interface DmpIncomeRepository extends JpaRepository<DmpIncome, Long> {
@Query
(
value
=
"select * from dmp_income where contract_code = ?1 and income_month =?2 limit 1 "
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from dmp_income where contract_code = ?1 and income_month =?2 limit 1 "
,
nativeQuery
=
true
)
DmpIncome
findByCodeMonth
(
String
contractCode
,
String
incomeMonth
);
DmpIncome
findByCodeMonth
(
String
contractCode
,
String
incomeMonth
);
}
}
src/main/java/common/repository/PdIncomeRepository.java
View file @
af0d3bd1
...
@@ -14,4 +14,7 @@ public interface PdIncomeRepository extends JpaRepository<PdIncome, Long> {
...
@@ -14,4 +14,7 @@ public interface PdIncomeRepository extends JpaRepository<PdIncome, Long> {
@Query
(
value
=
"select * from pd_income where settlement_date > ?1 and settlement_date < ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from pd_income where settlement_date > ?1 and settlement_date < ?2"
,
nativeQuery
=
true
)
List
<
PdIncome
>
findByDs
(
String
startDate
,
String
endDate
);
List
<
PdIncome
>
findByDs
(
String
startDate
,
String
endDate
);
@Query
(
value
=
"select contract_code, sum(acceptance_amount) from pd_income where contract_code in ?1 group by contract_code"
,
nativeQuery
=
true
)
List
<
Object
[]>
findGroupWithCode
(
List
codes
);
}
}
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
af0d3bd1
...
@@ -235,6 +235,9 @@ public class ContractServiceImpl implements ContractService {
...
@@ -235,6 +235,9 @@ public class ContractServiceImpl implements ContractService {
@Autowired
@Autowired
private
DmpIncomeService
dmpIncomeService
;
private
DmpIncomeService
dmpIncomeService
;
@Autowired
private
PdIncomeRepository
pdIncomeRepository
;
@Override
@Override
public
Map
<
String
,
Object
>
checkAccount
(
String
email
,
String
platfrom
)
{
public
Map
<
String
,
Object
>
checkAccount
(
String
email
,
String
platfrom
)
{
...
@@ -1585,7 +1588,16 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1585,7 +1588,16 @@ public class ContractServiceImpl implements ContractService {
Map
<
String
,
String
>
tradeTypeMap
=
tradeTypeRepsitory
.
findAll
().
stream
().
collect
(
Collectors
.
toMap
(
v
->
v
.
getId
().
toString
(),
v
->
v
.
getName
()));
Map
<
String
,
String
>
tradeTypeMap
=
tradeTypeRepsitory
.
findAll
().
stream
().
collect
(
Collectors
.
toMap
(
v
->
v
.
getId
().
toString
(),
v
->
v
.
getName
()));
if
(
ValidateUtil
.
isValid
(
contractList
))
{
if
(
ValidateUtil
.
isValid
(
contractList
))
{
Map
<
String
,
String
>
acceptanceAmountMap
=
new
HashMap
<>();
if
(
"pd"
.
equals
(
platform
))
{
//私有化合同关联 验收收入
List
<
Object
[]>
objects
=
pdIncomeRepository
.
findGroupWithCode
(
contractList
.
stream
().
map
(
v
->
v
.
getContractCode
()).
collect
(
Collectors
.
toList
()));
acceptanceAmountMap
=
objects
.
stream
().
collect
(
Collectors
.
toMap
(
v
->
v
[
0
]
+
""
,
v
->
v
[
1
]
+
""
,
(
v1
,
v2
)
->
v1
));
}
List
<
BarrioCity
>
barrioCities
=
barrioCityRepository
.
findAll
();
List
<
BarrioCity
>
barrioCities
=
barrioCityRepository
.
findAll
();
Map
<
Long
,
BarrioCity
>
barrioCitiesNameMap
=
barrioCities
.
stream
().
collect
(
Collectors
.
toMap
(
BarrioCity:
:
getId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
Map
<
Long
,
BarrioCity
>
barrioCitiesNameMap
=
barrioCities
.
stream
().
collect
(
Collectors
.
toMap
(
BarrioCity:
:
getId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
for
(
Contract
c
:
contractList
)
{
for
(
Contract
c
:
contractList
)
{
...
@@ -1607,6 +1619,9 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1607,6 +1619,9 @@ public class ContractServiceImpl implements ContractService {
c
.
setRelationContract
(-
1L
);
c
.
setRelationContract
(-
1L
);
}
}
c
.
setAcceptanceAmount
(
acceptanceAmountMap
.
containsKey
(
c
.
getContractCode
())
?
acceptanceAmountMap
.
get
(
c
.
getContractCode
())
:
"0"
);
/* if (ContractStatusEnum.MONEY_BACK_FIRST.getKey().equals(c.getStatus())) {
/* if (ContractStatusEnum.MONEY_BACK_FIRST.getKey().equals(c.getStatus())) {
c.setStartDate(null);
c.setStartDate(null);
}*/
}*/
...
...
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