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
4fbcd402
Commit
4fbcd402
authored
Nov 26, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a8737f4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
CostTypeController.java
.../blt/other/module/cost/controller/CostTypeController.java
+3
-1
CostDomain.java
...main/java/com/blt/other/module/cost/model/CostDomain.java
+17
-0
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+2
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostTypeController.java
View file @
4fbcd402
...
@@ -239,7 +239,9 @@ public class CostTypeController {
...
@@ -239,7 +239,9 @@ public class CostTypeController {
@ApiOperation
(
"导入 excel 文件"
)
@ApiOperation
(
"导入 excel 文件"
)
@PostMapping
(
"/import"
)
@PostMapping
(
"/import"
)
public
Map
<
String
,
Object
>
upload
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletResponse
response
,
HttpServletRequest
request
)
{
public
Map
<
String
,
Object
>
upload
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
AxiosUtil
.
setCors
(
response
,
request
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostDomain.java
View file @
4fbcd402
...
@@ -265,5 +265,22 @@ public class CostDomain implements Serializable {
...
@@ -265,5 +265,22 @@ public class CostDomain implements Serializable {
return
costDto
;
return
costDto
;
}
}
public
void
setCostTemplateIdByFrom
()
{
if
(
costForm
==
1
)
{
this
.
costTemplateId
=
3
;
}
if
(
costForm
==
2
)
{
this
.
costTemplateId
=
5
;
}
if
(
costForm
==
3
)
{
if
(
lendStatus
==
1
)
{
this
.
costTemplateId
=
6
;
}
if
(
lendStatus
==
2
)
{
this
.
costTemplateId
=
7
;
}
}
}
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
4fbcd402
...
@@ -152,6 +152,7 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -152,6 +152,7 @@ public class CostApiServiceImpl implements CostApiService {
costDetailDomain
.
setDetailNo
(
costNo
+
"-1"
);
costDetailDomain
.
setDetailNo
(
costNo
+
"-1"
);
costDetailDao
.
insert
(
costDetailDomain
);
costDetailDao
.
insert
(
costDetailDomain
);
}
}
costDomain
.
setCostTemplateIdByFrom
();
return
costNo
;
return
costNo
;
}
}
...
@@ -333,6 +334,7 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -333,6 +334,7 @@ public class CostApiServiceImpl implements CostApiService {
costDomain
.
setCreateUsername
(
user
.
getUsername
());
costDomain
.
setCreateUsername
(
user
.
getUsername
());
costDomain
.
setCreateTime
(
new
Date
());
costDomain
.
setCreateTime
(
new
Date
());
}
}
costDomain
.
setCostTemplateIdByFrom
();
//写入费用单
//写入费用单
costDao
.
insert
(
costDomain
);
costDao
.
insert
(
costDomain
);
...
...
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