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
5bccf8cf
Commit
5bccf8cf
authored
Oct 23, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
92a64da4
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
273 additions
and
169 deletions
+273
-169
CostListAddController.java
...t/other/module/cost/controller/CostListAddController.java
+1
-0
CostListAddReceiptController.java
.../module/cost/controller/CostListAddReceiptController.java
+1
-0
CostListController.java
.../blt/other/module/cost/controller/CostListController.java
+159
-8
CostListPrintController.java
...other/module/cost/controller/CostListPrintController.java
+0
-106
CostListSearchController.java
...ther/module/cost/controller/CostListSearchController.java
+1
-43
CostTemplateController.java
.../cost/controller/costtemplate/CostTemplateController.java
+2
-3
CostTemplateApiDto.java
...ava/com/blt/other/module/cost/dto/CostTemplateApiDto.java
+3
-0
CostTemplate.java
...in/java/com/blt/other/module/cost/model/CostTemplate.java
+7
-0
ICostTemplateBaseColService.java
...ther/module/cost/service/ICostTemplateBaseColService.java
+11
-0
ICostTemplateColService.java
...lt/other/module/cost/service/ICostTemplateColService.java
+22
-0
CostServiceImpl.java
...m/blt/other/module/cost/service/impl/CostServiceImpl.java
+3
-5
CostTemplateBaseColServiceImpl.java
...ice/impl/costtemplate/CostTemplateBaseColServiceImpl.java
+12
-0
CostTemplateColServiceImpl.java
...service/impl/costtemplate/CostTemplateColServiceImpl.java
+32
-2
CostTemplateServiceImpl.java
...st/service/impl/costtemplate/CostTemplateServiceImpl.java
+14
-2
UserCostFinansysDomain.java
...t/other/module/database/model/UserCostFinansysDomain.java
+5
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListAddController.java
View file @
5bccf8cf
...
@@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
@Deprecated
@RestController
@RestController
@RequestMapping
(
"cost/list/add/"
)
@RequestMapping
(
"cost/list/add/"
)
public
class
CostListAddController
{
public
class
CostListAddController
{
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListAddReceiptController.java
View file @
5bccf8cf
...
@@ -17,6 +17,7 @@ import java.util.HashMap;
...
@@ -17,6 +17,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@Deprecated
@RestController
@RestController
@RequestMapping
(
"cost/list/add"
)
@RequestMapping
(
"cost/list/add"
)
public
class
CostListAddReceiptController
{
public
class
CostListAddReceiptController
{
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListController.java
View file @
5bccf8cf
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.CostListPrintDto
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.MoneyUtil
;
import
com.blt.other.common.util.MyMapperUtil
;
import
com.blt.other.common.util.MyMapperUtil
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.module.cost.service.CostExportService
;
import
com.blt.other.module.auth.service.UserService
;
import
com.blt.other.module.cost.service.CostLogService
;
import
com.blt.other.module.cost.service.*
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.service.UserCostFinansysService
;
import
com.blt.other.module.cost.utils.CostFileUtil
;
import
com.blt.other.module.cost.utils.CostFileUtil
;
import
com.blt.other.module.cost.utils.CostUtils
;
import
com.blt.other.module.cost.utils.CostUtils
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
com.blt.other.module.cost.vo.CostListPrintVo
;
import
com.blt.other.module.cost.vo.CostListSearchKeysVo
;
import
com.blt.other.module.cost.vo.CostResp
;
import
com.blt.other.module.cost.vo.CostResp
;
import
com.blt.other.module.database.model.CostDomain
;
import
com.blt.other.module.database.model.CostDomain
;
import
com.blt.other.module.database.model.CostExpDomain
;
import
com.blt.other.module.database.model.CostExpDomain
;
import
com.blt.other.module.database.model.UserCostFinansysDomain
;
import
com.blt.other.module.database.model.UserCostFinansysDomain
;
import
com.blt.other.module.database.model.UserDomain
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -29,10 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -29,10 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Enumeration
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Api
(
tags
=
"费用单接口"
)
@Api
(
tags
=
"费用单接口"
)
@RestController
@RestController
...
@@ -40,6 +40,8 @@ import java.util.Map;
...
@@ -40,6 +40,8 @@ import java.util.Map;
public
class
CostListController
{
public
class
CostListController
{
@Autowired
@Autowired
private
CostListSearchService
costListSearchService
;
@Autowired
private
CostService
costService
;
private
CostService
costService
;
@Autowired
@Autowired
private
UserCostFinansysService
userCostFinansysService
;
private
UserCostFinansysService
userCostFinansysService
;
...
@@ -47,6 +49,155 @@ public class CostListController {
...
@@ -47,6 +49,155 @@ public class CostListController {
private
CostExportService
costExportService
;
private
CostExportService
costExportService
;
@Autowired
@Autowired
private
CostLogService
costLogService
;
private
CostLogService
costLogService
;
@Autowired
private
UserService
userService
;
@PostMapping
(
"/print/list"
)
public
Map
<
String
,
Object
>
printList
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
// 获取前端要打印的费用单列表
Enumeration
<
String
>
parameterNames
=
request
.
getParameterNames
();
if
(
null
!=
parameterNames
&&
parameterNames
.
hasMoreElements
())
{
String
s
=
parameterNames
.
nextElement
();
CostListPrintVo
printVo
=
(
CostListPrintVo
)
MyMapperUtil
.
getObject
(
s
,
CostListPrintVo
.
class
);
List
<
String
>
printNos
=
printVo
.
getPrintNos
();
// 遍历获取费用单详情
if
(
null
!=
printNos
&&
printNos
.
size
()
>=
1
)
{
List
<
CostListPrintDto
>
printDtoList
=
new
ArrayList
<>();
for
(
String
costNo
:
printNos
)
{
CostListPrintDto
dto
=
getPrintDto
(
costNo
);
printDtoList
.
add
(
dto
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"printList"
,
printDtoList
);
return
result
;
}
}
return
null
;
}
private
CostListPrintDto
getPrintDto
(
String
costNo
)
{
CostListPrintDto
print
=
new
CostListPrintDto
();
CostDto
cost
=
costService
.
getCostDtoByNo
(
costNo
);
UserDomain
user
=
userService
.
findByUserid
(
cost
.
getCreateUserid
());
if
(
user
==
null
)
{
print
.
setDepartment
(
""
);
print
.
setCreateUsername
(
cost
.
getCreateUsername
()
+
"【注销】"
);
}
else
{
print
.
setDepartment
(
user
.
getDepartmentname1
());
print
.
setCreateUsername
(
cost
.
getCreateUsername
());
}
print
.
setId
(
cost
.
getId
());
print
.
setCompanyName
(
cost
.
getCompanyName
());
//print.setDepartment(user.getDepartmentname1());
print
.
setCostNo
(
costNo
);
print
.
setCreateTime
(
cost
.
getCreateTime
());
print
.
setBankCompany
(
cost
.
getBankCompany
());
print
.
setBankCardUser
(
cost
.
getBankCardUser
());
print
.
setBankCard
(
cost
.
getBankCard
());
print
.
setCostReason
(
cost
.
getCostReason
());
print
.
setDic
(
cost
.
getDicDto
());
print
.
setAmount
(
cost
.
getAmountDto
());
print
.
setTxtAmount
(
MoneyUtil
.
getCnNum
(
cost
.
getAmount
()));
// dic='null', amount=null, txtAmount='null'}
if
(
1
==
cost
.
getCostForm
())
{
// 付款单
print
.
setCostFormStr
(
"付"
);
print
.
setBankCompanyStr
(
"收款单位"
);
print
.
setBankCardUserStr
(
"收款户名"
);
print
.
setFeeTypeStr
(
"付款方式"
);
print
.
setBankCardStr
(
"收款账户"
);
print
.
setCostReasonStr
(
"付款理由"
);
print
.
setCostReason
(
cost
.
getTypeName
()
+
"/"
+
cost
.
getKindName
()
+
"; "
+
cost
.
getCostRemark
());
// 差额单的付款理由需详细说明
if
(
null
!=
cost
.
getIsLend
()
&&
2
==
cost
.
getIsLend
())
{
print
.
setCostReason
(
"【差额单(关联借支单:"
+
cost
.
getSupCostNo
()
+
")】 "
+
cost
.
getTypeName
()
+
" "
+
cost
.
getCostRemark
());
}
print
.
setCostAmountStr
(
"付款金额"
);
}
if
(
2
==
cost
.
getCostForm
())
{
// 收款单
print
.
setCostFormStr
(
"收"
);
print
.
setBankCompanyStr
(
"付款单位"
);
print
.
setBankCardUserStr
(
"付款户名"
);
print
.
setFeeTypeStr
(
"收款方式"
);
print
.
setBankCardStr
(
"付款账户"
);
print
.
setCostReasonStr
(
"收款理由"
);
print
.
setCostAmountStr
(
"收款金额"
);
}
if
(
3
==
cost
.
getCostForm
()
&&
1
==
cost
.
getIsLend
())
{
// 借支单
print
.
setCostFormStr
(
"借支"
);
print
.
setBankCompanyStr
(
"收款单位"
);
print
.
setBankCardUserStr
(
"收款户名"
);
print
.
setFeeTypeStr
(
"付款方式"
);
print
.
setBankCardStr
(
"收款账户"
);
print
.
setCostReasonStr
(
"付款理由"
);
print
.
setCostAmountStr
(
"付款金额"
);
}
if
(
3
==
cost
.
getCostForm
()
&&
2
==
cost
.
getIsLend
())
{
// 借还单
print
.
setCostFormStr
(
"借还"
);
print
.
setBankCompanyStr
(
"付款单位"
);
print
.
setBankCardUserStr
(
"付款户名"
);
print
.
setFeeTypeStr
(
"收款方式"
);
print
.
setBankCardStr
(
"付款账户"
);
print
.
setCostReasonStr
(
"收款理由"
);
print
.
setCostAmountStr
(
"收款金额"
);
print
.
setDic
(
cost
.
getPayDicDto
());
print
.
setAmount
(
cost
.
getPayPlanAmountDto
());
print
.
setTxtAmount
(
MoneyUtil
.
getCnNum
(
cost
.
getPayPlanAmount
()));
}
return
print
;
}
@PostMapping
(
"/search/key"
)
public
Map
<
String
,
Object
>
getByKey
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
String
key
=
request
.
getParameter
(
"key"
);
String
pageNumStr
=
request
.
getParameter
(
"pageNum"
);
String
pageSizeStr
=
request
.
getParameter
(
"pageSize"
);
Map
<
String
,
Object
>
map
=
costListSearchService
.
searchByKey
(
key
,
Integer
.
parseInt
(
pageNumStr
),
Integer
.
parseInt
(
pageSizeStr
));
map
.
put
(
"success"
,
true
);
return
map
;
}
@PostMapping
(
"/search/keys"
)
public
Map
<
String
,
Object
>
getByKeys
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
Enumeration
<
String
>
parameterNames
=
request
.
getParameterNames
();
if
(
null
!=
parameterNames
&&
parameterNames
.
hasMoreElements
())
{
String
s
=
parameterNames
.
nextElement
();
Object
object
=
MyMapperUtil
.
getObject
(
s
,
CostListSearchKeysVo
.
class
);
CostListSearchKeysVo
searchKeysVo
=
(
CostListSearchKeysVo
)
object
;
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
);
}
Map
<
String
,
Object
>
result
=
costListSearchService
.
searchByKeys
(
searchKeysVo
);
result
.
put
(
"success"
,
true
);
return
result
;
}
return
null
;
}
@GetMapping
(
"/search/getLinkCost"
)
public
List
<
CostDomain
>
getLinkCost
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
return
costListSearchService
.
getLinkCost
();
}
@ApiOperation
(
"获取所有费用单"
)
@ApiOperation
(
"获取所有费用单"
)
@GetMapping
(
"/getAllCost"
)
@GetMapping
(
"/getAllCost"
)
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListPrintController.java
View file @
5bccf8cf
...
@@ -25,112 +25,6 @@ import java.util.*;
...
@@ -25,112 +25,6 @@ import java.util.*;
@RequestMapping
(
"/cost/list/print"
)
@RequestMapping
(
"/cost/list/print"
)
public
class
CostListPrintController
{
public
class
CostListPrintController
{
@Autowired
private
CostService
costService
;
@Autowired
private
UserService
userService
;
@PostMapping
(
"/list"
)
public
Map
<
String
,
Object
>
printList
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
// 获取前端要打印的费用单列表
Enumeration
<
String
>
parameterNames
=
request
.
getParameterNames
();
if
(
null
!=
parameterNames
&&
parameterNames
.
hasMoreElements
())
{
String
s
=
parameterNames
.
nextElement
();
CostListPrintVo
printVo
=
(
CostListPrintVo
)
MyMapperUtil
.
getObject
(
s
,
CostListPrintVo
.
class
);
List
<
String
>
printNos
=
printVo
.
getPrintNos
();
// 遍历获取费用单详情
if
(
null
!=
printNos
&&
printNos
.
size
()
>=
1
)
{
List
<
CostListPrintDto
>
printDtoList
=
new
ArrayList
<>();
for
(
String
costNo
:
printNos
)
{
CostListPrintDto
dto
=
getPrintDto
(
costNo
);
printDtoList
.
add
(
dto
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"success"
,
true
);
result
.
put
(
"printList"
,
printDtoList
);
return
result
;
}
}
return
null
;
}
private
CostListPrintDto
getPrintDto
(
String
costNo
)
{
CostListPrintDto
print
=
new
CostListPrintDto
();
CostDto
cost
=
costService
.
getCostDtoByNo
(
costNo
);
UserDomain
user
=
userService
.
findByUserid
(
cost
.
getCreateUserid
());
if
(
user
==
null
)
{
print
.
setDepartment
(
""
);
print
.
setCreateUsername
(
cost
.
getCreateUsername
()
+
"【注销】"
);
}
else
{
print
.
setDepartment
(
user
.
getDepartmentname1
());
print
.
setCreateUsername
(
cost
.
getCreateUsername
());
}
print
.
setId
(
cost
.
getId
());
print
.
setCompanyName
(
cost
.
getCompanyName
());
//print.setDepartment(user.getDepartmentname1());
print
.
setCostNo
(
costNo
);
print
.
setCreateTime
(
cost
.
getCreateTime
());
print
.
setBankCompany
(
cost
.
getBankCompany
());
print
.
setBankCardUser
(
cost
.
getBankCardUser
());
print
.
setBankCard
(
cost
.
getBankCard
());
print
.
setCostReason
(
cost
.
getCostReason
());
print
.
setDic
(
cost
.
getDicDto
());
print
.
setAmount
(
cost
.
getAmountDto
());
print
.
setTxtAmount
(
MoneyUtil
.
getCnNum
(
cost
.
getAmount
()));
// dic='null', amount=null, txtAmount='null'}
if
(
1
==
cost
.
getCostForm
())
{
// 付款单
print
.
setCostFormStr
(
"付"
);
print
.
setBankCompanyStr
(
"收款单位"
);
print
.
setBankCardUserStr
(
"收款户名"
);
print
.
setFeeTypeStr
(
"付款方式"
);
print
.
setBankCardStr
(
"收款账户"
);
print
.
setCostReasonStr
(
"付款理由"
);
print
.
setCostReason
(
cost
.
getTypeName
()
+
"/"
+
cost
.
getKindName
()
+
"; "
+
cost
.
getCostRemark
());
// 差额单的付款理由需详细说明
if
(
null
!=
cost
.
getIsLend
()
&&
2
==
cost
.
getIsLend
())
{
print
.
setCostReason
(
"【差额单(关联借支单:"
+
cost
.
getSupCostNo
()
+
")】 "
+
cost
.
getTypeName
()
+
" "
+
cost
.
getCostRemark
());
}
print
.
setCostAmountStr
(
"付款金额"
);
}
if
(
2
==
cost
.
getCostForm
())
{
// 收款单
print
.
setCostFormStr
(
"收"
);
print
.
setBankCompanyStr
(
"付款单位"
);
print
.
setBankCardUserStr
(
"付款户名"
);
print
.
setFeeTypeStr
(
"收款方式"
);
print
.
setBankCardStr
(
"付款账户"
);
print
.
setCostReasonStr
(
"收款理由"
);
print
.
setCostAmountStr
(
"收款金额"
);
}
if
(
3
==
cost
.
getCostForm
()
&&
1
==
cost
.
getIsLend
())
{
// 借支单
print
.
setCostFormStr
(
"借支"
);
print
.
setBankCompanyStr
(
"收款单位"
);
print
.
setBankCardUserStr
(
"收款户名"
);
print
.
setFeeTypeStr
(
"付款方式"
);
print
.
setBankCardStr
(
"收款账户"
);
print
.
setCostReasonStr
(
"付款理由"
);
print
.
setCostAmountStr
(
"付款金额"
);
}
if
(
3
==
cost
.
getCostForm
()
&&
2
==
cost
.
getIsLend
())
{
// 借还单
print
.
setCostFormStr
(
"借还"
);
print
.
setBankCompanyStr
(
"付款单位"
);
print
.
setBankCardUserStr
(
"付款户名"
);
print
.
setFeeTypeStr
(
"收款方式"
);
print
.
setBankCardStr
(
"付款账户"
);
print
.
setCostReasonStr
(
"收款理由"
);
print
.
setCostAmountStr
(
"收款金额"
);
print
.
setDic
(
cost
.
getPayDicDto
());
print
.
setAmount
(
cost
.
getPayPlanAmountDto
());
print
.
setTxtAmount
(
MoneyUtil
.
getCnNum
(
cost
.
getPayPlanAmount
()));
}
return
print
;
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostListSearchController.java
View file @
5bccf8cf
...
@@ -19,53 +19,11 @@ import java.util.List;
...
@@ -19,53 +19,11 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
@Deprecated
@Api
(
tags
=
"费用搜索接口"
)
@Api
(
tags
=
"费用搜索接口"
)
@RestController
@RestController
@RequestMapping
(
"cost/list"
)
@RequestMapping
(
"cost/list"
)
public
class
CostListSearchController
{
public
class
CostListSearchController
{
@Autowired
private
CostListSearchService
costListSearchService
;
@PostMapping
(
"/search/key"
)
public
Map
<
String
,
Object
>
getByKey
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
String
key
=
request
.
getParameter
(
"key"
);
String
pageNumStr
=
request
.
getParameter
(
"pageNum"
);
String
pageSizeStr
=
request
.
getParameter
(
"pageSize"
);
Map
<
String
,
Object
>
map
=
costListSearchService
.
searchByKey
(
key
,
Integer
.
parseInt
(
pageNumStr
),
Integer
.
parseInt
(
pageSizeStr
));
map
.
put
(
"success"
,
true
);
return
map
;
}
@PostMapping
(
"/search/keys"
)
public
Map
<
String
,
Object
>
getByKeys
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
Enumeration
<
String
>
parameterNames
=
request
.
getParameterNames
();
if
(
null
!=
parameterNames
&&
parameterNames
.
hasMoreElements
())
{
String
s
=
parameterNames
.
nextElement
();
Object
object
=
MyMapperUtil
.
getObject
(
s
,
CostListSearchKeysVo
.
class
);
CostListSearchKeysVo
searchKeysVo
=
(
CostListSearchKeysVo
)
object
;
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
);
}
Map
<
String
,
Object
>
result
=
costListSearchService
.
searchByKeys
(
searchKeysVo
);
result
.
put
(
"success"
,
true
);
return
result
;
}
return
null
;
}
@GetMapping
(
"/search/getLinkCost"
)
public
List
<
CostDomain
>
getLinkCost
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
return
costListSearchService
.
getLinkCost
();
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/costtemplate/CostTemplateController.java
View file @
5bccf8cf
...
@@ -42,21 +42,20 @@ public class CostTemplateController {
...
@@ -42,21 +42,20 @@ public class CostTemplateController {
return
CostResult
.
success
();
return
CostResult
.
success
();
}
}
@ApiOperation
(
"
/查询费用单模板
"
)
@ApiOperation
(
"
查询费用单模板详情
"
)
@GetMapping
(
"/queryDetail"
)
@GetMapping
(
"/queryDetail"
)
public
CostResult
<
CostTemplate
>
queryDetail
(
@RequestParam
Integer
id
)
{
public
CostResult
<
CostTemplate
>
queryDetail
(
@RequestParam
Integer
id
)
{
CostTemplate
costTemplate
=
costTemplateService
.
queryDetail
(
id
);
CostTemplate
costTemplate
=
costTemplateService
.
queryDetail
(
id
);
return
CostResult
.
success
(
costTemplate
);
return
CostResult
.
success
(
costTemplate
);
}
}
@ApiOperation
(
"
/查询费用单模板
"
)
@ApiOperation
(
"
查询费用单模板列表
"
)
@GetMapping
(
"/queryList"
)
@GetMapping
(
"/queryList"
)
public
CostResult
<
List
<
CostTemplate
>>
queryList
(
CostTemplateApiDto
.
QueryListReq
req
)
{
public
CostResult
<
List
<
CostTemplate
>>
queryList
(
CostTemplateApiDto
.
QueryListReq
req
)
{
List
<
CostTemplate
>
costTemplateList
=
costTemplateService
.
queryList
(
req
);
List
<
CostTemplate
>
costTemplateList
=
costTemplateService
.
queryList
(
req
);
return
CostResult
.
success
(
costTemplateList
);
return
CostResult
.
success
(
costTemplateList
);
}
}
@ApiOperation
(
"删除费用单模版"
)
@ApiOperation
(
"删除费用单模版"
)
@GetMapping
(
"/delete"
)
@GetMapping
(
"/delete"
)
public
CostResult
<
Void
>
delete
(
@RequestParam
Integer
id
)
{
public
CostResult
<
Void
>
delete
(
@RequestParam
Integer
id
)
{
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/CostTemplateApiDto.java
View file @
5bccf8cf
...
@@ -34,5 +34,8 @@ public class CostTemplateApiDto {
...
@@ -34,5 +34,8 @@ public class CostTemplateApiDto {
private
LocalDateTime
startTime
;
private
LocalDateTime
startTime
;
private
LocalDateTime
endTime
;
private
LocalDateTime
endTime
;
private
Integer
pageNum
;
private
Integer
pageSize
;
}
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostTemplate.java
View file @
5bccf8cf
...
@@ -49,6 +49,13 @@ public class CostTemplate implements Serializable {
...
@@ -49,6 +49,13 @@ public class CostTemplate implements Serializable {
@ApiModelProperty
(
"是否开启最终人审核"
)
@ApiModelProperty
(
"是否开启最终人审核"
)
private
Boolean
enableFinalReview
;
private
Boolean
enableFinalReview
;
@ApiModelProperty
(
"自动审核金额 冗余从表金额字段"
)
private
BigDecimal
autoCheckAmount
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"是否设置了自动审核"
)
private
Boolean
setAutoCheck
;
@ApiModelProperty
(
"最终审核人最低审核金额"
)
@ApiModelProperty
(
"最终审核人最低审核金额"
)
private
BigDecimal
finalMinimumReviewAmount
;
private
BigDecimal
finalMinimumReviewAmount
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/ICostTemplateBaseColService.java
View file @
5bccf8cf
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.service;
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.blt.other.module.cost.dto.CostTemplateColReq
;
import
com.blt.other.module.cost.dto.CostTemplateColReq
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
org.springframework.lang.NonNull
;
import
org.springframework.lang.NonNull
;
import
java.util.List
;
import
java.util.List
;
...
@@ -63,4 +64,14 @@ public interface ICostTemplateBaseColService extends IService<CostTemplateBaseCo
...
@@ -63,4 +64,14 @@ public interface ICostTemplateBaseColService extends IService<CostTemplateBaseCo
* @return list
* @return list
*/
*/
List
<
CostTemplateBaseCol
>
defaultBaseColList
(
@NonNull
Integer
costType
);
List
<
CostTemplateBaseCol
>
defaultBaseColList
(
@NonNull
Integer
costType
);
/**
* <p>
* 补全聚合
* </p>
*
* @param costTemplateColList req
*/
void
setCostTemplateBaseCol
(
List
<
CostTemplateCol
>
costTemplateColList
);
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/ICostTemplateColService.java
View file @
5bccf8cf
package
com
.
blt
.
other
.
module
.
cost
.
service
;
package
com
.
blt
.
other
.
module
.
cost
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.blt.other.module.cost.model.CostTemplate
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 费用单模版 服务类
* 费用单模版 服务类
...
@@ -39,4 +42,23 @@ public interface ICostTemplateColService extends IService<CostTemplateCol> {
...
@@ -39,4 +42,23 @@ public interface ICostTemplateColService extends IService<CostTemplateCol> {
* @param costTemplateCol req
* @param costTemplateCol req
*/
*/
void
add
(
CostTemplateCol
costTemplateCol
);
void
add
(
CostTemplateCol
costTemplateCol
);
/**
* <p>
* 补全聚合
* </p>
*
* @param costTemplateList req
*/
void
setCostTemplateCol
(
List
<
CostTemplate
>
costTemplateList
);
/**
* <p>
* 补全聚合
* </p>
*
* @param costTemplate costTemplate
*/
void
setCostTemplateCol
(
CostTemplate
costTemplate
);
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostServiceImpl.java
View file @
5bccf8cf
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.cost.dao.*
;
import
com.blt.other.module.cost.dao.*
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
com.blt.other.module.cost.vo.CostExportVo
;
...
@@ -356,8 +356,7 @@ public class CostServiceImpl implements CostService {
...
@@ -356,8 +356,7 @@ public class CostServiceImpl implements CostService {
@Override
@Override
public
List
<
CostDto
>
getLinkLendCost
(
Integer
createuserid
)
{
public
List
<
CostDto
>
getLinkLendCost
(
Integer
createuserid
)
{
List
<
CostDomain
>
costDomains
=
costDao
.
selectLinkLendCost
(
createuserid
);
List
<
CostDomain
>
costDomains
=
costDao
.
selectLinkLendCost
(
createuserid
);
List
<
CostDto
>
costDtos
=
domainToDto
(
costDomains
);
return
domainToDto
(
costDomains
);
return
costDtos
;
}
}
@Override
@Override
...
@@ -388,8 +387,7 @@ public class CostServiceImpl implements CostService {
...
@@ -388,8 +387,7 @@ public class CostServiceImpl implements CostService {
@Override
@Override
public
CostDomain
getCostDomainByNo
(
String
costNo
)
{
public
CostDomain
getCostDomainByNo
(
String
costNo
)
{
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
return
costDao
.
selectByCostNo
(
costNo
);
return
costDomain
;
}
}
@Override
@Override
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costtemplate/CostTemplateBaseColServiceImpl.java
View file @
5bccf8cf
...
@@ -5,11 +5,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -5,11 +5,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.blt.other.module.cost.dao.CostTemplateBaseColMapper
;
import
com.blt.other.module.cost.dao.CostTemplateBaseColMapper
;
import
com.blt.other.module.cost.dto.CostTemplateColReq
;
import
com.blt.other.module.cost.dto.CostTemplateColReq
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
com.blt.other.module.cost.service.ICostTemplateBaseColService
;
import
com.blt.other.module.cost.service.ICostTemplateBaseColService
;
import
org.springframework.lang.NonNull
;
import
org.springframework.lang.NonNull
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* <p>
* <p>
...
@@ -51,4 +54,13 @@ public class CostTemplateBaseColServiceImpl extends ServiceImpl<CostTemplateBase
...
@@ -51,4 +54,13 @@ public class CostTemplateBaseColServiceImpl extends ServiceImpl<CostTemplateBase
public
List
<
CostTemplateBaseCol
>
defaultBaseColList
(
@NonNull
Integer
costFrom
)
{
public
List
<
CostTemplateBaseCol
>
defaultBaseColList
(
@NonNull
Integer
costFrom
)
{
return
baseMapper
.
defaultBaseColList
(
costFrom
);
return
baseMapper
.
defaultBaseColList
(
costFrom
);
}
}
@Override
public
void
setCostTemplateBaseCol
(
List
<
CostTemplateCol
>
costTemplateColList
)
{
List
<
Integer
>
costTemplateBaseColIds
=
costTemplateColList
.
stream
().
map
(
CostTemplateCol:
:
getCostTemplateBaseColId
).
collect
(
Collectors
.
toList
());
List
<
CostTemplateBaseCol
>
costTemplateBaseColList
=
this
.
listByIds
(
costTemplateBaseColIds
);
Map
<
Integer
,
CostTemplateBaseCol
>
costTemplateBaseColMap
=
costTemplateBaseColList
.
stream
().
collect
(
Collectors
.
toMap
(
CostTemplateBaseCol:
:
getId
,
costTemplateBaseCol
->
costTemplateBaseCol
,
(
k1
,
k2
)
->
k1
));
costTemplateColList
.
forEach
(
costTemplateCol
->
costTemplateCol
.
setCostTemplateBaseCol
(
costTemplateBaseColMap
.
get
(
costTemplateCol
.
getCostTemplateBaseColId
())));
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costtemplate/CostTemplateColServiceImpl.java
View file @
5bccf8cf
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
.
costtemplate
;
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
.
costtemplate
;
import
com.blt.other.module.cost.model.CostTemplateCol
;
import
com.bailuntec.common.ListUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.blt.other.module.cost.dao.CostTemplateColMapper
;
import
com.blt.other.module.cost.dao.CostTemplateColMapper
;
import
com.blt.other.module.cost.model.CostTemplate
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
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.ICostTemplateColService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* <p>
* <p>
* 费用单模版 服务实现类
* 费用单模版 服务实现类
...
@@ -17,6 +27,10 @@ import org.springframework.stereotype.Service;
...
@@ -17,6 +27,10 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
CostTemplateColServiceImpl
extends
ServiceImpl
<
CostTemplateColMapper
,
CostTemplateCol
>
implements
ICostTemplateColService
{
public
class
CostTemplateColServiceImpl
extends
ServiceImpl
<
CostTemplateColMapper
,
CostTemplateCol
>
implements
ICostTemplateColService
{
@Resource
ICostTemplateBaseColService
costTemplateBaseColService
;
@Override
@Override
public
void
delete
(
Integer
id
)
{
public
void
delete
(
Integer
id
)
{
this
.
removeById
(
id
);
this
.
removeById
(
id
);
...
@@ -31,4 +45,20 @@ public class CostTemplateColServiceImpl extends ServiceImpl<CostTemplateColMappe
...
@@ -31,4 +45,20 @@ public class CostTemplateColServiceImpl extends ServiceImpl<CostTemplateColMappe
public
void
add
(
CostTemplateCol
costTemplateCol
)
{
public
void
add
(
CostTemplateCol
costTemplateCol
)
{
this
.
save
(
costTemplateCol
);
this
.
save
(
costTemplateCol
);
}
}
@Override
public
void
setCostTemplateCol
(
List
<
CostTemplate
>
costTemplateList
)
{
List
<
Integer
>
costTemplateIds
=
costTemplateList
.
stream
().
map
(
CostTemplate:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
ListUtil
.
isNotEmpty
(
costTemplateIds
))
{
List
<
CostTemplateCol
>
costTemplateColList
=
this
.
list
(
new
LambdaQueryWrapper
<
CostTemplateCol
>()
.
in
(
CostTemplateCol:
:
getCostTemplateId
,
costTemplateIds
));
costTemplateBaseColService
.
setCostTemplateBaseCol
(
costTemplateColList
);
}
}
@Override
public
void
setCostTemplateCol
(
CostTemplate
costTemplate
)
{
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costtemplate/CostTemplateServiceImpl.java
View file @
5bccf8cf
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
.
costtemplate
;
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
.
costtemplate
;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.common.StringUtils
;
import
com.bailuntec.common.StringUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
...
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -63,7 +65,14 @@ public class CostTemplateServiceImpl extends ServiceImpl<CostTemplateMapper, Cos
...
@@ -63,7 +65,14 @@ public class CostTemplateServiceImpl extends ServiceImpl<CostTemplateMapper, Cos
List
<
CostTemplateCol
>
costTemplateColList
=
costTemplateColService
.
list
(
new
LambdaQueryWrapper
<
CostTemplateCol
>()
List
<
CostTemplateCol
>
costTemplateColList
=
costTemplateColService
.
list
(
new
LambdaQueryWrapper
<
CostTemplateCol
>()
.
eq
(
CostTemplateCol:
:
getCostTemplateId
,
id
));
.
eq
(
CostTemplateCol:
:
getCostTemplateId
,
id
));
// List<CostTemplateBaseCol>
List
<
Integer
>
costTemplateBaseColIds
=
costTemplateColList
.
stream
().
map
(
CostTemplateCol:
:
getCostTemplateBaseColId
).
collect
(
Collectors
.
toList
());
if
(
ListUtil
.
isNotEmpty
(
costTemplateBaseColIds
))
{
List
<
CostTemplateBaseCol
>
costTemplateBaseColList
=
costTemplateBaseColService
.
listByIds
(
costTemplateBaseColIds
);
Map
<
Integer
,
CostTemplateBaseCol
>
costTemplateBaseColMap
=
costTemplateBaseColList
.
stream
().
collect
(
Collectors
.
toMap
(
CostTemplateBaseCol:
:
getId
,
costTemplateBaseCol
->
costTemplateBaseCol
,
(
k1
,
k2
)
->
k1
));
costTemplateColList
.
forEach
(
costTemplateCol
->
costTemplateCol
.
setCostTemplateBaseCol
(
costTemplateBaseColMap
.
get
(
costTemplateCol
.
getCostTemplateBaseColId
())));
}
costTemplate
.
setCostTemplateColList
(
costTemplateColList
);
costTemplate
.
setCostTemplateColList
(
costTemplateColList
);
return
costTemplate
;
return
costTemplate
;
}
}
...
@@ -117,6 +126,9 @@ public class CostTemplateServiceImpl extends ServiceImpl<CostTemplateMapper, Cos
...
@@ -117,6 +126,9 @@ public class CostTemplateServiceImpl extends ServiceImpl<CostTemplateMapper, Cos
if
(
req
.
getEndTime
()
!=
null
)
{
if
(
req
.
getEndTime
()
!=
null
)
{
wrapper
.
le
(
CostTemplate:
:
getLastUpdateTime
,
req
.
getEndTime
());
wrapper
.
le
(
CostTemplate:
:
getLastUpdateTime
,
req
.
getEndTime
());
}
}
return
this
.
list
(
wrapper
);
List
<
CostTemplate
>
costTemplateList
=
this
.
list
(
wrapper
);
costTemplateColService
.
setCostTemplateCol
(
costTemplateList
);
return
list
();
}
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/database/model/UserCostFinansysDomain.java
View file @
5bccf8cf
package
com
.
blt
.
other
.
module
.
database
.
model
;
package
com
.
blt
.
other
.
module
.
database
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -9,7 +12,9 @@ import lombok.Data;
...
@@ -9,7 +12,9 @@ import lombok.Data;
@TableName
(
"user_cost_finansys"
)
@TableName
(
"user_cost_finansys"
)
public
class
UserCostFinansysDomain
{
public
class
UserCostFinansysDomain
{
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
private
Integer
syncId
;
private
Integer
syncId
;
private
Integer
userid
;
private
Integer
userid
;
private
String
username
;
private
String
username
;
...
...
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