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
e87c86ca
Commit
e87c86ca
authored
7 years ago
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app排序
parent
d28522b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
129 additions
and
96 deletions
+129
-96
workspace.xml
.idea/workspace.xml
+85
-96
ContractController.java
src/main/java/common/controller/ContractController.java
+44
-0
No files found.
.idea/workspace.xml
View file @
e87c86ca
...
...
@@ -3,7 +3,7 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"e2e217e2-2dd6-4c6f-ad19-b1cba46bc7ad"
name=
"Default"
comment=
""
>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/main/java/common/
service/impl/ContractServiceImpl.java"
afterPath=
"$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl
.java"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/main/java/common/
controller/ContractController.java"
afterPath=
"$PROJECT_DIR$/src/main/java/common/controller/ContractController
.java"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/target/"
/>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
...
...
@@ -24,32 +24,14 @@
<component
name=
"ExecutionTargetManager"
SELECTED_TARGET=
"default_target"
/>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"
TkioAccoun
tController.java"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/
tkio/controller/TkioAccoun
tController.java"
>
<file
leaf-file-name=
"
Contrac
tController.java"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/
common/controller/Contrac
tController.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"352"
>
<caret
line=
"38"
column=
"55"
lean-forward=
"false"
selection-start-line=
"38"
selection-start-column=
"55"
selection-end-line=
"38"
selection-end-column=
"55"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"ResultStatus.java"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/util/ResultStatus.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"229"
>
<caret
line=
"14"
column=
"35"
lean-forward=
"false"
selection-start-line=
"14"
selection-start-column=
"35"
selection-end-line=
"14"
selection-end-column=
"35"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"TkioAccountService.java"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/tkio/service/TkioAccountService.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"183"
>
<caret
line=
"13"
column=
"16"
lean-forward=
"false"
selection-start-line=
"13"
selection-start-column=
"16"
selection-end-line=
"13"
selection-end-column=
"16"
/>
<folding
/>
<state
relative-caret-position=
"552"
>
<caret
line=
"69"
column=
"9"
lean-forward=
"false"
selection-start-line=
"69"
selection-start-column=
"9"
selection-end-line=
"69"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
...
...
@@ -57,38 +39,18 @@
<file
leaf-file-name=
"ContractServiceImpl.java"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-5697
"
>
<caret
line=
"1
50"
column=
"53"
lean-forward=
"false"
selection-start-line=
"150"
selection-start-column=
"53"
selection-end-line=
"150"
selection-end-column=
"53
"
/>
<state
relative-caret-position=
"
138
"
>
<caret
line=
"1
73"
column=
"32"
lean-forward=
"false"
selection-start-line=
"173"
selection-start-column=
"8"
selection-end-line=
"173"
selection-end-column=
"32
"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"
TrackAccountController.java
"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
src/main/java/track/controller/TrackAccountController.java
"
>
<file
leaf-file-name=
"
pom.xml
"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
pom.xml
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"343"
>
<caret
line=
"31"
column=
"5"
lean-forward=
"true"
selection-start-line=
"31"
selection-start-column=
"5"
selection-end-line=
"31"
selection-end-column=
"5"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"TrackAccountService.java"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/track/service/TrackAccountService.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"194"
>
<caret
line=
"13"
column=
"21"
lean-forward=
"false"
selection-start-line=
"13"
selection-start-column=
"21"
selection-end-line=
"13"
selection-end-column=
"21"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"TrackAccountServiceImpl.java"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/track/service/impl/TrackAccountServiceImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"309"
>
<caret
line=
"119"
column=
"9"
lean-forward=
"false"
selection-start-line=
"119"
selection-start-column=
"9"
selection-end-line=
"119"
selection-end-column=
"9"
/>
<state
relative-caret-position=
"218"
>
<caret
line=
"107"
column=
"125"
lean-forward=
"false"
selection-start-line=
"107"
selection-start-column=
"17"
selection-end-line=
"107"
selection-end-column=
"125"
/>
<folding
/>
</state>
</provider>
...
...
@@ -176,7 +138,6 @@
<option
value=
"$PROJECT_DIR$/src/main/java/tkio/repository/SalesManLeaderRepository.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/common/model/UserLog.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/util/NewUserLogThread.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/common/controller/ContractController.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/common/model/Reminder.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/tkio/service/TkioAccountService.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/common/repository/ReminderLevelRepository.java"
/>
...
...
@@ -199,6 +160,7 @@
<option
value=
"$PROJECT_DIR$/src/main/java/tkio/controller/TkioAccountController.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/track/controller/TrackAccountController.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/java/common/controller/ContractController.java"
/>
</list>
</option>
</component>
...
...
@@ -822,6 +784,36 @@
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"manager"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"manager"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"src"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"main"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"java"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"common"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"controller"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
...
...
@@ -1317,14 +1309,7 @@
<workItem
from=
"1516932422302"
duration=
"5866000"
/>
<workItem
from=
"1517189406074"
duration=
"8333000"
/>
<workItem
from=
"1517275427548"
duration=
"11524000"
/>
<workItem
from=
"1517361892578"
duration=
"5791000"
/>
</task>
<task
id=
"LOCAL-00020"
summary=
"pom"
>
<created>
1515034078195
</created>
<option
name=
"number"
value=
"00020"
/>
<option
name=
"presentableId"
value=
"LOCAL-00020"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1515034078195
</updated>
<workItem
from=
"1517361892578"
duration=
"10132000"
/>
</task>
<task
id=
"LOCAL-00021"
summary=
"pom"
>
<created>
1515046219519
</created>
...
...
@@ -1662,11 +1647,18 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1517382900046
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"69"
/>
<task
id=
"LOCAL-00069"
summary=
"app排序"
>
<created>
1517384165633
</created>
<option
name=
"number"
value=
"00069"
/>
<option
name=
"presentableId"
value=
"LOCAL-00069"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1517384165633
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"70"
/>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"30
3601
000"
/>
<option
name=
"totallyTimeSpent"
value=
"30
7942
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-8"
y=
"-8"
width=
"1382"
height=
"744"
extended-state=
"6"
/>
...
...
@@ -1690,7 +1682,7 @@
<window_info
id=
"Java Enterprise"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Capture Analysis"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.5155483"
sideWeight=
"0.49546143"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
fals
e"
show_stripe_button=
"true"
weight=
"0.33224222"
sideWeight=
"0.49016643"
order=
"9"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
tru
e"
show_stripe_button=
"true"
weight=
"0.33224222"
sideWeight=
"0.49016643"
order=
"9"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Spring"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.3289689"
sideWeight=
"0.5"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.5581015"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.30711043"
sideWeight=
"0.5"
order=
"8"
side_tool=
"false"
content_ui=
"combo"
/>
...
...
@@ -1744,7 +1736,7 @@
<window_info
id=
"Capture Analysis"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Inspection"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.4"
sideWeight=
"0.5"
order=
"14"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.5155483"
sideWeight=
"0.49546143"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
false"
show_stripe_button=
"true"
weight=
"0.4304419
"
sideWeight=
"0.49016643"
order=
"9"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
true"
show_stripe_button=
"true"
weight=
"0.33224222
"
sideWeight=
"0.49016643"
order=
"9"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Spring"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.3289689"
sideWeight=
"0.5"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.5581015"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"CheckStyle"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"4"
side_tool=
"false"
content_ui=
"tabs"
/>
...
...
@@ -1828,13 +1820,6 @@
<option
name=
"FILTER_TARGETS"
value=
"false"
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/model/Reminder.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"161"
>
<caret
line=
"10"
column=
"7"
lean-forward=
"false"
selection-start-line=
"10"
selection-start-column=
"7"
selection-end-line=
"10"
selection-end-column=
"7"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/model/ReminderLevel.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"92"
>
...
...
@@ -1929,14 +1914,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/pom.xml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"368"
>
<caret
line=
"178"
column=
"31"
lean-forward=
"true"
selection-start-line=
"178"
selection-start-column=
"23"
selection-end-line=
"178"
selection-end-column=
"31"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/exception/TransferCurrentAccountException.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"138"
>
...
...
@@ -2149,20 +2126,6 @@
</state>
</provider>
</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=
"736"
>
<caret
line=
"45"
column=
"44"
lean-forward=
"false"
selection-start-line=
"45"
selection-start-column=
"44"
selection-end-line=
"45"
selection-end-column=
"44"
/>
<folding>
<element
signature=
"imports"
expanded=
"false"
/>
<element
signature=
"e#1721#1722#0"
expanded=
"false"
/>
<element
signature=
"e#1778#1779#0"
expanded=
"false"
/>
<element
signature=
"e#2760#2761#0"
expanded=
"false"
/>
<element
signature=
"e#2817#2818#0"
expanded=
"false"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/service/ContractService.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"207"
>
...
...
@@ -2272,10 +2235,36 @@
</state>
</provider>
</entry>
<entry
file=
"jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.4/commons-io-2.4.jar!/org/apache/commons/io/IOUtils.class"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"194"
>
<caret
line=
"130"
column=
"25"
lean-forward=
"false"
selection-start-line=
"130"
selection-start-column=
"25"
selection-end-line=
"130"
selection-end-column=
"25"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/pom.xml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"218"
>
<caret
line=
"107"
column=
"125"
lean-forward=
"false"
selection-start-line=
"107"
selection-start-column=
"17"
selection-end-line=
"107"
selection-end-column=
"125"
/>
<folding
/>
</state>
</provider>
</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=
"552"
>
<caret
line=
"69"
column=
"9"
lean-forward=
"false"
selection-start-line=
"69"
selection-start-column=
"9"
selection-end-line=
"69"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-5697
"
>
<caret
line=
"1
50"
column=
"53"
lean-forward=
"false"
selection-start-line=
"150"
selection-start-column=
"53"
selection-end-line=
"150"
selection-end-column=
"53
"
/>
<state
relative-caret-position=
"
138
"
>
<caret
line=
"1
73"
column=
"32"
lean-forward=
"false"
selection-start-line=
"173"
selection-start-column=
"8"
selection-end-line=
"173"
selection-end-column=
"32
"
/>
<folding
/>
</state>
</provider>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
e87c86ca
package
common
.
controller
;
import
com.google.common.collect.ImmutableList
;
import
common.model.*
;
import
common.service.ContractService
;
import
common.service.MenuService
;
import
dic.OperateObjectTypeEnum
;
import
exception.TipException
;
import
org.apache.commons.io.IOUtils
;
import
org.joda.time.DateTime
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
security.annotation.CurrentAccount
;
import
util.NewUserLogThread
;
import
util.ResultModel
;
import
util.UserLogThread
;
import
util.ValidateUtil
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -34,6 +51,33 @@ public class ContractController {
return
ResultModel
.
OK
(
service
.
findAll
(
startDate
,
endDate
,
platform
));
}
@RequestMapping
(
value
=
"export"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
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
);
InputStream
in
=
null
;
byte
[]
content
=
new
byte
[
0
];
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"时间,合同编号,客户账号,签约方,销售,开始日期,结束日期,套餐类型,合同金额,折扣,收款金额,合同状态"
);
if
(
ValidateUtil
.
isValid
(
contractList
)){
for
(
Contract
c
:
contractList
){
sb
.
append
(
c
.
getDs
()).
append
(
c
.
getContractCode
()).
append
(
c
.
getEmail
()).
append
(
c
.
getCustomerBody
()).
append
(
c
.
getSaleName
())
.
append
(
c
.
getStartDate
()).
append
(
c
.
getEndDate
()).
append
(
c
.
getPriceLevelName
()).
append
(
c
.
getMoney
()).
append
(
c
.
getPayMoney
())
.
append
(
c
.
getStatus
());
}
}
content
=
sb
.
toString
().
getBytes
();
HttpHeaders
headers
=
new
HttpHeaders
();
response
.
setHeader
(
"filename"
,
"contraact.xls"
);
response
.
setHeader
(
"content-disposition"
,
"attachment; filename=contraact.xls"
);
response
.
setHeader
(
"Content-Type"
,
"application/vnd.ms-excel"
);
//返回文件字符串
return
new
ResponseEntity
<
byte
[]>(
content
,
headers
,
HttpStatus
.
CREATED
);
}
@RequestMapping
(
value
=
"findone"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findOne
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
code
)
{
...
...
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