切换导航条
此项目
正在载入...
登录
allied-creation
/
allied-creation-cooperation
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
yangfu
3 years ago
提交
cf166f60f23b4744a5926684af12cd69e9d305aa
1 个父辈
1375f5be
共创用户列表修改、合约数
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
7 行增加
和
8 行删除
pkg/infrastructure/domain_service/pg_cooperation_company_statistics_service.go
pkg/infrastructure/domain_service/pg_cooperation_person_statistics_service.go
pkg/infrastructure/domain_service/pg_cooperation_company_statistics_service.go
查看文件 @
cf166f6
...
...
@@ -311,12 +311,11 @@ func (ptr *CooperationStatisticsService) CompanyCooperationUsersStatistics(query
var
retMap
=
make
([]
interface
{},
0
)
for
i
:=
range
responses
{
responses
[
i
]
.
CooperationTime
=
time
.
Now
()
.
Unix
()
*
1000
unPaidAmount
:=
responses
[
i
]
.
DividesAmount
-
responses
[
i
]
.
ActuallyPaidAmount
item
:=
map
[
string
]
interface
{}{
"dividendsOrderAmount"
:
responses
[
i
]
.
DividendsOrderAmount
,
"actuallyPaidAmount"
:
responses
[
i
]
.
ActuallyPaidAmount
,
"unPaidAmount"
:
u
nPaidAmount
,
"unPaidAmount"
:
responses
[
i
]
.
U
nPaidAmount
,
"cooperationTime"
:
time
.
Now
()
.
Unix
()
*
1000
,
"participator"
:
map
[
string
]
interface
{}{
"userId"
:
responses
[
i
]
.
UserId
,
...
...
pkg/infrastructure/domain_service/pg_cooperation_person_statistics_service.go
查看文件 @
cf166f6
...
...
@@ -119,21 +119,21 @@ func (ptr *CooperationStatisticsService) PersonCooperationContractStatistics(que
if
len
(
contractUndertakers
)
==
0
{
return
response
,
nil
}
var
numbers
[]
string
var
contractIds
[]
int64
for
i
:=
range
contractUndertakers
{
numbers
=
append
(
numbers
,
contractUndertakers
[
i
]
.
CooperationContractNumber
)
contractIds
=
append
(
contractIds
,
contractUndertakers
[
i
]
.
CooperationContractId
)
}
response
.
ContractSum
=
ptr
.
cooperationContractCount
(
numbers
,
0
)
response
.
ContractStoppedSum
=
ptr
.
cooperationContractCount
(
numbers
,
2
)
response
.
ContractSum
=
ptr
.
cooperationContractCount
(
contractIds
,
0
)
response
.
ContractStoppedSum
=
ptr
.
cooperationContractCount
(
contractIds
,
2
)
return
response
,
nil
}
func
(
ptr
*
CooperationStatisticsService
)
cooperationContractCount
(
numbers
[]
string
,
status
int
)
int
{
func
(
ptr
*
CooperationStatisticsService
)
cooperationContractCount
(
contractIds
[]
int64
,
status
int
)
int
{
var
total
int
var
contract
=
new
(
models
.
CooperationContract
)
query
:=
ptr
.
transactionContext
.
PgDd
.
Model
(
contract
)
query
.
ColumnExpr
(
"count(*) total"
)
query
.
Where
(
"cooperation_contract_
number in (?)"
,
pg
.
In
(
number
s
))
query
.
Where
(
"cooperation_contract_
id in (?)"
,
pg
.
In
(
contractId
s
))
if
status
>
0
{
query
.
Where
(
"status =? "
,
status
)
}
...
...
请
注册
或
登录
后发表评论