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
f1b01b0f
Commit
f1b01b0f
authored
Dec 01, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
last update time update
parent
1895f99b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
42 additions
and
2 deletions
+42
-2
CostStatusSyncJob.java
...main/java/com/blt/other/common/job/CostStatusSyncJob.java
+1
-0
CostService.java
...n/java/com/blt/other/module/cost/service/CostService.java
+1
-0
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+0
-2
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+8
-0
Lend2PayCostServiceImpl.java
...odule/cost/service/impl/cost/Lend2PayCostServiceImpl.java
+6
-0
DepartmentCheckState.java
...ule/cost/service/impl/costcheck/DepartmentCheckState.java
+4
-0
FinalCheckState.java
...r/module/cost/service/impl/costcheck/FinalCheckState.java
+4
-0
FinancialCheckState.java
...dule/cost/service/impl/costcheck/FinancialCheckState.java
+3
-0
HrCheckState.java
...ther/module/cost/service/impl/costcheck/HrCheckState.java
+3
-0
UnSubmitState.java
...her/module/cost/service/impl/costcheck/UnSubmitState.java
+3
-0
AbstractCostPlanService.java
...e/cost/service/impl/costplan/AbstractCostPlanService.java
+2
-0
CostPlanNewLend2ServiceImpl.java
...st/service/impl/costplan/CostPlanNewLend2ServiceImpl.java
+5
-0
BuyServiceImpl.java
.../other/module/purchasing/service/impl/BuyServiceImpl.java
+2
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/common/job/CostStatusSyncJob.java
View file @
f1b01b0f
...
@@ -44,6 +44,7 @@ public class CostStatusSyncJob extends QuartzJobBean {
...
@@ -44,6 +44,7 @@ public class CostStatusSyncJob extends QuartzJobBean {
costDomainList
.
forEach
(
costDomain
->
{
costDomainList
.
forEach
(
costDomain
->
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_DELETE
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_DELETE
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
int
result
=
costDao
.
updateById
(
costDomain
);
int
result
=
costDao
.
updateById
(
costDomain
);
if
(
result
>
0
)
{
if
(
result
>
0
)
{
CostLogDomain
costLog
=
new
CostLogDomain
();
CostLogDomain
costLog
=
new
CostLogDomain
();
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/CostService.java
View file @
f1b01b0f
...
@@ -24,6 +24,7 @@ public interface CostService {
...
@@ -24,6 +24,7 @@ public interface CostService {
Integer
saveNewCost
(
CostDomain
costDomain
);
Integer
saveNewCost
(
CostDomain
costDomain
);
void
setPrimaryDepartment
(
List
<
CostDomain
>
costDomains
);
void
setPrimaryDepartment
(
List
<
CostDomain
>
costDomains
);
/**
/**
* 获取所有费用单
* 获取所有费用单
*
*
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
f1b01b0f
...
@@ -24,7 +24,6 @@ import org.slf4j.Logger;
...
@@ -24,7 +24,6 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -351,7 +350,6 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -351,7 +350,6 @@ public class CostApiServiceImpl implements CostApiService {
costDetailDomain
.
setFilePath
(
path
);
costDetailDomain
.
setFilePath
(
path
);
costDetailDao
.
insert
(
costDetailDomain
);
costDetailDao
.
insert
(
costDetailDomain
);
CostLogDomain
costLogDomain
=
new
CostLogDomain
();
CostLogDomain
costLogDomain
=
new
CostLogDomain
();
costLogDomain
.
setCostNo
(
costNo
);
costLogDomain
.
setCostNo
(
costNo
);
costLogDomain
.
setUpdateUserid
(
user
.
getUserid
());
costLogDomain
.
setUpdateUserid
(
user
.
getUserid
());
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
f1b01b0f
...
@@ -46,6 +46,7 @@ import org.springframework.util.StringUtils;
...
@@ -46,6 +46,7 @@ import org.springframework.util.StringUtils;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -173,6 +174,7 @@ public abstract class AbstractCostService implements CostService {
...
@@ -173,6 +174,7 @@ public abstract class AbstractCostService implements CostService {
UpdateCostResp
resp
=
new
UpdateCostResp
();
UpdateCostResp
resp
=
new
UpdateCostResp
();
setCostDomain
(
costDomain
);
setCostDomain
(
costDomain
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
Integer
update
=
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
Integer
update
=
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
...
@@ -231,6 +233,7 @@ public abstract class AbstractCostService implements CostService {
...
@@ -231,6 +233,7 @@ public abstract class AbstractCostService implements CostService {
costDomain
.
setKindNo
(
costDetailDomains
.
get
(
0
).
getKindNo
());
costDomain
.
setKindNo
(
costDetailDomains
.
get
(
0
).
getKindNo
());
costDomain
.
setKindName
(
costDetailDomains
.
get
(
0
).
getKindName
());
costDomain
.
setKindName
(
costDetailDomains
.
get
(
0
).
getKindName
());
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
}
}
...
@@ -241,12 +244,14 @@ public abstract class AbstractCostService implements CostService {
...
@@ -241,12 +244,14 @@ public abstract class AbstractCostService implements CostService {
CostDomain
costDomain
=
new
CostDomain
();
CostDomain
costDomain
=
new
CostDomain
();
costDomain
.
setCostNo
(
costNo
);
costDomain
.
setCostNo
(
costNo
);
costDomain
.
setCostStatus
(
i
);
costDomain
.
setCostStatus
(
i
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
return
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
return
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
}
}
@Override
@Override
public
Integer
updateById
(
CostDomain
costDomain
)
{
public
Integer
updateById
(
CostDomain
costDomain
)
{
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
return
costDao
.
updateById
(
costDomain
);
return
costDao
.
updateById
(
costDomain
);
}
}
...
@@ -255,6 +260,7 @@ public abstract class AbstractCostService implements CostService {
...
@@ -255,6 +260,7 @@ public abstract class AbstractCostService implements CostService {
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
costDomain
.
setCashierFilePath
(
filePath
);
costDomain
.
setCashierFilePath
(
filePath
);
costDomain
.
setCashierDownloadPath
(
downloadUrl
);
costDomain
.
setCashierDownloadPath
(
downloadUrl
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
}
}
...
@@ -349,12 +355,14 @@ public abstract class AbstractCostService implements CostService {
...
@@ -349,12 +355,14 @@ public abstract class AbstractCostService implements CostService {
//费用计划关联借支单
//费用计划关联借支单
CostDomain
supCost
=
costDao
.
selectByCostNo
(
costDomain
.
getSupCostNo
());
CostDomain
supCost
=
costDao
.
selectByCostNo
(
costDomain
.
getSupCostNo
());
supCost
.
setCompensate
(
supCost
.
getCompensate
().
subtract
(
costDomain
.
getAmount
()));
supCost
.
setCompensate
(
supCost
.
getCompensate
().
subtract
(
costDomain
.
getAmount
()));
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCost
);
costDao
.
updateById
(
supCost
);
}
}
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_REJECT
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_REJECT
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
}
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/cost/Lend2PayCostServiceImpl.java
View file @
f1b01b0f
...
@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -50,6 +51,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
...
@@ -50,6 +51,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
cost
.
setToRmbRate
(
toRmbRate
);
cost
.
setToRmbRate
(
toRmbRate
);
cost
.
setAmountRmb
(
cost
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
cost
.
setAmountRmb
(
cost
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
cost
.
setAuditTime
(
new
Date
());
cost
.
setAuditTime
(
new
Date
());
cost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
cost
);
costDao
.
updateById
(
cost
);
//借还单
//借还单
...
@@ -68,6 +70,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
...
@@ -68,6 +70,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
//todo 邮件通知
//todo 邮件通知
log
.
error
(
"金额异常 联系管理员,costNo:{}"
,
supCostDomain
.
getCostNo
());
log
.
error
(
"金额异常 联系管理员,costNo:{}"
,
supCostDomain
.
getCostNo
());
}
}
supCostDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCostDomain
);
costDao
.
updateById
(
supCostDomain
);
}
}
return
;
return
;
...
@@ -117,6 +120,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
...
@@ -117,6 +120,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
CostDomain
supCost
=
costDao
.
selectByCostNo
(
costDomain
.
getSupCostNo
());
CostDomain
supCost
=
costDao
.
selectByCostNo
(
costDomain
.
getSupCostNo
());
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
subtract
(
costDomain
.
getAmount
()));
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
subtract
(
costDomain
.
getAmount
()));
supCost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCost
);
costDao
.
updateById
(
supCost
);
}
}
...
@@ -135,6 +139,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
...
@@ -135,6 +139,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
costDomain
.
setToRmbRate
(
toRmbRate
);
costDomain
.
setToRmbRate
(
toRmbRate
);
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDomain
.
setAuditTime
(
new
Date
());
costDomain
.
setAuditTime
(
new
Date
());
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
...
@@ -154,6 +159,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
...
@@ -154,6 +159,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
//todo 邮件通知
//todo 邮件通知
log
.
error
(
"金额异常 联系管理员,costNo:{}"
,
supCostDomain
.
getCostNo
());
log
.
error
(
"金额异常 联系管理员,costNo:{}"
,
supCostDomain
.
getCostNo
());
}
}
supCostDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCostDomain
);
costDao
.
updateById
(
supCostDomain
);
}
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/DepartmentCheckState.java
View file @
f1b01b0f
...
@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
...
@@ -49,6 +50,7 @@ public class DepartmentCheckState extends CostState {
...
@@ -49,6 +50,7 @@ public class DepartmentCheckState extends CostState {
if
(!
costTemplate
.
shouldDepartmentCheck
(
costDomain
,
oaDepartment
.
getDepartmentMinimumReviewAmount
()))
{
if
(!
costTemplate
.
shouldDepartmentCheck
(
costDomain
,
oaDepartment
.
getDepartmentMinimumReviewAmount
()))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
...
@@ -66,6 +68,7 @@ public class DepartmentCheckState extends CostState {
...
@@ -66,6 +68,7 @@ public class DepartmentCheckState extends CostState {
//自动审核通过
//自动审核通过
if
(
this
.
autoCheck
(
costDomain
))
{
if
(
this
.
autoCheck
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"部门自动审核通过"
,
CostLogDomain
.
DEPARTMENT_AUTO_PASS
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"部门自动审核通过"
,
CostLogDomain
.
DEPARTMENT_AUTO_PASS
);
...
@@ -82,6 +85,7 @@ public class DepartmentCheckState extends CostState {
...
@@ -82,6 +85,7 @@ public class DepartmentCheckState extends CostState {
//人工审核通过
//人工审核通过
if
(
costReviewerMapper
.
queryOne
(
costUser
.
getPrimaryDepartmentId
(),
CostReviewer
.
departmentReviewer
,
currentUserId
)
!=
null
)
{
if
(
costReviewerMapper
.
queryOne
(
costUser
.
getPrimaryDepartmentId
(),
CostReviewer
.
departmentReviewer
,
currentUserId
)
!=
null
)
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_HR_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"部门审核通过"
,
CostLogDomain
.
DEPARTMENT_MANUAL_PASS
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"部门审核通过"
,
CostLogDomain
.
DEPARTMENT_MANUAL_PASS
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/FinalCheckState.java
View file @
f1b01b0f
...
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component;
...
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
...
@@ -46,6 +47,7 @@ public class FinalCheckState extends CostState {
...
@@ -46,6 +47,7 @@ public class FinalCheckState extends CostState {
//如果不需要审核 并且主体不是工会 直接通过
//如果不需要审核 并且主体不是工会 直接通过
if
(!
costTemplate
.
shouldFinalCheck
(
costDomain
))
{
if
(!
costTemplate
.
shouldFinalCheck
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"最终审核自动通过"
,
CostLogDomain
.
FINAL_AUTO_PASS
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"最终审核自动通过"
,
CostLogDomain
.
FINAL_AUTO_PASS
);
...
@@ -59,6 +61,7 @@ public class FinalCheckState extends CostState {
...
@@ -59,6 +61,7 @@ public class FinalCheckState extends CostState {
//自动审核通过
//自动审核通过
if
(
this
.
autoCheck
(
costDomain
))
{
if
(
this
.
autoCheck
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"最终审核自动通过"
,
CostLogDomain
.
FINAL_AUTO_PASS
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"最终审核自动通过"
,
CostLogDomain
.
FINAL_AUTO_PASS
);
...
@@ -74,6 +77,7 @@ public class FinalCheckState extends CostState {
...
@@ -74,6 +77,7 @@ public class FinalCheckState extends CostState {
//人工审核通过
//人工审核通过
if
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
finalReviewer
,
currentUserId
)
!=
null
)
{
if
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
finalReviewer
,
currentUserId
)
!=
null
)
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"最终审核通过"
,
CostLogDomain
.
FINAL_MANUAL_PASS
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"最终审核通过"
,
CostLogDomain
.
FINAL_MANUAL_PASS
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/FinancialCheckState.java
View file @
f1b01b0f
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
...
@@ -49,6 +50,7 @@ public class FinancialCheckState extends CostState {
...
@@ -49,6 +50,7 @@ public class FinancialCheckState extends CostState {
//自动审核通过
//自动审核通过
if
(
this
.
autoCheck
(
costDomain
))
{
if
(
this
.
autoCheck
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINAL_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"财务自动审核通过"
,
CostLogDomain
.
FINANCIAL_AUTO_PASS
);
costLogService
.
saveByManage
(
costDomain
.
getCostNo
(),
"财务自动审核通过"
,
CostLogDomain
.
FINANCIAL_AUTO_PASS
);
...
@@ -66,6 +68,7 @@ public class FinancialCheckState extends CostState {
...
@@ -66,6 +68,7 @@ public class FinancialCheckState extends CostState {
//人工审核通过
//人工审核通过
if
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
financialReviewer
,
currentUserId
)
!=
null
)
{
if
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
financialReviewer
,
currentUserId
)
!=
null
)
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINAL_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"财务审核通过"
,
CostLogDomain
.
FINANCIAL_MANUAL_PASS
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"财务审核通过"
,
CostLogDomain
.
FINANCIAL_MANUAL_PASS
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/HrCheckState.java
View file @
f1b01b0f
...
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
...
@@ -50,6 +51,7 @@ public class HrCheckState extends CostState {
...
@@ -50,6 +51,7 @@ public class HrCheckState extends CostState {
if
(!
costTemplate
.
shouldHrCheck
(
costDomain
))
{
if
(!
costTemplate
.
shouldHrCheck
(
costDomain
))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
//流转状态
//流转状态
...
@@ -66,6 +68,7 @@ public class HrCheckState extends CostState {
...
@@ -66,6 +68,7 @@ public class HrCheckState extends CostState {
//人工审核通过
//人工审核通过
if
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
hrReviewer
,
currentUserId
)
!=
null
)
{
if
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
hrReviewer
,
currentUserId
)
!=
null
)
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_FINANCIAL_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"行政审核通过"
,
CostLogDomain
.
HR_PASS
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
currentUserId
,
"行政审核通过"
,
CostLogDomain
.
HR_PASS
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/UnSubmitState.java
View file @
f1b01b0f
...
@@ -6,6 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -6,6 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
*
*
...
@@ -33,6 +35,7 @@ public class UnSubmitState extends CostState {
...
@@ -33,6 +35,7 @@ public class UnSubmitState extends CostState {
//更新费用单
//更新费用单
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_DEPARTMENT_CHECK
);
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_DEPARTMENT_CHECK
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
costContext
.
currentUserId
,
"提交费用单"
);
costLogService
.
save
(
costDomain
.
getCostNo
(),
costContext
.
currentUserId
,
"提交费用单"
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costplan/AbstractCostPlanService.java
View file @
f1b01b0f
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -142,6 +143,7 @@ public abstract class AbstractCostPlanService implements CostPlanService {
...
@@ -142,6 +143,7 @@ public abstract class AbstractCostPlanService implements CostPlanService {
//费用计划关联借支单
//费用计划关联借支单
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costPlanDomain
.
getSupCostNo
());
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costPlanDomain
.
getSupCostNo
());
costDomain
.
setCompensate
(
costDomain
.
getCompensate
().
subtract
(
costPlanDomain
.
getPlanAmount
()));
costDomain
.
setCompensate
(
costDomain
.
getCompensate
().
subtract
(
costPlanDomain
.
getPlanAmount
()));
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
}
}
costPlanDao
.
deleteByNo
(
costPlanNo
);
costPlanDao
.
deleteByNo
(
costPlanNo
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costplan/CostPlanNewLend2ServiceImpl.java
View file @
f1b01b0f
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
/**
...
@@ -113,6 +114,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
...
@@ -113,6 +114,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单申请归还金额
//更新借支单申请归还金额
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
add
(
counteract
));
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
add
(
counteract
));
supCost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCost
);
costDao
.
updateById
(
supCost
);
log
.
info
(
"冲销刚好抵消差额 / 冲销小于差额 ===== 生成一张无需付款的借还单:"
+
costDomain
);
log
.
info
(
"冲销刚好抵消差额 / 冲销小于差额 ===== 生成一张无需付款的借还单:"
+
costDomain
);
...
@@ -138,6 +140,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
...
@@ -138,6 +140,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单申请归还金额
//更新借支单申请归还金额
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
add
(
costDomain
.
getCounteract
()));
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
add
(
costDomain
.
getCounteract
()));
supCost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCost
);
costDao
.
updateById
(
supCost
);
log
.
info
(
"生成一张无需收款的借还单:"
+
costDomain
);
log
.
info
(
"生成一张无需收款的借还单:"
+
costDomain
);
...
@@ -189,6 +192,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
...
@@ -189,6 +192,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单归还金额
//更新借支单归还金额
supCost
.
setCompensate
(
supCost
.
getCompensate
().
add
(
payPlan
.
getPlanAmount
()));
supCost
.
setCompensate
(
supCost
.
getCompensate
().
add
(
payPlan
.
getPlanAmount
()));
supCost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCost
);
costDao
.
updateById
(
supCost
);
}
}
}
}
...
@@ -235,6 +239,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
...
@@ -235,6 +239,7 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
//更新借支单申请归还金额
//更新借支单申请归还金额
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
add
(
lendBalance
));
supCost
.
setRepaymentAppliedAmount
(
supCost
.
getRepaymentAppliedAmount
().
add
(
lendBalance
));
supCost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
supCost
);
costDao
.
updateById
(
supCost
);
log
.
info
(
"1、冲销 0,还大于0 ==== 生成一张收款的借还单: "
+
costDomain
);
log
.
info
(
"1、冲销 0,还大于0 ==== 生成一张收款的借还单: "
+
costDomain
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/service/impl/BuyServiceImpl.java
View file @
f1b01b0f
...
@@ -43,6 +43,7 @@ import java.io.File;
...
@@ -43,6 +43,7 @@ import java.io.File;
import
java.io.FileOutputStream
;
import
java.io.FileOutputStream
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
@Service
@Service
...
@@ -381,6 +382,7 @@ public class BuyServiceImpl implements BuyService {
...
@@ -381,6 +382,7 @@ public class BuyServiceImpl implements BuyService {
costDao
.
insert
(
backCost
);
costDao
.
insert
(
backCost
);
costLogService
.
save
(
backCost
.
getCostNo
(),
updateUserId
,
"采购单【"
+
buyListDto
.
getBuyno
()
+
"】冲销借支单【"
+
linkLendCost
.
getCostNo
()
+
"】时由系统自动生成"
);
costLogService
.
save
(
backCost
.
getCostNo
(),
updateUserId
,
"采购单【"
+
buyListDto
.
getBuyno
()
+
"】冲销借支单【"
+
linkLendCost
.
getCostNo
()
+
"】时由系统自动生成"
);
linkLendCost
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
update
(
linkLendCost
,
new
LambdaQueryWrapper
<
CostDomain
>()
costDao
.
update
(
linkLendCost
,
new
LambdaQueryWrapper
<
CostDomain
>()
.
eq
(
CostDomain:
:
getCostNo
,
linkLendCost
.
getCostNo
()));
.
eq
(
CostDomain:
:
getCostNo
,
linkLendCost
.
getCostNo
()));
costLogService
.
save
(
linkLendCost
.
getCostNo
(),
updateUserId
,
"财务审核:"
+
result
);
costLogService
.
save
(
linkLendCost
.
getCostNo
(),
updateUserId
,
"财务审核:"
+
result
);
...
...
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