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
8994f437
Commit
8994f437
authored
Nov 30, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fa4751f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
application-prod.yml
bailuntec-cost-core/src/main/resources/application-prod.yml
+2
-2
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+1
-1
OaDepartmentServiceImplTest.java
...module/auth/service/impl/OaDepartmentServiceImplTest.java
+19
-11
No files found.
bailuntec-cost-core/src/main/resources/application-prod.yml
View file @
8994f437
...
@@ -2,8 +2,8 @@ spring:
...
@@ -2,8 +2,8 @@ spring:
# 数据源配置
# 数据源配置
datasource
:
datasource
:
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
#
url: jdbc:mysql://gz-cdb-lnrmt5zh.sql.tencentcdb.com:61369/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://gz-cdb-lnrmt5zh.sql.tencentcdb.com:61369/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://10.0.8.2:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
#
url: jdbc:mysql://10.0.8.2:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
username
:
root
username
:
root
password
:
"
#7kfnymAM$Y9-Ntf"
password
:
"
#7kfnymAM$Y9-Ntf"
hikari
:
hikari
:
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
8994f437
...
@@ -466,7 +466,7 @@
...
@@ -466,7 +466,7 @@
and (t7.reviewer_user_id = #{req.userid} )
and (t7.reviewer_user_id = #{req.userid} )
</if>
</if>
<if
test=
" req.costNo!=null and req.costNo != ''"
>
<if
test=
" req.costNo!=null and req.costNo != ''"
>
and t1.cost_no
=#{req.costNo}
and t1.cost_no
like concat('%',#{req.costNo},'%')
</if>
</if>
group by
group by
t1.id
t1.id
...
...
bailuntec-cost-core/src/test/java/com/blt/other/module/auth/service/impl/OaDepartmentServiceImplTest.java
View file @
8994f437
package
com
.
blt
.
other
.
module
.
auth
.
service
.
impl
;
package
com
.
blt
.
other
.
module
.
auth
.
service
.
impl
;
import
com.bailuntec.common.ListUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.blt.other.module.auth.dao.CostReviewerMapper
;
import
com.blt.other.module.auth.dao.CostReviewerMapper
;
import
com.blt.other.module.auth.dao.OaDepartmentMapper
;
import
com.blt.other.module.auth.dao.OaDepartmentMapper
;
...
@@ -16,6 +17,7 @@ import org.springframework.test.context.ActiveProfiles;
...
@@ -16,6 +17,7 @@ import org.springframework.test.context.ActiveProfiles;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -71,23 +73,29 @@ public class OaDepartmentServiceImplTest {
...
@@ -71,23 +73,29 @@ public class OaDepartmentServiceImplTest {
@Test
@Test
public
void
setDepartmentReviewer
()
{
public
void
setDepartmentReviewer
()
{
costReviewerMapper
.
delete
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
departmentReviewer
));
oaDepartmentMapper
.
selectList
(
new
LambdaQueryWrapper
<>())
oaDepartmentMapper
.
selectList
(
new
LambdaQueryWrapper
<>())
.
forEach
(
oaDepartment
->
{
.
forEach
(
oaDepartment
->
{
try
{
try
{
String
manage
=
oaDepartment
.
getManageUser1
();
OaUser
oaUser
=
oaUserMapper
.
selectByUserName
(
manage
);
CostReviewer
costReviewer
=
CostReviewer
.
builder
()
List
<
CostReviewer
>
costReviewerList
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
reviewerUserId
(
oaUser
.
getOaUserId
())
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
departmentReviewer
)
.
reviewerUserName
(
oaUser
.
getUserName
())
.
eq
(
CostReviewer:
:
getReferId
,
oaDepartment
.
getDepartmentId
()));
.
referId
(
oaDepartment
.
getDepartmentId
())
.
type
(
CostReviewer
.
departmentReviewer
)
if
(
ListUtil
.
isEmpty
(
costReviewerList
))
{
.
build
();
String
manage
=
oaDepartment
.
getManageUser1
();
OaUser
oaUser
=
oaUserMapper
.
selectByUserName
(
manage
);
CostReviewer
costReviewer
=
CostReviewer
.
builder
()
.
reviewerUserId
(
oaUser
.
getOaUserId
())
.
reviewerUserName
(
oaUser
.
getUserName
())
.
referId
(
oaDepartment
.
getDepartmentId
())
.
type
(
CostReviewer
.
departmentReviewer
)
.
build
();
costReviewerMapper
.
insert
(
costReviewer
);
}
costReviewerMapper
.
insert
(
costReviewer
);
}
catch
(
Exception
ignore
)
{
}
catch
(
Exception
ignore
)
{
}
}
...
...
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