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
3426385d
Commit
3426385d
authored
Dec 29, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d32a6cde
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
49 additions
and
31 deletions
+49
-31
SessionHandlerInterceptor.java
...t/other/common/interceptor/SessionHandlerInterceptor.java
+2
-3
OaDepartment.java
...in/java/com/blt/other/module/auth/model/OaDepartment.java
+3
-0
OaDepartmentServiceImpl.java
...her/module/auth/service/impl/OaDepartmentServiceImpl.java
+0
-1
CostDomain.java
...main/java/com/blt/other/module/cost/model/CostDomain.java
+5
-0
DepartmentCheckState.java
...ule/cost/service/impl/costcheck/DepartmentCheckState.java
+1
-2
FinancialCheckState.java
...dule/cost/service/impl/costcheck/FinancialCheckState.java
+4
-5
HrCheckState.java
...ther/module/cost/service/impl/costcheck/HrCheckState.java
+1
-1
application-dev.yml
bailuntec-cost-core/src/main/resources/application-dev.yml
+11
-7
application-test.yml
bailuntec-cost-core/src/main/resources/application-test.yml
+11
-7
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+1
-1
OaDepartmentMapper.xml
...ore/src/main/resources/mapper/auth/OaDepartmentMapper.xml
+1
-0
DepartmentReviewerMapper.xml
.../resources/mapper/module/sys/DepartmentReviewerMapper.xml
+4
-1
OtherApplicationTests.java
...re/src/test/java/com/blt/other/OtherApplicationTests.java
+5
-3
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/common/interceptor/SessionHandlerInterceptor.java
View file @
3426385d
...
...
@@ -8,7 +8,6 @@ import com.blt.other.common.util.SessionUtils;
import
com.google.common.collect.Lists
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.servlet.HandlerInterceptor
;
...
...
@@ -28,7 +27,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
.
stream
()
.
filter
(
item
->
item
.
contains
(
"BailunToken"
))
.
findAny
()
.
map
(
item
->
item
.
replaceAll
(
"BailunToken="
,
""
))
.
map
(
item
->
item
.
replaceAll
(
"BailunToken="
,
""
)
.
trim
()
)
.
orElseThrow
(()
->
new
BizRuntimeException
(
"400"
,
"请先登陆"
));
SysUser
sysUser
=
JwtUtil
.
validateToken
(
token
);
...
...
@@ -36,7 +35,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
}
catch
(
Exception
ex
)
{
String
activeProfile
=
SpringContextUtil
.
getString
(
"spring.profiles.active"
);
if
(
activeProfile
.
equals
(
"test
"
))
{
if
(
!
activeProfile
.
equals
(
"prod
"
))
{
SysUser
sysUser
=
new
SysUser
();
sysUser
.
setOaUserId
(
0
);
sysUser
.
setUserName
(
"sys"
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/model/OaDepartment.java
View file @
3426385d
...
...
@@ -65,6 +65,9 @@ public class OaDepartment implements Serializable {
private
String
createUserName
;
@ApiModelProperty
(
"部门全名"
)
private
String
fullName
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd'T'HH:mm:ss"
)
private
LocalDateTime
createTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd'T'HH:mm:ss"
)
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/service/impl/OaDepartmentServiceImpl.java
View file @
3426385d
...
...
@@ -60,7 +60,6 @@ public class OaDepartmentServiceImpl extends ServiceImpl<OaDepartmentMapper, OaD
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
departmentReviewer
)
.
eq
(
CostReviewer:
:
getReferId
,
oaDepartmentId
));
//新增审核人
departmentReviewerUserIds
.
forEach
(
departmentReviewerUserId
->
{
//新增审核人
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostDomain.java
View file @
3426385d
...
...
@@ -57,6 +57,11 @@ public class CostDomain implements Serializable {
private
String
costNo
;
@ApiModelProperty
(
"费用计划编号"
)
private
String
costPlanNo
;
@ApiModelProperty
(
"当前部门id"
)
private
Integer
costDepartmentId
;
@ApiModelProperty
(
"主体编号"
)
private
String
companyNo
;
@ApiModelProperty
(
"主体名称"
)
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/DepartmentCheckState.java
View file @
3426385d
...
...
@@ -90,10 +90,9 @@ public class DepartmentCheckState extends CostState {
//人工审核
OaUser
costUser
=
oaUserMapper
.
selectByOaUserId
(
costDomain
.
getCreateUserid
());
if
(
costContext
.
currentUserId
!=
null
)
{
//人工审核通过
if
(
!
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
if
(
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/FinancialCheckState.java
View file @
3426385d
...
...
@@ -2,13 +2,13 @@ package com.blt.other.module.cost.service.impl.costcheck;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.module.sys.model.CostReviewer
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostLogDomain
;
import
com.blt.other.module.auth.service.IOaUserService
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.model.CostTemplate
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostLogDomain
;
import
com.blt.other.module.sys.model.CostReviewer
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -71,10 +71,9 @@ public class FinancialCheckState extends CostState {
}
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByNo
(
costDomain
.
getCompanyNo
());
if
(
costContext
.
currentUserId
!=
null
)
{
//人工审核通过
if
(
!
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
if
(
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/HrCheckState.java
View file @
3426385d
...
...
@@ -67,7 +67,7 @@ public class HrCheckState extends CostState {
//人工审核
if
(
costContext
.
currentUserId
!=
null
)
{
//人工审核通过
if
(
!
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
if
(
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
...
...
bailuntec-cost-core/src/main/resources/application-dev.yml
View file @
3426385d
...
...
@@ -38,22 +38,26 @@ logging:
#项目参数配置
cost
:
url
:
purchase-apply-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# fee
purchase-apply-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# oa
buy-user-api
:
http://oa.bailuntec.com/Api/User/GetUser
login-user-api
:
http://oa.bailuntec.com/Login/GetUserByBLUserAcct
get-exchange-rate-api
:
http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-department-list-api
:
http://oa.bailuntec.com/api/User/GetDeparmentList
# cw
post-company-list-api
:
http://cw.bailuntec.com/API/API/GetCompanyMainBody
post-apply-api
:
http://cw.bailuntec.com/API/API/Apply
post-company-list-finance-api
:
http://cw.bailuntec.com/API/API/GetBankAccount
get-exchange-rate-api
:
http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-consumables-api
:
http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api
:
http://cw.bailuntec.com/API/API/GetCashierAnnex
# supplier
get-supplier-page-list-api
:
http://supplier.bailuntec.com/Api/GetSupplierPageList
get-all-logistics-finance-api
:
http://supplier.bailuntec.com/Api/GetLogisticsSupplier
get-all-sub-logistics-finance-api
:
http://supplier.bailuntec.com/Api/GetSubLogisticsSupplier
get-consumables-api
:
http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api
:
http://cw.bailuntec.com/API/API/GetCashierAnnex
fee-domain
:
bailuntec.com
# servlet 容器配置
...
...
bailuntec-cost-core/src/main/resources/application-test.yml
View file @
3426385d
...
...
@@ -43,22 +43,26 @@ logging:
#项目参数配置
cost
:
url
:
purchase-apply-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post
:
http://api.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# fee
purchase-apply-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/ApplyCallbackUrl
purchase-cashier-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/purchasing/list/detail/CashierCallbackUrl
cost-apply-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/cost/check/ApplyCallbackUrl
cost-cashier-callback-url-post
:
http://api.test.fee.bailuntec.com/purchase/other/cost/check/CashierCallbackUrl
# oa
buy-user-api
:
http://oa.bailuntec.com/Api/User/GetUser
login-user-api
:
http://oa.bailuntec.com/Login/GetUserByBLUserAcct
get-exchange-rate-api
:
http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-department-list-api
:
http://oa.bailuntec.com/api/User/GetDeparmentList
# cw
post-company-list-api
:
http://cw.bailuntec.com/API/API/GetCompanyMainBody
post-apply-api
:
http://cw.bailuntec.com/API/API/Apply
post-company-list-finance-api
:
http://cw.bailuntec.com/API/API/GetBankAccount
get-exchange-rate-api
:
http://oa.bailuntec.com/api/ExchangeRate/GetExchangeRate
get-consumables-api
:
http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api
:
http://cw.bailuntec.com/API/API/GetCashierAnnex
# supplier
get-supplier-page-list-api
:
http://supplier.bailuntec.com/Api/GetSupplierPageList
get-all-logistics-finance-api
:
http://supplier.bailuntec.com/Api/GetLogisticsSupplier
get-all-sub-logistics-finance-api
:
http://supplier.bailuntec.com/Api/GetSubLogisticsSupplier
get-consumables-api
:
http://cw.bailuntec.com/Cashier/Cashier/BuyCashierRecordList
get-cashier-annex-api
:
http://cw.bailuntec.com/API/API/GetCashierAnnex
fee-domain
:
bailuntec.com
# servlet 容器配置
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
3426385d
...
...
@@ -501,7 +501,7 @@
<select
id=
"departmentAutoCheckLllCostList"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 2 and t2.update_userid = #{
userid.oaUserI
d}
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 2 and t2.update_userid = #{
req.useri
d}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
...
...
bailuntec-cost-core/src/main/resources/mapper/auth/OaDepartmentMapper.xml
View file @
3426385d
...
...
@@ -42,6 +42,7 @@
t2.name company_name
from oa_department t1
left join oa_company t2 on t1.company_id = t2.oa_company_id
order by t2.id, t1.id
</select>
<select
id=
"selectByName"
resultType=
"com.blt.other.module.auth.model.OaDepartment"
>
select *
...
...
bailuntec-cost-core/src/main/resources/mapper/module/sys/DepartmentReviewerMapper.xml
View file @
3426385d
...
...
@@ -4,9 +4,12 @@
<select
id=
"departmentReviewerList"
resultType=
"com.blt.other.module.sys.dto.response.DepartmentReviewerListItem"
>
select t1.*
select t1.*,
t4.name company_name
from department_reviewer t1
left join cost_reviewer t2 on t1.id = t2.refer_id
left join oa_department t3 on t1.primary_department_id =t3.department_id
left join oa_company t4 on t3.company_id = t4.oa_company_id
where true
<if
test=
"req.reviewerUserId !=null"
>
and t2.reviewer_user_id =#{req.reviewerUserId}
...
...
bailuntec-cost-core/src/test/java/com/blt/other/OtherApplicationTests.java
View file @
3426385d
...
...
@@ -9,7 +9,6 @@ import com.blt.other.module.auth.model.OaDepartment;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.auth.service.IOaDepartmentService
;
import
com.blt.other.module.auth.service.IOaUserService
;
import
com.blt.other.module.cost.service.impl.costcheck.DepartmentCheckState
;
import
com.blt.other.module.sys.dao.CostReviewerMapper
;
import
com.blt.other.module.sys.dao.DepartmentReviewerMapper
;
import
com.blt.other.module.sys.model.CostReviewer
;
...
...
@@ -88,7 +87,7 @@ public class OtherApplicationTests {
});
}
@Rollback
@Rollback
(
value
=
false
)
@Test
public
void
syncOa
()
{
List
<
OaUserResp
>
oaUserRespList
=
oaApi
.
getAllUser
();
...
...
@@ -117,7 +116,7 @@ public class OtherApplicationTests {
oaDepartment
.
setSort
(
oaDepartmentResp
.
getSort
());
oaDepartment
.
setParentId
(
oaDepartmentResp
.
getParentId
());
oaDepartment
.
setDepartmentId
(
oaDepartmentResp
.
getDepartmentId
());
oaDepartment
.
setFullName
(
oaDepartmentResp
.
getFullName
());
return
oaDepartment
;
})
.
collect
(
Collectors
.
toList
());
...
...
@@ -136,6 +135,9 @@ public class OtherApplicationTests {
if
(
oaDepartmentMapper
.
selectByDepartmentId
(
oaDepartment
.
getDepartmentId
())
==
null
)
{
oaDepartment
.
setUpdateUserId
(
0
);
oaDepartmentService
.
save
(
oaDepartment
);
}
else
{
oaDepartmentService
.
update
(
oaDepartment
,
new
LambdaQueryWrapper
<
OaDepartment
>()
.
eq
(
OaDepartment:
:
getDepartmentId
,
oaDepartment
.
getDepartmentId
()));
}
});
...
...
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