Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
512b5342
Commit
512b5342
authored
Nov 17, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
eab15ed2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
CostLogServiceImpl.java
...lt/other/module/cost/service/impl/CostLogServiceImpl.java
+11
-8
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+1
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostLogServiceImpl.java
View file @
512b5342
...
@@ -3,10 +3,10 @@ package com.blt.other.module.cost.service.impl;
...
@@ -3,10 +3,10 @@ package com.blt.other.module.cost.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.module.auth.dao.CostReviewerMapper
;
import
com.blt.other.module.auth.dao.CostReviewerMapper
;
import
com.blt.other.module.auth.dao.OaUserMapper
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.auth.model.CostReviewer
;
import
com.blt.other.module.auth.model.CostReviewer
;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.auth.service.IOaUserService
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dao.CostLogDao
;
import
com.blt.other.module.cost.dao.CostLogDao
;
...
@@ -58,7 +58,7 @@ public class CostLogServiceImpl implements CostLogService {
...
@@ -58,7 +58,7 @@ public class CostLogServiceImpl implements CostLogService {
}
}
@Resource
@Resource
IOaUserService
oaUserService
;
OaUserMapper
oaUserMapper
;
@Resource
@Resource
CostDao
costDao
;
CostDao
costDao
;
@Resource
@Resource
...
@@ -74,32 +74,35 @@ public class CostLogServiceImpl implements CostLogService {
...
@@ -74,32 +74,35 @@ public class CostLogServiceImpl implements CostLogService {
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
OaUser
oaUser
=
oaUserService
.
selectManage
(
costDomain
.
getCreateUserid
());
OaUser
costUser
=
oaUserMapper
.
selectByOaUserId
(
costDomain
.
getCreateUserid
());
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByNo
(
costDomain
.
getCompanyNo
());
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByNo
(
costDomain
.
getCompanyNo
());
OaUser
reviewer
;
OaUser
reviewer
;
if
(
type
.
equals
(
CostLogDomain
.
DEPARTMENT_AUTO_PASS
))
{
if
(
type
.
equals
(
CostLogDomain
.
DEPARTMENT_AUTO_PASS
))
{
reviewer
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
reviewer
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
departmentReviewer
)
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
departmentReviewer
)
.
eq
(
CostReviewer:
:
getReferId
,
oa
User
.
getPrimaryDepartmentId
()))
.
eq
(
CostReviewer:
:
getReferId
,
cost
User
.
getPrimaryDepartmentId
()))
.
stream
()
.
stream
()
.
limit
(
1
)
.
findAny
()
.
findAny
()
.
map
(
costReviewer
->
oaUser
Service
.
selectManage
(
costReviewer
.
getReviewerUserId
()))
.
map
(
costReviewer
->
oaUser
Mapper
.
selectByOaUserId
(
costReviewer
.
getReviewerUserId
()))
.
orElse
(
OaUser
.
DEFAULT
);
.
orElse
(
OaUser
.
DEFAULT
);
}
else
if
(
type
.
equals
(
CostLogDomain
.
FINANCIAL_AUTO_PASS
))
{
}
else
if
(
type
.
equals
(
CostLogDomain
.
FINANCIAL_AUTO_PASS
))
{
reviewer
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
reviewer
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
financialReviewer
)
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
financialReviewer
)
.
eq
(
CostReviewer:
:
getReferId
,
costCompany
.
getId
()))
.
eq
(
CostReviewer:
:
getReferId
,
costCompany
.
getId
()))
.
stream
()
.
stream
()
.
limit
(
1
)
.
findAny
()
.
findAny
()
.
map
(
costReviewer
->
oaUser
Service
.
selectManage
(
costReviewer
.
getReviewerUserId
()))
.
map
(
costReviewer
->
oaUser
Mapper
.
selectByOaUserId
(
costReviewer
.
getReviewerUserId
()))
.
orElse
(
OaUser
.
DEFAULT
);
.
orElse
(
OaUser
.
DEFAULT
);
}
else
if
(
type
.
equals
(
CostLogDomain
.
FINAL_AUTO_PASS
))
{
}
else
if
(
type
.
equals
(
CostLogDomain
.
FINAL_AUTO_PASS
))
{
reviewer
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
reviewer
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
finalReviewer
)
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
finalReviewer
)
.
eq
(
CostReviewer:
:
getReferId
,
costCompany
.
getId
()))
.
eq
(
CostReviewer:
:
getReferId
,
costCompany
.
getId
()))
.
stream
()
.
stream
()
.
limit
(
1
)
.
findAny
()
.
findAny
()
.
map
(
costReviewer
->
oaUser
Service
.
selectManage
(
costReviewer
.
getReviewerUserId
()))
.
map
(
costReviewer
->
oaUser
Mapper
.
selectByOaUserId
(
costReviewer
.
getReviewerUserId
()))
.
orElse
(
OaUser
.
DEFAULT
);
.
orElse
(
OaUser
.
DEFAULT
);
}
else
{
}
else
{
throw
new
BizRuntimeException
(
"invalid param"
);
throw
new
BizRuntimeException
(
"invalid param"
);
...
@@ -110,7 +113,7 @@ public class CostLogServiceImpl implements CostLogService {
...
@@ -110,7 +113,7 @@ public class CostLogServiceImpl implements CostLogService {
costLog
.
setUpdateUserid
(
reviewer
.
getOaUserId
());
costLog
.
setUpdateUserid
(
reviewer
.
getOaUserId
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
costLog
.
setUpdateNote
(
sdf
.
format
(
costLog
.
getUpdateTime
())
+
" "
+
updateMainNote
+
" 更新人:"
+
oaUs
er
.
getUserName
());
costLog
.
setUpdateNote
(
sdf
.
format
(
costLog
.
getUpdateTime
())
+
" "
+
updateMainNote
+
" 更新人:"
+
review
er
.
getUserName
());
costLog
.
setType
(
type
);
costLog
.
setType
(
type
);
return
costLogDao
.
insert
(
costLog
);
return
costLogDao
.
insert
(
costLog
);
}
}
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
512b5342
...
@@ -445,6 +445,7 @@
...
@@ -445,6 +445,7 @@
</if>
</if>
and (t7.reviewer_user_id = #{userid} )
and (t7.reviewer_user_id = #{userid} )
</if>
</if>
order by t1.create_time desc
group by
group by
t1.id
t1.id
</select>
</select>
...
...
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