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
fa65a248
Commit
fa65a248
authored
Oct 27, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5c0e833b
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
221 additions
and
119 deletions
+221
-119
CostListPrintController.java
...other/module/cost/controller/CostListPrintController.java
+1
-0
CostApiController.java
.../other/module/cost/controller/cost/CostApiController.java
+11
-24
CostCheckController.java
...ther/module/cost/controller/cost/CostCheckController.java
+20
-54
CostCheckLendController.java
.../module/cost/controller/cost/CostCheckLendController.java
+1
-1
CostCheckSearchController.java
...odule/cost/controller/cost/CostCheckSearchController.java
+1
-1
CostDetailController.java
...her/module/cost/controller/cost/CostDetailController.java
+1
-1
CostListController.java
...other/module/cost/controller/cost/CostListController.java
+1
-1
CostTemplateBaseColController.java
...ontroller/costtemplate/CostTemplateBaseColController.java
+2
-2
CostTemplateColController.java
...st/controller/costtemplate/CostTemplateColController.java
+10
-0
CostFinansysDetailController.java
...ost/controller/finansys/CostFinansysDetailController.java
+1
-1
UserCostFinansysController.java
.../cost/controller/finansys/UserCostFinansysController.java
+26
-23
CostTemplateBaseColApiReq.java
.../blt/other/module/cost/dto/CostTemplateBaseColApiReq.java
+2
-2
CostTemplateColApiReq.java
.../com/blt/other/module/cost/dto/CostTemplateColApiReq.java
+60
-0
CostTemplateBaseCol.java
.../com/blt/other/module/cost/model/CostTemplateBaseCol.java
+7
-1
CostTemplateCol.java
...java/com/blt/other/module/cost/model/CostTemplateCol.java
+11
-2
ICostTemplateBaseColService.java
...ther/module/cost/service/ICostTemplateBaseColService.java
+2
-2
ICostTemplateColService.java
...lt/other/module/cost/service/ICostTemplateColService.java
+11
-0
CostTemplateBaseColServiceImpl.java
...ice/impl/costtemplate/CostTemplateBaseColServiceImpl.java
+2
-2
CostTemplateColServiceImpl.java
...service/impl/costtemplate/CostTemplateColServiceImpl.java
+51
-2
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListPrintController.java
View file @
fa65a248
...
...
@@ -20,6 +20,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.util.*
;
@Deprecated
@Api
(
tags
=
"打印费用单"
)
@RestController
@RequestMapping
(
"/cost/list/print"
)
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostApiController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostApiController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
import
com.bailuntec.cost.api.CostApi
;
import
com.bailuntec.cost.api.dto.CostDto
;
...
...
@@ -8,6 +8,7 @@ import com.bailuntec.cost.api.dto.WageCostDto;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.blt.other.module.cost.service.CostApiService
;
import
com.blt.other.module.database.model.CostDomain
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,14 +31,7 @@ public class CostApiController implements CostApi {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CostApiController
.
class
);
/**
* <p>
* 接受工资单,自动生成付款费用单到财务审核
* </p>
*
* @param wageCostDto 工资单入参
* @return 费用单No
*/
@ApiOperation
(
"接受工资单,自动生成付款费用单到财务审核"
)
@PostMapping
(
"/pushWageCost"
)
public
CostResult
<
Void
>
pushWageCost
(
@RequestBody
WageCostDto
wageCostDto
)
{
logger
.
info
(
"接收推送而来的工资单信息:"
+
wageCostDto
);
...
...
@@ -50,13 +44,7 @@ public class CostApiController implements CostApi {
}
}
/**
* <p>
* 接收物流单,自动生成付款费用单到财务审核
* </p>
*
* @return 费用单No
*/
@ApiOperation
(
"接收物流单,自动生成付款费用单到财务审核"
)
@PostMapping
(
"/pushLogisticsCost"
)
public
CostResult
<
Void
>
pushLogisticsCost
(
@RequestBody
LogisticsCostDto
logisticsCostDto
)
{
logger
.
warn
(
"接收推送而来的物流单信息:"
+
logisticsCostDto
);
...
...
@@ -70,13 +58,8 @@ public class CostApiController implements CostApi {
}
}
/**
* <p>
* 吴通接收物流单,自动生成收款费用单到财务审核
* </p>
*
* @return 费用单No
*/
@ApiOperation
(
"吴通接收物流单,自动生成收款费用单到财务审核"
)
@PostMapping
(
"/pushLogisticsReceipt"
)
public
CostResult
<
Void
>
pushLogisticsReceipt
(
@RequestBody
LogisticsCostDto
logisticsCostDto
)
{
logger
.
info
(
"接收推送而来的物流单信息:"
+
logisticsCostDto
);
...
...
@@ -105,6 +88,7 @@ public class CostApiController implements CostApi {
* @param payUserId 支付用户id
* @return 单据
*/
@ApiOperation
(
"查询所有的费用单和采购单"
)
@GetMapping
(
"/manageCostList"
)
public
CostResult
<
List
<
ManageCostDto
>>
manageCostList
(
@RequestParam
(
name
=
"startDate"
,
required
=
false
)
String
startDateStr
,
@RequestParam
(
name
=
"endDate"
,
required
=
false
)
String
endDateStr
,
...
...
@@ -143,6 +127,7 @@ public class CostApiController implements CostApi {
* @param payUserId 支付用户id
* @return 单据
*/
@ApiOperation
(
"查询所有的物流费用单和采购单"
)
@GetMapping
(
"/logisticsCostList"
)
public
CostResult
<
List
<
ManageCostDto
>>
logisticsCostList
(
@RequestParam
(
name
=
"startDate"
,
required
=
false
)
String
startDateStr
,
@RequestParam
(
name
=
"endDate"
,
required
=
false
)
String
endDateStr
,
...
...
@@ -163,7 +148,6 @@ public class CostApiController implements CostApi {
e
.
printStackTrace
();
return
CostResult
.
error
();
}
}
/**
...
...
@@ -176,6 +160,7 @@ public class CostApiController implements CostApi {
* @return 资产负债表相关费用单
*/
@ApiOperation
(
"获取资产负债表相关费用单"
)
@GetMapping
(
"/balanceSheetCost"
)
public
CostResult
<
List
<
CostDto
>>
balanceSheetCostList
(
@RequestParam
(
name
=
"startDate"
)
String
startDateStr
,
@RequestParam
(
name
=
"endDate"
)
String
endDateStr
)
{
...
...
@@ -201,6 +186,7 @@ public class CostApiController implements CostApi {
* @param costNoList 费用单号
* @return 费用单
*/
@ApiOperation
(
"查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单"
)
@GetMapping
(
"/noPayCost"
)
public
CostResult
<
List
<
CostDto
>>
getNoPayCost
(
@RequestParam
(
name
=
"costNoList"
)
List
<
String
>
costNoList
)
{
if
(
costNoList
!=
null
&&
costNoList
.
size
()
>
0
)
{
...
...
@@ -218,6 +204,7 @@ public class CostApiController implements CostApi {
* @param costNo 费用单号
* @return 费用单大类
*/
@ApiOperation
(
"根据费用单号获取费用单大类"
)
@GetMapping
(
"/type/{costNo}"
)
public
CostResult
<
String
>
getTypeName
(
@PathVariable
(
"costNo"
)
String
costNo
)
{
// 获取费用单详细信息
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostCheckController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostCheckController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
import
com.alibaba.fastjson.JSON
;
import
com.bailuntec.cost.api.dto.CostDto
;
...
...
@@ -12,6 +12,8 @@ import com.blt.other.module.cost.vo.ApplyMoneyDetail;
import
com.blt.other.module.cost.vo.CashierCallbackUrlVo
;
import
com.blt.other.module.database.model.*
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -39,6 +41,7 @@ import java.io.InputStreamReader;
import
java.math.BigDecimal
;
import
java.util.*
;
@Api
(
tags
=
"费用审核接口"
)
@RestController
@RequestMapping
(
"cost/check"
)
public
class
CostCheckController
{
...
...
@@ -78,13 +81,8 @@ public class CostCheckController {
@Value
(
"${url.api.getExchangeRateApi}"
)
private
String
getExchangeRateApi
;
/**
* 获取财务审核系统费用单列表
*
* @param request
* @param response
* @return
*/
@ApiOperation
(
"获取财务审核系统费用单列表"
)
@GetMapping
(
"getCostCheckList"
)
public
Map
<
String
,
Object
>
getCostCheckList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
AxiosUtil
.
setCors
(
response
,
request
);
...
...
@@ -99,13 +97,8 @@ public class CostCheckController {
return
result
;
}
/**
* 审核通过
*
* @param request
* @param response
* @return
*/
@ApiOperation
(
"审核通过"
)
@PostMapping
(
"pass"
)
public
Map
<
String
,
Object
>
pass
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
AxiosUtil
.
setCors
(
response
,
request
);
...
...
@@ -141,13 +134,7 @@ public class CostCheckController {
return
map
;
}
/**
* 驳回审核
*
* @param request
* @param response
* @return
*/
@ApiOperation
(
"驳回审核"
)
@PostMapping
(
"reject"
)
public
Map
<
String
,
Object
>
reject
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
AxiosUtil
.
setCors
(
response
,
request
);
...
...
@@ -164,15 +151,10 @@ public class CostCheckController {
costLogService
.
save
(
costNo
,
Integer
.
parseInt
(
updateuserid
),
"费用系统财务审核驳回:"
+
rejectReason
);
return
map
;
}
/**
* 财务审核回调接口
*
* @param request
* @return
*/
@ApiOperation
(
"财务审核回调接口"
)
@PostMapping
(
value
=
"ApplyCallbackUrl"
,
consumes
=
"application/json"
)
public
String
applyCallbackUrl
(
HttpServletRequest
request
)
{
String
result
=
null
;
...
...
@@ -191,7 +173,7 @@ public class CostCheckController {
int
id
=
line
.
lastIndexOf
(
"id"
);
String
substring1
=
line
.
substring
(
0
,
data
+
6
);
String
substring2
=
line
.
substring
(
data
+
7
,
id
-
4
);
String
substring3
=
line
.
substring
(
id
-
3
,
line
.
length
()
);
String
substring3
=
line
.
substring
(
id
-
3
);
line
=
substring1
+
substring2
+
substring3
;
line
=
line
.
toLowerCase
();
...
...
@@ -209,7 +191,7 @@ public class CostCheckController {
CostApplycallbackDomain
applycallbackDomain
=
new
CostApplycallbackDomain
();
BeanUtils
.
copyProperties
(
applyCallbackUrlVo
.
getData
().
getData
(),
applycallbackDomain
);
String
costNo
=
applyCallbackUrlVo
.
getId
().
toUpperCase
();
if
(
null
!=
costNo
&&
costNo
.
contains
(
"-"
))
{
if
(
costNo
.
contains
(
"-"
))
{
costNo
=
costNo
.
split
(
"-"
)[
0
];
}
applycallbackDomain
.
setCostNo
(
costNo
);
...
...
@@ -226,15 +208,11 @@ public class CostCheckController {
return
result
;
}
/**
* 财务付款回调接口
*
* @param request
* @return
*/
@ApiOperation
(
"财务付款回调接口"
)
@PostMapping
(
value
=
"CashierCallbackUrl"
,
consumes
=
"application/json"
)
public
String
cashierCallbackUrl
(
HttpServletRequest
request
)
{
String
result
=
null
;
String
result
;
// 将状态改为审核通过、已付款
logger
.
warn
(
"费用系统出纳回调"
+
IpUtil
.
getIpAddr
(
request
)
+
" CashierCallbackUrl "
);
...
...
@@ -249,7 +227,7 @@ public class CostCheckController {
int
id
=
line
.
lastIndexOf
(
"id"
);
String
substring1
=
line
.
substring
(
0
,
data
+
6
);
String
substring2
=
line
.
substring
(
data
+
7
,
id
-
4
);
String
substring3
=
line
.
substring
(
id
-
3
,
line
.
length
()
);
String
substring3
=
line
.
substring
(
id
-
3
);
line
=
substring1
+
substring2
+
substring3
;
line
=
line
.
toLowerCase
();
line
=
line
.
replace
(
"_"
,
""
);
...
...
@@ -270,7 +248,7 @@ public class CostCheckController {
BeanUtils
.
copyProperties
(
cashierCallbackUrlVo
.
getData
().
getData
(),
costCashiercallbackDomain
);
BeanUtils
.
copyProperties
(
cashierCallbackUrlVo
.
getData
().
getData
().
getPaydetail
(),
costCashiercallbackDomain
);
String
costNo
=
cashierCallbackUrlVo
.
getId
().
toUpperCase
();
if
(
null
!=
costNo
&&
costNo
.
contains
(
"-"
))
{
if
(
costNo
.
contains
(
"-"
))
{
String
[]
split
=
costNo
.
split
(
"-"
);
costNo
=
split
[
0
];
}
...
...
@@ -363,19 +341,6 @@ public class CostCheckController {
costDomain
.
setCostStatus
(
3
);
costDomain
.
setRejectType
(
2
);
Integer
result
=
costService
.
updateById
(
costDomain
);
// if (null != result && result >= 1) {
// 如果是付款费用,改变子项目的费用单
// if (1 == oldCost.getCostForm()) {
// List<CostDetailDomain> costDetailListByCostNo = costDetailService.getCostDetailListByCostNo(oldNo);
// if (null != costDetailListByCostNo && costDetailListByCostNo.size() >= 1){
// for (CostDetailDomain detail: costDetailListByCostNo){
// detail.setCostNo(costDomain.getCostNo());
// costDetailService.update(detail);
// }
// }
// }
// }
}
return
true
;
}
...
...
@@ -394,7 +359,7 @@ public class CostCheckController {
if
(
costStatus
==
2
)
{
costDomain
.
setAuditTime
(
new
Date
());
}
if
(
null
!=
costDomain
&&
null
!=
costDomain
.
getIsLend
())
{
if
(
null
!=
costDomain
.
getIsLend
())
{
if
(
1
==
costDomain
.
getIsLend
()
&&
4
==
costStatus
)
{
costDomain
.
setLendStatus
(
1
);
}
...
...
@@ -581,6 +546,7 @@ public class CostCheckController {
* @param request
* @return
*/
@ApiOperation
(
"借支单结清"
)
@PostMapping
(
"/finishLend"
)
public
Map
<
String
,
Object
>
finishLend
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostCheckLendController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostCheckLendController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
import
com.alibaba.fastjson.JSON
;
import
com.blt.other.common.util.AxiosUtil
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostCheckSearchController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostCheckSearchController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.MyMapperUtil
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostDetailController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostDetailController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
import
com.blt.other.module.auth.service.UserService
;
import
com.blt.other.common.util.AxiosUtil
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostListController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.CostListPrintDto
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/costtemplate/CostTemplateBaseColController.java
View file @
fa65a248
...
...
@@ -2,7 +2,7 @@ package com.blt.other.module.cost.controller.costtemplate;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.blt.other.module.cost.dto.CostTemplate
Col
Req
;
import
com.blt.other.module.cost.dto.CostTemplate
BaseColApi
Req
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.service.ICostTemplateBaseColService
;
import
io.swagger.annotations.Api
;
...
...
@@ -37,7 +37,7 @@ public class CostTemplateBaseColController {
@ApiOperation
(
"新增费用单基础字段"
)
@PostMapping
(
"/add"
)
public
CostResult
<
Void
>
add
(
@RequestBody
CostTemplate
Col
Req
.
AddReq
req
)
{
public
CostResult
<
Void
>
add
(
@RequestBody
CostTemplate
BaseColApi
Req
.
AddReq
req
)
{
costTemplateBaseColService
.
add
(
req
);
return
CostResult
.
success
();
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/costtemplate/CostTemplateColController.java
View file @
fa65a248
...
...
@@ -2,6 +2,7 @@ package com.blt.other.module.cost.controller.costtemplate;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.blt.other.module.cost.dto.CostTemplateColApiReq
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
com.blt.other.module.cost.service.ICostTemplateColService
;
import
io.swagger.annotations.Api
;
...
...
@@ -9,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
...
...
@@ -46,4 +48,12 @@ public class CostTemplateColController {
costTemplateColService
.
delete
(
id
);
return
CostResult
.
success
();
}
@ApiOperation
(
"/筛选费用单模版字段"
)
@PostMapping
(
"/queryList"
)
public
CostResult
<
List
<
CostTemplateCol
>>
queryList
(
@RequestBody
CostTemplateColApiReq
.
QueryListReq
req
)
{
List
<
CostTemplateCol
>
resp
=
costTemplateColService
.
queryList
(
req
);
return
CostResult
.
success
(
resp
);
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostFinansysDetailController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
finansys/
CostFinansysDetailController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
finansys
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.blt.other.module.auth.service.UserService
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/UserCostFinansysController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
finansys/
UserCostFinansysController.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
finansys
;
import
com.blt.other.common.util.AxiosUtil
;
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.module.database.model.UserCostFinansysDomain
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -17,6 +18,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
@Api
(
tags
=
"财务信息接口"
)
@RestController
@RequestMapping
(
"user/cost/finansys"
)
public
class
UserCostFinansysController
{
...
...
@@ -25,54 +27,55 @@ public class UserCostFinansysController {
private
UserCostFinansysService
userCostFinansysService
;
@PostMapping
(
"/getFinansysRecord"
)
public
Map
<
String
,
Object
>
getFinansysRecord
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
public
Map
<
String
,
Object
>
getFinansysRecord
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
String
userid
=
request
.
getParameter
(
"userid"
);
List
<
UserCostFinansysDomain
>
byUsercode
=
userCostFinansysService
.
getByUserid
(
Integer
.
parseInt
(
userid
));
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"userFinansys"
,
byUsercode
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"userFinansys"
,
byUsercode
);
return
result
;
}
@PostMapping
(
"/getFinansysRecordByNo"
)
public
Map
<
String
,
Object
>
getFinansysRecordByNo
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
public
Map
<
String
,
Object
>
getFinansysRecordByNo
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
String
userCostFinansysNo
=
request
.
getParameter
(
"userCostFinansysNo"
);
UserCostFinansysDomain
userCostFinansys
=
userCostFinansysService
.
getByUserCostFinansysNo
(
userCostFinansysNo
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"userCostFinansys"
,
userCostFinansys
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"userCostFinansys"
,
userCostFinansys
);
return
result
;
}
@PostMapping
(
"/getAllFinansysRecord"
)
public
Map
<
String
,
Object
>
getAllFinansysRecord
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
public
Map
<
String
,
Object
>
getAllFinansysRecord
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
UserCostFinansysDomain
>
list
=
userCostFinansysService
.
getAllFinansysRecord
();
result
.
put
(
"success"
,
true
);
result
.
put
(
"allFinansys"
,
list
);
result
.
put
(
"success"
,
true
);
result
.
put
(
"allFinansys"
,
list
);
return
result
;
}
/**
* 获取所有一、二级物流供应商财务信息
*
* @param response
* @param request
* @return
*/
@GetMapping
(
"/getAllLogisticsFinansys"
)
public
Map
<
String
,
Object
>
getAllLogisticsFinansys
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
public
Map
<
String
,
Object
>
getAllLogisticsFinansys
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
LogisticsFinansysDto
>
list
=
userCostFinansysService
.
getAllLogisticsFinansys
();
List
<
SubLogisticsFinansysDto
>
subList
=
userCostFinansysService
.
getAllSubLogisticsFinansys
();
result
.
put
(
"success"
,
true
);
result
.
put
(
"allLogisticsFinansys"
,
list
);
result
.
put
(
"allSubLogisticsFinansys"
,
subList
);
result
.
put
(
"success"
,
true
);
result
.
put
(
"allLogisticsFinansys"
,
list
);
result
.
put
(
"allSubLogisticsFinansys"
,
subList
);
return
result
;
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/CostTemplate
Col
Req.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/CostTemplate
BaseColApi
Req.java
View file @
fa65a248
...
...
@@ -11,12 +11,12 @@ import lombok.Data;
* @author robbendev
* @since 2020/10/15 9:12 上午
*/
public
final
class
CostTemplateColReq
{
public
final
class
CostTemplateBaseColApiReq
{
@Data
public
static
class
AddReq
{
@ApiModelProperty
(
value
=
"对应cost表字段名"
)
private
String
costCol
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/CostTemplateColApiReq.java
0 → 100644
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDateTime
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/10/15 9:12 上午
*/
public
final
class
CostTemplateColApiReq
{
@Data
public
static
class
QueryListReq
{
private
Integer
costTemplateId
;
@ApiModelProperty
(
"字段类目"
)
private
String
colCategory
;
@ApiModelProperty
(
value
=
"表单字段名"
)
private
String
colName
;
@ApiModelProperty
(
value
=
"1-单行文本 2-多行文本 3-下拉框 4-多选 5-日期 6-附件"
)
private
Integer
colType
;
@ApiModelProperty
(
"提示"
)
private
String
prompt
;
private
Integer
createUserId
;
private
Integer
updateUserId
;
@ApiModelProperty
(
value
=
"是否必填"
)
private
Boolean
isRequired
;
@ApiModelProperty
(
"是否配置审批规则"
)
private
Boolean
isAutoRule
;
@ApiModelProperty
(
value
=
"审批符号 类型 1 = ;2 != ;3 < ;4 <= ;5 > ;6 >= ;7 list contain (校验值用逗号分隔) ;8 ! list contain (校验值用逗号分隔) "
)
private
Integer
autoRuleType
;
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE_TIME
)
private
LocalDateTime
createTimeStart
;
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE_TIME
)
private
LocalDateTime
createTimeEnd
;
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE_TIME
)
private
LocalDateTime
updateTimeStart
;
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE_TIME
)
private
LocalDateTime
updateTimeEnd
;
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostTemplateBaseCol.java
View file @
fa65a248
...
...
@@ -34,6 +34,12 @@ public class CostTemplateBaseCol implements Serializable {
@ApiModelProperty
(
value
=
"对应cost表字段数据库类型"
)
private
String
costColType
;
@ApiModelProperty
(
"字段类目"
)
private
String
colCategory
;
@ApiModelProperty
(
"提示"
)
private
String
prompt
;
@ApiModelProperty
(
value
=
"表单字段名"
)
private
String
colName
;
...
...
@@ -46,7 +52,7 @@ public class CostTemplateBaseCol implements Serializable {
@ApiModelProperty
(
"是否扩展字段"
)
private
Boolean
isExtension
;
private
Integer
createUserId
;
private
Integer
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
LocalDateTime
createTime
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostTemplateCol.java
View file @
fa65a248
...
...
@@ -43,15 +43,26 @@ public class CostTemplateCol implements Serializable {
@ApiModelProperty
(
value
=
"自动校验的校验值 cost_col_type在程序做类型转换 写入的时候也要校验类型"
)
private
String
autoRuleCheckVal
;
@ApiModelProperty
(
value
=
"是否必填"
)
private
Boolean
isRequired
;
@ApiModelProperty
(
"是否默认模版字段"
)
private
Boolean
isDefault
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
LocalDateTime
createTime
;
private
Integer
createUserId
;
private
String
createUserName
;
private
Integer
updateUserId
;
private
String
updateUserName
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
LocalDateTime
lastUpdateTime
;
private
String
companyScope
;
@TableField
(
exist
=
false
)
private
CostTemplateBaseCol
costTemplateBaseCol
;
...
...
@@ -65,6 +76,4 @@ public class CostTemplateCol implements Serializable {
return
false
;
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/ICostTemplateBaseColService.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.blt.other.module.cost.dto.CostTemplate
Col
Req
;
import
com.blt.other.module.cost.dto.CostTemplate
BaseColApi
Req
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
org.springframework.lang.NonNull
;
...
...
@@ -34,7 +34,7 @@ public interface ICostTemplateBaseColService extends IService<CostTemplateBaseCo
*
* @param req req
*/
void
add
(
CostTemplate
Col
Req
.
AddReq
req
);
void
add
(
CostTemplate
BaseColApi
Req
.
AddReq
req
);
/**
* <p>
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/ICostTemplateColService.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.blt.other.module.cost.dto.CostTemplateColApiReq
;
import
com.blt.other.module.cost.model.CostTemplate
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
...
...
@@ -61,4 +62,14 @@ public interface ICostTemplateColService extends IService<CostTemplateCol> {
* @param costTemplate costTemplate
*/
void
setCostTemplateCol
(
CostTemplate
costTemplate
);
/**
* <p>
* 筛选
* </p>
*
* @param req req
* @return res
*/
List
<
CostTemplateCol
>
queryList
(
CostTemplateColApiReq
.
QueryListReq
req
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costtemplate/CostTemplateBaseColServiceImpl.java
View file @
fa65a248
...
...
@@ -4,7 +4,7 @@ import com.bailuntec.common.BeanUtils;
import
com.bailuntec.common.ListUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.blt.other.module.cost.dao.CostTemplateBaseColMapper
;
import
com.blt.other.module.cost.dto.CostTemplate
Col
Req
;
import
com.blt.other.module.cost.dto.CostTemplate
BaseColApi
Req
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
com.blt.other.module.cost.service.ICostTemplateBaseColService
;
...
...
@@ -32,7 +32,7 @@ public class CostTemplateBaseColServiceImpl extends ServiceImpl<CostTemplateBase
}
@Override
public
void
add
(
CostTemplate
Col
Req
.
AddReq
req
)
{
public
void
add
(
CostTemplate
BaseColApi
Req
.
AddReq
req
)
{
if
(!
req
.
getIsExtension
())
{
throw
new
RuntimeException
(
"只能添加扩展字段"
);
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costtemplate/CostTemplateColServiceImpl.java
View file @
fa65a248
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
.
costtemplate
;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.common.StringUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.module.cost.dao.CostTemplateColMapper
;
import
com.blt.other.module.cost.dto.CostTemplateColApiReq
;
import
com.blt.other.module.cost.model.CostTemplate
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
com.blt.other.module.cost.service.ICostTemplateBaseColService
;
import
com.blt.other.module.cost.service.ICostTemplateColService
;
import
com.blt.other.module.cost.service.ICostTemplateService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -26,8 +29,8 @@ import java.util.stream.Collectors;
*/
@Service
public
class
CostTemplateColServiceImpl
extends
ServiceImpl
<
CostTemplateColMapper
,
CostTemplateCol
>
implements
ICostTemplateColService
{
@Resource
ICostTemplateService
costTemplateService
;
@Resource
ICostTemplateBaseColService
costTemplateBaseColService
;
...
...
@@ -76,4 +79,50 @@ public class CostTemplateColServiceImpl extends ServiceImpl<CostTemplateColMappe
costTemplate
.
setCostTemplateColList
(
costTemplateColList
);
}
@Override
public
List
<
CostTemplateCol
>
queryList
(
CostTemplateColApiReq
.
QueryListReq
req
)
{
return
costTemplateService
.
queryDetail
(
req
.
getCostTemplateId
()).
getCostTemplateColList
()
.
stream
()
//字段类目
.
filter
(
costTemplateCol
->
StringUtils
.
isEmpty
(
req
.
getColCategory
())
||
costTemplateCol
.
getCostTemplateBaseCol
().
getColCategory
().
contains
(
req
.
getColCategory
()))
//字段提示
.
filter
(
costTemplateCol
->
StringUtils
.
isEmpty
(
req
.
getPrompt
())
||
costTemplateCol
.
getCostTemplateBaseCol
().
getPrompt
().
contains
(
req
.
getPrompt
()))
//字段名称
.
filter
(
costTemplateCol
->
StringUtils
.
isEmpty
(
req
.
getColName
())
||
costTemplateCol
.
getCostTemplateBaseCol
().
getColName
().
contains
(
req
.
getColName
()))
//字段类型
.
filter
(
costTemplateCol
->
req
.
getColType
()
==
null
||
costTemplateCol
.
getCostTemplateBaseCol
().
getColType
().
equals
(
req
.
getColType
()))
//是否必填
.
filter
(
costTemplateCol
->
req
.
getIsRequired
()
==
null
||
costTemplateCol
.
getIsRequired
().
equals
(
req
.
getIsRequired
()))
//创建人
.
filter
(
costTemplateCol
->
req
.
getCreateUserId
()
==
null
||
costTemplateCol
.
getCreateUserId
().
equals
(
req
.
getCreateUserId
()))
//更新人
.
filter
(
costTemplateCol
->
req
.
getUpdateUserId
()
==
null
||
costTemplateCol
.
getUpdateUserId
().
equals
(
req
.
getUpdateUserId
()))
//审批规则是否配置
.
filter
(
costTemplateCol
->
req
.
getIsAutoRule
()
==
null
||
req
.
getIsAutoRule
().
equals
(
costTemplateCol
.
getAutoRuleType
()
>
0
))
//审核匹配符号类型
.
filter
(
costTemplateCol
->
req
.
getAutoRuleType
()
==
null
||
costTemplateCol
.
getAutoRuleType
().
equals
(
req
.
getAutoRuleType
()))
//创建时间
.
filter
(
costTemplateCol
->
req
.
getCreateTimeStart
()
==
null
||
costTemplateCol
.
getCreateTime
().
compareTo
(
req
.
getCreateTimeStart
())
>=
0
)
.
filter
(
costTemplateCol
->
req
.
getCreateTimeEnd
()
==
null
||
costTemplateCol
.
getCreateTime
().
compareTo
(
req
.
getCreateTimeEnd
())
<=
0
)
//更新时间
.
filter
(
costTemplateCol
->
req
.
getUpdateTimeStart
()
==
null
||
costTemplateCol
.
getLastUpdateTime
().
compareTo
(
req
.
getUpdateTimeStart
())
>=
0
)
.
filter
(
costTemplateCol
->
req
.
getCreateTimeEnd
()
==
null
||
costTemplateCol
.
getLastUpdateTime
().
compareTo
(
req
.
getCreateTimeEnd
())
<=
0
)
.
collect
(
Collectors
.
toList
());
}
}
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