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
f17ddf8b
Commit
f17ddf8b
authored
Jan 26, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# update
parent
535e2554
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
47 deletions
+16
-47
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+3
-35
AppCostServiceImpl.java
...lt/other/module/cost/service/impl/AppCostServiceImpl.java
+3
-3
CostTypeServiceImpl.java
...t/other/module/cost/service/impl/CostTypeServiceImpl.java
+10
-9
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
f17ddf8b
...
...
@@ -14,6 +14,7 @@ import com.blt.other.module.cost.dto.response.GetCostByCostPlanNoResp;
import
com.blt.other.module.cost.dto.response.PrintListResp
;
import
com.blt.other.module.cost.dto.response.UpdateCostResp
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostListSearchService
;
import
com.blt.other.module.cost.service.CostLogService
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.service.impl.cost.CostServiceFactory
;
...
...
@@ -56,6 +57,8 @@ public class CostController {
private
FinancialCheckState
financialCheckState
;
@Resource
private
HrCheckState
hrCheckState
;
@Resource
CostListSearchService
costListSearchService
;
@ApiOperation
(
"获取前端要打印的费用单列表"
)
...
...
@@ -76,29 +79,8 @@ public class CostController {
public
CostResult
<
Page
<
CostDto
>>
queryPage
(
@RequestBody
CostQueryPageReq
req
)
{
Page
<
CostDomain
>
costDaoPage
=
costService
.
queryPage
(
req
);
return
CostResult
.
success
((
Page
<
CostDto
>)
costDaoPage
.
convert
(
CostDomain:
:
castToDto
));
@ApiOperation
(
"搜索"
)
@PostMapping
(
"/list/search/key"
)
public
GetByKeyResp
getByKey
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
pageSize
,
@RequestParam
String
key
)
{
costService
=
CostServiceFactory
.
getCostService
();
return
costListSearchService
.
searchByKey
(
key
,
pageNum
,
pageSize
);
}
@ApiOperation
(
"搜索?"
)
@PostMapping
(
"/list/search/keys"
)
public
GetByKeyResp
getByKeys
(
@RequestBody
CostListSearchKeysVo
searchKeysVo
)
{
costService
=
CostServiceFactory
.
getCostService
();
if
(
null
!=
searchKeysVo
.
getParams
().
getKeys
().
getCostForm
()
&&
3
==
searchKeysVo
.
getParams
().
getKeys
().
getCostForm
())
{
searchKeysVo
.
getParams
().
getKeys
().
setIsLend
(
1
);
}
if
(
null
!=
searchKeysVo
.
getParams
().
getKeys
().
getCostForm
()
&&
4
==
searchKeysVo
.
getParams
().
getKeys
().
getCostForm
())
{
searchKeysVo
.
getParams
().
getKeys
().
setCostForm
(
3
);
searchKeysVo
.
getParams
().
getKeys
().
setIsLend
(
2
);
}
return
costListSearchService
.
searchByKeys
(
searchKeysVo
);
}
@ApiOperation
(
"获取借支单列表"
)
@GetMapping
(
"/list/search/getLinkCost"
)
...
...
@@ -107,20 +89,6 @@ public class CostController {
}
@ApiOperation
(
"获取所有费用单"
)
@GetMapping
(
"/list/getAllCost"
)
public
CostPageResult
getAllCost
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
pageSize
,
@RequestParam
Integer
userId
,
@RequestParam
(
defaultValue
=
"0"
,
required
=
false
)
Integer
authType
,
@RequestParam
(
required
=
false
)
String
projectTypes
)
{
if
(
authType
!=
0
)
{
userId
=
null
;
}
costService
=
CostServiceFactory
.
getCostService
();
return
costService
.
getAllCost
(
pageNum
,
pageSize
,
userId
,
projectTypes
);
}
@ApiOperation
(
"获取费用详情"
)
@PostMapping
(
"/list/getCostDetail"
)
public
CostResult
<
CostDto
>
getCostDetail
(
@RequestParam
String
costNo
)
{
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/AppCostServiceImpl.java
View file @
f17ddf8b
...
...
@@ -102,14 +102,14 @@ public class AppCostServiceImpl implements AppCostService {
public
static
BigDecimal
rece
(
BigDecimal
amount
,
int
months
)
{
if
(
months
>
1
)
{
return
rece
(
amount
.
add
(
new
BigDecimal
(
"
10000"
)).
multiply
(
new
BigDecimal
(
"1.
1"
)),
months
-
1
);
return
rece
(
amount
.
add
(
new
BigDecimal
(
"
200"
)).
multiply
(
new
BigDecimal
(
"1.0
1"
)),
months
-
1
);
}
else
{
return
amount
.
add
(
new
BigDecimal
(
"
10000"
)).
multiply
(
new
BigDecimal
(
"1.
1"
));
return
amount
.
add
(
new
BigDecimal
(
"
200"
)).
multiply
(
new
BigDecimal
(
"1.0
1"
));
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
rece
(
new
BigDecimal
(
"
50000"
),
12
));
System
.
out
.
println
(
rece
(
new
BigDecimal
(
"
40000"
),
200
));
}
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostTypeServiceImpl.java
View file @
f17ddf8b
...
...
@@ -40,6 +40,16 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
@Resource
OaUserMapper
oaUserMapper
;
@Override
public
Page
<
CostTypeResult
>
queryPage
(
CostTypeQueryPageReq
req
)
{
IPage
<
CostTypeResult
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
req
.
setCostTemplateType
(
this
.
getCostTemplateType
((
req
.
getType
())));
page
=
baseMapper
.
queryPage
(
page
,
req
);
return
(
Page
<
CostTypeResult
>)
page
;
}
@Override
public
void
addCostType
(
CostTypeAddReq
req
)
{
CostTypeDomain
costTypeDomain
=
new
CostTypeDomain
();
...
...
@@ -74,15 +84,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
}
@Override
public
Page
<
CostTypeResult
>
queryPage
(
CostTypeQueryPageReq
req
)
{
IPage
<
CostTypeResult
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
req
.
setCostTemplateType
(
this
.
getCostTemplateType
((
req
.
getType
())));
page
=
baseMapper
.
queryPage
(
page
,
req
);
return
(
Page
<
CostTypeResult
>)
page
;
}
@Override
public
void
modifyCostType
(
CostTypeModifyReq
req
)
{
OaUser
oaUser
=
oaUserMapper
.
selectByOaUserId
(
req
.
getCurrentUserId
());
...
...
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