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
364cc7ea
Commit
364cc7ea
authored
Jun 14, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增物流收款单接口
parent
b3a65df5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
11 deletions
+32
-11
CostApiController.java
...om/blt/other/other_cost/controller/CostApiController.java
+22
-1
CostApiService.java
...java/com/blt/other/other_cost/service/CostApiService.java
+1
-1
CostApiServiceImpl.java
...blt/other/other_cost/service/impl/CostApiServiceImpl.java
+9
-9
No files found.
cost-core/src/main/java/com/blt/other/other_cost/controller/CostApiController.java
View file @
364cc7ea
...
...
@@ -35,7 +35,7 @@ public class CostApiController {
logger
.
warn
(
"接收推送而来的物流单信息:"
+
logisticsCostDto
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
try
{
String
costNo
=
costApiService
.
generateLogisticsCost
(
logisticsCostDto
);
String
costNo
=
costApiService
.
generateLogisticsCost
(
1
,
logisticsCostDto
);
result
.
put
(
"success"
,
true
);
result
.
put
(
"message"
,
costNo
);
}
catch
(
Exception
e
)
{
...
...
@@ -46,6 +46,27 @@ public class CostApiController {
}
return
result
;
}
/**
* 吴通
* 接收物流单,自动生成收款费用单到财务审核
* @return
*/
@PostMapping
(
"/pushLogisticsReceipt"
)
public
Map
<
String
,
Object
>
pushLogisticsReceipt
(
@RequestBody
LogisticsCostDto
logisticsCostDto
){
logger
.
warn
(
"接收推送而来的物流单信息:"
+
logisticsCostDto
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
try
{
String
costNo
=
costApiService
.
generateLogisticsCost
(
2
,
logisticsCostDto
);
result
.
put
(
"success"
,
true
);
result
.
put
(
"message"
,
costNo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
result
.
put
(
"success"
,
false
);
result
.
put
(
"message"
,
"生成物流收款费用单发生错误:"
+
e
.
getMessage
());
logger
.
error
(
"生成物流收款费用单发生错误:"
+
e
.
getMessage
());
}
return
result
;
}
@GetMapping
(
"/manageCostList"
)
public
Map
<
String
,
Object
>
manageCostList
(
@RequestParam
(
name
=
"startDate"
,
required
=
false
)
String
startDateStr
,
...
...
cost-core/src/main/java/com/blt/other/other_cost/service/CostApiService.java
View file @
364cc7ea
...
...
@@ -12,7 +12,7 @@ public interface CostApiService {
* 接收物流单,自动生成付款费用单到财务审核
* @param logisticsCostDto
*/
String
generateLogisticsCost
(
LogisticsCostDto
logisticsCostDto
)
throws
Exception
;
String
generateLogisticsCost
(
int
costForm
,
LogisticsCostDto
logisticsCostDto
)
throws
Exception
;
/**
* 查询管理成本费用列表
...
...
cost-core/src/main/java/com/blt/other/other_cost/service/impl/CostApiServiceImpl.java
View file @
364cc7ea
...
...
@@ -59,12 +59,12 @@ public class CostApiServiceImpl implements CostApiService {
@Override
@Transactional
public
String
generateLogisticsCost
(
LogisticsCostDto
logisticsCostDto
)
throws
Exception
{
public
String
generateLogisticsCost
(
int
costForm
,
LogisticsCostDto
logisticsCostDto
)
throws
Exception
{
CostDomain
costDomain
=
new
CostDomain
();
String
costNo
=
CostUtils
.
getIdNum
(
costService
);
costDomain
.
setCostNo
(
costNo
);
costDomain
.
setCostForm
(
1
);
// 付款费用单
costDomain
.
setCostStatus
(
0
);
//
待提交
costDomain
.
setCostForm
(
costForm
);
// 付款费用单 1付款 2收款 3借支/借还
costDomain
.
setCostStatus
(
0
);
//
0 待提交 1待审核 2待出纳付款 3被驳回 4已支付 5已作废
costDomain
.
setCostRemark
(
logisticsCostDto
.
getCostRemark
()
+
"【WMS系统推送】"
);
costDomain
.
setCostReason
(
logisticsCostDto
.
getCostReason
());
costDomain
.
setTypeNo
(
"CTN1809180519188"
);
...
...
@@ -140,13 +140,13 @@ public class CostApiServiceImpl implements CostApiService {
costDomain
.
setCreateUsername
(
user
.
getUsername
());
costDomain
.
setCreateTime
(
new
Date
());
}
CostDetailDomain
costDetailDomain
=
new
CostDetailDomain
();
BeanUtils
.
copyProperties
(
costDomain
,
costDetailDomain
);
costDetailDomain
.
setDetailNo
(
costNo
+
"-1"
);
costDao
.
insert
(
costDomain
);
costDetailDao
.
insert
(
costDetailDomain
);
if
(
costForm
==
1
)
{
CostDetailDomain
costDetailDomain
=
new
CostDetailDomain
();
BeanUtils
.
copyProperties
(
costDomain
,
costDetailDomain
);
costDetailDomain
.
setDetailNo
(
costNo
+
"-1"
);
costDetailDao
.
insert
(
costDetailDomain
);
}
return
costNo
;
}
...
...
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