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
d387373e
Commit
d387373e
authored
Jan 09, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c709d5ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
13 deletions
+87
-13
CostPlanTempDomain.java
...java/com/blt/other/database/model/CostPlanTempDomain.java
+17
-11
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+3
-2
FinancialCheckStateTest.java
.../cost/service/impl/costcheck/FinancialCheckStateTest.java
+67
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/database/model/CostPlanTempDomain.java
View file @
d387373e
...
...
@@ -17,21 +17,28 @@ import java.math.BigDecimal;
@TableName
(
"cost_plan_temp"
)
@Data
public
class
CostPlanTempDomain
{
// 费用单表 id
// 费用单表 id
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
String
costPlanNo
;
// 费用计划编号
private
String
tempNo
;
// 计划缓存编号
private
String
filePath
;
// 文件地址
private
BigDecimal
amount
;
// 费用总金额
private
String
costReason
;
// 付款理由
private
String
dic
;
// 币种
private
String
typeNo
;
// 大类编号
// 费用计划编号
private
String
costPlanNo
;
// 计划缓存编号
private
String
tempNo
;
// 文件地址
private
String
filePath
;
// 费用总金额
private
BigDecimal
amount
;
// 付款理由
private
String
costReason
;
// 币种
private
String
dic
;
// 大类编号
private
String
typeNo
;
// 会计一级科目
@ApiModelProperty
(
"会计一级科目"
)
private
String
accountingSubjectNo
;
//会计一级科目
@ApiModelProperty
(
"会计一级科目"
)
private
String
accountingSubjectName
;
...
...
@@ -56,7 +63,6 @@ public class CostPlanTempDomain {
dto
.
setTypeNo
(
costTypeDomain
.
getTypeName
());
}
dto
.
setFileName
(
PathUtil
.
getFileName
(
dto
.
getFilePath
()));
return
dto
;
}
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
d387373e
...
...
@@ -56,7 +56,6 @@ public class CostController {
FinalCheckState
finalCheckState
;
@Resource
FinancialCheckState
financialCheckState
;
@Resource
HrCheckState
hrCheckState
;
...
...
@@ -213,7 +212,9 @@ public class CostController {
public
CostResult
<
Long
>
checkCostCount
(
CheckCostListReq
req
)
{
costService
=
CostServiceFactory
.
getCostService
();
Long
count
=
costService
.
checkCostList
(
req
).
getTotal
();
return
CostResult
.
success
(
count
);
req
.
setType
(
1
);
Long
count1
=
costService
.
checkCostList
(
req
).
getTotal
();
return
CostResult
.
success
(
count
+
count1
);
}
@ApiOperation
(
"部门审核通过"
)
...
...
bailuntec-cost-core/src/test/java/com/blt/other/module/cost/service/impl/costcheck/FinancialCheckStateTest.java
0 → 100644
View file @
d387373e
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
.
costcheck
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.ICostCurrentReviewerService
;
import
com.blt.other.module.sys.dao.CostReviewerMapper
;
import
com.blt.other.module.sys.model.CostReviewer
;
import
com.google.common.collect.Lists
;
import
org.junit.jupiter.api.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.annotation.Rollback
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/8 6:02 下午
*/
@Transactional
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
@ActiveProfiles
(
"prod"
)
class
FinancialCheckStateTest
{
@Resource
CostDao
costDao
;
@Resource
CostCompanyDao
costCompanyDao
;
@Resource
CostReviewerMapper
costReviewerMapper
;
@Resource
ICostCurrentReviewerService
costCurrentReviewerService
;
@Test
@Rollback
(
value
=
false
)
public
void
reSet
()
{
List
<
String
>
costs
=
Lists
.
newArrayList
(
"F031366"
,
"F031367"
,
"F031370"
);
costs
.
forEach
(
this
::
reSet
);
}
//F031366
//F031367
//F031370
private
void
reSet
(
String
costNo
)
{
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
CostCompanyDomain
costCompanyDomain
=
costCompanyDao
.
selectByNo
(
costDomain
.
getCompanyNo
());
List
<
CostReviewer
>
costReviewerList
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
eq
(
CostReviewer:
:
getReferId
,
costCompanyDomain
.
getId
())
.
eq
(
CostReviewer:
:
getType
,
CostReviewer
.
financialReviewer
));
costCurrentReviewerService
.
updateByCostNoAndReviewer
(
costDomain
.
getCostNo
(),
costReviewerList
);
}
}
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