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
0e22d7c5
Commit
0e22d7c5
authored
Oct 29, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3d748923
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
0 deletions
+48
-0
CostPlanDomain.java
...ain/java/com/blt/other/database/model/CostPlanDomain.java
+3
-0
CostPlanController.java
.../blt/other/module/cost/controller/CostPlanController.java
+13
-0
CostPlanDao.java
.../main/java/com/blt/other/module/cost/dao/CostPlanDao.java
+3
-0
CostPlanService.java
...va/com/blt/other/module/cost/service/CostPlanService.java
+7
-0
AbstractCostPlanService.java
...e/cost/service/impl/costplan/AbstractCostPlanService.java
+15
-0
CostPlanDao.xml
cost-service/src/main/resources/mapper/CostPlanDao.xml
+7
-0
No files found.
cost-service/src/main/java/com/blt/other/database/model/CostPlanDomain.java
View file @
0e22d7c5
...
...
@@ -159,6 +159,9 @@ public class CostPlanDomain implements Serializable {
private
CostTemplate
costTemplate
;
@TableField
(
exist
=
false
)
private
List
<
CostPlanTempDomain
>
costPlanTempDomainList
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"借还单 借还支付币种 -> 借支币种汇率"
)
private
BigDecimal
cur
;
...
...
cost-service/src/main/java/com/blt/other/module/cost/controller/CostPlanController.java
View file @
0e22d7c5
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.dto.CostPlanTempDto
;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.common.annotation.LoginIgnore
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.database.model.CostLogDomain
;
import
com.blt.other.database.model.CostPlanDomain
;
import
com.blt.other.module.cost.dto.request.GetAllCostPlanReq
;
import
com.blt.other.module.cost.dto.response.GetAllCostPlanResp
;
import
com.blt.other.module.cost.dto.response.GetCostPlanResp
;
...
...
@@ -116,4 +121,12 @@ public class CostPlanController {
.
contentType
(
MediaType
.
parseMediaType
(
"application/octet-stream"
))
.
body
(
new
InputStreamResource
(
inputStream
));
}
@LoginIgnore
@ApiOperation
(
"获取4k费用计划数据"
)
@GetMapping
(
"/costPlanFor4k/{pageSize}/{pageNum}"
)
public
Page
<
CostPlanDomain
>
getCostLogFor4k
(
@PathVariable
(
"pageSize"
)
long
pageSize
,
@PathVariable
(
"pageNum"
)
long
pageNum
)
{
return
costPlanService
.
get4kCostPlan
(
new
Page
(
pageNum
,
pageSize
));
}
}
cost-service/src/main/java/com/blt/other/module/cost/dao/CostPlanDao.java
View file @
0e22d7c5
package
com
.
blt
.
other
.
module
.
cost
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.database.model.CostPlanDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -26,4 +28,5 @@ public interface CostPlanDao extends BaseMapper<CostPlanDomain> {
List
<
CostPlanDomain
>
selectAll
(
@Param
(
"userId"
)
Integer
userId
);
Page
<
CostPlanDomain
>
queryPageFor4k
(
@Param
(
"page"
)
Page
<
Object
>
page
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/CostPlanService.java
View file @
0e22d7c5
package
com
.
blt
.
other
.
module
.
cost
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.module.cost.dto.request.GetAllCostPlanReq
;
import
com.blt.other.module.cost.dto.response.GetAllCostPlanResp
;
import
com.blt.other.module.cost.dto.response.GetCostPlanResp
;
...
...
@@ -72,4 +73,10 @@ public interface CostPlanService {
* @return 费用计划详情
*/
GetCostPlanResp
getByPlanNo
(
String
planNo
);
/**
* 获取4k费用计划
* @return
*/
Page
<
CostPlanDomain
>
get4kCostPlan
(
Page
page
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/costplan/AbstractCostPlanService.java
View file @
0e22d7c5
...
...
@@ -3,6 +3,8 @@ package com.blt.other.module.cost.service.impl.costplan;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.common.StringUtils
;
import
com.bailuntec.cost.api.dto.CostPlanDto
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.database.model.*
;
import
com.blt.other.module.auth.dao.UserDao
;
...
...
@@ -204,6 +206,19 @@ public abstract class AbstractCostPlanService implements CostPlanService {
return
result
;
}
@Override
public
Page
<
CostPlanDomain
>
get4kCostPlan
(
Page
page
){
Page
<
CostPlanDomain
>
costPlanDomainPage
=
costPlanDao
.
queryPageFor4k
(
page
);
costPlanDomainPage
.
getRecords
().
forEach
(
costPlanDomain
->
{
List
<
CostPlanTempDomain
>
costPlanTempDomainList
=
costPlanTempDao
.
selectList
(
new
LambdaQueryWrapper
<
CostPlanTempDomain
>()
.
eq
(
CostPlanTempDomain:
:
getCostPlanNo
,
costPlanDomain
.
getCostPlanNo
()));
if
(
costPlanTempDomainList
!=
null
){
costPlanDomain
.
setCostPlanTempDomainList
(
costPlanTempDomainList
);
}
});
return
costPlanDomainPage
;
}
protected
CostDomain
planToCost
(
String
costPlanNo
)
{
CostDomain
costDomain
=
new
CostDomain
();
...
...
cost-service/src/main/resources/mapper/CostPlanDao.xml
View file @
0e22d7c5
...
...
@@ -44,4 +44,11 @@
id DESC
</select>
<select
id=
"queryPageFor4k"
resultType=
"com.blt.other.database.model.CostPlanDomain"
>
select cp.* from cost_plan cp
left join oa_user ou on ou.oa_user_id = cp.create_userid
where ou.company_id in(18, 27, 32)
order by cp.id desc
</select>
</mapper>
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