Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
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
reyun
manager
Commits
8521b38d
Commit
8521b38d
authored
7 years ago
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app排序
parent
f0b8cd7f
master
…
0727_bugfix
1082_bugfix
1151_bugfix
1209_bugfix
1315_bugfix
1439_bugfix
1608_bugfix
1608_from_1619
1619_bugfix
1990_bugfix
20180328_sale
20180411
20180525_adi
20180530_bpu
2578_bugfix
2580_fix
31762_2_bugfix
31762_bugfix
31969_bugfix
32400_fix
32599_bugfix
649_bugfix
back_version
back_version2
bigfix_20201028
bugfix_1608_new
bugfix_1760
bugfix_master_1760
change_double
contract_rela
develper
feature_20180116_new
liushaowei
manager_new
master_mv
mobvista_master
month_flow
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
19 deletions
+28
-19
workspace.xml
.idea/workspace.xml
+14
-14
ContractController.java
src/main/java/common/controller/ContractController.java
+14
-5
No files found.
.idea/workspace.xml
View file @
8521b38d
...
...
@@ -27,8 +27,8 @@
<file
leaf-file-name=
"ContractController.java"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/controller/ContractController.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
506
"
>
<caret
line=
"1
11"
column=
"91"
lean-forward=
"true"
selection-start-line=
"111"
selection-start-column=
"91"
selection-end-line=
"111"
selection-end-column=
"91
"
/>
<state
relative-caret-position=
"
368
"
>
<caret
line=
"1
04"
column=
"47"
lean-forward=
"true"
selection-start-line=
"104"
selection-start-column=
"47"
selection-end-line=
"104"
selection-end-column=
"47
"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
...
...
@@ -1443,14 +1443,7 @@
<workItem
from=
"1517189406074"
duration=
"8333000"
/>
<workItem
from=
"1517275427548"
duration=
"11524000"
/>
<workItem
from=
"1517361892578"
duration=
"19237000"
/>
<workItem
from=
"1517447750893"
duration=
"616000"
/>
</task>
<task
id=
"LOCAL-00024"
summary=
"pom"
>
<created>
1515054597133
</created>
<option
name=
"number"
value=
"00024"
/>
<option
name=
"presentableId"
value=
"LOCAL-00024"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1515054597133
</updated>
<workItem
from=
"1517447750893"
duration=
"1793000"
/>
</task>
<task
id=
"LOCAL-00025"
summary=
"pom"
>
<created>
1515061487894
</created>
...
...
@@ -1788,11 +1781,18 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1517399760213
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"73"
/>
<task
id=
"LOCAL-00073"
summary=
"app排序"
>
<created>
1517452222290
</created>
<option
name=
"number"
value=
"00073"
/>
<option
name=
"presentableId"
value=
"LOCAL-00073"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1517452222291
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"74"
/>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"31
7663
000"
/>
<option
name=
"totallyTimeSpent"
value=
"31
8840
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-8"
y=
"-8"
width=
"1382"
height=
"744"
extended-state=
"6"
/>
...
...
@@ -2426,8 +2426,8 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/controller/ContractController.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
506
"
>
<caret
line=
"1
11"
column=
"91"
lean-forward=
"true"
selection-start-line=
"111"
selection-start-column=
"91"
selection-end-line=
"111"
selection-end-column=
"91
"
/>
<state
relative-caret-position=
"
368
"
>
<caret
line=
"1
04"
column=
"47"
lean-forward=
"true"
selection-start-line=
"104"
selection-start-column=
"47"
selection-end-line=
"104"
selection-end-column=
"47
"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
8521b38d
...
...
@@ -32,7 +32,9 @@ import java.net.URLConnection;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by mxq on 17/12/21.
...
...
@@ -58,7 +60,11 @@ public class ContractController {
public
ResponseEntity
<
byte
[]>
export
(
@PathVariable
String
platform
,
@RequestParam
String
startDate
,
@RequestParam
String
endDate
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Contract
>
contractList
=
service
.
findAll
(
startDate
,
endDate
,
platform
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"wait"
,
"未执行"
);
map
.
put
(
"executing"
,
"执行中"
);
map
.
put
(
"end"
,
"已结束"
);
map
.
put
(
"cancel"
,
"作废"
);
byte
[]
content
=
new
byte
[
0
];
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -67,7 +73,7 @@ public class ContractController {
for
(
Contract
c
:
contractList
){
sb
.
append
(
c
.
getDs
()).
append
(
","
).
append
(
c
.
getContractCode
()).
append
(
","
).
append
(
c
.
getEmail
()).
append
(
","
).
append
(
c
.
getCustomerBody
()).
append
(
","
).
append
(
c
.
getSaleName
()).
append
(
","
)
.
append
(
c
.
getStartDate
()).
append
(
","
).
append
(
c
.
getEndDate
()).
append
(
","
).
append
(
c
.
getPriceLevelName
()).
append
(
","
).
append
(
c
.
getMoney
()).
append
(
","
).
append
(
c
.
getPayMoney
()).
append
(
","
)
.
append
(
c
.
getStatus
()).
append
(
","
).
append
(
"\r\n"
);
.
append
(
map
.
get
(
c
.
getStatus
())
).
append
(
"\r\n"
);
}
}
InputStream
in
=
new
ByteArrayInputStream
(
sb
.
toString
().
getBytes
());
...
...
@@ -79,7 +85,8 @@ public class ContractController {
HttpHeaders
headers
=
new
HttpHeaders
();
response
.
setHeader
(
"filename"
,
"contract.txt"
);
response
.
setHeader
(
"content-disposition"
,
"attachment; filename=contract.txt"
);
response
.
setHeader
(
"Content-Type"
,
"application/octet-stream;charset=UTF-8"
);
response
.
setHeader
(
"Content-Type"
,
"text/csv"
);
response
.
setContentType
(
"APPLICATION/OCTET-STREAM"
);
//返回文件字符串
return
new
ResponseEntity
<
byte
[]>(
content
,
headers
,
HttpStatus
.
CREATED
);
...
...
@@ -90,14 +97,16 @@ public class ContractController {
public
ResponseEntity
<
byte
[]>
exportPay
(
@RequestParam
String
startDate
,
@RequestParam
String
endDate
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
ContractMoney
>
moneyList
=
service
.
findPay
(
startDate
,
endDate
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"pay"
,
"收款"
);
map
.
put
(
"invoice"
,
"收票"
);
byte
[]
content
=
new
byte
[
0
];
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"合同编号 ,客户账号 ,签约方 ,事项 ,金额 ,日期 ,修改人 \r\n"
);
if
(
ValidateUtil
.
isValid
(
moneyList
)){
for
(
ContractMoney
c
:
moneyList
){
sb
.
append
(
c
.
getContractCode
()).
append
(
","
).
append
(
c
.
getEmail
()).
append
(
","
).
append
(
c
.
getCompany
()).
append
(
","
).
append
(
c
.
getType
(
)).
append
(
","
)
sb
.
append
(
c
.
getContractCode
()).
append
(
","
).
append
(
c
.
getEmail
()).
append
(
","
).
append
(
c
.
getCompany
()).
append
(
","
).
append
(
map
.
get
(
c
.
getType
()
)).
append
(
","
)
.
append
(
c
.
getMoney
()).
append
(
","
).
append
(
c
.
getDs
()).
append
(
","
).
append
(
c
.
getCreateName
()).
append
(
"\r\n"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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