Commit 97caee98 by manxiaoqiang

合同

parent 70849a07
......@@ -2,6 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="e2e217e2-2dd6-4c6f-ad19-b1cba46bc7ad" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/common/model/ContractChange.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/common/repository/ContractChangeRepository.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/common/repository/ContractMoneyRepository.java" />
<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/model/Contract.java" afterPath="$PROJECT_DIR$/src/main/java/common/model/Contract.java" />
......@@ -31,32 +35,41 @@
<file leaf-file-name="Contract.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/Contract.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1472">
<caret line="121" column="16" lean-forward="false" selection-start-line="121" selection-start-column="16" selection-end-line="121" selection-end-column="16" />
<state relative-caret-position="459">
<caret line="244" column="35" lean-forward="false" selection-start-line="244" selection-start-column="35" selection-end-line="244" selection-end-column="35" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1439#1440#0" expanded="true" />
<element signature="e#1472#1473#0" expanded="true" />
<element signature="e#1524#1525#0" expanded="true" />
<element signature="e#1568#1569#0" expanded="true" />
<element signature="e#2581#2582#0" expanded="true" />
<element signature="e#2614#2615#0" expanded="true" />
<element signature="e#4097#4098#0" expanded="true" />
<element signature="e#4126#4127#0" expanded="true" />
<element signature="e#4170#4171#0" expanded="true" />
<element signature="e#4206#4207#0" expanded="true" />
<element signature="e#4239#4240#0" expanded="true" />
<element signature="e#4270#4271#0" expanded="true" />
<element signature="e#4316#4317#0" expanded="true" />
<element signature="e#4356#4357#0" expanded="true" />
<element signature="e#4406#4407#0" expanded="true" />
<element signature="e#4437#4438#0" expanded="true" />
<element signature="e#4485#4486#0" expanded="true" />
<element signature="e#4525#4526#0" expanded="true" />
<element signature="e#4580#4581#0" expanded="true" />
<element signature="e#4617#4618#0" expanded="true" />
<element signature="e#4677#4678#0" expanded="true" />
<element signature="e#4729#4730#0" expanded="true" />
<element signature="e#1496#1497#0" expanded="true" />
<element signature="e#1529#1530#0" expanded="true" />
<element signature="e#1581#1582#0" expanded="true" />
<element signature="e#1625#1626#0" expanded="true" />
<element signature="e#2489#2490#0" expanded="true" />
<element signature="e#2519#2520#0" expanded="true" />
<element signature="e#2638#2639#0" expanded="true" />
<element signature="e#2671#2672#0" expanded="true" />
<element signature="e#4154#4155#0" expanded="true" />
<element signature="e#4183#4184#0" expanded="true" />
<element signature="e#4227#4228#0" expanded="true" />
<element signature="e#4263#4264#0" expanded="true" />
<element signature="e#4296#4297#0" expanded="true" />
<element signature="e#4327#4328#0" expanded="true" />
<element signature="e#4373#4374#0" expanded="true" />
<element signature="e#4413#4414#0" expanded="true" />
<element signature="e#4445#4446#0" expanded="true" />
<element signature="e#4475#4476#0" expanded="true" />
<element signature="e#4519#4520#0" expanded="true" />
<element signature="e#4557#4558#0" expanded="true" />
<element signature="e#4607#4608#0" expanded="true" />
<element signature="e#4638#4639#0" expanded="true" />
<element signature="e#4686#4687#0" expanded="true" />
<element signature="e#4726#4727#0" expanded="true" />
<element signature="e#4781#4782#0" expanded="true" />
<element signature="e#4818#4819#0" expanded="true" />
<element signature="e#4878#4879#0" expanded="true" />
<element signature="e#4930#4931#0" expanded="true" />
<element signature="e#5000#5001#0" expanded="true" />
<element signature="e#5052#5053#0" expanded="true" />
<element signature="e#5096#5097#0" expanded="true" />
</folding>
</state>
</provider>
......@@ -66,7 +79,7 @@
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/ContractRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366">
<caret line="21" column="23" lean-forward="false" selection-start-line="21" selection-start-column="23" selection-end-line="21" selection-end-column="23" />
<caret line="24" column="23" lean-forward="false" selection-start-line="24" selection-start-column="13" selection-end-line="24" selection-end-column="23" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......@@ -77,8 +90,8 @@
<file leaf-file-name="ContractService.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/common/service/ContractService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="343">
<caret line="31" column="59" lean-forward="true" selection-start-line="31" selection-start-column="27" selection-end-line="31" selection-end-column="59" />
<state relative-caret-position="366">
<caret line="39" column="13" lean-forward="false" selection-start-line="39" selection-start-column="13" selection-end-line="39" selection-end-column="13" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......@@ -86,46 +99,46 @@
</provider>
</entry>
</file>
<file leaf-file-name="ContractServiceImpl.java" pinned="false" current-in-tab="true">
<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="367">
<caret line="97" column="32" lean-forward="false" selection-start-line="97" selection-start-column="32" selection-end-line="97" selection-end-column="32" />
<state relative-caret-position="153">
<caret line="285" column="106" lean-forward="true" selection-start-line="285" selection-start-column="106" selection-end-line="285" selection-end-column="106" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1648#1649#0" expanded="true" />
<element signature="e#1703#1704#0" expanded="true" />
<element signature="e#2207#2208#0" expanded="true" />
<element signature="e#2261#2262#0" expanded="true" />
<element signature="e#2544#2545#0" expanded="true" />
<element signature="e#2593#2594#0" expanded="true" />
<element signature="e#3254#3255#0" expanded="true" />
<element signature="e#3281#3282#0" expanded="true" />
<element signature="e#1736#1737#0" expanded="true" />
<element signature="e#1791#1792#0" expanded="true" />
<element signature="e#2295#2296#0" expanded="true" />
<element signature="e#2349#2350#0" expanded="true" />
<element signature="e#2632#2633#0" expanded="true" />
<element signature="e#2681#2682#0" expanded="true" />
</folding>
</state>
</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">
<file leaf-file-name="ContractController.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/ContractController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="253">
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
<state relative-caret-position="320">
<caret line="109" column="89" lean-forward="true" selection-start-line="109" selection-start-column="89" selection-end-line="109" selection-end-column="89" />
<folding>
<element signature="e#1271#1272#0" expanded="true" />
<element signature="e#1328#1329#0" expanded="true" />
<element signature="e#2310#2311#0" expanded="true" />
<element signature="e#2367#2368#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ContractController.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/ContractController.java">
<file leaf-file-name="ContractMoney.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="183">
<caret line="30" column="41" lean-forward="false" selection-start-line="30" selection-start-column="41" selection-end-line="30" selection-end-column="41" />
<state relative-caret-position="240">
<caret line="13" column="31" lean-forward="false" selection-start-line="13" selection-start-column="19" selection-end-line="13" selection-end-column="31" />
<folding>
<element signature="e#1330#1331#0" expanded="true" />
<element signature="e#1387#1388#0" expanded="true" />
<element signature="e#2369#2370#0" expanded="true" />
<element signature="e#2426#2427#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
......@@ -157,6 +170,7 @@
<find>http://internal-report-api-976419027.cn-north-1.elb.amazonaws.com.cn</find>
<find>reyun</find>
<find>\t</find>
<find>rebat</find>
</findStrings>
<replaceStrings>
<replace />
......@@ -178,9 +192,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/java/office/service/AccountFlowRestrictService.java" />
<option value="$PROJECT_DIR$/src/main/java/office/service/impl/OffAccountFlowRestrictServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/office/service/impl/BussinussManServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/office/repository/BussinessManRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/dic/RoleEnum.java" />
<option value="$PROJECT_DIR$/src/main/resources/applicationContext-schedule.xml" />
......@@ -221,13 +232,16 @@
<option value="$PROJECT_DIR$/src/main/java/common/repository/Account4WebRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/util/DateUtil.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/PriceLevelMoney.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/UserRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/PriceLevelMoneyRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/ContractRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/controller/ContractController.java" />
<option value="$PROJECT_DIR$/src/main/java/common/service/ContractService.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/UserRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/Contract.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/ContractRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java" />
<option value="$PROJECT_DIR$/src/main/java/common/model/ContractChange.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/ContractChangeRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/repository/ContractMoneyRepository.java" />
<option value="$PROJECT_DIR$/src/main/java/common/service/ContractService.java" />
<option value="$PROJECT_DIR$/src/main/java/common/controller/ContractController.java" />
<option value="$PROJECT_DIR$/src/main/java/common/service/impl/ContractServiceImpl.java" />
</list>
</option>
......@@ -733,8 +747,8 @@
<recent name="E:\newgit\manager\src\main\resources" />
</key>
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="common.controller" />
<recent name="common.repository" />
<recent name="common.controller" />
<recent name="common.service" />
<recent name="tkio.service.impl" />
<recent name="office.service.impl" />
......@@ -1196,7 +1210,7 @@
<workItem from="1515728204617" duration="796000" />
<workItem from="1515983952975" duration="10545000" />
<workItem from="1516096949113" duration="5148000" />
<workItem from="1516155511499" duration="24451000" />
<workItem from="1516155511499" duration="42877000" />
</task>
<task id="LOCAL-00003" summary="Merge branch 'master' of git.minrow.com:reyun/manager&#10;&#10;# Conflicts:&#10;#&#9;pom.xml&#10;#&#9;target/classes/common.properties&#10;#&#9;target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst&#10;">
<created>1514871143365</created>
......@@ -1513,15 +1527,22 @@
<option name="project" value="LOCAL" />
<updated>1516187770796</updated>
</task>
<option name="localTasksCounter" value="48" />
<task id="LOCAL-00048" summary="合同">
<created>1516244162355</created>
<option name="number" value="00048" />
<option name="presentableId" value="LOCAL-00048" />
<option name="project" value="LOCAL" />
<updated>1516244162355</updated>
</task>
<option name="localTasksCounter" value="49" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="195229000" />
<option name="totallyTimeSpent" value="213655000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
<editor active="true" />
<editor active="false" />
<layout>
<window_info id="Palette" 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="8" side_tool="false" content_ui="tabs" />
<window_info id="Nl-Palette" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
......@@ -1540,11 +1561,11 @@
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<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.41734862" sideWeight="0.49319214" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" 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.48608837" sideWeight="0.49319214" 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.28441754" sideWeight="0.5" order="8" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28441754" sideWeight="0.5" order="8" side_tool="false" content_ui="combo" />
<window_info id="Bean Validation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
<window_info id="Theme Preview" 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="7" side_tool="false" content_ui="tabs" />
......@@ -1565,49 +1586,6 @@
<window_info id="JRebel" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
<window_info id="Find" 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="8" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="Palette" 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="8" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
<window_info id="Nl-Palette" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" 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="7" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.42389524" sideWeight="0.50680786" order="6" side_tool="true" content_ui="tabs" />
<window_info id="Application Servers" 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="12" side_tool="false" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.46747354" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="JRebel Executor" 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="13" side_tool="false" content_ui="tabs" />
<window_info id="Properties" 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="1" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" 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="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="11" side_tool="false" content_ui="combo" />
<window_info id="Memory View" 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="4" side_tool="false" content_ui="tabs" />
<window_info id="Get Gist" 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="15" side_tool="false" content_ui="tabs" />
<window_info id="Database" 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="2" side_tool="false" content_ui="tabs" />
<window_info id="SonarQube" 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="16" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24962178" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24962178" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.45499182" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="TODO" 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="18" side_tool="false" content_ui="tabs" />
<window_info id="Messages" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" 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="3" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<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="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.41734862" sideWeight="0.49319214" 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" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28441754" sideWeight="0.5" order="8" side_tool="false" content_ui="combo" />
<window_info id="Bean Validation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
<window_info id="Gradle View" 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="17" side_tool="false" content_ui="tabs" />
<window_info id="JRebel" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
<window_info id="Find" 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="8" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" 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="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="true" content_ui="tabs" />
</layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
......@@ -1684,29 +1662,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="504">
<caret line="35" column="27" lean-forward="true" selection-start-line="35" selection-start-column="27" selection-end-line="35" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/redis.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="184">
<caret line="8" column="23" lean-forward="false" selection-start-line="8" selection-start-column="23" selection-end-line="8" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/logback.xml" />
<entry file="file://$PROJECT_DIR$/src/main/java/util/AwsS3Util.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="182">
<caret line="121" column="5" lean-forward="false" selection-start-line="121" selection-start-column="5" selection-end-line="121" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/applicationContext-schedule.xml" />
<entry file="file://$PROJECT_DIR$/src/main/resources/spring/applicationContext.xml">
<provider selected="true" editor-type-id="text-editor">
......@@ -2010,14 +1965,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/UserRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="430">
<caret line="29" column="27" lean-forward="false" selection-start-line="29" selection-start-column="15" selection-end-line="29" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/PriceLevelMoney.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="205">
......@@ -2036,101 +1983,157 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/ContractController.java">
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/LoginController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="339">
<caret line="69" column="36" lean-forward="true" selection-start-line="69" selection-start-column="36" selection-end-line="69" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://E:/Java/jdk1.8.0_65/src.zip!/java/math/BigDecimal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="183">
<caret line="30" column="41" lean-forward="false" selection-start-line="30" selection-start-column="41" selection-end-line="30" selection-end-column="41" />
<caret line="2300" column="28" lean-forward="false" selection-start-line="2300" selection-start-column="28" selection-end-line="2300" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/UserRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="320">
<caret line="28" column="63" lean-forward="false" selection-start-line="28" selection-start-column="63" selection-end-line="28" selection-end-column="63" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/Contract.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
<caret line="244" column="35" lean-forward="false" selection-start-line="244" selection-start-column="35" selection-end-line="244" selection-end-column="35" />
<folding>
<element signature="e#1330#1331#0" expanded="true" />
<element signature="e#1387#1388#0" expanded="true" />
<element signature="e#2369#2370#0" expanded="true" />
<element signature="e#2426#2427#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#1496#1497#0" expanded="true" />
<element signature="e#1529#1530#0" expanded="true" />
<element signature="e#1581#1582#0" expanded="true" />
<element signature="e#1625#1626#0" expanded="true" />
<element signature="e#2489#2490#0" expanded="true" />
<element signature="e#2519#2520#0" expanded="true" />
<element signature="e#2638#2639#0" expanded="true" />
<element signature="e#2671#2672#0" expanded="true" />
<element signature="e#4154#4155#0" expanded="true" />
<element signature="e#4183#4184#0" expanded="true" />
<element signature="e#4227#4228#0" expanded="true" />
<element signature="e#4263#4264#0" expanded="true" />
<element signature="e#4296#4297#0" expanded="true" />
<element signature="e#4327#4328#0" expanded="true" />
<element signature="e#4373#4374#0" expanded="true" />
<element signature="e#4413#4414#0" expanded="true" />
<element signature="e#4445#4446#0" expanded="true" />
<element signature="e#4475#4476#0" expanded="true" />
<element signature="e#4519#4520#0" expanded="true" />
<element signature="e#4557#4558#0" expanded="true" />
<element signature="e#4607#4608#0" expanded="true" />
<element signature="e#4638#4639#0" expanded="true" />
<element signature="e#4686#4687#0" expanded="true" />
<element signature="e#4726#4727#0" expanded="true" />
<element signature="e#4781#4782#0" expanded="true" />
<element signature="e#4818#4819#0" expanded="true" />
<element signature="e#4878#4879#0" expanded="true" />
<element signature="e#4930#4931#0" expanded="true" />
<element signature="e#5000#5001#0" expanded="true" />
<element signature="e#5052#5053#0" expanded="true" />
<element signature="e#5096#5097#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/service/ContractService.java">
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/ContractRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="343">
<caret line="31" column="59" lean-forward="true" selection-start-line="31" selection-start-column="27" selection-end-line="31" selection-end-column="59" />
<state relative-caret-position="366">
<caret line="24" column="23" lean-forward="false" selection-start-line="24" selection-start-column="13" selection-end-line="24" selection-end-column="23" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/LoginController.java">
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/ContractChange.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="339">
<caret line="69" column="36" lean-forward="true" selection-start-line="69" selection-start-column="36" selection-end-line="69" selection-end-column="36" />
<folding />
<state relative-caret-position="412">
<caret line="143" column="35" lean-forward="false" selection-start-line="143" selection-start-column="35" selection-end-line="143" selection-end-column="35" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2780#2781#0" expanded="true" />
<element signature="e#2832#2833#0" expanded="true" />
<element signature="e#2876#2877#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/ContractMoney.java">
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/ContractMoneyRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="253">
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<state relative-caret-position="345">
<caret line="15" column="80" lean-forward="true" selection-start-line="15" selection-start-column="80" selection-end-line="15" selection-end-column="80" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/ContractChangeRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="184">
<caret line="16" column="79" lean-forward="false" selection-start-line="16" selection-start-column="79" selection-end-line="16" selection-end-column="79" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/repository/ContractRepository.java">
<entry file="file://$PROJECT_DIR$/src/main/java/common/service/ContractService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366">
<caret line="21" column="23" lean-forward="false" selection-start-line="21" selection-start-column="23" selection-end-line="21" selection-end-column="23" />
<caret line="39" column="13" lean-forward="false" selection-start-line="39" selection-start-column="13" selection-end-line="39" selection-end-column="13" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/common/model/Contract.java">
<entry file="file://$PROJECT_DIR$/src/main/java/common/controller/ContractController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1472">
<caret line="121" column="16" lean-forward="false" selection-start-line="121" selection-start-column="16" selection-end-line="121" selection-end-column="16" />
<state relative-caret-position="320">
<caret line="109" column="89" lean-forward="true" selection-start-line="109" selection-start-column="89" selection-end-line="109" selection-end-column="89" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1439#1440#0" expanded="true" />
<element signature="e#1472#1473#0" expanded="true" />
<element signature="e#1524#1525#0" expanded="true" />
<element signature="e#1568#1569#0" expanded="true" />
<element signature="e#2581#2582#0" expanded="true" />
<element signature="e#2614#2615#0" expanded="true" />
<element signature="e#4097#4098#0" expanded="true" />
<element signature="e#4126#4127#0" expanded="true" />
<element signature="e#4170#4171#0" expanded="true" />
<element signature="e#4206#4207#0" expanded="true" />
<element signature="e#4239#4240#0" expanded="true" />
<element signature="e#4270#4271#0" expanded="true" />
<element signature="e#4316#4317#0" expanded="true" />
<element signature="e#4356#4357#0" expanded="true" />
<element signature="e#4406#4407#0" expanded="true" />
<element signature="e#4437#4438#0" expanded="true" />
<element signature="e#4485#4486#0" expanded="true" />
<element signature="e#4525#4526#0" expanded="true" />
<element signature="e#4580#4581#0" expanded="true" />
<element signature="e#4617#4618#0" expanded="true" />
<element signature="e#4677#4678#0" expanded="true" />
<element signature="e#4729#4730#0" expanded="true" />
<element signature="e#1271#1272#0" expanded="true" />
<element signature="e#1328#1329#0" expanded="true" />
<element signature="e#2310#2311#0" expanded="true" />
<element signature="e#2367#2368#0" 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="367">
<caret line="97" column="32" lean-forward="false" selection-start-line="97" selection-start-column="32" selection-end-line="97" selection-end-column="32" />
<state relative-caret-position="153">
<caret line="285" column="106" lean-forward="true" selection-start-line="285" selection-start-column="106" selection-end-line="285" selection-end-column="106" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1736#1737#0" expanded="true" />
<element signature="e#1791#1792#0" expanded="true" />
<element signature="e#2295#2296#0" expanded="true" />
<element signature="e#2349#2350#0" expanded="true" />
<element signature="e#2632#2633#0" expanded="true" />
<element signature="e#2681#2682#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="240">
<caret line="13" column="31" lean-forward="false" selection-start-line="13" selection-start-column="19" selection-end-line="13" selection-end-column="31" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1648#1649#0" expanded="true" />
<element signature="e#1703#1704#0" expanded="true" />
<element signature="e#2207#2208#0" expanded="true" />
<element signature="e#2261#2262#0" expanded="true" />
<element signature="e#2544#2545#0" expanded="true" />
<element signature="e#2593#2594#0" expanded="true" />
<element signature="e#3254#3255#0" expanded="true" />
<element signature="e#3281#3282#0" expanded="true" />
</folding>
</state>
</provider>
......
package common.controller;
import common.model.Contract;
import common.model.Menu;
import common.model.User;
import common.model.*;
import common.service.ContractService;
import common.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -74,4 +72,42 @@ public class ContractController {
public ResultModel create(@CurrentAccount User loginAccount, @RequestBody Contract contract) {
return ResultModel.OK(service.create(loginAccount, contract));
}
@RequestMapping(value = "update", method = RequestMethod.PUT)
@ResponseBody
public ResultModel update(@CurrentAccount User loginAccount, @RequestBody Contract contract) {
return ResultModel.OK(service.update(loginAccount, contract));
}
@RequestMapping(value = "pay", method = RequestMethod.POST)
@ResponseBody
public ResultModel pay(@CurrentAccount User loginAccount, @RequestBody ContractMoney contract) {
return ResultModel.OK(service.pay(loginAccount, contract));
}
@RequestMapping(value = "change", method = RequestMethod.POST)
@ResponseBody
public ResultModel change(@CurrentAccount User loginAccount, @RequestBody ContractChange contract) {
return ResultModel.OK(service.change(loginAccount, contract));
}
@RequestMapping(value = "find/pay", method = RequestMethod.GET)
@ResponseBody
public ResultModel findPay(@CurrentAccount User loginAccount, @RequestParam String startDate,
@RequestParam String endDate, @RequestParam String code) {
return ResultModel.OK(service.findPay(startDate, endDate, code));
}
@RequestMapping(value = "find/change", method = RequestMethod.GET)
@ResponseBody
public ResultModel findChange(@CurrentAccount User loginAccount, @RequestParam String startDate,
@RequestParam String endDate, @RequestParam String code) {
return ResultModel.OK(service.findChange(startDate, endDate, code));
}
@RequestMapping(value = "update/pay", method = RequestMethod.PUT)
@ResponseBody
public ResultModel updatePay(@CurrentAccount User loginAccount, @RequestBody ContractMoney contract) {
return ResultModel.OK(service.updatePay(loginAccount, contract));
}
}
......@@ -30,6 +30,8 @@ public class Contract {
private String saleName;
private String priceLevelName;
private Long payMoney;
private Long invoice;
private String createName;
private Long modifyAccount;
private Long createAccount;
......@@ -215,6 +217,14 @@ public class Contract {
this.payMoney = payMoney;
}
public Long getInvoice() {
return invoice;
}
public void setInvoice(Long invoice) {
this.invoice = invoice;
}
@Transient
public String getSaleName() {
return saleName;
......@@ -232,6 +242,14 @@ public class Contract {
this.priceLevelName = priceLevelName;
}
public String getCreateName() {
return createName;
}
public void setCreateName(String createName) {
this.createName = createName;
}
@Override
public String toString() {
return "Contract{" +
......
package common.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by mxq on 2018/1/18.
*/
@Entity
public class ContractChange {
private Long id;
private String contractCode;
private String email;
private String company;
private String ds;
private String type;
private String content;
private Long level;
private Long money;
private Long user;
private String createName;
private Long modifyAccount;
private Long createAccount;
private Date modifyTime;
private Date createTime;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDs() {
return ds;
}
public void setDs(String ds) {
this.ds = ds;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getUser() {
return user;
}
public void setUser(Long user) {
this.user = user;
}
public String getContractCode() {
return contractCode;
}
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getLevel() {
return level;
}
public void setLevel(Long level) {
this.level = level;
}
public Long getMoney() {
return money;
}
public void setMoney(Long money) {
this.money = money;
}
public String getCreateName() {
return createName;
}
public void setCreateName(String createName) {
this.createName = createName;
}
}
package common.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by mxq on 2018/1/18.
*/
@Entity
public class ContractMoney {
private Long id;
private String contractCode;
private String email;
private String company;
private String ds;
private String type;
private Long money;
private Long user;
private String createName;
private Long modifyAccount;
private Long createAccount;
private Date modifyTime;
private Date createTime;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getContractCode() {
return contractCode;
}
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
public String getDs() {
return ds;
}
public void setDs(String ds) {
this.ds = ds;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Long getMoney() {
return money;
}
public void setMoney(Long money) {
this.money = money;
}
public Long getUser() {
return user;
}
public void setUser(Long user) {
this.user = user;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateName() {
return createName;
}
public void setCreateName(String createName) {
this.createName = createName;
}
}
package common.repository;
import common.model.Contract;
import common.model.ContractChange;
import common.model.ContractMoney;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigInteger;
import java.util.List;
@Transactional
public interface ContractChangeRepository extends JpaRepository<ContractChange, Long> {
@Query(value="select * from contract_change where ds >= ?1 and ds <= ?2 and contract_code = ?3 order by ds desc",nativeQuery=true)
List<ContractChange> findByDs(String startDate, String endDate, String code);
}
package common.repository;
import common.model.Contract;
import common.model.ContractChange;
import common.model.ContractMoney;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
public interface ContractMoneyRepository extends JpaRepository<ContractMoney, Long> {
@Query(value="select * from contract_money where ds >= ?1 and ds <= ?2 and contract_code = ?3 order by ds desc",nativeQuery=true)
List<ContractMoney> findByDs(String startDate, String endDate, String code);
}
......@@ -20,4 +20,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value="select * from contract where ds >= ?1 and ds <= ?2 order by ds desc",nativeQuery=true)
List<Contract> findByDs(String startDate, String endDate);
@Query(value="select * from contract where contract_code = ?1",nativeQuery=true)
Contract findByCode(String contract_code);
}
package common.service;
import common.model.Contract;
import common.model.ContractBody;
import common.model.User;
import common.model.*;
import tkio.model.PackageType;
import java.util.List;
......@@ -31,4 +29,13 @@ public interface ContractService {
List<Contract> findAll(String startDate, String endDate);
ContractMoney pay(User loginUser, ContractMoney resource);
Contract change(User loginUser, ContractChange resource);
List<ContractMoney> findPay(String startDate, String endDate, String code);
List<ContractChange> findChange(String startDate, String endDate, String code);
Contract updatePay(User loginUser, ContractMoney resource);
}
......@@ -11,11 +11,9 @@ import tkio.repository.PackageTypeRepository;
import util.DateUtil;
import util.ValidateUtil;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* Created by mxq on 2018/1/16.
......@@ -35,6 +33,10 @@ public class ContractServiceImpl implements ContractService{
PriceLevelMoneyRepository priceLevelMoneyRepository;
@Autowired
UserRepository userRepository;
@Autowired
ContractChangeRepository contractChangeRepository;
@Autowired
ContractMoneyRepository contractMoneyRepository;
@Override
public Map<String, Object> checkAccount(String email) {
......@@ -87,6 +89,8 @@ public class ContractServiceImpl implements ContractService{
@Override
public Contract create(User loginUser, Contract resource) {
resource.setPayMoney(0L);
resource.setInvoice(0L);
if(DateUtil.getBeforeDays(0).compareTo(resource.getStartDate()) > 0){
resource.setDs(DateUtil.getBeforeDays(0));
resource.setStatus("wait");
......@@ -94,20 +98,77 @@ public class ContractServiceImpl implements ContractService{
resource.setDs(DateUtil.getBeforeDays(0));
resource.setStatus("executing");
}
Double rebat = getRebat(resource.getProduct(), resource.getPriceLevel().intValue(), resource.getMoney());
resource.setRebate(rebat);
BigDecimal bg = new BigDecimal(rebat);
double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
resource.setRebate(f1);
resource.setCreateAccount(loginUser.getId());
resource.setCreateTime(new Date());
return contractRepository.save(resource);
}
@Override
public Contract update(User loginUser, Contract resource) {
return null;
Contract contract = contractRepository.findOne(resource.getId());
ContractChange cc = new ContractChange();
cc.setType("update");
cc.setUser(loginUser.getId());
cc.setDs(DateUtil.getBeforeDays(0));
cc.setContent("");
cc.setEmail(contract.getEmail());
cc.setCompany(contract.getCustomerBody());
cc.setContractCode(contract.getContractCode());
if(!resource.getStartDate().equals(contract.getStartDate())){
cc.setContent(cc.getContent() + "startDate changed : " + contract.getStartDate() + "-->" + resource.getStartDate());
contract.setStartDate(resource.getStartDate());
if(DateUtil.getBeforeDays(0).compareTo(resource.getStartDate()) > 0){
contract.setStatus("wait");
}else{
contract.setStatus("executing");
}
}
if(!resource.getEndDate().equals(contract.getEndDate())){
cc.setContent(cc.getContent() + " endDate changed : " + contract.getEndDate() + "-->" + resource.getEndDate());
contract.setEndDate(resource.getEndDate());
}
boolean newRebat = false;
if(!resource.getPriceLevel().equals(contract.getPriceLevel())){
cc.setContent(cc.getContent() + " priceLevel changed : " + contract.getPriceLevel() + "-->" + resource.getPriceLevel());
newRebat = true;
contract.setPriceLevel(resource.getPriceLevel());
}
if(!resource.getMoney().equals(contract.getMoney())){
cc.setContent(cc.getContent() + " money changed : " + contract.getMoney() + "-->" + resource.getMoney());
newRebat = true;
contract.setMoney(resource.getMoney());
}
if(!resource.getSale().equals(contract.getSale())){
cc.setContent(cc.getContent() + " slae changed : " + contract.getSale() + "-->" + resource.getSale());
contract.setSale(resource.getSale());
}
if(newRebat){
Double rebat = getRebat(contract.getProduct(), contract.getPriceLevel().intValue(), contract.getMoney());
BigDecimal bg = new BigDecimal(rebat);
double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
contract.setRebate(f1);
}
contractChangeRepository.save(cc);
return contractRepository.save(contract);
}
@Override
public List<Contract> findAll(String startDate, String endDate) {
List<Contract> result = new ArrayList<>();
List<User> sales = userRepository.findAllSales();
List<User> sales = userRepository.findAll();
Map<Long, String> saleMap = new HashMap<>();
if(ValidateUtil.isValid(sales)){
for(User s: sales){
......@@ -126,9 +187,132 @@ public class ContractServiceImpl implements ContractService{
for(Contract c : contractList){
c.setSaleName(saleMap.containsKey(c.getSale()) ? saleMap.get(c.getSale()) : "");
c.setPriceLevelName(typeMap.containsKey(c.getPriceLevel()) ? typeMap.get(c.getPriceLevel()) : "");
c.setCreateName(saleMap.containsKey(c.getSale()) ? saleMap.get(c.getSale()) : "");
result.add(c);
}
}
return result;
}
@Override
public ContractMoney pay(User loginUser, ContractMoney resource) {
Contract contract = contractRepository.findByCode(resource.getContractCode());
if(resource.getType().equals("pay")){
contract.setPayMoney(contract.getPayMoney() + resource.getMoney());
} else {
contract.setInvoice(contract.getInvoice() + resource.getMoney());
}
contractRepository.save(contract);
resource.setCreateAccount(loginUser.getId());
resource.setCreateTime(new Date());
resource.setUser(loginUser.getId());
return contractMoneyRepository.save(resource);
}
@Override
public Contract change(User loginUser, ContractChange resource) {
Contract contract = contractRepository.findByCode(resource.getContractCode());
if(resource.getType().equals("price")){
resource.setContent(" priceLevel changed : " + contract.getPriceLevel() + "-->" + resource.getLevel()
+ " money changed :" + contract.getMoney() + "-->" +(resource.getMoney() + contract.getMoney()));
contract.setMoney(resource.getMoney() + contract.getMoney());
contract.setPriceLevel(resource.getLevel());
Double rebat = getRebat(contract.getProduct(), contract.getPriceLevel().intValue(), contract.getMoney());
BigDecimal bg = new BigDecimal(rebat);
double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
contract.setRebate(f1);
}else{
contract.setStatus("cancel");
}
resource.setCreateAccount(loginUser.getId());
resource.setCreateTime(new Date());
resource.setDs(DateUtil.getBeforeDays(0));
resource.setUser(loginUser.getId());
contractChangeRepository.save(resource);
return contractRepository.save(contract);
}
@Override
public List<ContractMoney> findPay(String startDate, String endDate, String code) {
List<User> sales = userRepository.findAll();
Map<Long, String> saleMap = new HashMap<>();
if(ValidateUtil.isValid(sales)){
for(User s: sales){
saleMap.put(s.getId(), s.getName());
}
}
List<ContractMoney> result = new ArrayList<>();
List<ContractMoney> list = contractMoneyRepository.findByDs(startDate, endDate,code);
if(ValidateUtil.isValid(list)){
for(ContractMoney cm : list){
cm.setCreateName(saleMap.containsKey(cm.getUser()) ? saleMap.get(cm.getUser()) : "");
result.add(cm);
}
}
return result;
}
@Override
public List<ContractChange> findChange(String startDate, String endDate, String code) {
List<User> sales = userRepository.findAll();
Map<Long, String> saleMap = new HashMap<>();
if(ValidateUtil.isValid(sales)){
for(User s: sales){
saleMap.put(s.getId(), s.getName());
}
}
List<ContractChange> result = new ArrayList<>();
List<ContractChange> list = contractChangeRepository.findByDs(startDate, endDate,code);
if(ValidateUtil.isValid(list)){
for(ContractChange cm : list){
cm.setCreateName(saleMap.containsKey(cm.getUser()) ? saleMap.get(cm.getUser()) : "");
result.add(cm);
}
}
return result;
}
@Override
public Contract updatePay(User loginUser, ContractMoney resource) {
ContractMoney contractMoney = contractMoneyRepository.findOne(resource.getId());
Contract contract = contractRepository.findByCode(resource.getContractCode());
if(contractMoney.getType().equals("pay")){
contract.setPayMoney(contract.getPayMoney() + resource.getMoney() - contractMoney.getMoney());
} else {
contract.setInvoice(contract.getInvoice() + resource.getMoney() - contractMoney.getMoney());
}
Contract save = contractRepository.save(contract);
contractMoney.setModifyAccount(loginUser.getId());
contractMoney.setModifyTime(new Date());
contractMoney.setMoney(resource.getMoney());
contractMoney.setDs(resource.getDs());
contractMoneyRepository.save(contractMoney);
List<User> sales = userRepository.findAll();
Map<Long, String> saleMap = new HashMap<>();
if(ValidateUtil.isValid(sales)){
for(User s: sales){
saleMap.put(s.getId(), s.getName());
}
}
List<PackageType> typeList = packageTypeRepository.findAll();
Map<Long, String> typeMap = new HashMap<>();
if(ValidateUtil.isValid(typeList)){
for(PackageType s: typeList){
typeMap.put(s.getId(), s.getPackageName());
}
}
save.setSaleName(saleMap.containsKey(save.getSale()) ? saleMap.get(save.getSale()) : "");
save.setPriceLevelName(typeMap.containsKey(save.getPriceLevel()) ? typeMap.get(save.getPriceLevel()) : "");
save.setCreateName(saleMap.containsKey(save.getSale()) ? saleMap.get(save.getSale()) : "");
return save;
}
}
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