Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ef02825d
authored
Jan 04, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg] 合同金额计算也根据查询条件来更改
1 parent
fd62bb0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
src/main/java/vion/service/impl/ContractServiceImpl.java
src/main/java/vion/service/impl/ContractServiceImpl.java
View file @
ef02825
...
...
@@ -97,7 +97,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
.
in
(
CollUtil
.
isNotEmpty
(
relatedContractIdList
),
Contract:
:
getId
,
relatedContractIdList
)
.
eq
(
StrUtil
.
isNotBlank
(
saleName
),
Contract:
:
getSaleName
,
saleName
)
.
or
()
.
eq
(
StrUtil
.
isNotBlank
(
saleName
),
Contract:
:
getSaleN
ame
,
saleName
)
.
eq
(
StrUtil
.
isNotBlank
(
saleName
),
RContractUser:
:
getUsern
ame
,
saleName
)
.
orderByDesc
(
Contract:
:
getEntryTime
);
if
(
StrUtil
.
isNotBlank
(
dto
.
getOperator
())
&&
ObjUtil
.
isNotNull
(
dto
.
getAmount
()))
{
String
ope
=
dto
.
getOperator
();
...
...
@@ -320,6 +320,11 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
// 防止特殊情况出现
Assert
.
notEquals
(
saleName
,
"未知"
,
"当前用户角色不详,请联系管理员"
);
List
<
Long
>
relatedContractIdList
=
Opt
.
ofNullable
(
dto
.
getProductLine
())
.
map
(
pl
->
Db
.
listObjs
(
Wrappers
.
lambdaQuery
(
Store
.
class
).
eq
(
Store:
:
getProductLine
,
pl
),
Store:
:
getId
))
.
map
(
storeIds
->
contractStoreService
.
listObjs
(
Wrappers
.<
RContractStore
>
lambdaQuery
().
select
(
RContractStore:
:
getContractId
).
in
(
RContractStore:
:
getStoreId
,
storeIds
),
o
->
Long
.
valueOf
(
o
.
toString
())))
.
orElse
(
ListUtil
.
empty
());
JSONObject
obj
=
JSONUtil
.
createObj
()
.
set
(
"totalAmount"
,
0
)
.
set
(
"paidAmount"
,
0
)
...
...
@@ -331,10 +336,15 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
return
obj
;
}
List
<
Contract
>
contracts
=
this
.
list
(
Wrappers
.
lambdaQuery
(
converter
.
convert
(
dto
,
Contract
.
class
))
MPJLambdaWrapper
<
Contract
>
wrapper
=
new
MPJLambdaWrapper
<>(
converter
.
convert
(
dto
,
Contract
.
class
))
.
selectAll
(
Contract
.
class
)
.
leftJoin
(
RContractUser
.
class
,
RContractUser:
:
getContractId
,
Contract:
:
getId
)
.
eq
(
StrUtil
.
isNotBlank
(
saleName
),
Contract:
:
getSaleName
,
saleName
)
.
between
(
ArrayUtil
.
isAllNotNull
(
dto
.
getSignDateStart
(),
dto
.
getSignDateEnd
()),
Contract:
:
getSignDate
,
dto
.
getSignDateStart
(),
dto
.
getSignDateEnd
())
);
.
or
()
.
eq
(
StrUtil
.
isNotBlank
(
saleName
),
RContractUser:
:
getUsername
,
saleName
)
.
in
(
CollUtil
.
isNotEmpty
(
relatedContractIdList
),
Contract:
:
getId
,
relatedContractIdList
)
.
between
(
ArrayUtil
.
isAllNotNull
(
dto
.
getSignDateStart
(),
dto
.
getSignDateEnd
()),
Contract:
:
getSignDate
,
dto
.
getSignDateStart
(),
dto
.
getSignDateEnd
());
List
<
Contract
>
contracts
=
this
.
selectJoinList
(
Contract
.
class
,
wrapper
);
Opt
.
ofEmptyAble
(
contracts
)
.
ifPresent
(
list
->
{
...
...
@@ -408,7 +418,7 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
Opt
.
ofNullable
(
type2DateMap
.
get
(
type
)).
ifPresent
(
date
->
{
financialAgeVO
.
setPayableDate
(
date
);
long
age
=
DateUtil
.
between
(
new
Date
(),
date
,
DateUnit
.
DAY
,
fals
e
);
long
age
=
DateUtil
.
between
(
date
,
new
Date
(),
DateUnit
.
DAY
,
tru
e
);
financialAgeVO
.
setAge
(((
int
)
age
));
}
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment