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
efe7753a
Commit
efe7753a
authored
Jan 13, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 费用系统 配置 批量导入导出
parent
714b818c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
148 additions
and
29 deletions
+148
-29
CostTypeController.java
.../blt/other/module/cost/controller/CostTypeController.java
+24
-21
UserCostFinansysController.java
...er/module/cost/controller/UserCostFinansysController.java
+1
-1
CostTypeExportExcelReq.java
...other/module/cost/dto/request/CostTypeExportExcelReq.java
+15
-0
CostTypeImportExcelReq.java
...other/module/cost/dto/request/CostTypeImportExcelReq.java
+15
-0
GetLogisticsBankResp.java
.../other/module/cost/dto/response/GetLogisticsBankResp.java
+19
-0
GetLogisticsCodeResp.java
.../other/module/cost/dto/response/GetLogisticsCodeResp.java
+18
-0
CostTypeService.java
...va/com/blt/other/module/cost/service/CostTypeService.java
+17
-3
CostTypeServiceImpl.java
...t/other/module/cost/service/impl/CostTypeServiceImpl.java
+36
-3
SpecDepartmentCheckConfigController.java
...e/sys/controller/SpecDepartmentCheckConfigController.java
+3
-1
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/CostTypeController.java
View file @
efe7753a
...
...
@@ -2,11 +2,10 @@ package com.blt.other.module.cost.controller;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.database.model.LogisticsSupplierBankDomain
;
import
com.blt.other.module.cost.dto.request.CostTypeAddReq
;
import
com.blt.other.module.cost.dto.request.CostTypeModifyReq
;
import
com.blt.other.module.cost.dto.request.CostTypeQueryPageReq
;
import
com.blt.other.module.cost.dto.request.*
;
import
com.blt.other.module.cost.dto.response.CostTypeResult
;
import
com.blt.other.module.cost.dto.response.GetLogisticsBankResp
;
import
com.blt.other.module.cost.dto.response.GetLogisticsCodeResp
;
import
com.blt.other.module.cost.service.CostTypeKindService
;
import
com.blt.other.module.cost.service.CostTypeService
;
import
io.swagger.annotations.Api
;
...
...
@@ -15,8 +14,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java
.util.HashMap
;
import
java.
util.Map
;
import
java
x.servlet.http.HttpServletResponse
;
import
java.
io.IOException
;
@Slf4j
@Api
(
tags
=
"类型接口"
)
...
...
@@ -76,25 +75,29 @@ public class CostTypeController {
@ApiOperation
(
"获取物流subjectCode"
)
@GetMapping
(
"/getLogisticsCode"
)
public
Map
<
String
,
Object
>
getLogisticsCode
()
{
public
GetLogisticsCodeResp
getLogisticsCode
()
{
log
.
info
(
"获取物流subjectCode"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"logisticsCode"
,
"22222"
);
return
result
;
return
costTypeService
.
getLogisticsCode
();
}
@ApiOperation
(
"获取物流银行帐号"
)
@PostMapping
(
"/getLogisticsBank"
)
public
Map
<
String
,
Object
>
getLogisticsBank
(
@RequestParam
String
subSupplierName
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
LogisticsSupplierBankDomain
bankDomain
=
costTypeKindService
.
getLogisticsBank
(
subSupplierName
);
if
(
bankDomain
!=
null
)
{
result
.
put
(
"success"
,
true
);
result
.
put
(
"bankInfo"
,
bankDomain
);
}
else
{
result
.
put
(
"success"
,
false
);
}
return
result
;
public
GetLogisticsBankResp
getLogisticsBank
(
@RequestParam
String
subSupplierName
)
{
return
costTypeService
.
getLogisticsBank
(
subSupplierName
);
}
@ApiOperation
(
"批量导入数据"
)
@PostMapping
(
"/importExcel"
)
public
CostResult
<
Void
>
importExcel
(
@RequestBody
CostTypeImportExcelReq
excel
)
throws
IOException
{
costTypeService
.
importExcel
(
excel
);
return
CostResult
.
success
();
}
@ApiOperation
(
"导出excel"
)
@PostMapping
(
"/exportExcel"
)
public
CostResult
<
Void
>
exportExcel
(
HttpServletResponse
response
,
@RequestBody
CostTypeExportExcelReq
req
)
throws
IOException
{
costTypeService
.
exportExcel
(
response
,
req
);
return
CostResult
.
success
();
}
}
cost-service/src/main/java/com/blt/other/module/cost/controller/UserCostFinansysController.java
View file @
efe7753a
...
...
@@ -3,8 +3,8 @@ package com.blt.other.module.cost.controller;
import
com.bailuntec.cost.api.dto.LogisticsFinansysDto
;
import
com.bailuntec.cost.api.dto.SubLogisticsFinansysDto
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.module.cost.service.UserCostFinansysService
;
import
com.blt.other.database.model.UserCostFinansysDomain
;
import
com.blt.other.module.cost.service.UserCostFinansysService
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
cost-service/src/main/java/com/blt/other/module/cost/dto/request/CostTypeExportExcelReq.java
0 → 100644
View file @
efe7753a
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
request
;
import
lombok.Data
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/13 3:04 下午
*/
@Data
public
class
CostTypeExportExcelReq
{
}
cost-service/src/main/java/com/blt/other/module/cost/dto/request/CostTypeImportExcelReq.java
0 → 100644
View file @
efe7753a
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
request
;
import
lombok.Data
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/13 3:03 下午
*/
@Data
public
class
CostTypeImportExcelReq
{
}
cost-service/src/main/java/com/blt/other/module/cost/dto/response/GetLogisticsBankResp.java
0 → 100644
View file @
efe7753a
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
response
;
import
com.blt.other.database.model.LogisticsSupplierBankDomain
;
import
lombok.Data
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/13 2:58 下午
*/
@Data
public
class
GetLogisticsBankResp
{
private
LogisticsSupplierBankDomain
bankInfo
;
private
Boolean
success
;
}
cost-service/src/main/java/com/blt/other/module/cost/dto/response/GetLogisticsCodeResp.java
0 → 100644
View file @
efe7753a
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
response
;
import
lombok.Data
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/13 2:56 下午
*/
@Data
public
class
GetLogisticsCodeResp
{
private
Boolean
success
;
private
String
logisticsCode
;
}
cost-service/src/main/java/com/blt/other/module/cost/service/CostTypeService.java
View file @
efe7753a
...
...
@@ -3,10 +3,12 @@ package com.blt.other.module.cost.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.blt.other.database.model.CostTypeDomain
;
import
com.blt.other.module.cost.dto.request.CostTypeAddReq
;
import
com.blt.other.module.cost.dto.request.CostTypeModifyReq
;
import
com.blt.other.module.cost.dto.request.CostTypeQueryPageReq
;
import
com.blt.other.module.cost.dto.request.*
;
import
com.blt.other.module.cost.dto.response.CostTypeResult
;
import
com.blt.other.module.cost.dto.response.GetLogisticsBankResp
;
import
com.blt.other.module.cost.dto.response.GetLogisticsCodeResp
;
import
javax.servlet.http.HttpServletResponse
;
public
interface
CostTypeService
extends
IService
<
CostTypeDomain
>
{
...
...
@@ -55,4 +57,16 @@ public interface CostTypeService extends IService<CostTypeDomain> {
* @return res
*/
CostTypeResult
queryByNo
(
String
typeNo
);
//获取物流subjectCode
GetLogisticsCodeResp
getLogisticsCode
();
//获取物流银行帐号
GetLogisticsBankResp
getLogisticsBank
(
String
subSupplierName
);
//批量导入
void
importExcel
(
CostTypeImportExcelReq
excel
);
//导出
void
exportExcel
(
HttpServletResponse
response
,
CostTypeExportExcelReq
req
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostTypeServiceImpl.java
View file @
efe7753a
...
...
@@ -6,19 +6,22 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.database.model.CostTypeDomain
;
import
com.blt.other.database.model.LogisticsSupplierBankDomain
;
import
com.blt.other.module.auth.dao.OaUserMapper
;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.cost.dao.AccountingSubjectMapper
;
import
com.blt.other.module.cost.dao.CostTypeDao
;
import
com.blt.other.module.cost.dto.request.CostTypeAddReq
;
import
com.blt.other.module.cost.dto.request.CostTypeModifyReq
;
import
com.blt.other.module.cost.dto.request.CostTypeQueryPageReq
;
import
com.blt.other.module.cost.dto.request.*
;
import
com.blt.other.module.cost.dto.response.CostTypeResult
;
import
com.blt.other.module.cost.dto.response.GetLogisticsBankResp
;
import
com.blt.other.module.cost.dto.response.GetLogisticsCodeResp
;
import
com.blt.other.module.cost.service.CostTypeKindService
;
import
com.blt.other.module.cost.service.CostTypeService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
@Service
...
...
@@ -99,6 +102,36 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
return
baseMapper
.
queryByNo
(
typeNo
);
}
@Override
public
GetLogisticsCodeResp
getLogisticsCode
()
{
GetLogisticsCodeResp
resp
=
new
GetLogisticsCodeResp
();
resp
.
setSuccess
(
true
);
resp
.
setLogisticsCode
(
"22222"
);
return
resp
;
}
@Resource
CostTypeKindService
costTypeKindService
;
@Override
public
GetLogisticsBankResp
getLogisticsBank
(
String
subSupplierName
)
{
GetLogisticsBankResp
resp
=
new
GetLogisticsBankResp
();
resp
.
setSuccess
(
true
);
LogisticsSupplierBankDomain
bankDomain
=
costTypeKindService
.
getLogisticsBank
(
subSupplierName
);
resp
.
setBankInfo
(
bankDomain
);
return
resp
;
}
@Override
public
void
importExcel
(
CostTypeImportExcelReq
excel
)
{
}
@Override
public
void
exportExcel
(
HttpServletResponse
response
,
CostTypeExportExcelReq
req
)
{
}
/**
* 根据ui类型获取费用类型 对应的费用模版类型
*
...
...
cost-service/src/main/java/com/blt/other/module/sys/controller/SpecDepartmentCheckConfigController.java
View file @
efe7753a
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -71,7 +72,8 @@ public class SpecDepartmentCheckConfigController {
@ApiOperation
(
"批量导入数据"
)
@PostMapping
(
"/importExcel"
)
public
CostResult
<
Void
>
importExcel
(
@RequestBody
SpecDepartmentCheckImportExcelReq
excel
)
throws
IOException
{
public
CostResult
<
Void
>
importExcel
(
MultipartFile
multipartFile
,
@RequestBody
SpecDepartmentCheckImportExcelReq
excel
)
throws
IOException
{
specDepartmentCheckConfigService
.
importExcel
(
excel
);
return
CostResult
.
success
();
}
...
...
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