Commit 4028c3e3 by manxiaoqiang

app排序

parent 4b8bfbac
......@@ -4,6 +4,12 @@
<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/controller/ContractController.java" afterPath="$PROJECT_DIR$/src/main/java/common/controller/ContractController.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/common/controller/UserController.java" afterPath="$PROJECT_DIR$/src/main/java/common/controller/UserController.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/common/model/ContractChange.java" afterPath="$PROJECT_DIR$/src/main/java/common/model/ContractChange.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/common/model/UserLog.java" afterPath="$PROJECT_DIR$/src/main/java/common/model/UserLog.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/tkio/controller/TkioAccountController.java" afterPath="$PROJECT_DIR$/src/main/java/tkio/controller/TkioAccountController.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/track/controller/TrackAccountController.java" afterPath="$PROJECT_DIR$/src/main/java/track/controller/TrackAccountController.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/util/UserLogThread.java" afterPath="$PROJECT_DIR$/src/main/java/util/UserLogThread.java" />
</list>
<ignored path="$PROJECT_DIR$/target/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
......@@ -27,8 +33,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="414">
<caret line="63" column="47" lean-forward="true" selection-start-line="63" selection-start-column="47" selection-end-line="63" selection-end-column="47" />
<state relative-caret-position="145">
<caret line="111" column="84" lean-forward="false" selection-start-line="111" selection-start-column="84" selection-end-line="111" selection-end-column="84" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......@@ -36,11 +42,35 @@
</provider>
</entry>
</file>
<file leaf-file-name="ContractMoney.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="276">
<caret line="15" column="27" lean-forward="false" selection-start-line="15" selection-start-column="20" selection-end-line="15" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="UserLog.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/UserLog.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="574">
<caret line="139" column="36" lean-forward="true" selection-start-line="139" selection-start-column="36" selection-end-line="139" selection-end-column="36" />
<folding>
<element signature="e#2494#2495#0" expanded="true" />
<element signature="e#2521#2522#0" expanded="true" />
<element signature="e#2591#2592#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ContractServiceImpl.java" pinned="false" current-in-tab="false">
<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="1012">
<caret line="178" column="9" lean-forward="true" selection-start-line="178" selection-start-column="9" selection-end-line="178" selection-end-column="9" />
<state relative-caret-position="183">
<caret line="125" column="15" lean-forward="false" selection-start-line="125" selection-start-column="15" selection-end-line="125" selection-end-column="15" />
<folding />
</state>
</provider>
......@@ -49,8 +79,8 @@
<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="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" />
<state relative-caret-position="724">
<caret line="99" column="8" lean-forward="false" selection-start-line="99" selection-start-column="8" selection-end-line="99" selection-end-column="8" />
<folding />
</state>
</provider>
......@@ -89,6 +119,7 @@
<find>sortString</find>
<find>isASC</find>
<find>rootParent</find>
<find>, request</find>
</findStrings>
<replaceStrings>
<replace />
......@@ -110,7 +141,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/java/common/model/ContractBody.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/ContractBodyRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/Account4WebRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/PriceLevelMoney.java" />
......@@ -118,14 +148,12 @@
<option value="$PROJECT_DIR$/src/main/java/common/model/Contract.java" />
<option value="$PROJECT_DIR$/src/main/java/tkio/service/impl/AccountFlowRestrictServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/User.java" />
<option value="$PROJECT_DIR$/src/main/java/common/controller/UserController.java" />
<option value="$PROJECT_DIR$/src/main/java/common/service/UserService.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/UserRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/AuthRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/service/impl/UserServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/ContractChangeRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/Account4Web.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/ContractChange.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/TrackAccount4Web.java" />
<option value="$PROJECT_DIR$/src/main/java/track/service/TrackAccountService.java" />
......@@ -136,7 +164,6 @@
<option value="$PROJECT_DIR$/src/main/java/util/DateUtil.java" />
<option value="$PROJECT_DIR$/src/main/java/tkio/service/AccountService.java" />
<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/model/Reminder.java" />
<option value="$PROJECT_DIR$/src/main/java/tkio/service/TkioAccountService.java" />
......@@ -157,9 +184,13 @@
<option value="$PROJECT_DIR$/src/main/java/tkio/service/impl/TkioAccountServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/util/ResultStatus.java" />
<option value="$PROJECT_DIR$/src/main/java/track/service/impl/TrackAccountServiceImpl.java" />
<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/model/ContractChange.java" />
<option value="$PROJECT_DIR$/src/main/java/util/UserLogThread.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/UserLog.java" />
<option value="$PROJECT_DIR$/src/main/java/track/controller/TrackAccountController.java" />
<option value="$PROJECT_DIR$/src/main/java/common/controller/UserController.java" />
<option value="$PROJECT_DIR$/src/main/java/tkio/controller/TkioAccountController.java" />
<option value="$PROJECT_DIR$/src/main/java/common/controller/ContractController.java" />
</list>
</option>
......@@ -1309,14 +1340,7 @@
<workItem from="1516932422302" duration="5866000" />
<workItem from="1517189406074" duration="8333000" />
<workItem from="1517275427548" duration="11524000" />
<workItem from="1517361892578" duration="11038000" />
</task>
<task id="LOCAL-00022" summary="pom">
<created>1515048013108</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1515048013108</updated>
<workItem from="1517361892578" duration="19172000" />
</task>
<task id="LOCAL-00023" summary="pom">
<created>1515052644376</created>
......@@ -1654,11 +1678,18 @@
<option name="project" value="LOCAL" />
<updated>1517388583155</updated>
</task>
<option name="localTasksCounter" value="71" />
<task id="LOCAL-00071" summary="app排序">
<created>1517390626972</created>
<option name="number" value="00071" />
<option name="presentableId" value="LOCAL-00071" />
<option name="project" value="LOCAL" />
<updated>1517390626972</updated>
</task>
<option name="localTasksCounter" value="72" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="308848000" />
<option name="totallyTimeSpent" value="316982000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
......@@ -1682,7 +1713,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="false" 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="true" show_stripe_button="true" weight="0.42553192" 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" />
......@@ -1736,7 +1767,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="true" 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="false" show_stripe_button="true" weight="0.42553192" 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" />
......@@ -1820,51 +1851,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<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">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/ContractRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="299">
<caret line="20" column="80" lean-forward="false" selection-start-line="20" selection-start-column="80" selection-end-line="20" selection-end-column="80" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/TrackAccount4Web.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="184">
<caret line="12" column="4" lean-forward="false" selection-start-line="12" selection-start-column="4" selection-end-line="12" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/logback/product/logback.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="138">
<caret line="6" column="24" lean-forward="false" selection-start-line="6" selection-start-column="20" selection-end-line="6" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/security/annotation/CurrentAccount.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="230">
<caret line="13" column="23" lean-forward="false" selection-start-line="13" selection-start-column="23" selection-end-line="13" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/security/annotation/Authorization.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="138">
<caret line="9" column="18" lean-forward="false" selection-start-line="9" selection-start-column="18" selection-end-line="9" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/exception/TipException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="138">
......@@ -2211,58 +2197,110 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/tkio/controller/TkioAccountController.java">
<entry file="file://$PROJECT_DIR$/src/main/java/util/ResultStatus.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" />
<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>
<entry file="file://$PROJECT_DIR$/src/main/java/track/controller/TrackAccountController.java">
<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="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" />
<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$/src/main/java/util/ResultStatus.java">
<entry file="file://$PROJECT_DIR$/pom.xml">
<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" />
<state relative-caret-position="724">
<caret line="99" column="8" lean-forward="false" selection-start-line="99" selection-start-column="8" selection-end-line="99" selection-end-column="8" />
<folding />
</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">
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/ContractChange.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="46">
<caret line="33" column="34" lean-forward="false" selection-start-line="33" selection-start-column="34" selection-end-line="33" selection-end-column="34" />
<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="183">
<caret line="125" column="15" lean-forward="false" selection-start-line="125" selection-start-column="15" selection-end-line="125" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://$MAVEN_REPOSITORY$/org/springframework/spring-web/4.3.4.RELEASE/spring-web-4.3.4.RELEASE.jar!/org/springframework/http/ResponseEntity.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" />
<caret line="35" column="32" lean-forward="false" selection-start-line="35" selection-start-column="28" selection-end-line="35" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<entry file="file://$PROJECT_DIR$/src/main/java/track/controller/TrackAccountController.java">
<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" />
<state relative-caret-position="1403">
<caret line="73" column="197" lean-forward="false" selection-start-line="73" selection-start-column="197" selection-end-line="73" selection-end-column="197" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java">
<entry file="file://$PROJECT_DIR$/src/main/java/util/UserLogThread.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="214">
<caret line="41" column="20" lean-forward="false" selection-start-line="41" selection-start-column="20" selection-end-line="41" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/UserController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="122">
<caret line="140" column="47" lean-forward="true" selection-start-line="140" selection-start-column="47" selection-end-line="140" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/tkio/controller/TkioAccountController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="112">
<caret line="79" column="161" lean-forward="false" selection-start-line="79" selection-start-column="161" selection-end-line="79" selection-end-column="161" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/UserLog.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="574">
<caret line="139" column="36" lean-forward="true" selection-start-line="139" selection-start-column="36" selection-end-line="139" selection-end-column="36" />
<folding>
<element signature="e#2494#2495#0" expanded="true" />
<element signature="e#2521#2522#0" expanded="true" />
<element signature="e#2591#2592#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1012">
<caret line="178" column="9" lean-forward="true" selection-start-line="178" selection-start-column="9" selection-end-line="178" selection-end-column="9" />
<state relative-caret-position="276">
<caret line="15" column="27" lean-forward="false" selection-start-line="15" selection-start-column="20" selection-end-line="15" selection-end-column="27" />
<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="414">
<caret line="63" column="47" lean-forward="true" selection-start-line="63" selection-start-column="47" selection-end-line="63" selection-end-column="47" />
<state relative-caret-position="145">
<caret line="111" column="84" lean-forward="false" selection-start-line="111" selection-start-column="84" selection-end-line="111" selection-end-column="84" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......
......@@ -11,6 +11,7 @@ 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.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
......@@ -27,6 +28,7 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Date;
......@@ -51,28 +53,64 @@ public class ContractController {
return ResultModel.OK(service.findAll(startDate, endDate, platform));
}
@RequestMapping(value = "export", method = RequestMethod.GET)
@RequestMapping(value = "export", method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@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("时间,合同编号,客户账号,签约方,销售,开始日期,结束日期,套餐类型,合同金额,折扣,收款金额,合同状态\r\n");
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()).append("\r\n");
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");
}
}
InputStream in = new ByteArrayInputStream(sb.toString().getBytes());
try {
content = IOUtils.toByteArray(in);
} catch (IOException e) {
e.printStackTrace();
}
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");
//返回文件字符串
return new ResponseEntity<byte[]>(content, headers, HttpStatus.CREATED);
}
@RequestMapping(value = "pay/export", method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ResponseBody
public ResponseEntity<byte[]> exportPay( @RequestParam String startDate, @RequestParam String endDate,
HttpServletRequest request, HttpServletResponse response) {
List<ContractMoney> moneyList = service.findPay(startDate, endDate);
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(",")
.append(c.getMoney()).append(",").append(c.getDs()).append(",").append(c.getCreateName()).append("\r\n");
}
}
InputStream in = new ByteArrayInputStream(sb.toString().getBytes());
try {
content = IOUtils.toByteArray(in);
} catch (IOException e) {
e.printStackTrace();
}
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");
response.setHeader("filename", "contract_pay.txt");
response.setHeader("content-disposition", "attachment; filename=contract_pay.txt");
response.setHeader("Content-Type", "application/octet-stream;charset=UTF-8");
//返回文件字符串
return new ResponseEntity<byte[]>(content, headers, HttpStatus.CREATED);
......
......@@ -53,7 +53,7 @@ public class UserController {
public ResultModel create(@CurrentAccount User loginAccount, @RequestBody User resource, HttpServletRequest request) {
if(userService.validEmail(resource.getEmail())){
userService.create(loginAccount, resource);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), resource.getEmail(), "创建系统账号", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), resource.getEmail(), "创建系统账号", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(true);
}else{
......@@ -64,7 +64,7 @@ public class UserController {
@RequestMapping(value = "/update", method = RequestMethod.PUT)
@ResponseBody
public ResultModel update(@CurrentAccount User loginAccount, @RequestBody User resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), resource.getEmail(), "修改系统账号", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), resource.getEmail(), "修改系统账号", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(userService.update(loginAccount, resource));
}
......@@ -97,7 +97,7 @@ public class UserController {
@ResponseBody
public ResultModel delete(@CurrentAccount User loginAccount, @PathVariable Long id, HttpServletRequest request) {
User user = userService.delete(loginAccount, id);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "删除系统账号", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "删除系统账号", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(user);
}
......@@ -106,7 +106,7 @@ public class UserController {
@ResponseBody
public ResultModel enable(@CurrentAccount User loginAccount, @PathVariable Long id, HttpServletRequest request) {
User user = userService.enable(loginAccount, id);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "启用系统账号", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "启用系统账号", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(user);
}
......@@ -115,7 +115,7 @@ public class UserController {
@ResponseBody
public ResultModel forbiden(@CurrentAccount User loginAccount, @PathVariable Long id, HttpServletRequest request) {
User user = userService.forbiden(loginAccount, id);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "停用系统账号", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "停用系统账号", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(user);
}
......@@ -126,7 +126,7 @@ public class UserController {
User login = userRepository.login(name);
if(null == login){
User user = userService.updateName(loginAccount, name);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "修改系统账号名字", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "修改系统账号名字", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(true);
}else{
......@@ -141,7 +141,7 @@ public class UserController {
User login = userRepository.login(loginAccount.getEmail(), CipherUtil.generatePassword(oldpwd));
if(null != login){
User user = userService.updatePwd(loginAccount, pwd);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "修改系统账号密码", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.INNERUSER.getKey(), user.getEmail(), "修改系统账号密码", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(true);
}else{
......@@ -153,7 +153,7 @@ public class UserController {
@RequestMapping(value = "/update/pwd", method = RequestMethod.PUT)
@ResponseBody
public ResultModel updatePwd(@RequestParam String email, @RequestParam String pwd, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(email, email, OperateObjectTypeEnum.INNERUSER.getKey(), email, "修改系统账号密码", request);
UserLogThread userlog = new UserLogThread(email, email, OperateObjectTypeEnum.INNERUSER.getKey(), email, "修改系统账号密码", request,null);
userlog.start();
return ResultModel.OK(userService.updatePwd(email, pwd));
}
......
......@@ -2,6 +2,7 @@ package common.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
......@@ -30,7 +31,7 @@ public class ContractChange {
private Date createTime;
@Id
@GeneratedValue
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() {
return id;
}
......
......@@ -23,6 +23,7 @@ public class UserLog
private String location;
private String OldObject;
private String newObject;
private Long role;
@Id
@GeneratedValue
......@@ -132,6 +133,14 @@ public class UserLog
this.newObject = newObject;
}
public Long getRole() {
return role;
}
public void setRole(Long role) {
this.role = role;
}
@Override
public String toString() {
return "UserLog{" +
......
......@@ -50,7 +50,7 @@ public class TkioAccountController {
@RequestMapping(value = "/forbiden", method = RequestMethod.PUT)
@ResponseBody
public ResultModel forbiden(@CurrentAccount User loginAccount, @RequestBody Reminder resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "关闭异常状态跟进", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "关闭异常状态跟进", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(tkioAccountService.forbiden(loginAccount, resource));
}
......@@ -59,7 +59,7 @@ public class TkioAccountController {
@RequestMapping(value = "/enable", method = RequestMethod.PUT)
@ResponseBody
public ResultModel enable(@CurrentAccount User loginAccount, @RequestBody Reminder resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "开启异常状态跟进", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "开启异常状态跟进", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(tkioAccountService.enable(loginAccount, resource));
}
......@@ -68,7 +68,7 @@ public class TkioAccountController {
@RequestMapping(value = "/pay", method = RequestMethod.PUT)
@ResponseBody
public ResultModel pay(@CurrentAccount User loginAccount, @RequestBody Payment resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "缴费", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "缴费", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(tkioAccountService.pay(loginAccount, resource));
}
......@@ -77,7 +77,7 @@ public class TkioAccountController {
@RequestMapping(value = "/visit", method = RequestMethod.PUT)
@ResponseBody
public ResultModel visit(@CurrentAccount User loginAccount, @RequestBody BackVisit resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "回访", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "回访", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK( tkioAccountService.visit(loginAccount, resource));
}
......
......@@ -44,7 +44,7 @@ public class TrackAccountController {
@RequestMapping(value = "/forbiden", method = RequestMethod.PUT)
@ResponseBody
public ResultModel forbiden(@CurrentAccount User loginAccount, @RequestBody Reminder resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "关闭到期提醒", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "关闭到期提醒", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(tkioAccountService.forbiden(loginAccount, resource));
}
......@@ -53,7 +53,7 @@ public class TrackAccountController {
@RequestMapping(value = "/enable", method = RequestMethod.PUT)
@ResponseBody
public ResultModel enable(@CurrentAccount User loginAccount, @RequestBody Reminder resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "开启到期提醒", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "开启到期提醒", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(tkioAccountService.enable(loginAccount, resource));
}
......@@ -62,7 +62,7 @@ public class TrackAccountController {
@RequestMapping(value = "/pay", method = RequestMethod.PUT)
@ResponseBody
public ResultModel pay(@CurrentAccount User loginAccount, @RequestBody Payment resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "缴费", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "缴费", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK(tkioAccountService.pay(loginAccount, resource));
}
......@@ -71,7 +71,7 @@ public class TrackAccountController {
@RequestMapping(value = "/visit", method = RequestMethod.PUT)
@ResponseBody
public ResultModel visit(@CurrentAccount User loginAccount, @RequestBody BackVisit resource, HttpServletRequest request) {
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "回访", request);
UserLogThread userlog = new UserLogThread(loginAccount.getEmail(), loginAccount.getName(), OperateObjectTypeEnum.CUSTOMER.getKey(), resource.getEmail(), "回访", request,loginAccount.getRole());
userlog.start();
return ResultModel.OK( tkioAccountService.visit(loginAccount, resource));
}
......
......@@ -32,12 +32,14 @@ public class UserLogThread
//为了获取ip及解析地点
private HttpServletRequest request;
private Long role;
/**
* 传入内容为对象
* UserLogThread userlog = new UserLogThread("zxy@reyun.com", "zxy", OperateObjectTypeEnum.CUSTOMER.getKey(), "app", "查看app", request);
* userlog.start();
*/
public UserLogThread(String operaAccount, String accountName, String operateObjectType, String operateObject, String operateType, HttpServletRequest request)
public UserLogThread(String operaAccount, String accountName, String operateObjectType, String operateObject, String operateType, HttpServletRequest request, Long role)
{
this.operaAccount = operaAccount;
this.accountName = accountName;
......@@ -45,6 +47,7 @@ public class UserLogThread
this.operateObject = operateObject;
this.operateType = operateType;
this.request = request;
this.role = role;
}
......@@ -60,6 +63,7 @@ public class UserLogThread
audit.setOperateObject(this.operateObject);
audit.setOperateTime(DateUtil.format(new Date(), DateUtil.C_TIME_PATTON_DEFAULT));
audit.setOperateType(this.operateType);
audit.setRole(this.role);
if (this.request != null) {
String ipAddr = IPAddrUtil.getIpAddrNew(request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment