Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
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
huluobin
bailuntec-cost
Commits
aeee3783
Commit
aeee3783
authored
Nov 12, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2478960a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
20 deletions
+58
-20
CostUrlProperties.java
...m/blt/other/common/config/property/CostUrlProperties.java
+4
-2
CostTemplateCol.java
...java/com/blt/other/module/cost/model/CostTemplateCol.java
+22
-1
PayCostServiceImpl.java
...her/module/cost/service/impl/cost/PayCostServiceImpl.java
+3
-13
DepartmentCheckState.java
...ule/cost/service/impl/costcheck/DepartmentCheckState.java
+1
-1
FinalCheckState.java
...r/module/cost/service/impl/costcheck/FinalCheckState.java
+1
-2
OaDepartmentServiceImplTest.java
...module/auth/service/impl/OaDepartmentServiceImplTest.java
+27
-1
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/common/config/property/CostUrlProperties.java
View file @
aeee3783
...
...
@@ -18,12 +18,14 @@ import org.springframework.stereotype.Component;
@ConfigurationProperties
(
"cost.url"
)
public
class
CostUrlProperties
{
//采购回调用
public
String
purchaseApplyCallbackUrlPost
;
public
String
purchaseCashierCallbackUrlPost
;
//费用单回调
public
String
costApplyCallbackUrlPost
;
public
String
costCashierCallbackUrlPost
;
public
String
lendCostApplyCallBackUrlPost
;
public
String
lendCostCashierCallbackUrlPost
;
public
String
getBuyDetailApi
;
public
String
getCostDetailApi
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostTemplateCol.java
View file @
aeee3783
...
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.model;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.google.common.collect.Lists
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -81,7 +82,27 @@ public class CostTemplateCol implements Serializable {
Field
field
=
clazz
.
getDeclaredField
(
this
.
costTemplateBaseCol
.
getColName
());
field
.
setAccessible
(
true
);
Object
fieldVar
=
field
.
get
(
costDomain
);
return
true
;
switch
(
autoRuleType
)
{
case
1
:
return
autoRuleCheckVal
.
compareTo
(
fieldVar
.
toString
())
==
0
;
case
2
:
return
autoRuleCheckVal
.
compareTo
(
fieldVar
.
toString
())
!=
0
;
case
3
:
return
autoRuleCheckVal
.
compareTo
(
fieldVar
.
toString
())
<
0
;
case
4
:
return
autoRuleCheckVal
.
compareTo
(
fieldVar
.
toString
())
<=
0
;
case
5
:
return
autoRuleCheckVal
.
compareTo
(
fieldVar
.
toString
())
>
0
;
case
6
:
return
autoRuleCheckVal
.
compareTo
(
fieldVar
.
toString
())
>=
0
;
case
7
:
return
Lists
.
newArrayList
(
autoRuleCheckVal
.
split
(
","
)).
contains
(
fieldVar
.
toString
());
case
8
:
return
!
Lists
.
newArrayList
(
autoRuleCheckVal
.
split
(
","
)).
contains
(
fieldVar
.
toString
());
//不用自动校验
default
:
return
true
;
}
}
catch
(
Exception
e
)
{
return
false
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/cost/PayCostServiceImpl.java
View file @
aeee3783
...
...
@@ -34,19 +34,9 @@ public class PayCostServiceImpl extends AbstractCostService implements CostServi
public
void
toFinancial
(
CostDomain
cost
)
{
PostApplyReq
req
=
buildPostApplyReq
(
cost
);
// 审核回调地址(ApplyCallbackUrl)不可为空;
if
(
cost
.
getCostNo
().
startsWith
(
"S"
))
{
log
.
info
(
"补差额的付款单:"
+
cost
.
getCostNo
());
// 审核回调地址(ApplyCallbackUrl)不可为空;
req
.
setApplyCallbackUrl
(
costUrlProperties
.
lendCostApplyCallBackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
req
.
setCashierCallbackUrl
(
costUrlProperties
.
lendCostCashierCallbackUrlPost
);
}
else
{
// 审核回调地址(ApplyCallbackUrl)不可为空;
req
.
setApplyCallbackUrl
(
costUrlProperties
.
costApplyCallbackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
req
.
setCashierCallbackUrl
(
costUrlProperties
.
costCashierCallbackUrlPost
);
}
req
.
setApplyCallbackUrl
(
costUrlProperties
.
costApplyCallbackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
req
.
setCashierCallbackUrl
(
costUrlProperties
.
costCashierCallbackUrlPost
);
req
.
setApplyType
(
""
+
1
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/DepartmentCheckState.java
View file @
aeee3783
...
...
@@ -59,7 +59,7 @@ public class DepartmentCheckState extends CostState {
//需要自动审核
if
(
costTemplate
.
shouldDepartmentAutoCheck
())
{
//自动审核通过
if
(
autoCheck
(
costDomain
))
{
if
(
this
.
autoCheck
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDao
.
updateById
(
costDomain
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"部门自动审核通过"
,
CostLogDomain
.
DEPARTMENT_AUTO_PASS
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/FinalCheckState.java
View file @
aeee3783
...
...
@@ -61,8 +61,7 @@ public class FinalCheckState extends CostState {
if
(!
costTemplate
.
shouldFinalCheck
(
costDomain
.
getAmount
()))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDao
.
updateById
(
costDomain
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"最终审核自动通过"
,
CostLogDomain
.
FINAL_AUTO_PASS
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"最终审核自动通过"
,
null
);
//通知财务系统
costContext
.
costService
.
toFinancial
(
costDomain
);
...
...
bailuntec-cost-core/src/test/java/com/blt/other/module/auth/service/impl/OaDepartmentServiceImplTest.java
View file @
aeee3783
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.blt.other.module.auth.dao.CostReviewerMapper
;
import
com.blt.other.module.auth.dao.OaDepartmentMapper
;
import
com.blt.other.module.auth.dao.OaUserMapper
;
import
com.blt.other.module.auth.model.CostReviewer
;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.auth.service.IOaCompanyService
;
import
com.blt.other.module.auth.service.IOaDepartmentService
;
...
...
@@ -61,10 +62,35 @@ public class OaDepartmentServiceImplTest {
oaCompany
.
getName
().
contains
(
"4k"
)
||
oaCompany
.
getName
().
contains
(
"歌戈儿"
)
||
oaCompany
.
getName
().
contains
(
"迪致"
)
||
oaCompany
.
getName
().
contains
(
"快询"
)){
oaCompany
.
getName
().
contains
(
"快询"
))
{
}
});
}
@Test
public
void
setDepartmentReviewer
()
{
costReviewerMapper
.
delete
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
departmentReviewer
));
oaDepartmentMapper
.
selectList
(
new
LambdaQueryWrapper
<>())
.
forEach
(
oaDepartment
->
{
try
{
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
);
}
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