Commit 331a7f16 by 王军业

'123'

1 parent 776cdad6
Showing 209 changed files with 9024 additions and 4142 deletions
<component name="ArtifactManager">
<artifact type="war" name="finance_serv:war">
<output-path>$PROJECT_DIR$/target</output-path>
<root id="archive" name="finance_serv-SNAPSHOT.war">
<element id="artifact" artifact-name="finance_serv:war exploded" />
</root>
</artifact>
</component>
\ No newline at end of file \ No newline at end of file
<component name="ArtifactManager">
<artifact type="exploded-war" name="finance_serv:war exploded">
<output-path>$PROJECT_DIR$/target/finance_serv-SNAPSHOT</output-path>
<root id="root">
<element id="directory" name="WEB-INF">
<element id="directory" name="classes">
<element id="module-output" name="finance_serv" />
</element>
<element id="directory" name="lib">
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-starter:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: ch.qos.logback:logback-classic:1.1.11" />
<element id="library" level="project" name="Maven: ch.qos.logback:logback-core:1.1.11" />
<element id="library" level="project" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" />
<element id="library" level="project" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" />
<element id="library" level="project" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" />
<element id="library" level="project" name="Maven: org.yaml:snakeyaml:1.17" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.16" />
<element id="library" level="project" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.16" />
<element id="library" level="project" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.16" />
<element id="library" level="project" name="Maven: org.hibernate:hibernate-validator:5.3.5.Final" />
<element id="library" level="project" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" />
<element id="library" level="project" name="Maven: com.fasterxml:classmate:1.3.3" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.9" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.9" />
<element id="library" level="project" name="Maven: org.springframework:spring-web:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-aop:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-beans:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-context:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-webmvc:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-expression:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" />
<element id="library" level="project" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" />
<element id="library" level="project" name="Maven: org.mybatis:mybatis:3.4.0" />
<element id="library" level="project" name="Maven: org.mybatis:mybatis-spring:1.3.0" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.thymeleaf:thymeleaf-spring4:2.1.5.RELEASE" />
<element id="library" level="project" name="Maven: org.thymeleaf:thymeleaf:2.1.5.RELEASE" />
<element id="library" level="project" name="Maven: ognl:ognl:3.0.8" />
<element id="library" level="project" name="Maven: org.javassist:javassist:3.21.0-GA" />
<element id="library" level="project" name="Maven: org.unbescape:unbescape:1.1.0.RELEASE" />
<element id="library" level="project" name="Maven: nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0" />
<element id="library" level="project" name="Maven: org.codehaus.groovy:groovy:2.4.12" />
<element id="library" level="project" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.6.RELEASE" />
<element id="library" level="project" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.16" />
<element id="library" level="project" name="Maven: org.apache.tomcat:tomcat-juli:8.5.16" />
<element id="library" level="project" name="Maven: org.springframework:spring-jdbc:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-tx:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: com.alibaba:druid:1.0.18" />
<element id="library" level="project" name="Maven: org.postgresql:postgresql:9.3-1102-jdbc41" />
<element id="library" level="project" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.1.2" />
<element id="library" level="project" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.1.2" />
<element id="library" level="project" name="Maven: com.github.pagehelper:pagehelper:5.0.3" />
<element id="library" level="project" name="Maven: com.github.jsqlparser:jsqlparser:1.0" />
<element id="library" level="project" name="Maven: cn.afterturn:easypoi-base:3.0.3" />
<element id="library" level="project" name="Maven: org.apache.poi:poi:3.15" />
<element id="library" level="project" name="Maven: org.apache.commons:commons-collections4:4.1" />
<element id="library" level="project" name="Maven: org.apache.poi:poi-ooxml:3.15" />
<element id="library" level="project" name="Maven: com.github.virtuald:curvesapi:1.04" />
<element id="library" level="project" name="Maven: org.apache.poi:poi-ooxml-schemas:3.15" />
<element id="library" level="project" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" />
<element id="library" level="project" name="Maven: stax:stax-api:1.0.1" />
<element id="library" level="project" name="Maven: com.google.guava:guava:16.0.1" />
<element id="library" level="project" name="Maven: org.apache.commons:commons-lang3:3.2.1" />
<element id="library" level="project" name="Maven: org.slf4j:slf4j-api:1.7.25" />
<element id="library" level="project" name="Maven: javax.validation:validation-api:1.1.0.Final" />
<element id="library" level="project" name="Maven: cn.afterturn:easypoi-web:3.0.3" />
<element id="library" level="project" name="Maven: org.springframework:spring-core:4.3.10.RELEASE" />
<element id="library" level="project" name="Maven: cn.afterturn:easypoi-annotation:3.0.3" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpclient:4.1.2" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" />
<element id="library" level="project" name="Maven: commons-codec:commons-codec:1.10" />
<element id="library" level="project" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" />
<element id="library" level="project" name="Maven: commons-beanutils:commons-beanutils:1.9.3" />
<element id="library" level="project" name="Maven: commons-collections:commons-collections:3.2.2" />
<element id="library" level="project" name="Maven: commons-lang:commons-lang:2.5" />
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.1.1" />
<element id="library" level="project" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" />
</element>
</element>
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/target/finance_serv-SNAPSHOT/META-INF/MANIFEST.MF" />
</element>
<element id="javaee-facet-resources" facet="finance_serv/web/Web" />
</root>
</artifact>
</component>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="finance_serv" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="finance_serv" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
</component>
</project>
\ No newline at end of file \ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AliAccessStaticViaInstance" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliDeprecation" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AliEqualsAvoidNull" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliMissingOverrideAnnotation" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliWrapperTypeEquality" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidCommentBehindStatement" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidComplexCondition" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidConcurrentCompetitionRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidManuallyCreateThread" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidMissUseOfMathRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidNegationOperator" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidReturnInFinally" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidStartWithDollarAndUnderLineNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidUseTimer" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaBooleanPropertyShouldNotStartWithIs" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaClassCastExceptionWithSubListToArrayList" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaClassCastExceptionWithToArray" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaClassMustHaveAuthor" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaClassNamingShouldBeCamel" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaCollectionInitShouldAssignCapacity" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaCommentsMustBeJavadocFormat" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaConstantFieldShouldBeUpperCase" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaCountDownShouldInFinally" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaDontModifyInForeachCircle" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaEnumConstantsMustHaveComment" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaExceptionClassShouldEndWithException" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaIbatisMethodQueryForList" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaLowerCamelCaseVariableNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaMethodReturnWrapperType" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaMethodTooLong" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPackageNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPojoMustOverrideToString" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPojoMustUsePrimitiveField" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPojoNoDefaultValue" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaRemoveCommentedCode" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaServiceOrDaoClassShouldEndWithImpl" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaStringConcat" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaSwitchStatement" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaThreadLocalShouldRemove" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaThreadPoolCreation" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaThreadShouldSetName" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaUndefineMagicConstant" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaUnsupportedExceptionWithModifyAsList" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaUseQuietReferenceNotation" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="INNER_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="METHOD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
</value>
</option>
<option name="FIELD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="IGNORE_DEPRECATED" value="false" />
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
<option name="myAdditionalJavadocTags" value="date" />
</inspection_tool>
<inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="false" level="CRITICAL" enabled_by_default="false" />
</profile>
</component>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JUnitGeneratorProjectSettings">
<option name="combineGetterAndSetter" value="true" />
<option name="outputFilePattern" value="${SOURCEPATH}/../../test/${PACKAGE}/${FILENAME}" />
<option name="selectedTemplateKey" value="JUnit 4" />
<option name="vmTemplates">
<map>
<entry key="JUnit 3" value="######################################################################################## &#10;## &#10;## Available variables: &#10;## $entryList.methodList - List of method composites &#10;## $entryList.privateMethodList - List of private method composites &#10;## $entryList.fieldList - ArrayList of class scope field names &#10;## $entryList.className - class name &#10;## $entryList.packageName - package name &#10;## $today - Todays date in MM/dd/yyyy format &#10;## &#10;## MethodComposite variables: &#10;## $method.name - Method Name &#10;## $method.signature - Full method signature in String form &#10;## $method.reflectionCode - list of strings representing commented out reflection code to access method (Private Methods) &#10;## $method.paramNames - List of Strings representing the method's parameters' names &#10;## $method.paramClasses - List of Strings representing the method's parameters' classes &#10;## &#10;## You can configure the output class name using &quot;testClass&quot; variable below. &#10;## Here are some examples: &#10;## Test${entry.ClassName} - will produce TestSomeClass &#10;## ${entry.className}Test - will produce SomeClassTest &#10;## &#10;######################################################################################## &#10;## &#10;#macro (cap $strIn)$strIn.valueOf($strIn.charAt(0)).toUpperCase()$strIn.substring(1)#end &#10;## Iterate through the list and generate testcase for every entry. &#10;#foreach ($entry in $entryList) &#10;#set( $testClass=&quot;${entry.className}Test&quot;) &#10;## &#10;package test.$entry.packageName; &#10;&#10;import junit.framework.Test; &#10;import junit.framework.TestSuite; &#10;import junit.framework.TestCase; &#10;&#10;/** &#10;* ${entry.className} Tester. &#10;* &#10;* @author &lt;Authors name&gt; &#10;* @since &lt;pre&gt;$today&lt;/pre&gt; &#10;* @version 1.0 &#10;*/ &#10;public class $testClass extends TestCase { &#10;public $testClass(String name) { &#10;super(name); &#10;} &#10;&#10;public void setUp() throws Exception { &#10;super.setUp(); &#10;} &#10;&#10;public void tearDown() throws Exception { &#10;super.tearDown(); &#10;} &#10;&#10;#foreach($method in $entry.methodList) &#10;/** &#10;* &#10;* Method: $method.signature &#10;* &#10;*/ &#10;public void test#cap(${method.name})() throws Exception { &#10;//TODO: Test goes here... &#10;} &#10;&#10;#end &#10;&#10;#foreach($method in $entry.privateMethodList) &#10;/** &#10;* &#10;* Method: $method.signature &#10;* &#10;*/ &#10;public void test#cap(${method.name})() throws Exception { &#10;//TODO: Test goes here... &#10;#foreach($string in $method.reflectionCode) &#10;$string &#10;#end &#10;} &#10;&#10;#end &#10;&#10;public static Test suite() { &#10;return new TestSuite(${testClass}.class); &#10;} &#10;} &#10;#end" />
<entry key="JUnit 4" value="######################################################################################## &#10;## &#10;## Available variables: &#10;## $entryList.methodList - List of method composites &#10;## $entryList.privateMethodList - List of private method composites &#10;## $entryList.fieldList - ArrayList of class scope field names &#10;## $entryList.className - class name &#10;## $entryList.packageName - package name &#10;## $today - Todays date in MM/dd/yyyy format &#10;## &#10;## MethodComposite variables: &#10;## $method.name - Method Name &#10;## $method.signature - Full method signature in String form &#10;## $method.reflectionCode - list of strings representing commented out reflection code to access method (Private Methods) &#10;## $method.paramNames - List of Strings representing the method's parameters' names &#10;## $method.paramClasses - List of Strings representing the method's parameters' classes &#10;## &#10;## You can configure the output class name using &quot;testClass&quot; variable below. &#10;## Here are some examples: &#10;## Test${entry.ClassName} - will produce TestSomeClass &#10;## ${entry.className}Test - will produce SomeClassTest &#10;## &#10;######################################################################################## &#10;## &#10;#macro (cap $strIn)$strIn.valueOf($strIn.charAt(0)).toUpperCase()$strIn.substring(1)#end &#10;## Iterate through the list and generate testcase for every entry. &#10;#foreach ($entry in $entryList) &#10;#set( $testClass=&quot;${entry.className}Test&quot;) &#10;## &#10;package $entry.packageName; &#10;&#10;import org.junit.Test; &#10;import org.junit.Before; &#10;import org.junit.After; &#10;import org.junit.runner.RunWith;&#10;import com.sun.glass.ui.Application;&#10;import org.springframework.boot.test.context.SpringBootTest;&#10;import org.springframework.test.context.junit4.SpringRunner;&#10;/** &#10;* ${entry.className} Tester. &#10;* &#10;* @author &lt;Authors name&gt; &#10;* @since &lt;pre&gt;$today&lt;/pre&gt; &#10;* @version 1.0 &#10;*/ &#10;@RunWith(SpringRunner.class)&#10;@SpringBootTest(classes = Application.class)&#10;public class $testClass { &#10;&#10;@Before&#10;public void before() throws Exception { &#10;} &#10;&#10;@After&#10;public void after() throws Exception { &#10;} &#10;&#10;#foreach($method in $entry.methodList) &#10;/** &#10;* &#10;* Method: $method.signature &#10;* &#10;*/ &#10;@Test&#10;public void test#cap(${method.name})() throws Exception { &#10;//TODO: Test goes here... &#10;} &#10;&#10;#end &#10;&#10;#foreach($method in $entry.privateMethodList) &#10;/** &#10;* &#10;* Method: $method.signature &#10;* &#10;*/ &#10;@Test&#10;public void test#cap(${method.name})() throws Exception { &#10;//TODO: Test goes here... &#10;#foreach($string in $method.reflectionCode) &#10;$string &#10;#end &#10;} &#10;&#10;#end &#10;} &#10;#end" />
</map>
</option>
</component>
</project>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: ch.qos.logback:logback-classic:1.1.11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: ch.qos.logback:logback-core:1.1.11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: cn.afterturn:easypoi-annotation:3.0.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-annotation/3.0.3/easypoi-annotation-3.0.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-annotation/3.0.3/easypoi-annotation-3.0.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-annotation/3.0.3/easypoi-annotation-3.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: cn.afterturn:easypoi-base:3.0.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-base/3.0.3/easypoi-base-3.0.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-base/3.0.3/easypoi-base-3.0.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-base/3.0.3/easypoi-base-3.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: cn.afterturn:easypoi-web:3.0.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-web/3.0.3/easypoi-web-3.0.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-web/3.0.3/easypoi-web-3.0.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/cn/afterturn/easypoi-web/3.0.3/easypoi-web-3.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.alibaba:druid:1.0.18">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/druid/1.0.18/druid-1.0.18.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/druid/1.0.18/druid-1.0.18-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/druid/1.0.18/druid-1.0.18-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.fasterxml:classmate:1.3.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/classmate/1.3.3/classmate-1.3.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/classmate/1.3.3/classmate-1.3.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/classmate/1.3.3/classmate-1.3.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.9">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.8.9/jackson-core-2.8.9.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.8.9/jackson-core-2.8.9-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.8.9/jackson-core-2.8.9-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.9">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.8.9/jackson-databind-2.8.9.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.8.9/jackson-databind-2.8.9-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.8.9/jackson-databind-2.8.9-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.github.jsqlparser:jsqlparser:1.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.github.pagehelper:pagehelper:5.0.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper/5.0.3/pagehelper-5.0.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper/5.0.3/pagehelper-5.0.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper/5.0.3/pagehelper-5.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.1.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.1.2/pagehelper-spring-boot-autoconfigure-1.1.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.1.2/pagehelper-spring-boot-autoconfigure-1.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.1.2/pagehelper-spring-boot-autoconfigure-1.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.1.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-starter/1.1.2/pagehelper-spring-boot-starter-1.1.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-starter/1.1.2/pagehelper-spring-boot-starter-1.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-starter/1.1.2/pagehelper-spring-boot-starter-1.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.github.virtuald:curvesapi:1.04">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/virtuald/curvesapi/1.04/curvesapi-1.04.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/github/virtuald/curvesapi/1.04/curvesapi-1.04-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/virtuald/curvesapi/1.04/curvesapi-1.04-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.google.guava:guava:16.0.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/16.0.1/guava-16.0.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/16.0.1/guava-16.0.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/16.0.1/guava-16.0.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.jayway.jsonpath:json-path:2.2.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/jayway/jsonpath/json-path/2.2.0/json-path-2.2.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/jayway/jsonpath/json-path/2.2.0/json-path-2.2.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/jayway/jsonpath/json-path/2.2.0/json-path-2.2.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: commons-beanutils:commons-beanutils:1.9.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: commons-codec:commons-codec:1.10">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.10/commons-codec-1.10.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.10/commons-codec-1.10-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: commons-collections:commons-collections:3.2.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: commons-lang:commons-lang:2.5">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.5/commons-lang-2.5.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.5/commons-lang-2.5-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.5/commons-lang-2.5-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: commons-logging:commons-logging:1.1.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: javax.validation:validation-api:1.1.0.Final">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: junit:junit:4.12">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: net.minidev:accessors-smart:1.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/net/minidev/accessors-smart/1.1/accessors-smart-1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/net/minidev/accessors-smart/1.1/accessors-smart-1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/net/minidev/accessors-smart/1.1/accessors-smart-1.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: net.minidev:json-smart:2.2.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/net/minidev/json-smart/2.2.1/json-smart-2.2.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/net/minidev/json-smart/2.2.1/json-smart-2.2.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/net/minidev/json-smart/2.2.1/json-smart-2.2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: net.sf.ezmorph:ezmorph:1.0.6">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: net.sf.json-lib:json-lib:jdk15:2.4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/nz/net/ultraq/thymeleaf/thymeleaf-layout-dialect/1.4.0/thymeleaf-layout-dialect-1.4.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/nz/net/ultraq/thymeleaf/thymeleaf-layout-dialect/1.4.0/thymeleaf-layout-dialect-1.4.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/nz/net/ultraq/thymeleaf/thymeleaf-layout-dialect/1.4.0/thymeleaf-layout-dialect-1.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: ognl:ognl:3.0.8">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/ognl/ognl/3.0.8/ognl-3.0.8.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/ognl/ognl/3.0.8/ognl-3.0.8-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/ognl/ognl/3.0.8/ognl-3.0.8-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.commons:commons-collections4:4.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.commons:commons-lang3:3.2.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.httpcomponents:httpclient:4.1.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.httpcomponents:httpcore:4.4.6">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.poi:poi:3.15">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi/3.15/poi-3.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi/3.15/poi-3.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi/3.15/poi-3.15-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.poi:poi-ooxml:3.15">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi-ooxml/3.15/poi-ooxml-3.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi-ooxml/3.15/poi-ooxml-3.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi-ooxml/3.15/poi-ooxml-3.15-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.poi:poi-ooxml-schemas:3.15">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi-ooxml-schemas/3.15/poi-ooxml-schemas-3.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi-ooxml-schemas/3.15/poi-ooxml-schemas-3.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/poi/poi-ooxml-schemas/3.15/poi-ooxml-schemas-3.15-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.16">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-core/8.5.16/tomcat-embed-core-8.5.16.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-core/8.5.16/tomcat-embed-core-8.5.16-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-core/8.5.16/tomcat-embed-core-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.16">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-el/8.5.16/tomcat-embed-el-8.5.16.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-el/8.5.16/tomcat-embed-el-8.5.16-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-el/8.5.16/tomcat-embed-el-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.16">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.16/tomcat-embed-websocket-8.5.16.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.16/tomcat-embed-websocket-8.5.16-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.16/tomcat-embed-websocket-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.16">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/tomcat-jdbc/8.5.16/tomcat-jdbc-8.5.16.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/tomcat-jdbc/8.5.16/tomcat-jdbc-8.5.16-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/tomcat-jdbc/8.5.16/tomcat-jdbc-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.tomcat:tomcat-juli:8.5.16">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/tomcat-juli/8.5.16/tomcat-juli-8.5.16.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/tomcat-juli/8.5.16/tomcat-juli-8.5.16-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/tomcat/tomcat-juli/8.5.16/tomcat-juli-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.assertj:assertj-core:2.6.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/assertj/assertj-core/2.6.0/assertj-core-2.6.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/assertj/assertj-core/2.6.0/assertj-core-2.6.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/assertj/assertj-core/2.6.0/assertj-core-2.6.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.codehaus.groovy:groovy:2.4.12">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/2.4.12/groovy-2.4.12.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/2.4.12/groovy-2.4.12-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/2.4.12/groovy-2.4.12-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.hamcrest:hamcrest-core:1.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.hamcrest:hamcrest-library:1.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.hibernate:hibernate-validator:5.3.5.Final">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/hibernate/hibernate-validator/5.3.5.Final/hibernate-validator-5.3.5.Final-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.javassist:javassist:3.21.0-GA">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.mockito:mockito-core:1.10.19">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.mybatis:mybatis:3.4.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.4.0/mybatis-3.4.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.4.0/mybatis-3.4.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.4.0/mybatis-3.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.mybatis:mybatis-spring:1.3.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/1.3.0/mybatis-spring-1.3.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/1.3.0/mybatis-spring-1.3.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/1.3.0/mybatis-spring-1.3.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/1.1.1/mybatis-spring-boot-autoconfigure-1.1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/1.1.1/mybatis-spring-boot-autoconfigure-1.1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/1.1.1/mybatis-spring-boot-autoconfigure-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/spring/boot/mybatis-spring-boot-starter/1.1.1/mybatis-spring-boot-starter-1.1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/spring/boot/mybatis-spring-boot-starter/1.1.1/mybatis-spring-boot-starter-1.1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/mybatis/spring/boot/mybatis-spring-boot-starter/1.1.1/mybatis-spring-boot-starter-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.objenesis:objenesis:2.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/objenesis/objenesis/2.1/objenesis-2.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/objenesis/objenesis/2.1/objenesis-2.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/objenesis/objenesis/2.1/objenesis-2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.ow2.asm:asm:5.0.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/ow2/asm/asm/5.0.3/asm-5.0.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/ow2/asm/asm/5.0.3/asm-5.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.postgresql:postgresql:9.3-1102-jdbc41">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/9.3-1102-jdbc41/postgresql-9.3-1102-jdbc41.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/9.3-1102-jdbc41/postgresql-9.3-1102-jdbc41-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/9.3-1102-jdbc41/postgresql-9.3-1102-jdbc41-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.skyscreamer:jsonassert:1.4.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/skyscreamer/jsonassert/1.4.0/jsonassert-1.4.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/skyscreamer/jsonassert/1.4.0/jsonassert-1.4.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/skyscreamer/jsonassert/1.4.0/jsonassert-1.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.slf4j:jcl-over-slf4j:1.7.25">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.slf4j:jul-to-slf4j:1.7.25">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.slf4j:log4j-over-slf4j:1.7.25">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.slf4j:slf4j-api:1.7.25">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/1.5.6.RELEASE/spring-boot-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/1.5.6.RELEASE/spring-boot-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/1.5.6.RELEASE/spring-boot-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-autoconfigure/1.5.6.RELEASE/spring-boot-autoconfigure-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-autoconfigure/1.5.6.RELEASE/spring-boot-autoconfigure-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-autoconfigure/1.5.6.RELEASE/spring-boot-autoconfigure-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter/1.5.6.RELEASE/spring-boot-starter-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter/1.5.6.RELEASE/spring-boot-starter-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter/1.5.6.RELEASE/spring-boot-starter-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-jdbc/1.5.6.RELEASE/spring-boot-starter-jdbc-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-jdbc/1.5.6.RELEASE/spring-boot-starter-jdbc-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-jdbc/1.5.6.RELEASE/spring-boot-starter-jdbc-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-logging/1.5.6.RELEASE/spring-boot-starter-logging-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-logging/1.5.6.RELEASE/spring-boot-starter-logging-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-logging/1.5.6.RELEASE/spring-boot-starter-logging-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter-test:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-test/1.5.6.RELEASE/spring-boot-starter-test-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-test/1.5.6.RELEASE/spring-boot-starter-test-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-test/1.5.6.RELEASE/spring-boot-starter-test-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-thymeleaf/1.5.6.RELEASE/spring-boot-starter-thymeleaf-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-thymeleaf/1.5.6.RELEASE/spring-boot-starter-thymeleaf-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-thymeleaf/1.5.6.RELEASE/spring-boot-starter-thymeleaf-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-tomcat/1.5.6.RELEASE/spring-boot-starter-tomcat-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-tomcat/1.5.6.RELEASE/spring-boot-starter-tomcat-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-tomcat/1.5.6.RELEASE/spring-boot-starter-tomcat-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-web/1.5.6.RELEASE/spring-boot-starter-web-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-web/1.5.6.RELEASE/spring-boot-starter-web-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-web/1.5.6.RELEASE/spring-boot-starter-web-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-test:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-test/1.5.6.RELEASE/spring-boot-test-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-test/1.5.6.RELEASE/spring-boot-test-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-test/1.5.6.RELEASE/spring-boot-test-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-test-autoconfigure/1.5.6.RELEASE/spring-boot-test-autoconfigure-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-test-autoconfigure/1.5.6.RELEASE/spring-boot-test-autoconfigure-1.5.6.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-test-autoconfigure/1.5.6.RELEASE/spring-boot-test-autoconfigure-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-aop:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/4.3.10.RELEASE/spring-aop-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/4.3.10.RELEASE/spring-aop-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/4.3.10.RELEASE/spring-aop-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-beans:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/4.3.10.RELEASE/spring-beans-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/4.3.10.RELEASE/spring-beans-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/4.3.10.RELEASE/spring-beans-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-context:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/4.3.10.RELEASE/spring-context-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/4.3.10.RELEASE/spring-context-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/4.3.10.RELEASE/spring-context-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-core:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/4.3.10.RELEASE/spring-core-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/4.3.10.RELEASE/spring-core-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/4.3.10.RELEASE/spring-core-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-expression:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/4.3.10.RELEASE/spring-expression-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/4.3.10.RELEASE/spring-expression-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/4.3.10.RELEASE/spring-expression-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-jdbc:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-jdbc/4.3.10.RELEASE/spring-jdbc-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-jdbc/4.3.10.RELEASE/spring-jdbc-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-jdbc/4.3.10.RELEASE/spring-jdbc-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-test:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-test/4.3.10.RELEASE/spring-test-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-test/4.3.10.RELEASE/spring-test-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-test/4.3.10.RELEASE/spring-test-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-tx:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-tx/4.3.10.RELEASE/spring-tx-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-tx/4.3.10.RELEASE/spring-tx-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-tx/4.3.10.RELEASE/spring-tx-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-web:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-web/4.3.10.RELEASE/spring-web-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-web/4.3.10.RELEASE/spring-web-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-web/4.3.10.RELEASE/spring-web-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.springframework:spring-webmvc:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-webmvc/4.3.10.RELEASE/spring-webmvc-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-webmvc/4.3.10.RELEASE/spring-webmvc-4.3.10.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-webmvc/4.3.10.RELEASE/spring-webmvc-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.thymeleaf:thymeleaf:2.1.5.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/thymeleaf/thymeleaf/2.1.5.RELEASE/thymeleaf-2.1.5.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/thymeleaf/thymeleaf/2.1.5.RELEASE/thymeleaf-2.1.5.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/thymeleaf/thymeleaf/2.1.5.RELEASE/thymeleaf-2.1.5.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.thymeleaf:thymeleaf-spring4:2.1.5.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/thymeleaf/thymeleaf-spring4/2.1.5.RELEASE/thymeleaf-spring4-2.1.5.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/thymeleaf/thymeleaf-spring4/2.1.5.RELEASE/thymeleaf-spring4-2.1.5.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/thymeleaf/thymeleaf-spring4/2.1.5.RELEASE/thymeleaf-spring4-2.1.5.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.unbescape:unbescape:1.1.0.RELEASE">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/unbescape/unbescape/1.1.0.RELEASE/unbescape-1.1.0.RELEASE.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/unbescape/unbescape/1.1.0.RELEASE/unbescape-1.1.0.RELEASE-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/unbescape/unbescape/1.1.0.RELEASE/unbescape-1.1.0.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.yaml:snakeyaml:1.17">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.17/snakeyaml-1.17-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.17/snakeyaml-1.17-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<component name="libraryTable">
<library name="Maven: stax:stax-api:1.0.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/stax/stax-api/1.0.1/stax-api-1.0.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/stax/stax-api/1.0.1/stax-api-1.0.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/stax/stax-api/1.0.1/stax-api-1.0.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/finance_serv.iml" filepath="$PROJECT_DIR$/finance_serv.iml" />
</modules>
</component>
</project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SmartFoxProjectConfig">
<option name="projectInspectionClosed" value="true" />
</component>
</project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>finance_serv</name>
<comment>Financial System project for Spring Boot. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
\ No newline at end of file \ No newline at end of file
eclipse.preferences.version=1
encoding//src/main/java/com/vion/financial/vo/ContractVo.java=UTF-8
encoding//src/main/java/com/vion/financial/vo/SelectVo.java=UTF-8
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vion</groupId>
<artifactId>finance_serv</artifactId>
<version>SNAPSHOT</version>
<packaging>war</packaging>
<name>FinancialSystem</name>
<description>Financial System project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId>
<optional>true</optional> </dependency> -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId>
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.18</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.3-1102-jdbc41</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<!-- 是否替换资源中的属性 -->
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>*/*.yml</exclude>
</excludes>
<!-- 是否替换资源中的属性 -->
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.AppendixMapper">
<select id="queryAppendixList" resultType="com.vion.financial.entity.Appendix" parameterType="com.vion.financial.entity.Appendix">
select * from tb_appendix where
<if test="business_table !=null and business_table !=''">
business_table = #{business_table}
</if>
<if test="business_unid !=null and business_unid !=''">
and business_unid = #{business_unid}
</if>
<!-- and
<if test="appendix_name !=null and appendix_name !=''">
appendix_name = #{appendix_name}
</if>
and
<if test="appendix_type !=null and appendix_type !=''">
appendix_type = #{appendix_type}
</if>
and
<if test="appendix_url !=null and appendix_url !=''">
appendix_url = #{appendix_url}
</if> -->
</select>
<insert id="addAppendix" parameterType="com.vion.financial.entity.Appendix" keyColumn="appendix_unid" keyProperty="appendix_unid" useGeneratedKeys="true" >
insert into tb_appendix (
business_table
<if test="business_unid !=null and business_unid !=''">
,business_unid
</if>
<if test="appendix_name !=null and appendix_name !=''">
,appendix_name
</if>
<if test="appendix_type !=null and appendix_type !=''">
,appendix_type
</if>
<if test="appendix_url !=null and appendix_url !=''">
,appendix_url
</if>
) values (
#{business_table}
<if test="business_unid !=null and business_unid !=''">
,#{business_unid}
</if>
<if test="appendix_name !=null and appendix_name !=''">
,#{appendix_name}
</if>
<if test="appendix_type !=null and appendix_type !=''">
,#{appendix_type}
</if>
<if test="appendix_url !=null and appendix_url !=''">
,#{appendix_url}
</if>
)
</insert>
<update id="updateAppendix" parameterType="com.vion.financial.entity.Appendix" keyColumn="appendix_unid" keyProperty="appendix_unid" useGeneratedKeys="true">
update tb_appendix set
<if test="appendix_unid != null and appendix_unid != ''">
appendix_unid=#{appendix_unid}
</if>
<if test="business_table != null and business_table != ''">
,business_table=#{business_table}
</if>
<if test="business_unid !=null and business_unid != ''">
, business_unid=#{business_unid}
</if>
<if test="appendix_name != null and appendix_name != ''">
,appendix_name=#{appendix_name}
</if>
<if test="appendix_type != null and appendix_type != ''">
,appendix_type=#{appendix_type}
</if>
<if test="appendix_url != null and appendix_url != ''">
,appendix_url=#{appendix_url}
</if>
where appendix_unid = #{appendix_unid}
</update>
<delete id="deleteAppendix" parameterType="com.vion.financial.entity.Appendix">
delete from tb_appendix where 1=1
<if test="business_table">
and business_table = #{business_table}
</if>
<if test="business_unid">
and business_unid = #{business_unid}
</if>
<if test="appendix_unid">
and appendix_unid=#{appendix_unid}
</if>
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ContractMapper">
<insert id="addOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
INSERT INTO tb_contract(
contract_unid
<if test="salesperson_unid != null and salesperson_unid != ''">
,salesperson_unid
</if>
<if test="province != null and province != ''">
,province,province_name
</if>
<if test="city !=null and city != ''">
,city,city_name
</if>
<if test="county != null and county != ''">
,county,county_name
</if>
<if test="guarantee_period != null">
,guarantee_period
</if>
<if test="sign_date != null">
,sign_date
</if>
<if test="product_line_type != null and product_line_type != ''">
,product_line_type
</if>
<if test="contract_state != null and contract_state != ''">
,contract_state
</if>
<if test="contract_type != null and contract_type != ''">
,contract_type
</if>
<if test="contract_amount != null ">
,contract_amount
</if>
<if test="deduct_amount != null ">
,deduct_amount
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,contract_amount_note
</if>
<if test="stop_amount != null ">
,stop_amount
</if>
<if test="reback_note != null and reback_note != ''">
,reback_note
</if>
<if test="exemptions_amount != null ">
,exemptions_amount
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,contract_remain_note
</if>
<if test="is_archive != null and is_archive != ''">
,is_archive
</if>
<if test="bad_amount != null ">
,bad_amount
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,bad_amount_note
</if>
<if test="confirm_income_amount != null ">
,confirm_income_amount
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,amount_state_unid
</if>
<if test="start_guarantee_date != null ">
,start_guarantee_date
</if>
<if test="end_guarantee_date != null ">
,end_guarantee_date
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,mainten_start_point
</if>
<if test="contract_note != null and contract_note != ''">
,contract_note
</if>
,is_delete
<if test="project_unid != null and project_unid != ''">
,project_unid
</if>
<if test="customer_unid != null and customer_unid != ''">
,customer_unid
</if>
<if test="province_name !=null and province_name !=''">
,province_name
</if>
<if test="city_name !=null and city_name !=''">
,city_name
</if>
<if test="county_name !=null and county_name !=''">
,county_name
</if>
<if test="final_user != null ">
,final_user
</if>
<if test="relation_customer != null and relation_customer != ''">
,relation_customer
</if>
<if test="first_industry != null and first_industry != ''">
,first_industry
</if>
<if test="final_user != null and final_user != ''">
,final_user_name
</if>
<if test="relation_customer != null and relation_customer != ''">
,relation_customer_name
</if>
<if test="first_industry_name != null and first_industry_name != ''">
,first_industry_name
</if>
<if test="second_industry != null and second_industry != ''">
,second_industry
</if>
<if test="second_industry_name != null and second_industry_name != ''">
,second_industry_name
</if>
) VALUES(
#{contract_unid}
<if test="salesperson_unid != null and salesperson_unid != ''">
,#{salesperson_unid}
</if>
<if test="province != null and province != ''">
,#{province},#{province_name}
</if>
<if test="city !=null and city != ''">
, #{city},#{city_name}
</if>
<if test="county != null and county != ''">
,#{county},#{county_name}
</if>
<if test="guarantee_period != null ">
,#{guarantee_period}
</if>
<if test="sign_date != null ">
,#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="product_line_type != null and product_line_type != ''">
,#{product_line_type}
</if>
<if test="contract_state != null and contract_state != ''">
,#{contract_state}
</if>
<if test="contract_type != null and contract_type != ''">
,#{contract_type}
</if>
<if test="contract_amount != null ">
,#{contract_amount}
</if>
<if test="deduct_amount != null ">
,#{deduct_amount}
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,#{contract_amount_note}
</if>
<if test="stop_amount != null ">
,#{stop_amount}
</if>
<if test="reback_note != null and reback_note != ''">
,#{reback_note}
</if>
<if test="exemptions_amount != null ">
,#{exemptions_amount}
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,#{contract_remain_note}
</if>
<if test="is_archive != null and is_archive != ''">
,#{is_archive}
</if>
<if test="bad_amount != null ">
,#{bad_amount}
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,#{bad_amount_note}
</if>
<if test="confirm_income_amount != null ">
,#{confirm_income_amount}
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,#{amount_state_unid}
</if>
<if test="start_guarantee_date != null ">
,#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="end_guarantee_date != null ">
,#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,#{mainten_start_point}
</if>
<if test="contract_note != null and contract_note != ''">
,#{contract_note}
</if>
,false
<if test="project_unid != null and project_unid != ''">
,#{project_unid}
</if>
<if test="customer_unid != null and customer_unid != ''">
,#{customer_unid}
</if>
<if test="province_name !=null and province_name !=''">
,#{province_name}
</if>
<if test="city_name !=null and city_name !=''">
,#{city_name}
</if>
<if test="county_name !=null and county_name !=''">
,#{county_name}
</if>
<if test="final_user != null ">
,#{final_user}
</if>
<if test="relation_customer != null and relation_customer != ''">
,#{relation_customer}
</if>
<if test="first_industry != null and first_industry != ''">
,#{first_industry}
</if>
<if test="final_user != null and final_user != ''">
,#{final_user_name}
</if>
<if test="relation_customer != null and relation_customer != ''">
,#{relation_customer_name}
</if>
<if test="first_industry_name != null and first_industry_name != ''">
,#{first_industry_name}
</if>
<if test="second_industry != null and second_industry != ''">
,#{second_industry}
</if>
<if test="second_industry_name != null and second_industry_name != ''">
,#{second_industry_name}
</if>
)
</insert>
<select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String">
select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, final_user,relation_customer,first_industry, final_user_name,relation_customer_name,first_industry_name,second_industry,second_industry_name,
customer_unid,
(cast(contract_amount as decimal(18,2))-(select cast(case when total_reback_view.sum is null then 0 else total_reback_view.sum end as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where contract_unid = #{contract_unid}
</select>
<update id="updateOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
update tb_contract
<set>
<if test="salesperson_unid != null and salesperson_unid != ''">
salesperson_unid=#{salesperson_unid},
</if>
<if test="province != null and province != ''">
province=#{province},
province_name=#{province_name},
</if>
<if test="city !=null and city != ''">
city=#{city},
city_name=#{city_name},
</if>
<if test="county != null and county != ''">
county=#{county},
county_name=#{county_name},
</if>
<if test="guarantee_period != null ">
guarantee_period=#{guarantee_period},
</if>
<if test="sign_date != null ">
sign_date=#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="product_line_type != null and product_line_type != ''">
product_line_type=#{product_line_type},
</if>
<if test="contract_state != null and contract_state != ''">
contract_state=#{contract_state},
</if>
<if test="contract_type != null and contract_type != ''">
contract_type=#{contract_type},
</if>
<if test="contract_amount !=null">
contract_amount=#{contract_amount},
</if>
<if test="deduct_amount !=null">
deduct_amount=#{deduct_amount},
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
contract_amount_note=#{contract_amount_note},
</if>
<if test="stop_amount !=null">
stop_amount=#{stop_amount},
</if>
<if test="reback_note != null and reback_note != ''">
reback_note=#{reback_note},
</if>
<if test="exemptions_amount !=null">
exemptions_amount=#{exemptions_amount},
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
contract_remain_note=#{contract_remain_note},
</if>
<if test="is_archive != null and is_archive != ''">
is_archive=#{is_archive},
</if>
<if test="bad_amount !=null">
bad_amount=#{bad_amount},
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
bad_amount_note=#{bad_amount_note},
</if>
confirm_income_amount=#{confirm_income_amount},
<if test="amount_state_unid != null and amount_state_unid != ''">
amount_state_unid=#{amount_state_unid},
</if>
<if test="start_guarantee_date != null ">
start_guarantee_date=#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="end_guarantee_date != null ">
end_guarantee_date=#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
mainten_start_point=#{mainten_start_point},
</if>
<if test="contract_note != null and contract_note != ''">
contract_note=#{contract_note},
</if>
<if test="is_delete != null and is_delete != ''">
is_delete=#{is_delete},
</if>
<if test="project_unid != null and project_unid != ''">
project_unid=#{project_unid},
</if>
<if test="customer_unid != null and customer_unid != ''">
customer_unid=#{customer_unid},
</if>
<if test="final_user != null ">
final_user=#{final_user},
</if>
<if test="relation_customer != null and relation_customer !=''">
relation_customer=#{relation_customer},
</if>
<if test="first_industry != null and first_industry !=''">
first_industry=#{first_industry},
</if>
<if test="second_industry != null and second_industry !=''">
second_industry=#{second_industry},
</if>
<if test="final_user_name != null and final_user_name !=''">
final_user_name=#{final_user_name},
</if>
<if test="relation_customer_name != null and relation_customer_name !=''">
relation_customer_name=#{relation_customer_name},
</if>
<if test="first_industry_name != null and first_industry_name !=''">
first_industry_name=#{first_industry_name},
</if>
<if test="second_industry_name != null and second_industry_name !=''">
second_industry_name=#{second_industry_name}
</if>
</set>
where contract_unid=#{contract_unid}
</update>
<delete id="deleteOne" parameterType="java.lang.String">
<!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} -->
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int">
select count(1) as count from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null ">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="first_industry !=null and first_industry !=''">
and
first_industry=#{first_industry}
</if>
<if test="second_industry !=null and second_industry !=''">
and
second_industry=#{second_industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="first_industry_name !=null and first_industry_name !=''">
and
first_industry_name=#{first_industry_name}
</if>
<if test="second_industry_name !=null and second_industry_name !=''">
and
second_industry_name=#{second_industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null and end_date !=null">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
</select>
<select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo">
select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid,
customer_unid,
(cast(CASE WHEN contract_amount IS NULL THEN 0 ELSE contract_amount END as decimal(18,2))-(select cast(CASE WHEN total_reback_view.sum IS NULL THEN 0 ELSE total_reback_view.sum END as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null ">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="first_industry !=null and first_industry !=''">
and
first_industry=#{first_industry}
</if>
<if test="second_industry !=null and second_industry !=''">
and
second_industry=#{second_industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="first_industry_name !=null and first_industry_name !=''">
and
first_industry_name=#{first_industry_name}
</if>
<if test="second_industry_name !=null and second_industry_name !=''">
and
second_industry_name=#{second_industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null and end_date !=null">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
<if test="limit !=null ">
limit #{limit}
</if>
<if test="offset !=null">
offset #{offset}
</if>
</select>
<select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel">
select
<if test="columns == null">
*
</if>
<if test="columns !=null">
contract_unid,
<foreach collection="columns" index="index" item="column" separator=",">
${column}
</foreach>
</if>
from (select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,final_user_name,relation_customer_name,first_industry_name,second_industry_name,
guarantee_period,to_char(sign_date, 'yyyy-MM-dd') as sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount,
amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid,
customer_unid,
<!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, -->
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_proportition,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_requirement,
(select cast(sum(receipt_amount) as decimal(18,2)) from tb_receipt where tb_receipt.contract_unid = tb_contract.contract_unid) as total_receipt_amount ,
to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month,
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
to_char((select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as advance_pay_date,
to_char((select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as arrive_pay_date,
to_char((select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as acceptanc_pay_date,
to_char((select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as mainten_pay_date,
<!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, -->
to_char((select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as deliver_date,
to_char((SELECT tb_deliver_goods.goods_acceptanc_date FROM tb_deliver_goods WHERE tb_deliver_goods.deliver_unid = ( SELECT MAX ( tb_deliver_goods.deliver_unid ) FROM tb_deliver_goods WHERE tb_deliver_goods.contract_unid = tb_contract.contract_unid ) ), 'yyyy-MM-dd') as goods_acceptanc_date,
to_char((select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as acceptanc_date
from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null ">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="first_industry !=null and first_industry !=''">
and
first_industry=#{first_industry}
</if>
<if test="second_industry !=null and second_industry !=''">
and
second_industry=#{second_industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="first_industry_name !=null and first_industry_name !=''">
and
first_industry_name=#{first_industry_name}
</if>
<if test="second_industry_name !=null and second_industry_name !=''">
and
second_industry_name=#{second_industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null ">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date
</if>
<if test="end_date!=null">
and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<!-- <if test="overdays_start_point !=null ">
and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_end_point !=null ">
and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> -->
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
) contract
order by (contract_unid,amount_state_unid) desc
</select>
<select id="isDelete" parameterType="String" resultType="Boolean">
select is_delete from tb_contract where contract_unid = #{contract_unid}
</select>
<select id="queryList" resultType="String">
select contract_unid from tb_contract where
is_delete=false
<!-- and project_unid is null
and customer_unid is null -->
</select>
<select id="countNumber" resultType="int">
select count(contract_unid) from tb_contract where is_delete=false
</select>
<delete id="actualDeleteOne" parameterType="String">
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select id="timeUpdate" resultType="java.lang.String">
select timing_update_amount_state()
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.CustomerMapper">
<insert id="addCustomer" parameterType="com.vion.financial.entity.Customer">
insert into tb_customer (customer_name) values (#{customer_name})
</insert>
<update id="updateCustomer" parameterType="com.vion.financial.entity.Customer">
update tb_customer set customer_name = #{customer_name}
where customer_unid = #{customer_unid}
</update>
<select id="queryCustomer" resultType="com.vion.financial.entity.Customer" >
select * from tb_customer
</select>
<delete id="deleteCustomer" parameterType="int">
delete from tb_customer where customer_unid = #{customer_unid}
</delete>
<select id="selectByName" parameterType="String" resultType="com.vion.financial.entity.Customer">
select * from tb_customer where customer_name = #{customer_name}
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.DeliverGoodsMapper">
<insert id="addDeliverGoods" parameterType="com.vion.financial.entity.DeliverGoods" keyColumn="deliver_unid" keyProperty="deliver_unid" useGeneratedKeys="true">
insert into tb_deliver_goods (contract_unid,deliver_goods_date,goods_acceptanc_date)
values(#{contract_unid},#{deliver_goods_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},#{goods_acceptanc_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler})
</insert>
<update id="updateDeliverGoods" parameterType="com.vion.financial.entity.DeliverGoods" keyColumn="deliver_unid" keyProperty="deliver_unid" useGeneratedKeys="true">
update tb_deliver_goods set
<if test="deliver_goods_date !=null">
deliver_goods_date = #{deliver_goods_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
goods_acceptanc_date = #{goods_acceptanc_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
where deliver_unid = #{deliver_unid}
</update>
<select id="queryDeliverGoods" parameterType="String" resultType="com.vion.financial.entity.DeliverGoods">
select *from tb_deliver_goods where contract_unid = #{contract_unid}
</select>
<delete id="deleteDeliverGoods" parameterType="int">
delete from tb_deliver_goods where deliver_unid = #{deliver_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.PaymentAgreeMapper">
<insert id="addPaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
insert into tb_payment_agree (
contract_unid,
<if test="payment_type !=null and payment_type !=''">
payment_type,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress,
</if>
<if test="days !=null ">
days,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority,
</if>
payment_requirement
)
values(
#{contract_unid},
<if test="payment_type !=null and payment_type !=''">
#{payment_type},
</if>
<if test="payment_progress !=null and payment_progress !=''">
#{payment_progress},
</if>
<if test="days !=null">
#{days},
</if>
<if test="payment_propority !=null and payment_propority !=''">
#{payment_propority},
</if>
#{payment_requirement}
)
</insert>
<update id="updatePaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
update tb_payment_agree set
contract_unid=#{contract_unid},
<if test="payment_type != null and payment_type !=''">
payment_type = #{payment_type} ,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress = #{payment_progress} ,
</if>
<if test="days !=null">
days = #{days} ,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority = #{payment_propority} ,
</if>
payment_requirement = #{payment_requirement}
where payment_unid = #{payment_unid}
</update>
<select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree">
select
payment_unid,
contract_unid,
payment_type,
payment_progress,
days,
cast(payment_propority as decimal(18,2)),
payment_requirement
from tb_payment_agree
where contract_unid = #{contract_unid} order by payment_progress asc
</select>
<delete id="deletePaymentAgree" parameterType="int">
delete from tb_payment_agree where payment_unid = #{payment_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ProjectAcceptancMapper">
<insert id="addProjectAcceptanc" parameterType="com.vion.financial.entity.ProjectAcceptanc" keyColumn="acceptanc_unid" useGeneratedKeys="true" keyProperty="acceptanc_unid">
insert into tb_project_acceptanc (contract_unid,acceptanc_type,acceptanc_date,acceptanc_note)
values(#{contract_unid},#{acceptanc_type},#{acceptanc_date},#{acceptanc_note})
</insert>
<update id="updateProjectAcceptanc" parameterType="com.vion.financial.entity.ProjectAcceptanc" keyColumn="acceptanc_unid" useGeneratedKeys="true" keyProperty="acceptanc_unid">
update tb_project_acceptanc set contract_unid = #{contract_unid},acceptanc_type = #{acceptanc_type},acceptanc_date = #{acceptanc_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},acceptanc_note = #{acceptanc_note}
where acceptanc_unid = #{acceptanc_unid}
</update>
<select id="queryProjectAcceptanc" parameterType="String" resultType="com.vion.financial.entity.ProjectAcceptanc">
select *from tb_project_acceptanc where contract_unid = #{contract_unid}
</select>
<delete id="deleteProjectAcceptanc" parameterType="int">
delete from tb_project_acceptanc where acceptanc_unid = #{acceptanc_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ProjectMapper">
<insert id="addProject" parameterType="com.vion.financial.entity.Project">
insert into tb_project (project_name) values (#{project_name})
</insert>
<update id="updateProject" parameterType="com.vion.financial.entity.Project">
update tb_project set project_name = #{project_name}
where project_unid = #{project_unid}
</update>
<select id="queryProject" resultType="com.vion.financial.entity.Project">
select * from tb_project
</select>
<delete id="deleteProject" parameterType="int">
delete from tb_project where project_unid = #{project_unid}
</delete>
<select id="selectByName" parameterType="String" resultType="com.vion.financial.entity.Project">
select * from tb_project where project_name=#{project_name}
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ReceiptMapper">
<insert id="addReceipt" parameterType="com.vion.financial.entity.Receipt">
insert into tb_receipt (contract_unid,receipt_progress,receipt_amount,oa_flow_id,
<if test="receipt_note !=null and receipt_note !=''">
receipt_note,
</if>
create_date)
values( #{contract_unid},
<choose>
<when test="receipt_progress == null">
(select case when max(receipt_progress) is null then 1 else max(receipt_progress)+1 end as receipt_progress from tb_receipt where tb_receipt.contract_unid=#{contract_unid})
</when>
<otherwise>
#{receipt_progress}
</otherwise>
</choose>
,#{receipt_amount},#{oa_flow_id},
<if test="receipt_note !=null and receipt_note !=''">
#{receipt_note},
</if>
now())
</insert>
<update id="updateReceipt" parameterType="com.vion.financial.entity.Receipt">
update tb_receipt set
<if test="receipt_progress !=null">
receipt_progress = #{receipt_progress},
</if>
<if test="receipt_amount !=null">
receipt_amount = #{receipt_amount},
</if>
<if test="oa_flow_id !=null and oa_flow_id !=''">
oa_flow_id = #{oa_flow_id},
</if>
receipt_note = #{receipt_note}
<!-- <if test="create_date !=null ">
create_date = now()
</if> -->
where receipt_unid = #{receipt_unid}
</update>
<select id="queryReceipt" parameterType="String" resultType="com.vion.financial.entity.Receipt">
select receipt_unid, contract_unid,
receipt_progress,cast(receipt_amount as decimal(18,2)),
oa_flow_id,receipt_note,create_date from tb_receipt
where contract_unid = #{contract_unid}
order by receipt_progress asc
</select>
<delete id="deleteReceipt" parameterType="int">
delete from tb_receipt where receipt_unid = #{receipt_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ReturnInfoMapper">
<insert id="addReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
insert into tb_return_info (
contract_unid,
reback_progress,
<if test="reback_date !=null">
reback_date,
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
actual_reback_amount,
</if>
reback_note
)
values (
#{contract_unid},
<if test="reback_progress !=null">
#{reback_progress},
</if>
<if test="reback_progress ==null">
(select case when max(reback_progress) is null then 1 else max(reback_progress)+1 end as reback_progress from tb_return_info where tb_return_info.contract_unid=#{contract_unid}),
</if>
<if test="reback_date !=null">
#{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
#{actual_reback_amount},
</if>
#{reback_note}
)
</insert>
<update id="updateReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
update tb_return_info
<set>
<if test="reback_progress !=null and reback_progress !=''">
reback_progress = #{reback_progress},
</if>
<if test="reback_date !=null">
reback_date = #{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
actual_reback_amount = #{actual_reback_amount},
</if>
<if test="reback_note !=null and reback_note !=''">
reback_note = #{reback_note}
</if>
</set>
where reback_unid = #{reback_unid}
</update>
<select id="queryReturnInfo" parameterType="String" resultType="com.vion.financial.entity.ReturnInfo">
select reback_unid, contract_unid ,
reback_progress ,reback_date,
cast(actual_reback_amount as decimal(18,2)),
reback_note from tb_return_info where contract_unid = #{contract_unid}
order by reback_progress asc
</select>
<delete id="deleteReturnInfo" parameterType="int">
delete from tb_return_info where reback_unid = #{reback_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
server:
port: 8080
spring:
thymeleaf:
prefix: classpath:/templates/thymeleaf/
suffix: .html
mode: HTML5
encoding: UTF-8
cache: false
datasource:
url: jdbc:postgresql://192.168.9.162:5432/financial_serv
username: postgres
password: authpass
driver-class-name: org.postgresql.Driver
###################以下为druid增加的配置###########################
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
initialSize: 5
minIdle: 5
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# hikari:
# maximum-pool-size:
http:
multipart:
max-file-size: 20Mb
max-request-size: 40Mb
mybatis:
mapper-locations: com/vion/financial/mapping/*.xml
logging:
level:
root: INFO
pattern:
level: INFO
console: "[financial_serv]-[%d{yyyy-MM-dd HH:mm:ss.SSS}]-%m%n"
path: F:\LOG\
finance:
authurl: http://192.168.9.162:20080/api/v1/auth/users
appendsavepath: /data/face-web/www/static/pics/cache/finance
appendurl: http://192.168.9.162:20080/static/pics/cache/finance/
amount_state: 正常验收款:50001;正常维保:50002;正常预付款:50003;正常到货款:50004;正常质保款:50005;逾期预付款:50006;逾期到货款:50007;逾期验收款:50008;逾期质保款:50009;暂停:50010;质量问题:50011;
# provinceurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces
# cityurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities
# countyurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities/%s/counties
#pagehelper:
# helperDialect: postgresql
# reasonable: true
# supportMethodsArguments: true
# params: count=countSql
server:
port: 8080
spring:
thymeleaf:
prefix: classpath:/templates/thymeleaf/
suffix: .html
mode: HTML5
encoding: UTF-8
cache: false
datasource:
url: jdbc:postgresql://192.168.9.162:5432/financial_serv
username: postgres
password: authpass
driver-class-name: org.postgresql.Driver
###################以下为druid增加的配置###########################
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
initialSize: 5
minIdle: 5
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# hikari:
# maximum-pool-size:
http:
multipart:
max-file-size: 20Mb
max-request-size: 40Mb
mybatis:
mapper-locations: com/vion/financial/mapping/*.xml
logging:
level:
root: INFO
pattern:
level: INFO
console: "[financial_serv]-[%d{yyyy-MM-dd HH:mm:ss.SSS}]-%m%n"
path: F:\LOG\
finance:
authurl: http://192.168.9.162:20080/api/v1/auth/users
appendsavepath: /data/face-web/www/static/pics/cache/finance
appendurl: http://192.168.9.162:20080/static/pics/cache/finance/
amount_state: 正常验收款:50001;正常维保:50002;正常预付款:50003;正常到货款:50004;正常质保款:50005;逾期预付款:50006;逾期到货款:50007;逾期验收款:50008;逾期质保款:50009;暂停:50010;质量问题:50011;
# provinceurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces
# cityurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities
# countyurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities/%s/counties
#pagehelper:
# helperDialect: postgresql
# reasonable: true
# supportMethodsArguments: true
# params: count=countSql
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.AppendixMapper">
<select id="queryAppendixList" resultType="com.vion.financial.entity.Appendix" parameterType="com.vion.financial.entity.Appendix">
select * from tb_appendix where
<if test="business_table !=null and business_table !=''">
business_table = #{business_table}
</if>
<if test="business_unid !=null and business_unid !=''">
and business_unid = #{business_unid}
</if>
<!-- and
<if test="appendix_name !=null and appendix_name !=''">
appendix_name = #{appendix_name}
</if>
and
<if test="appendix_type !=null and appendix_type !=''">
appendix_type = #{appendix_type}
</if>
and
<if test="appendix_url !=null and appendix_url !=''">
appendix_url = #{appendix_url}
</if> -->
</select>
<insert id="addAppendix" parameterType="com.vion.financial.entity.Appendix" keyColumn="appendix_unid" keyProperty="appendix_unid" useGeneratedKeys="true" >
insert into tb_appendix (
business_table
<if test="business_unid !=null and business_unid !=''">
,business_unid
</if>
<if test="appendix_name !=null and appendix_name !=''">
,appendix_name
</if>
<if test="appendix_type !=null and appendix_type !=''">
,appendix_type
</if>
<if test="appendix_url !=null and appendix_url !=''">
,appendix_url
</if>
) values (
#{business_table}
<if test="business_unid !=null and business_unid !=''">
,#{business_unid}
</if>
<if test="appendix_name !=null and appendix_name !=''">
,#{appendix_name}
</if>
<if test="appendix_type !=null and appendix_type !=''">
,#{appendix_type}
</if>
<if test="appendix_url !=null and appendix_url !=''">
,#{appendix_url}
</if>
)
</insert>
<update id="updateAppendix" parameterType="com.vion.financial.entity.Appendix" keyColumn="appendix_unid" keyProperty="appendix_unid" useGeneratedKeys="true">
update tb_appendix set
<if test="appendix_unid != null and appendix_unid != ''">
appendix_unid=#{appendix_unid}
</if>
<if test="business_table != null and business_table != ''">
,business_table=#{business_table}
</if>
<if test="business_unid !=null and business_unid != ''">
, business_unid=#{business_unid}
</if>
<if test="appendix_name != null and appendix_name != ''">
,appendix_name=#{appendix_name}
</if>
<if test="appendix_type != null and appendix_type != ''">
,appendix_type=#{appendix_type}
</if>
<if test="appendix_url != null and appendix_url != ''">
,appendix_url=#{appendix_url}
</if>
where appendix_unid = #{appendix_unid}
</update>
<delete id="deleteAppendix" parameterType="com.vion.financial.entity.Appendix">
delete from tb_appendix where 1=1
<if test="business_table">
and business_table = #{business_table}
</if>
<if test="business_unid">
and business_unid = #{business_unid}
</if>
<if test="appendix_unid">
and appendix_unid=#{appendix_unid}
</if>
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ContractMapper">
<insert id="addOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
INSERT INTO tb_contract(
contract_unid
<if test="salesperson_unid != null and salesperson_unid != ''">
,salesperson_unid
</if>
<if test="province != null and province != ''">
,province,province_name
</if>
<if test="city !=null and city != ''">
,city,city_name
</if>
<if test="county != null and county != ''">
,county,county_name
</if>
<if test="guarantee_period != null">
,guarantee_period
</if>
<if test="sign_date != null">
,sign_date
</if>
<if test="product_line_type != null and product_line_type != ''">
,product_line_type
</if>
<if test="contract_state != null and contract_state != ''">
,contract_state
</if>
<if test="contract_type != null and contract_type != ''">
,contract_type
</if>
<if test="contract_amount != null ">
,contract_amount
</if>
<if test="deduct_amount != null ">
,deduct_amount
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,contract_amount_note
</if>
<if test="stop_amount != null ">
,stop_amount
</if>
<if test="reback_note != null and reback_note != ''">
,reback_note
</if>
<if test="exemptions_amount != null ">
,exemptions_amount
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,contract_remain_note
</if>
<if test="is_archive != null and is_archive != ''">
,is_archive
</if>
<if test="bad_amount != null ">
,bad_amount
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,bad_amount_note
</if>
<if test="confirm_income_amount != null ">
,confirm_income_amount
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,amount_state_unid
</if>
<if test="start_guarantee_date != null ">
,start_guarantee_date
</if>
<if test="end_guarantee_date != null ">
,end_guarantee_date
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,mainten_start_point
</if>
<if test="contract_note != null and contract_note != ''">
,contract_note
</if>
,is_delete
<if test="project_unid != null and project_unid != ''">
,project_unid
</if>
<if test="customer_unid != null and customer_unid != ''">
,customer_unid
</if>
<if test="province_name !=null and province_name !=''">
,province_name
</if>
<if test="city_name !=null and city_name !=''">
,city_name
</if>
<if test="county_name !=null and county_name !=''">
,county_name
</if>
<if test="final_user != null and final_user != ''">
,final_user
</if>
<if test="relation_customer != null and relation_customer != ''">
,relation_customer
</if>
<if test="industry != null and industry != ''">
,industry
</if>
<if test="final_user != null and final_user != ''">
,final_user_name
</if>
<if test="relation_customer != null and relation_customer != ''">
,relation_customer_name
</if>
<if test="industry != null and industry != ''">
,industry_name
</if>
) VALUES(
#{contract_unid}
<if test="salesperson_unid != null and salesperson_unid != ''">
,#{salesperson_unid}
</if>
<if test="province != null and province != ''">
,#{province},#{province_name}
</if>
<if test="city !=null and city != ''">
, #{city},#{city_name}
</if>
<if test="county != null and county != ''">
,#{county},#{county_name}
</if>
<if test="guarantee_period != null ">
,#{guarantee_period}
</if>
<if test="sign_date != null ">
,#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="product_line_type != null and product_line_type != ''">
,#{product_line_type}
</if>
<if test="contract_state != null and contract_state != ''">
,#{contract_state}
</if>
<if test="contract_type != null and contract_type != ''">
,#{contract_type}
</if>
<if test="contract_amount != null ">
,#{contract_amount}
</if>
<if test="deduct_amount != null ">
,#{deduct_amount}
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,#{contract_amount_note}
</if>
<if test="stop_amount != null ">
,#{stop_amount}
</if>
<if test="reback_note != null and reback_note != ''">
,#{reback_note}
</if>
<if test="exemptions_amount != null ">
,#{exemptions_amount}
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,#{contract_remain_note}
</if>
<if test="is_archive != null and is_archive != ''">
,#{is_archive}
</if>
<if test="bad_amount != null ">
,#{bad_amount}
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,#{bad_amount_note}
</if>
<if test="confirm_income_amount != null ">
,#{confirm_income_amount}
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,#{amount_state_unid}
</if>
<if test="start_guarantee_date != null ">
,#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="end_guarantee_date != null ">
,#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,#{mainten_start_point}
</if>
<if test="contract_note != null and contract_note != ''">
,#{contract_note}
</if>
,false
<if test="project_unid != null and project_unid != ''">
,#{project_unid}
</if>
<if test="customer_unid != null and customer_unid != ''">
,#{customer_unid}
</if>
<if test="province_name !=null and province_name !=''">
,#{province_name}
</if>
<if test="city_name !=null and city_name !=''">
,#{city_name}
</if>
<if test="county_name !=null and county_name !=''">
,#{county_name}
</if>
<if test="final_user != null and final_user != ''">
,#{final_user}
</if>
<if test="relation_customer != null and relation_customer != ''">
,#{relation_customer}
</if>
<if test="industry != null and industry != ''">
,#{industry}
</if>
<if test="final_user != null and final_user != ''">
,#{final_user_name}
</if>
<if test="relation_customer != null and relation_customer != ''">
,#{relation_customer_name}
</if>
<if test="industry != null and industry != ''">
,#{industry_name}
</if>
)
</insert>
<select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String">
select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, final_user,relation_customer,industry, final_user_name,relation_customer_name,industry_name,
customer_unid,
(cast(contract_amount as decimal(18,2))-(select cast(case when total_reback_view.sum is null then 0 else total_reback_view.sum end as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where contract_unid = #{contract_unid}
</select>
<update id="updateOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
update tb_contract
<set>
<if test="salesperson_unid != null and salesperson_unid != ''">
salesperson_unid=#{salesperson_unid},
</if>
<if test="province != null and province != ''">
province=#{province},
province_name=#{province_name},
</if>
<if test="city !=null and city != ''">
city=#{city},
city_name=#{city_name},
</if>
<if test="county != null and county != ''">
county=#{county},
county_name=#{county_name},
</if>
<if test="guarantee_period != null ">
guarantee_period=#{guarantee_period},
</if>
<if test="sign_date != null ">
sign_date=#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="product_line_type != null and product_line_type != ''">
product_line_type=#{product_line_type},
</if>
<if test="contract_state != null and contract_state != ''">
contract_state=#{contract_state},
</if>
<if test="contract_type != null and contract_type != ''">
contract_type=#{contract_type},
</if>
<if test="contract_amount !=null">
contract_amount=#{contract_amount},
</if>
<if test="deduct_amount !=null">
deduct_amount=#{deduct_amount},
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
contract_amount_note=#{contract_amount_note},
</if>
<if test="stop_amount !=null">
stop_amount=#{stop_amount},
</if>
<if test="reback_note != null and reback_note != ''">
reback_note=#{reback_note},
</if>
<if test="exemptions_amount !=null">
exemptions_amount=#{exemptions_amount},
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
contract_remain_note=#{contract_remain_note},
</if>
<if test="is_archive != null and is_archive != ''">
is_archive=#{is_archive},
</if>
<if test="bad_amount !=null">
bad_amount=#{bad_amount},
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
bad_amount_note=#{bad_amount_note},
</if>
confirm_income_amount=#{confirm_income_amount},
<if test="amount_state_unid != null and amount_state_unid != ''">
amount_state_unid=#{amount_state_unid},
</if>
<if test="start_guarantee_date != null ">
start_guarantee_date=#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="end_guarantee_date != null ">
end_guarantee_date=#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
mainten_start_point=#{mainten_start_point},
</if>
<if test="contract_note != null and contract_note != ''">
contract_note=#{contract_note},
</if>
<if test="is_delete != null and is_delete != ''">
is_delete=#{is_delete},
</if>
<if test="project_unid != null and project_unid != ''">
project_unid=#{project_unid},
</if>
<if test="customer_unid != null and customer_unid != ''">
customer_unid=#{customer_unid},
</if>
<if test="final_user != null and final_user !=''">
final_user=#{final_user},
</if>
<if test="relation_customer != null and relation_customer !=''">
relation_customer=#{relation_customer},
</if>
<if test="industry != null and industry !=''">
industry=#{industry},
</if>
<if test="final_user_name != null and final_user_name !=''">
final_user_name=#{final_user_name},
</if>
<if test="relation_customer_name != null and relation_customer_name !=''">
relation_customer_name=#{relation_customer_name},
</if>
<if test="industry_name != null and industry_name !=''">
industry_name=#{industry_name}
</if>
</set>
where contract_unid=#{contract_unid}
</update>
<delete id="deleteOne" parameterType="java.lang.String">
<!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} -->
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int">
select count(1) as count from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null and final_user !=''">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="industry !=null and industry !=''">
and
industry=#{industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="industry_name !=null and industry_name !=''">
and
industry_name=#{industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null and end_date !=null">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
</select>
<select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo">
select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid,
customer_unid,
(cast(CASE WHEN contract_amount IS NULL THEN 0 ELSE contract_amount END as decimal(18,2))-(select cast(CASE WHEN total_reback_view.sum IS NULL THEN 0 ELSE total_reback_view.sum END as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null and final_user !=''">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="industry !=null and industry !=''">
and
industry=#{industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="industry_name !=null and industry_name !=''">
and
industry_name=#{industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null and end_date !=null">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
<if test="limit !=null ">
limit #{limit}
</if>
<if test="offset !=null">
offset #{offset}
</if>
</select>
<select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel">
select
<if test="columns == null">
*
</if>
<if test="columns !=null">
contract_unid,
<foreach collection="columns" index="index" item="column" separator=",">
${column}
</foreach>
</if>
from (select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,final_user,relation_customer,industry,final_user_name,relation_customer_name,industry_name,
guarantee_period,to_char(sign_date, 'yyyy-MM-dd') as sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount,
amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid,
customer_unid,
<!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, -->
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_proportition,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_requirement,
(select cast(sum(receipt_amount) as decimal(18,2)) from tb_receipt where tb_receipt.contract_unid = tb_contract.contract_unid) as total_receipt_amount ,
to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month,
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
to_char((select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as advance_pay_date,
to_char((select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as arrive_pay_date,
to_char((select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as acceptanc_pay_date,
to_char((select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as mainten_pay_date,
<!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, -->
to_char((select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as deliver_date,
to_char((SELECT tb_deliver_goods.goods_acceptanc_date FROM tb_deliver_goods WHERE tb_deliver_goods.deliver_unid = ( SELECT MAX ( tb_deliver_goods.deliver_unid ) FROM tb_deliver_goods WHERE tb_deliver_goods.contract_unid = tb_contract.contract_unid ) ), 'yyyy-MM-dd') as goods_acceptanc_date,
to_char((select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as acceptanc_date
from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null and final_user !=''">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="industry !=null and industry !=''">
and
industry=#{industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="industry_name !=null and industry_name !=''">
and
industry_name=#{industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null ">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date
</if>
<if test="end_date!=null">
and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<!-- <if test="overdays_start_point !=null ">
and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_end_point !=null ">
and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> -->
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
) contract
order by (contract_unid,amount_state_unid) desc
</select>
<select id="isDelete" parameterType="String" resultType="Boolean">
select is_delete from tb_contract where contract_unid = #{contract_unid}
</select>
<select id="queryList" resultType="String">
select contract_unid from tb_contract where
is_delete=false
<!-- and project_unid is null
and customer_unid is null -->
</select>
<select id="countNumber" resultType="int">
select count(contract_unid) from tb_contract where is_delete=false
</select>
<delete id="actualDeleteOne" parameterType="String">
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select id="timeUpdate" resultType="java.lang.String">
select timing_update_amount_state()
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.CustomerMapper">
<insert id="addCustomer" parameterType="com.vion.financial.entity.Customer">
insert into tb_customer (customer_name) values (#{customer_name})
</insert>
<update id="updateCustomer" parameterType="com.vion.financial.entity.Customer">
update tb_customer set customer_name = #{customer_name}
where customer_unid = #{customer_unid}
</update>
<select id="queryCustomer" resultType="com.vion.financial.entity.Customer" >
select * from tb_customer
</select>
<delete id="deleteCustomer" parameterType="int">
delete from tb_customer where customer_unid = #{customer_unid}
</delete>
<select id="selectByName" parameterType="String" resultType="com.vion.financial.entity.Customer">
select * from tb_customer where customer_name = #{customer_name}
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.DeliverGoodsMapper">
<insert id="addDeliverGoods" parameterType="com.vion.financial.entity.DeliverGoods" keyColumn="deliver_unid" keyProperty="deliver_unid" useGeneratedKeys="true">
insert into tb_deliver_goods (contract_unid,deliver_goods_date,goods_acceptanc_date)
values(#{contract_unid},#{deliver_goods_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},#{goods_acceptanc_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler})
</insert>
<update id="updateDeliverGoods" parameterType="com.vion.financial.entity.DeliverGoods" keyColumn="deliver_unid" keyProperty="deliver_unid" useGeneratedKeys="true">
update tb_deliver_goods set
<if test="deliver_goods_date !=null">
deliver_goods_date = #{deliver_goods_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
goods_acceptanc_date = #{goods_acceptanc_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
where deliver_unid = #{deliver_unid}
</update>
<select id="queryDeliverGoods" parameterType="String" resultType="com.vion.financial.entity.DeliverGoods">
select *from tb_deliver_goods where contract_unid = #{contract_unid}
</select>
<delete id="deleteDeliverGoods" parameterType="int">
delete from tb_deliver_goods where deliver_unid = #{deliver_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.PaymentAgreeMapper">
<insert id="addPaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
insert into tb_payment_agree (
contract_unid,
<if test="payment_type !=null and payment_type !=''">
payment_type,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress,
</if>
<if test="days !=null ">
days,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority,
</if>
payment_requirement
)
values(
#{contract_unid},
<if test="payment_type !=null and payment_type !=''">
#{payment_type},
</if>
<if test="payment_progress !=null and payment_progress !=''">
#{payment_progress},
</if>
<if test="days !=null">
#{days},
</if>
<if test="payment_propority !=null and payment_propority !=''">
#{payment_propority},
</if>
#{payment_requirement}
)
</insert>
<update id="updatePaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
update tb_payment_agree set
contract_unid=#{contract_unid},
<if test="payment_type != null and payment_type !=''">
payment_type = #{payment_type} ,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress = #{payment_progress} ,
</if>
<if test="days !=null">
days = #{days} ,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority = #{payment_propority} ,
</if>
payment_requirement = #{payment_requirement}
where payment_unid = #{payment_unid}
</update>
<select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree">
select
payment_unid,
contract_unid,
payment_type,
payment_progress,
days,
cast(payment_propority as decimal(18,2)),
payment_requirement
from tb_payment_agree
where contract_unid = #{contract_unid} order by payment_progress asc
</select>
<delete id="deletePaymentAgree" parameterType="int">
delete from tb_payment_agree where payment_unid = #{payment_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ProjectAcceptancMapper">
<insert id="addProjectAcceptanc" parameterType="com.vion.financial.entity.ProjectAcceptanc" keyColumn="acceptanc_unid" useGeneratedKeys="true" keyProperty="acceptanc_unid">
insert into tb_project_acceptanc (contract_unid,acceptanc_type,acceptanc_date,acceptanc_note)
values(#{contract_unid},#{acceptanc_type},#{acceptanc_date},#{acceptanc_note})
</insert>
<update id="updateProjectAcceptanc" parameterType="com.vion.financial.entity.ProjectAcceptanc" keyColumn="acceptanc_unid" useGeneratedKeys="true" keyProperty="acceptanc_unid">
update tb_project_acceptanc set contract_unid = #{contract_unid},acceptanc_type = #{acceptanc_type},acceptanc_date = #{acceptanc_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},acceptanc_note = #{acceptanc_note}
where acceptanc_unid = #{acceptanc_unid}
</update>
<select id="queryProjectAcceptanc" parameterType="String" resultType="com.vion.financial.entity.ProjectAcceptanc">
select *from tb_project_acceptanc where contract_unid = #{contract_unid}
</select>
<delete id="deleteProjectAcceptanc" parameterType="int">
delete from tb_project_acceptanc where acceptanc_unid = #{acceptanc_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ProjectMapper">
<insert id="addProject" parameterType="com.vion.financial.entity.Project">
insert into tb_project (project_name) values (#{project_name})
</insert>
<update id="updateProject" parameterType="com.vion.financial.entity.Project">
update tb_project set project_name = #{project_name}
where project_unid = #{project_unid}
</update>
<select id="queryProject" resultType="com.vion.financial.entity.Project">
select * from tb_project
</select>
<delete id="deleteProject" parameterType="int">
delete from tb_project where project_unid = #{project_unid}
</delete>
<select id="selectByName" parameterType="String" resultType="com.vion.financial.entity.Project">
select * from tb_project where project_name=#{project_name}
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ReceiptMapper">
<insert id="addReceipt" parameterType="com.vion.financial.entity.Receipt">
insert into tb_receipt (contract_unid,receipt_progress,receipt_amount,oa_flow_id,
<if test="receipt_note !=null and receipt_note !=''">
receipt_note,
</if>
create_date)
values( #{contract_unid},
<choose>
<when test="receipt_progress == null">
(select case when max(receipt_progress) is null then 1 else max(receipt_progress)+1 end as receipt_progress from tb_receipt where tb_receipt.contract_unid=#{contract_unid})
</when>
<otherwise>
#{receipt_progress}
</otherwise>
</choose>
,#{receipt_amount},#{oa_flow_id},
<if test="receipt_note !=null and receipt_note !=''">
#{receipt_note},
</if>
now())
</insert>
<update id="updateReceipt" parameterType="com.vion.financial.entity.Receipt">
update tb_receipt set
<if test="receipt_progress !=null">
receipt_progress = #{receipt_progress},
</if>
<if test="receipt_amount !=null">
receipt_amount = #{receipt_amount},
</if>
<if test="oa_flow_id !=null and oa_flow_id !=''">
oa_flow_id = #{oa_flow_id},
</if>
receipt_note = #{receipt_note}
<!-- <if test="create_date !=null ">
create_date = now()
</if> -->
where receipt_unid = #{receipt_unid}
</update>
<select id="queryReceipt" parameterType="String" resultType="com.vion.financial.entity.Receipt">
select receipt_unid, contract_unid,
receipt_progress,cast(receipt_amount as decimal(18,2)),
oa_flow_id,receipt_note,create_date from tb_receipt
where contract_unid = #{contract_unid}
order by receipt_progress asc
</select>
<delete id="deleteReceipt" parameterType="int">
delete from tb_receipt where receipt_unid = #{receipt_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ReturnInfoMapper">
<insert id="addReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
insert into tb_return_info (
contract_unid,
reback_progress,
<if test="reback_date !=null">
reback_date,
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
actual_reback_amount,
</if>
reback_note
)
values (
#{contract_unid},
<if test="reback_progress !=null">
#{reback_progress},
</if>
<if test="reback_progress ==null">
(select case when max(reback_progress) is null then 1 else max(reback_progress)+1 end as reback_progress from tb_return_info where tb_return_info.contract_unid=#{contract_unid}),
</if>
<if test="reback_date !=null">
#{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
#{actual_reback_amount},
</if>
#{reback_note}
)
</insert>
<update id="updateReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
update tb_return_info
<set>
<if test="reback_progress !=null and reback_progress !=''">
reback_progress = #{reback_progress},
</if>
<if test="reback_date !=null">
reback_date = #{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
actual_reback_amount = #{actual_reback_amount},
</if>
<if test="reback_note !=null and reback_note !=''">
reback_note = #{reback_note}
</if>
</set>
where reback_unid = #{reback_unid}
</update>
<select id="queryReturnInfo" parameterType="String" resultType="com.vion.financial.entity.ReturnInfo">
select reback_unid, contract_unid ,
reback_progress ,reback_date,
cast(actual_reback_amount as decimal(18,2)),
reback_note from tb_return_info where contract_unid = #{contract_unid}
order by reback_progress asc
</select>
<delete id="deleteReturnInfo" parameterType="int">
delete from tb_return_info where reback_unid = #{reback_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
Manifest-Version: 1.0
Implementation-Title: FinancialSystem
Implementation-Version: SNAPSHOT
Built-By: Administrator
Implementation-Vendor-Id: com.vion
Build-Jdk: 1.8.0_131
Implementation-URL: http://projects.spring.io/spring-boot/finance_serv
/
Created-By: Maven Integration for Eclipse
Implementation-Vendor: Pivotal Software, Inc.
#Generated by Maven Integration for Eclipse
#Tue Sep 04 10:38:39 CST 2018
version=SNAPSHOT
groupId=com.vion
m2e.projectName=finance_serv
m2e.projectLocation=C\:\\Users\\Administrator\\Desktop\\finance_serv\\code\\finance_serv
artifactId=finance_serv
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vion</groupId>
<artifactId>finance_serv</artifactId>
<version>SNAPSHOT</version>
<packaging>war</packaging>
<name>FinancialSystem</name>
<description>Financial System project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId>
<optional>true</optional> </dependency> -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId>
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.18</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.3-1102-jdbc41</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<!-- 是否替换资源中的属性 -->
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>*/*.yml</exclude>
</excludes>
<!-- 是否替换资源中的属性 -->
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
<facet type="web" name="Web">
<configuration>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.16" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.16" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.16" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.5.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.9" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring4:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ognl:ognl:3.0.8" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy:2.4.12" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.16" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.16" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.0.18" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.alibaba:jconsole:1.8.0">
<CLASSES>
<root url="jar://C:/Program Files/Java/jdk1.8.0_20/lib/jconsole.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: com.alibaba:tools:1.8.0">
<CLASSES>
<root url="jar://C:/Program Files/Java/jdk1.8.0_20/lib/tools.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: org.postgresql:postgresql:9.3-1102-jdbc41" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.1.2" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.1.2" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.0.3" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-base:3.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.15" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.15" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.15" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:16.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.2.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-web:3.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:3.0.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.5.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:1.5.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:1.5.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:2.6.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:1.10.19" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
<orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
</component>
</module>
\ No newline at end of file \ No newline at end of file
package com.vion.financial.entity; package com.vion.financial.entity;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer; import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
public class Contract { public class Contract {
private String contract_unid; //合同编号 private String contract_unid; //合同编号
private String salesperson_unid; //销售员id private String salesperson_unid; //销售员id
private int project_unid; //项目id private int project_unid; //项目id
private int customer_unid; //顾客id private int customer_unid; //顾客id
private String province; //省 private String province; //省
private String city; //市 private String city; //市
private String county; //县 private String county; //县
private int guarantee_period; //质保周期 private int guarantee_period; //质保周期
private Date sign_date; //签订时间 private Date sign_date; //签订时间
private String product_line_type; //生产线类型 private String product_line_type; //生产线类型
private String contract_state; //合同状态 private String contract_state; //合同状态
private String contract_type; //合同性质 private String contract_type; //合同性质
private double contract_amount; //合同金额 private double contract_amount; //合同金额
private double deduct_amount; //折扣金额 private double deduct_amount; //折扣金额
private String contract_amount_note; //合同金额备注 private String contract_amount_note; //合同金额备注
private double stop_amount; //暂停金额 private double stop_amount; //暂停金额
private String reback_note; //累计回款备注 private String reback_note; //累计回款备注
private double exemptions_amount; //豁免金额 private double exemptions_amount; //豁免金额
private String contract_remain_note; //合同余额备注 private String contract_remain_note; //合同余额备注
private boolean is_archive; //是否归档 private boolean is_archive; //是否归档
private double bad_amount; //坏账金额 private double bad_amount; //坏账金额
private String bad_amount_note; //坏账金额备注 private String bad_amount_note; //坏账金额备注
private double confirm_income_amount; //确定收入金额 private double confirm_income_amount; //确定收入金额
private String amount_state_unid; //账款状态 private String amount_state_unid; //账款状态
private Date start_guarantee_date; //维保服务期开始时间 private Date start_guarantee_date; //维保服务期开始时间
private Date end_guarantee_date; //维保服务期结束时间 private Date end_guarantee_date; //维保服务期结束时间
private String mainten_start_point; //质保期开始节点 private String mainten_start_point; //质保期开始节点
private String contract_note; //合同备注 private String contract_note; //合同备注
private boolean is_delete; //标示合同是否逻辑删除 private boolean is_delete; //标示合同是否逻辑删除
private int final_user; //最终用户 private int final_user; //最终用户
private String relation_customer; //关联大客户 private String relation_customer; //关联大客户
private String first_industry; //行业 private String first_industry; //行业
private String final_user_name; //最终用户name private String final_user_name; //最终用户name
private String relation_customer_name; //关联大客户name private String relation_customer_name; //关联大客户name
private String first_industry_name; //行业name private String first_industry_name; //行业name
private String second_industry; private String second_industry;
private String second_industry_name; private String second_industry_name;
public String getContract_unid() { public String getContract_unid() {
return contract_unid; return contract_unid;
} }
public void setContract_unid(String contract_unid) { public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid; this.contract_unid = contract_unid;
} }
public String getSalesperson_unid() { public String getSalesperson_unid() {
return salesperson_unid; return salesperson_unid;
} }
public void setSalesperson_unid(String salesperson_unid) { public void setSalesperson_unid(String salesperson_unid) {
this.salesperson_unid = salesperson_unid; this.salesperson_unid = salesperson_unid;
} }
public int getProject_unid() { public int getProject_unid() {
return project_unid; return project_unid;
} }
public void setProject_unid(int project_unid) { public void setProject_unid(int project_unid) {
this.project_unid = project_unid; this.project_unid = project_unid;
} }
public int getCustomer_unid() { public int getCustomer_unid() {
return customer_unid; return customer_unid;
} }
public void setCustomer_unid(int customer_unid) { public void setCustomer_unid(int customer_unid) {
this.customer_unid = customer_unid; this.customer_unid = customer_unid;
} }
public String getProvince() { public String getProvince() {
return province; return province;
} }
public void setProvince(String province) { public void setProvince(String province) {
this.province = province; this.province = province;
} }
public String getCity() { public String getCity() {
return city; return city;
} }
public void setCity(String city) { public void setCity(String city) {
this.city = city; this.city = city;
} }
public String getCounty() { public String getCounty() {
return county; return county;
} }
public void setCounty(String county) { public void setCounty(String county) {
this.county = county; this.county = county;
} }
public int getGuarantee_period() { public int getGuarantee_period() {
return guarantee_period; return guarantee_period;
} }
public void setGuarantee_period(int guarantee_period) { public void setGuarantee_period(int guarantee_period) {
this.guarantee_period = guarantee_period; this.guarantee_period = guarantee_period;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getSign_date() { public Date getSign_date() {
return sign_date; return sign_date;
} }
public void setSign_date(Date sign_date) { public void setSign_date(Date sign_date) {
this.sign_date = sign_date; this.sign_date = sign_date;
} }
public String getProduct_line_type() { public String getProduct_line_type() {
return product_line_type; return product_line_type;
} }
public void setProduct_line_type(String product_line_type) { public void setProduct_line_type(String product_line_type) {
this.product_line_type = product_line_type; this.product_line_type = product_line_type;
} }
public String getContract_state() { public String getContract_state() {
return contract_state; return contract_state;
} }
public void setContract_state(String contract_state) { public void setContract_state(String contract_state) {
this.contract_state = contract_state; this.contract_state = contract_state;
} }
public String getContract_type() { public String getContract_type() {
return contract_type; return contract_type;
} }
public void setContract_type(String contract_type) { public void setContract_type(String contract_type) {
this.contract_type = contract_type; this.contract_type = contract_type;
} }
public double getContract_amount() { public double getContract_amount() {
return contract_amount; return contract_amount;
} }
public void setContract_amount(double contract_amount) { public void setContract_amount(double contract_amount) {
this.contract_amount = contract_amount; this.contract_amount = contract_amount;
} }
public double getDeduct_amount() { public double getDeduct_amount() {
return deduct_amount; return deduct_amount;
} }
public void setDeduct_amount(double deduct_amount) { public void setDeduct_amount(double deduct_amount) {
this.deduct_amount = deduct_amount; this.deduct_amount = deduct_amount;
} }
public String getContract_amount_note() { public String getContract_amount_note() {
return contract_amount_note; return contract_amount_note;
} }
public void setContract_amount_note(String contract_amount_note) { public void setContract_amount_note(String contract_amount_note) {
this.contract_amount_note = contract_amount_note; this.contract_amount_note = contract_amount_note;
} }
public double getStop_amount() { public double getStop_amount() {
return stop_amount; return stop_amount;
} }
public void setStop_amount(double stop_amount) { public void setStop_amount(double stop_amount) {
this.stop_amount = stop_amount; this.stop_amount = stop_amount;
} }
public String getReback_note() { public String getReback_note() {
return reback_note; return reback_note;
} }
public void setReback_note(String reback_note) { public void setReback_note(String reback_note) {
this.reback_note = reback_note; this.reback_note = reback_note;
} }
public double getExemptions_amount() { public double getExemptions_amount() {
return exemptions_amount; return exemptions_amount;
} }
public void setExemptions_amount(double exemptions_amount) { public void setExemptions_amount(double exemptions_amount) {
this.exemptions_amount = exemptions_amount; this.exemptions_amount = exemptions_amount;
} }
public String getContract_remain_note() { public String getContract_remain_note() {
return contract_remain_note; return contract_remain_note;
} }
public void setContract_remain_note(String contract_remain_note) { public void setContract_remain_note(String contract_remain_note) {
this.contract_remain_note = contract_remain_note; this.contract_remain_note = contract_remain_note;
} }
public boolean isIs_archive() { public boolean isIs_archive() {
return is_archive; return is_archive;
} }
public void setIs_archive(boolean is_archive) { public void setIs_archive(boolean is_archive) {
this.is_archive = is_archive; this.is_archive = is_archive;
} }
public double getBad_amount() { public double getBad_amount() {
return bad_amount; return bad_amount;
} }
public void setBad_amount(double bad_amount) { public void setBad_amount(double bad_amount) {
this.bad_amount = bad_amount; this.bad_amount = bad_amount;
} }
public String getBad_amount_note() { public String getBad_amount_note() {
return bad_amount_note; return bad_amount_note;
} }
public void setBad_amount_note(String bad_amount_note) { public void setBad_amount_note(String bad_amount_note) {
this.bad_amount_note = bad_amount_note; this.bad_amount_note = bad_amount_note;
} }
public double getConfirm_income_amount() { public double getConfirm_income_amount() {
return confirm_income_amount; return confirm_income_amount;
} }
public void setConfirm_income_amount(double confirm_income_amount) { public void setConfirm_income_amount(double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount; this.confirm_income_amount = confirm_income_amount;
} }
public String getAmount_state_unid() { public String getAmount_state_unid() {
return amount_state_unid; return amount_state_unid;
} }
public void setAmount_state_unid(String amount_state_unid) { public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid; this.amount_state_unid = amount_state_unid;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getStart_guarantee_date() { public Date getStart_guarantee_date() {
return start_guarantee_date; return start_guarantee_date;
} }
public void setStart_guarantee_date(Date start_guarantee_date) { public void setStart_guarantee_date(Date start_guarantee_date) {
this.start_guarantee_date = start_guarantee_date; this.start_guarantee_date = start_guarantee_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getEnd_guarantee_date() { public Date getEnd_guarantee_date() {
return end_guarantee_date; return end_guarantee_date;
} }
public void setEnd_guarantee_date(Date end_guarantee_date) { public void setEnd_guarantee_date(Date end_guarantee_date) {
this.end_guarantee_date = end_guarantee_date; this.end_guarantee_date = end_guarantee_date;
} }
public String getMainten_start_point() { public String getMainten_start_point() {
return mainten_start_point; return mainten_start_point;
} }
public void setMainten_start_point(String mainten_start_point) { public void setMainten_start_point(String mainten_start_point) {
this.mainten_start_point = mainten_start_point; this.mainten_start_point = mainten_start_point;
} }
public String getContract_note() { public String getContract_note() {
return contract_note; return contract_note;
} }
public void setContract_note(String contract_note) { public void setContract_note(String contract_note) {
this.contract_note = contract_note; this.contract_note = contract_note;
} }
public boolean isIs_delete() { public boolean isIs_delete() {
return is_delete; return is_delete;
} }
public void setIs_delete(boolean is_delete) { public void setIs_delete(boolean is_delete) {
this.is_delete = is_delete; this.is_delete = is_delete;
} }
public String getRelation_customer() { public String getRelation_customer() {
return relation_customer; return relation_customer;
} }
public void setRelation_customer(String relation_customer) { public void setRelation_customer(String relation_customer) {
this.relation_customer = relation_customer; this.relation_customer = relation_customer;
} }
public String getFinal_user_name() { public String getFinal_user_name() {
return final_user_name; return final_user_name;
} }
public void setFinal_user_name(String final_user_name) { public void setFinal_user_name(String final_user_name) {
this.final_user_name = final_user_name; this.final_user_name = final_user_name;
} }
public String getRelation_customer_name() { public String getRelation_customer_name() {
return relation_customer_name; return relation_customer_name;
} }
public void setRelation_customer_name(String relation_customer_name) { public void setRelation_customer_name(String relation_customer_name) {
this.relation_customer_name = relation_customer_name; this.relation_customer_name = relation_customer_name;
} }
public void setFinal_user(int final_user) { public void setFinal_user(int final_user) {
this.final_user = final_user; this.final_user = final_user;
} }
public String getFirst_industry() { public String getFirst_industry() {
return first_industry; return first_industry;
} }
public void setFirst_industry(String first_industry) { public void setFirst_industry(String first_industry) {
this.first_industry = first_industry; this.first_industry = first_industry;
} }
public String getFirst_industry_name() { public String getFirst_industry_name() {
return first_industry_name; return first_industry_name;
} }
public void setFirst_industry_name(String first_industry_name) { public void setFirst_industry_name(String first_industry_name) {
this.first_industry_name = first_industry_name; this.first_industry_name = first_industry_name;
} }
public String getSecond_industry() { public String getSecond_industry() {
return second_industry; return second_industry;
} }
public void setSecond_industry(String second_industry) { public void setSecond_industry(String second_industry) {
this.second_industry = second_industry; this.second_industry = second_industry;
} }
public String getSecond_industry_name() { public String getSecond_industry_name() {
return second_industry_name; return second_industry_name;
} }
public void setSecond_industry_name(String second_industry_name) { public void setSecond_industry_name(String second_industry_name) {
this.second_industry_name = second_industry_name; this.second_industry_name = second_industry_name;
} }
public int getFinal_user() { public int getFinal_user() {
return final_user; return final_user;
} }
} }
package com.vion.financial.excel; package com.vion.financial.excel;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore; import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
@JsonInclude(value=Include.NON_NULL) @JsonInclude(value=Include.NON_NULL)
public class ExportModel { public class ExportModel {
@Excel(name="合同编号",orderNum="0") @Excel(name="合同编号",orderNum="0")
private String contract_unid; //合同编号 private String contract_unid; //合同编号
@Excel(name="所属年份") @Excel(name="所属年份")
private String year; //所属年份 private String year; //所属年份
@ExcelIgnore() @ExcelIgnore()
private String product_line_type; private String product_line_type;
@Excel(name="产品线类型") @Excel(name="产品线类型")
private String product_line_type_name="-"; //产品线类型 private String product_line_type_name="-"; //产品线类型
@Excel(name="签订日期",width=15) @Excel(name="签订日期",width=15)
private String sign_date="-"; //签订日期 private String sign_date="-"; //签订日期
@Excel(name="所属月份") @Excel(name="所属月份")
private String month="-"; //所属月份 private String month="-"; //所属月份
@Excel(name="销售员") @Excel(name="销售员")
private String salesperson_name="-"; //销售员名称 private String salesperson_name="-"; //销售员名称
@Excel(name="省") @Excel(name="省")
private String province_name="-"; //省份 private String province_name="-"; //省份
@ExcelIgnore() @ExcelIgnore()
private String province="-"; private String province="-";
@Excel(name="市") @Excel(name="市")
private String city_name="-"; //城市 private String city_name="-"; //城市
@ExcelIgnore() @ExcelIgnore()
private String city="-"; private String city="-";
@Excel(name="县") @Excel(name="县")
private String county_name="-"; //县 private String county_name="-"; //县
@ExcelIgnore() @ExcelIgnore()
private String county="-"; private String county="-";
@Excel(name="客户名称",width=20) @Excel(name="客户名称",width=20)
private String customer_name="-"; //顾客名称 private String customer_name="-"; //顾客名称
@Excel(name="项目名称",width=20) @Excel(name="项目名称",width=20)
private String project_name="-"; //项目名称 private String project_name="-"; //项目名称
@Excel(name="合同金额",type=1,width=15,numFormat="###############.00") @Excel(name="合同金额",type=1,width=15,numFormat="###############.00")
private Double contract_amount=0D; //合同金额 private Double contract_amount=0D; //合同金额
@Excel(name="暂停金额",width=15,type=1,numFormat="###############.00") @Excel(name="暂停金额",width=15,type=1,numFormat="###############.00")
private Double stop_amount=0D; //暂停金额 private Double stop_amount=0D; //暂停金额
@Excel(name="坏账金额",width=15,type=1,numFormat="###############.00") @Excel(name="坏账金额",width=15,type=1,numFormat="###############.00")
private Double bad_amount=0D; //坏账金额 private Double bad_amount=0D; //坏账金额
@Excel(name="豁免金额",width=15,type=1,numFormat="###############.00") @Excel(name="豁免金额",width=15,type=1,numFormat="###############.00")
private Double exemptions_amount=0D; //豁免金额 private Double exemptions_amount=0D; //豁免金额
@Excel(name="折扣金额",width=15,type=1,numFormat="###############.00") @Excel(name="折扣金额",width=15,type=1,numFormat="###############.00")
private Double deduct_amount=0D; //折扣金额 private Double deduct_amount=0D; //折扣金额
@Excel(name="累计已收款",width=15,type=1,numFormat="###############.00") @Excel(name="累计已收款",width=15,type=1,numFormat="###############.00")
private Double total_reback_amount=0D; //累计已收款 private Double total_reback_amount=0D; //累计已收款
@Excel(name="合同余额",width=15,type=1,numFormat="###############.00") @Excel(name="合同余额",width=15,type=1,numFormat="###############.00")
private Double contract_remain=0D; //合同余额 private Double contract_remain=0D; //合同余额
@Excel(name="账款状态",width=15) @Excel(name="账款状态",width=15)
private String amount_state_unid_name="-"; //账款 状态 private String amount_state_unid_name="-"; //账款 状态
@ExcelIgnore() @ExcelIgnore()
private String amount_state_unid; private String amount_state_unid;
@Excel(name="累计应收款",width=15,type=1,numFormat="###############.00") @Excel(name="累计应收款",width=15,type=1,numFormat="###############.00")
private Double total_receive_amount=0D; //累计应收款 private Double total_receive_amount=0D; //累计应收款
@Excel(name="应收账款余额",width=15,type=1,numFormat="###############.00") @Excel(name="应收账款余额",width=15,type=1,numFormat="###############.00")
private Double total_amount_remain=0D; //应收账款余额 private Double total_amount_remain=0D; //应收账款余额
@Excel(name="逾期天数") @Excel(name="逾期天数")
private Integer over_days; //逾期天数 private Integer over_days; //逾期天数
@Excel(name="预付款金额",width=15,type=1,numFormat="###############.00") @Excel(name="预付款金额",width=15,type=1,numFormat="###############.00")
private Double advance_pay=0D; //预付款金额 private Double advance_pay=0D; //预付款金额
@Excel(name="预付款到期日",width=15) @Excel(name="预付款到期日",width=15)
private String advance_pay_date="-"; //预付款到期日 private String advance_pay_date="-"; //预付款到期日
@Excel(name="到货款金额",width=15,type=1,numFormat="###############.00") @Excel(name="到货款金额",width=15,type=1,numFormat="###############.00")
private Double arrive_pay=0D; //到货款金额 private Double arrive_pay=0D; //到货款金额
@Excel(name="发货日期",width=15) @Excel(name="发货日期",width=15)
private String deliver_date="-"; //发货日期 private String deliver_date="-"; //发货日期
@Excel(name="到货款到期日",width=15) @Excel(name="到货款到期日",width=15)
private String arrive_pay_date="-"; //到货款到期日 private String arrive_pay_date="-"; //到货款到期日
@Excel(name="验收款金额",width=15,type=1,numFormat="###############.00") @Excel(name="验收款金额",width=15,type=1,numFormat="###############.00")
private Double acceptanc_pay=0D; //验收款金额 private Double acceptanc_pay=0D; //验收款金额
@Excel(name="验收日期",width=15) @Excel(name="验收日期",width=15)
private String acceptanc_date="-"; //验收日期 private String acceptanc_date="-"; //验收日期
@Excel(name="验收款到期日",width=15) @Excel(name="验收款到期日",width=15)
private String acceptanc_pay_date="-"; //验货款到期日 private String acceptanc_pay_date="-"; //验货款到期日
@Excel(name="质保金额",width=15,type=1,numFormat="###############.00") @Excel(name="质保金额",width=15,type=1,numFormat="###############.00")
private Double mainten_pay=0D; //质保金额 private Double mainten_pay=0D; //质保金额
@Excel(name="质保款到期日",width=15) @Excel(name="质保款到期日",width=15)
private String mainten_pay_date="-"; //质保款到期日 private String mainten_pay_date="-"; //质保款到期日
private String salesperson_unid; private String salesperson_unid;
@Excel(name="到货验收日期",width=15) @Excel(name="到货验收日期",width=15)
private String goods_acceptanc_date; private String goods_acceptanc_date;
@Excel(name="确认收入金额",width=15,type=1,numFormat="###############.00") @Excel(name="确认收入金额",width=15,type=1,numFormat="###############.00")
private Double confirm_income_amount; private Double confirm_income_amount;
@Excel(name="累计开票金额",width=15,type=1,numFormat="###############.00") @Excel(name="累计开票金额",width=15,type=1,numFormat="###############.00")
private Double total_receipt_amount; private Double total_receipt_amount;
@Excel(name="合同备注",width=35) @Excel(name="合同备注",width=35)
private String contract_note; private String contract_note;
@Excel(name="坏账金额备注",width=35) @Excel(name="坏账金额备注",width=35)
private String bad_amount_note; private String bad_amount_note;
@Excel(name="暂停金额备注",width=35) @Excel(name="暂停金额备注",width=35)
private String reback_note; private String reback_note;
@Excel(name="豁免金额备注",width=35) @Excel(name="豁免金额备注",width=35)
private String contract_remain_note; private String contract_remain_note;
@Excel(name="抵扣金额备注",width=35) @Excel(name="抵扣金额备注",width=35)
private String contract_amount_note; private String contract_amount_note;
@Excel(name="预付款比例") @Excel(name="预付款比例")
private Double advance_pay_proporition; private Double advance_pay_proporition;
@Excel(name="到货款比例") @Excel(name="到货款比例")
private Double arrive_pay_proportion; private Double arrive_pay_proportion;
@Excel(name="验收款比例") @Excel(name="验收款比例")
private Double acceptanc_pay_proportion; private Double acceptanc_pay_proportion;
@Excel(name="质保款比例") @Excel(name="质保款比例")
private Double mainten_pay_proportition; private Double mainten_pay_proportition;
@Excel(name="预付款条件",width=35) @Excel(name="预付款条件",width=35)
private String advance_pay_requirement; private String advance_pay_requirement;
@Excel(name="到货款条件",width=35) @Excel(name="到货款条件",width=35)
private String arrive_pay_requirement; private String arrive_pay_requirement;
@Excel(name="验收款条件",width=35) @Excel(name="验收款条件",width=35)
private String acceptanc_pay_requirement; private String acceptanc_pay_requirement;
@Excel(name="质保款条件",width=35) @Excel(name="质保款条件",width=35)
private String mainten_pay_requirement; private String mainten_pay_requirement;
@Excel(name ="最终用户",width=35) @Excel(name ="最终用户",width=35)
private String final_user_name; private String final_user_name;
@Excel(name = "关联客户",width = 35) @Excel(name = "关联客户",width = 35)
private String relation_customer_name; private String relation_customer_name;
@Excel(name = "一级行业",width = 35) @Excel(name = "一级行业",width = 35)
private String first_industry_namefirst_industry_name; private String first_industry_namefirst_industry_name;
@Excel(name = "二级行业",width = 35) @Excel(name = "二级行业",width = 35)
private String second_industry_name; private String second_industry_name;
public String getContract_note() { public String getContract_note() {
return contract_note; return contract_note;
} }
public void setContract_note(String contract_note) { public void setContract_note(String contract_note) {
this.contract_note = contract_note; this.contract_note = contract_note;
} }
public String getBad_amount_note() { public String getBad_amount_note() {
return bad_amount_note; return bad_amount_note;
} }
public void setBad_amount_note(String bad_amount_note) { public void setBad_amount_note(String bad_amount_note) {
this.bad_amount_note = bad_amount_note; this.bad_amount_note = bad_amount_note;
} }
public String getReback_note() { public String getReback_note() {
return reback_note; return reback_note;
} }
public void setReback_note(String reback_note) { public void setReback_note(String reback_note) {
this.reback_note = reback_note; this.reback_note = reback_note;
} }
public String getContract_remain_note() { public String getContract_remain_note() {
return contract_remain_note; return contract_remain_note;
} }
public void setContract_remain_note(String contract_remain_note) { public void setContract_remain_note(String contract_remain_note) {
this.contract_remain_note = contract_remain_note; this.contract_remain_note = contract_remain_note;
} }
public String getContract_amount_note() { public String getContract_amount_note() {
return contract_amount_note; return contract_amount_note;
} }
public void setContract_amount_note(String contract_amount_note) { public void setContract_amount_note(String contract_amount_note) {
this.contract_amount_note = contract_amount_note; this.contract_amount_note = contract_amount_note;
} }
public Double getAdvance_pay_proporition() { public Double getAdvance_pay_proporition() {
return advance_pay_proporition; return advance_pay_proporition;
} }
public void setAdvance_pay_proporition(Double advance_pay_proporition) { public void setAdvance_pay_proporition(Double advance_pay_proporition) {
this.advance_pay_proporition = advance_pay_proporition; this.advance_pay_proporition = advance_pay_proporition;
} }
public Double getArrive_pay_proportion() { public Double getArrive_pay_proportion() {
return arrive_pay_proportion; return arrive_pay_proportion;
} }
public void setArrive_pay_proportion(Double arrive_pay_proportion) { public void setArrive_pay_proportion(Double arrive_pay_proportion) {
this.arrive_pay_proportion = arrive_pay_proportion; this.arrive_pay_proportion = arrive_pay_proportion;
} }
public Double getAcceptanc_pay_proportion() { public Double getAcceptanc_pay_proportion() {
return acceptanc_pay_proportion; return acceptanc_pay_proportion;
} }
public void setAcceptanc_pay_proportion(Double acceptanc_pay_proportion) { public void setAcceptanc_pay_proportion(Double acceptanc_pay_proportion) {
this.acceptanc_pay_proportion = acceptanc_pay_proportion; this.acceptanc_pay_proportion = acceptanc_pay_proportion;
} }
public Double getMainten_pay_proportition() { public Double getMainten_pay_proportition() {
return mainten_pay_proportition; return mainten_pay_proportition;
} }
public void setMainten_pay_proportition(Double mainten_pay_proportition) { public void setMainten_pay_proportition(Double mainten_pay_proportition) {
this.mainten_pay_proportition = mainten_pay_proportition; this.mainten_pay_proportition = mainten_pay_proportition;
} }
public String getAdvance_pay_requirement() { public String getAdvance_pay_requirement() {
return advance_pay_requirement; return advance_pay_requirement;
} }
public void setAdvance_pay_requirement(String advance_pay_requirement) { public void setAdvance_pay_requirement(String advance_pay_requirement) {
this.advance_pay_requirement = advance_pay_requirement; this.advance_pay_requirement = advance_pay_requirement;
} }
public String getArrive_pay_requirement() { public String getArrive_pay_requirement() {
return arrive_pay_requirement; return arrive_pay_requirement;
} }
public void setArrive_pay_requirement(String arrive_pay_requirement) { public void setArrive_pay_requirement(String arrive_pay_requirement) {
this.arrive_pay_requirement = arrive_pay_requirement; this.arrive_pay_requirement = arrive_pay_requirement;
} }
public String getAcceptanc_pay_requirement() { public String getAcceptanc_pay_requirement() {
return acceptanc_pay_requirement; return acceptanc_pay_requirement;
} }
public void setAcceptanc_pay_requirement(String acceptanc_pay_requirement) { public void setAcceptanc_pay_requirement(String acceptanc_pay_requirement) {
this.acceptanc_pay_requirement = acceptanc_pay_requirement; this.acceptanc_pay_requirement = acceptanc_pay_requirement;
} }
public String getMainten_pay_requirement() { public String getMainten_pay_requirement() {
return mainten_pay_requirement; return mainten_pay_requirement;
} }
public void setMainten_pay_requirement(String mainten_pay_requirement) { public void setMainten_pay_requirement(String mainten_pay_requirement) {
this.mainten_pay_requirement = mainten_pay_requirement; this.mainten_pay_requirement = mainten_pay_requirement;
} }
public Double getConfirm_income_amount() { public Double getConfirm_income_amount() {
return confirm_income_amount; return confirm_income_amount;
} }
public void setConfirm_income_amount(Double confirm_income_amount) { public void setConfirm_income_amount(Double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount; this.confirm_income_amount = confirm_income_amount;
} }
public Double getTotal_receipt_amount() { public Double getTotal_receipt_amount() {
return total_receipt_amount; return total_receipt_amount;
} }
public void setTotal_receipt_amount(Double total_receipt_amount) { public void setTotal_receipt_amount(Double total_receipt_amount) {
this.total_receipt_amount = total_receipt_amount; this.total_receipt_amount = total_receipt_amount;
} }
public String getGoods_acceptanc_date() { public String getGoods_acceptanc_date() {
return goods_acceptanc_date; return goods_acceptanc_date;
} }
public void setGoods_acceptanc_date(String goods_acceptanc_date) { public void setGoods_acceptanc_date(String goods_acceptanc_date) {
this.goods_acceptanc_date = goods_acceptanc_date; this.goods_acceptanc_date = goods_acceptanc_date;
} }
public String getContract_unid() { public String getContract_unid() {
return contract_unid; return contract_unid;
} }
public void setContract_unid(String contract_unid) { public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid; this.contract_unid = contract_unid;
} }
public String getYear() { public String getYear() {
return year; return year;
} }
public void setYear(String year) { public void setYear(String year) {
this.year = year; this.year = year;
} }
public String getProduct_line_type() { public String getProduct_line_type() {
return product_line_type; return product_line_type;
} }
public void setProduct_line_type(String product_line_type) { public void setProduct_line_type(String product_line_type) {
this.product_line_type = product_line_type; this.product_line_type = product_line_type;
} }
public String getMonth() { public String getMonth() {
return month; return month;
} }
public void setMonth(String month) { public void setMonth(String month) {
this.month = month; this.month = month;
} }
public String getSalesperson_name() { public String getSalesperson_name() {
return salesperson_name; return salesperson_name;
} }
public void setSalesperson_name(String salesperson_name) { public void setSalesperson_name(String salesperson_name) {
this.salesperson_name = salesperson_name; this.salesperson_name = salesperson_name;
} }
public String getProvince() { public String getProvince() {
return province; return province;
} }
public void setProvince(String province) { public void setProvince(String province) {
this.province = province; this.province = province;
} }
public String getCity() { public String getCity() {
return city; return city;
} }
public void setCity(String city) { public void setCity(String city) {
this.city = city; this.city = city;
} }
public String getCounty() { public String getCounty() {
return county; return county;
} }
public void setCounty(String county) { public void setCounty(String county) {
this.county = county; this.county = county;
} }
public String getCustomer_name() { public String getCustomer_name() {
return customer_name; return customer_name;
} }
public void setCustomer_name(String customer_name) { public void setCustomer_name(String customer_name) {
this.customer_name = customer_name; this.customer_name = customer_name;
} }
public String getProject_name() { public String getProject_name() {
return project_name; return project_name;
} }
public void setProject_name(String project_name) { public void setProject_name(String project_name) {
this.project_name = project_name; this.project_name = project_name;
} }
public Double getContract_amount() { public Double getContract_amount() {
return contract_amount; return contract_amount;
} }
public void setContract_amount(Double contract_amount) { public void setContract_amount(Double contract_amount) {
this.contract_amount = contract_amount; this.contract_amount = contract_amount;
} }
public Double getStop_amount() { public Double getStop_amount() {
return stop_amount; return stop_amount;
} }
public void setStop_amount(Double stop_amount) { public void setStop_amount(Double stop_amount) {
this.stop_amount = stop_amount; this.stop_amount = stop_amount;
} }
public Double getBad_amount() { public Double getBad_amount() {
return bad_amount; return bad_amount;
} }
public void setBad_amount(Double bad_amount) { public void setBad_amount(Double bad_amount) {
this.bad_amount = bad_amount; this.bad_amount = bad_amount;
} }
public Double getExemptions_amount() { public Double getExemptions_amount() {
return exemptions_amount; return exemptions_amount;
} }
public void setExemptions_amount(Double exemptions_amount) { public void setExemptions_amount(Double exemptions_amount) {
this.exemptions_amount = exemptions_amount; this.exemptions_amount = exemptions_amount;
} }
public Double getDeduct_amount() { public Double getDeduct_amount() {
return deduct_amount; return deduct_amount;
} }
public void setDeduct_amount(Double deduct_amount) { public void setDeduct_amount(Double deduct_amount) {
this.deduct_amount = deduct_amount; this.deduct_amount = deduct_amount;
} }
public Double getTotal_reback_amount() { public Double getTotal_reback_amount() {
return total_reback_amount; return total_reback_amount;
} }
public void setTotal_reback_amount(Double total_reback_amount) { public void setTotal_reback_amount(Double total_reback_amount) {
this.total_reback_amount = total_reback_amount; this.total_reback_amount = total_reback_amount;
} }
public Double getContract_remain() { public Double getContract_remain() {
return contract_remain; return contract_remain;
} }
public void setContract_remain(Double contract_remain) { public void setContract_remain(Double contract_remain) {
this.contract_remain = contract_remain; this.contract_remain = contract_remain;
} }
public Double getTotal_receive_amount() { public Double getTotal_receive_amount() {
return total_receive_amount; return total_receive_amount;
} }
public void setTotal_receive_amount(Double total_receive_amount) { public void setTotal_receive_amount(Double total_receive_amount) {
this.total_receive_amount = total_receive_amount; this.total_receive_amount = total_receive_amount;
} }
public Double getTotal_amount_remain() { public Double getTotal_amount_remain() {
return total_amount_remain; return total_amount_remain;
} }
public void setTotal_amount_remain(Double total_amount_remain) { public void setTotal_amount_remain(Double total_amount_remain) {
this.total_amount_remain = total_amount_remain; this.total_amount_remain = total_amount_remain;
} }
public Integer getOver_days() { public Integer getOver_days() {
return over_days; return over_days;
} }
public void setOver_days(Integer over_days) { public void setOver_days(Integer over_days) {
this.over_days = over_days; this.over_days = over_days;
} }
public Double getAdvance_pay() { public Double getAdvance_pay() {
return advance_pay; return advance_pay;
} }
public void setAdvance_pay(Double advance_pay) { public void setAdvance_pay(Double advance_pay) {
this.advance_pay = advance_pay; this.advance_pay = advance_pay;
} }
public Double getArrive_pay() { public Double getArrive_pay() {
return arrive_pay; return arrive_pay;
} }
public void setArrive_pay(Double arrive_pay) { public void setArrive_pay(Double arrive_pay) {
this.arrive_pay = arrive_pay; this.arrive_pay = arrive_pay;
} }
public Double getAcceptanc_pay() { public Double getAcceptanc_pay() {
return acceptanc_pay; return acceptanc_pay;
} }
public void setAcceptanc_pay(Double acceptanc_pay) { public void setAcceptanc_pay(Double acceptanc_pay) {
this.acceptanc_pay = acceptanc_pay; this.acceptanc_pay = acceptanc_pay;
} }
public Double getMainten_pay() { public Double getMainten_pay() {
return mainten_pay; return mainten_pay;
} }
public void setMainten_pay(Double mainten_pay) { public void setMainten_pay(Double mainten_pay) {
this.mainten_pay = mainten_pay; this.mainten_pay = mainten_pay;
} }
public String getSalesperson_unid() { public String getSalesperson_unid() {
return salesperson_unid; return salesperson_unid;
} }
public void setSalesperson_unid(String salesperson_unid) { public void setSalesperson_unid(String salesperson_unid) {
this.salesperson_unid = salesperson_unid; this.salesperson_unid = salesperson_unid;
} }
public String getProvince_name() { public String getProvince_name() {
return province_name; return province_name;
} }
public void setProvince_name(String province_name) { public void setProvince_name(String province_name) {
this.province_name = province_name; this.province_name = province_name;
} }
public String getCity_name() { public String getCity_name() {
return city_name; return city_name;
} }
public void setCity_name(String city_name) { public void setCity_name(String city_name) {
this.city_name = city_name; this.city_name = city_name;
} }
public String getCounty_name() { public String getCounty_name() {
return county_name; return county_name;
} }
public void setCounty_name(String county_name) { public void setCounty_name(String county_name) {
this.county_name = county_name; this.county_name = county_name;
} }
public String getAmount_state_unid_name() { public String getAmount_state_unid_name() {
return amount_state_unid_name; return amount_state_unid_name;
} }
public void setAmount_state_unid_name(String amount_state_unid_name) { public void setAmount_state_unid_name(String amount_state_unid_name) {
this.amount_state_unid_name = amount_state_unid_name; this.amount_state_unid_name = amount_state_unid_name;
} }
public String getAmount_state_unid() { public String getAmount_state_unid() {
return amount_state_unid; return amount_state_unid;
} }
public void setAmount_state_unid(String amount_state_unid) { public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid; this.amount_state_unid = amount_state_unid;
} }
public String getProduct_line_type_name() { public String getProduct_line_type_name() {
return product_line_type_name; return product_line_type_name;
} }
public void setProduct_line_type_name(String product_line_type_name) { public void setProduct_line_type_name(String product_line_type_name) {
this.product_line_type_name = product_line_type_name; this.product_line_type_name = product_line_type_name;
} }
public String getSign_date() { public String getSign_date() {
return sign_date; return sign_date;
} }
public void setSign_date(String sign_date) { public void setSign_date(String sign_date) {
this.sign_date = sign_date; this.sign_date = sign_date;
} }
public String getAdvance_pay_date() { public String getAdvance_pay_date() {
return advance_pay_date; return advance_pay_date;
} }
public void setAdvance_pay_date(String advance_pay_date) { public void setAdvance_pay_date(String advance_pay_date) {
this.advance_pay_date = advance_pay_date; this.advance_pay_date = advance_pay_date;
} }
public String getDeliver_date() { public String getDeliver_date() {
return deliver_date; return deliver_date;
} }
public void setDeliver_date(String deliver_date) { public void setDeliver_date(String deliver_date) {
this.deliver_date = deliver_date; this.deliver_date = deliver_date;
} }
public String getArrive_pay_date() { public String getArrive_pay_date() {
return arrive_pay_date; return arrive_pay_date;
} }
public void setArrive_pay_date(String arrive_pay_date) { public void setArrive_pay_date(String arrive_pay_date) {
this.arrive_pay_date = arrive_pay_date; this.arrive_pay_date = arrive_pay_date;
} }
public String getAcceptanc_date() { public String getAcceptanc_date() {
return acceptanc_date; return acceptanc_date;
} }
public void setAcceptanc_date(String acceptanc_date) { public void setAcceptanc_date(String acceptanc_date) {
this.acceptanc_date = acceptanc_date; this.acceptanc_date = acceptanc_date;
} }
public String getAcceptanc_pay_date() { public String getAcceptanc_pay_date() {
return acceptanc_pay_date; return acceptanc_pay_date;
} }
public void setAcceptanc_pay_date(String acceptanc_pay_date) { public void setAcceptanc_pay_date(String acceptanc_pay_date) {
this.acceptanc_pay_date = acceptanc_pay_date; this.acceptanc_pay_date = acceptanc_pay_date;
} }
public String getMainten_pay_date() { public String getMainten_pay_date() {
return mainten_pay_date; return mainten_pay_date;
} }
public void setMainten_pay_date(String mainten_pay_date) { public void setMainten_pay_date(String mainten_pay_date) {
this.mainten_pay_date = mainten_pay_date; this.mainten_pay_date = mainten_pay_date;
} }
public String getFinal_user_name() { public String getFinal_user_name() {
return final_user_name; return final_user_name;
} }
public void setFinal_user_name(String final_user_name) { public void setFinal_user_name(String final_user_name) {
this.final_user_name = final_user_name; this.final_user_name = final_user_name;
} }
public String getRelation_customer_name() { public String getRelation_customer_name() {
return relation_customer_name; return relation_customer_name;
} }
public void setRelation_customer_name(String relation_customer_name) { public void setRelation_customer_name(String relation_customer_name) {
this.relation_customer_name = relation_customer_name; this.relation_customer_name = relation_customer_name;
} }
public String getFirst_industry_namefirst_industry_name() { public String getFirst_industry_namefirst_industry_name() {
return first_industry_namefirst_industry_name; return first_industry_namefirst_industry_name;
} }
public void setFirst_industry_namefirst_industry_name(String first_industry_namefirst_industry_name) { public void setFirst_industry_namefirst_industry_name(String first_industry_namefirst_industry_name) {
this.first_industry_namefirst_industry_name = first_industry_namefirst_industry_name; this.first_industry_namefirst_industry_name = first_industry_namefirst_industry_name;
} }
public String getSecond_industry_name() { public String getSecond_industry_name() {
return second_industry_name; return second_industry_name;
} }
public void setSecond_industry_name(String second_industry_name) { public void setSecond_industry_name(String second_industry_name) {
this.second_industry_name = second_industry_name; this.second_industry_name = second_industry_name;
} }
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ContractMapper"> <mapper namespace="com.vion.financial.mapper.ContractMapper">
<insert id="addOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true"> <insert id="addOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
INSERT INTO tb_contract( INSERT INTO tb_contract(
contract_unid contract_unid
<if test="salesperson_unid != null and salesperson_unid != ''"> <if test="salesperson_unid != null and salesperson_unid != ''">
,salesperson_unid ,salesperson_unid
</if> </if>
<if test="province != null and province != ''"> <if test="province != null and province != ''">
,province,province_name ,province,province_name
</if> </if>
<if test="city !=null and city != ''"> <if test="city !=null and city != ''">
,city,city_name ,city,city_name
</if> </if>
<if test="county != null and county != ''"> <if test="county != null and county != ''">
,county,county_name ,county,county_name
</if> </if>
<if test="guarantee_period != null"> <if test="guarantee_period != null">
,guarantee_period ,guarantee_period
</if> </if>
<if test="sign_date != null"> <if test="sign_date != null">
,sign_date ,sign_date
</if> </if>
<if test="product_line_type != null and product_line_type != ''"> <if test="product_line_type != null and product_line_type != ''">
,product_line_type ,product_line_type
</if> </if>
<if test="contract_state != null and contract_state != ''"> <if test="contract_state != null and contract_state != ''">
,contract_state ,contract_state
</if> </if>
<if test="contract_type != null and contract_type != ''"> <if test="contract_type != null and contract_type != ''">
,contract_type ,contract_type
</if> </if>
<if test="contract_amount != null "> <if test="contract_amount != null ">
,contract_amount ,contract_amount
</if> </if>
<if test="deduct_amount != null "> <if test="deduct_amount != null ">
,deduct_amount ,deduct_amount
</if> </if>
<if test="contract_amount_note != null and contract_amount_note != ''"> <if test="contract_amount_note != null and contract_amount_note != ''">
,contract_amount_note ,contract_amount_note
</if> </if>
<if test="stop_amount != null "> <if test="stop_amount != null ">
,stop_amount ,stop_amount
</if> </if>
<if test="reback_note != null and reback_note != ''"> <if test="reback_note != null and reback_note != ''">
,reback_note ,reback_note
</if> </if>
<if test="exemptions_amount != null "> <if test="exemptions_amount != null ">
,exemptions_amount ,exemptions_amount
</if> </if>
<if test="contract_remain_note != null and contract_remain_note != ''"> <if test="contract_remain_note != null and contract_remain_note != ''">
,contract_remain_note ,contract_remain_note
</if> </if>
<if test="is_archive != null and is_archive != ''"> <if test="is_archive != null and is_archive != ''">
,is_archive ,is_archive
</if> </if>
<if test="bad_amount != null "> <if test="bad_amount != null ">
,bad_amount ,bad_amount
</if> </if>
<if test="bad_amount_note != null and bad_amount_note != ''"> <if test="bad_amount_note != null and bad_amount_note != ''">
,bad_amount_note ,bad_amount_note
</if> </if>
<if test="confirm_income_amount != null "> <if test="confirm_income_amount != null ">
,confirm_income_amount ,confirm_income_amount
</if> </if>
<if test="amount_state_unid != null and amount_state_unid != ''"> <if test="amount_state_unid != null and amount_state_unid != ''">
,amount_state_unid ,amount_state_unid
</if> </if>
<if test="start_guarantee_date != null "> <if test="start_guarantee_date != null ">
,start_guarantee_date ,start_guarantee_date
</if> </if>
<if test="end_guarantee_date != null "> <if test="end_guarantee_date != null ">
,end_guarantee_date ,end_guarantee_date
</if> </if>
<if test="mainten_start_point != null and mainten_start_point != ''"> <if test="mainten_start_point != null and mainten_start_point != ''">
,mainten_start_point ,mainten_start_point
</if> </if>
<if test="contract_note != null and contract_note != ''"> <if test="contract_note != null and contract_note != ''">
,contract_note ,contract_note
</if> </if>
,is_delete ,is_delete
<if test="project_unid != null and project_unid != ''"> <if test="project_unid != null and project_unid != ''">
,project_unid ,project_unid
</if> </if>
<if test="customer_unid != null and customer_unid != ''"> <if test="customer_unid != null and customer_unid != ''">
,customer_unid ,customer_unid
</if> </if>
<if test="province_name !=null and province_name !=''"> <if test="province_name !=null and province_name !=''">
,province_name ,province_name
</if> </if>
<if test="city_name !=null and city_name !=''"> <if test="city_name !=null and city_name !=''">
,city_name ,city_name
</if> </if>
<if test="county_name !=null and county_name !=''"> <if test="county_name !=null and county_name !=''">
,county_name ,county_name
</if> </if>
<if test="final_user != null "> <if test="final_user != null ">
,final_user ,final_user
</if> </if>
<if test="relation_customer != null and relation_customer != ''"> <if test="relation_customer != null and relation_customer != ''">
,relation_customer ,relation_customer
</if> </if>
<if test="first_industry != null and first_industry != ''"> <if test="first_industry != null and first_industry != ''">
,first_industry ,first_industry
</if> </if>
<if test="final_user != null and final_user != ''"> <if test="final_user != null and final_user != ''">
,final_user_name ,final_user_name
</if> </if>
<if test="relation_customer != null and relation_customer != ''"> <if test="relation_customer != null and relation_customer != ''">
,relation_customer_name ,relation_customer_name
</if> </if>
<if test="first_industry_name != null and first_industry_name != ''"> <if test="first_industry_name != null and first_industry_name != ''">
,first_industry_name ,first_industry_name
</if> </if>
<if test="second_industry != null and second_industry != ''"> <if test="second_industry != null and second_industry != ''">
,second_industry ,second_industry
</if> </if>
<if test="second_industry_name != null and second_industry_name != ''"> <if test="second_industry_name != null and second_industry_name != ''">
,second_industry_name ,second_industry_name
</if> </if>
) VALUES( ) VALUES(
#{contract_unid} #{contract_unid}
<if test="salesperson_unid != null and salesperson_unid != ''"> <if test="salesperson_unid != null and salesperson_unid != ''">
,#{salesperson_unid} ,#{salesperson_unid}
</if> </if>
<if test="province != null and province != ''"> <if test="province != null and province != ''">
,#{province},#{province_name} ,#{province},#{province_name}
</if> </if>
<if test="city !=null and city != ''"> <if test="city !=null and city != ''">
, #{city},#{city_name} , #{city},#{city_name}
</if> </if>
<if test="county != null and county != ''"> <if test="county != null and county != ''">
,#{county},#{county_name} ,#{county},#{county_name}
</if> </if>
<if test="guarantee_period != null "> <if test="guarantee_period != null ">
,#{guarantee_period} ,#{guarantee_period}
</if> </if>
<if test="sign_date != null "> <if test="sign_date != null ">
,#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} ,#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="product_line_type != null and product_line_type != ''"> <if test="product_line_type != null and product_line_type != ''">
,#{product_line_type} ,#{product_line_type}
</if> </if>
<if test="contract_state != null and contract_state != ''"> <if test="contract_state != null and contract_state != ''">
,#{contract_state} ,#{contract_state}
</if> </if>
<if test="contract_type != null and contract_type != ''"> <if test="contract_type != null and contract_type != ''">
,#{contract_type} ,#{contract_type}
</if> </if>
<if test="contract_amount != null "> <if test="contract_amount != null ">
,#{contract_amount} ,#{contract_amount}
</if> </if>
<if test="deduct_amount != null "> <if test="deduct_amount != null ">
,#{deduct_amount} ,#{deduct_amount}
</if> </if>
<if test="contract_amount_note != null and contract_amount_note != ''"> <if test="contract_amount_note != null and contract_amount_note != ''">
,#{contract_amount_note} ,#{contract_amount_note}
</if> </if>
<if test="stop_amount != null "> <if test="stop_amount != null ">
,#{stop_amount} ,#{stop_amount}
</if> </if>
<if test="reback_note != null and reback_note != ''"> <if test="reback_note != null and reback_note != ''">
,#{reback_note} ,#{reback_note}
</if> </if>
<if test="exemptions_amount != null "> <if test="exemptions_amount != null ">
,#{exemptions_amount} ,#{exemptions_amount}
</if> </if>
<if test="contract_remain_note != null and contract_remain_note != ''"> <if test="contract_remain_note != null and contract_remain_note != ''">
,#{contract_remain_note} ,#{contract_remain_note}
</if> </if>
<if test="is_archive != null and is_archive != ''"> <if test="is_archive != null and is_archive != ''">
,#{is_archive} ,#{is_archive}
</if> </if>
<if test="bad_amount != null "> <if test="bad_amount != null ">
,#{bad_amount} ,#{bad_amount}
</if> </if>
<if test="bad_amount_note != null and bad_amount_note != ''"> <if test="bad_amount_note != null and bad_amount_note != ''">
,#{bad_amount_note} ,#{bad_amount_note}
</if> </if>
<if test="confirm_income_amount != null "> <if test="confirm_income_amount != null ">
,#{confirm_income_amount} ,#{confirm_income_amount}
</if> </if>
<if test="amount_state_unid != null and amount_state_unid != ''"> <if test="amount_state_unid != null and amount_state_unid != ''">
,#{amount_state_unid} ,#{amount_state_unid}
</if> </if>
<if test="start_guarantee_date != null "> <if test="start_guarantee_date != null ">
,#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} ,#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="end_guarantee_date != null "> <if test="end_guarantee_date != null ">
,#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} ,#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="mainten_start_point != null and mainten_start_point != ''"> <if test="mainten_start_point != null and mainten_start_point != ''">
,#{mainten_start_point} ,#{mainten_start_point}
</if> </if>
<if test="contract_note != null and contract_note != ''"> <if test="contract_note != null and contract_note != ''">
,#{contract_note} ,#{contract_note}
</if> </if>
,false ,false
<if test="project_unid != null and project_unid != ''"> <if test="project_unid != null and project_unid != ''">
,#{project_unid} ,#{project_unid}
</if> </if>
<if test="customer_unid != null and customer_unid != ''"> <if test="customer_unid != null and customer_unid != ''">
,#{customer_unid} ,#{customer_unid}
</if> </if>
<if test="province_name !=null and province_name !=''"> <if test="province_name !=null and province_name !=''">
,#{province_name} ,#{province_name}
</if> </if>
<if test="city_name !=null and city_name !=''"> <if test="city_name !=null and city_name !=''">
,#{city_name} ,#{city_name}
</if> </if>
<if test="county_name !=null and county_name !=''"> <if test="county_name !=null and county_name !=''">
,#{county_name} ,#{county_name}
</if> </if>
<if test="final_user != null "> <if test="final_user != null ">
,#{final_user} ,#{final_user}
</if> </if>
<if test="relation_customer != null and relation_customer != ''"> <if test="relation_customer != null and relation_customer != ''">
,#{relation_customer} ,#{relation_customer}
</if> </if>
<if test="first_industry != null and first_industry != ''"> <if test="first_industry != null and first_industry != ''">
,#{first_industry} ,#{first_industry}
</if> </if>
<if test="final_user != null and final_user != ''"> <if test="final_user != null and final_user != ''">
,#{final_user_name} ,#{final_user_name}
</if> </if>
<if test="relation_customer != null and relation_customer != ''"> <if test="relation_customer != null and relation_customer != ''">
,#{relation_customer_name} ,#{relation_customer_name}
</if> </if>
<if test="first_industry_name != null and first_industry_name != ''"> <if test="first_industry_name != null and first_industry_name != ''">
,#{first_industry_name} ,#{first_industry_name}
</if> </if>
<if test="second_industry != null and second_industry != ''"> <if test="second_industry != null and second_industry != ''">
,#{second_industry} ,#{second_industry}
</if> </if>
<if test="second_industry_name != null and second_industry_name != ''"> <if test="second_industry_name != null and second_industry_name != ''">
,#{second_industry_name} ,#{second_industry_name}
</if> </if>
) )
</insert> </insert>
<select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String"> <select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String">
select select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name, contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state, guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note, contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note, cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)), is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date, amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, final_user,relation_customer,first_industry, final_user_name,relation_customer_name,first_industry_name,second_industry,second_industry_name, mainten_start_point, contract_note, is_delete, project_unid, final_user,relation_customer,first_industry, final_user_name,relation_customer_name,first_industry_name,second_industry,second_industry_name,
customer_unid, customer_unid,
(cast(contract_amount as decimal(18,2))-(select cast(case when total_reback_view.sum is null then 0 else total_reback_view.sum end as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2)) (cast(contract_amount as decimal(18,2))-(select cast(case when total_reback_view.sum is null then 0 else total_reback_view.sum end as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain, -cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, (select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , (select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain--> <!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain, (select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days, (select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name, (select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name, (select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay, (select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay, (select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay, (select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay, (select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date, (select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date, (select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date, (select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date, (select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date, (select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date (select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where contract_unid = #{contract_unid} from tb_contract where contract_unid = #{contract_unid}
</select> </select>
<update id="updateOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true"> <update id="updateOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
update tb_contract update tb_contract
<set> <set>
<if test="salesperson_unid != null and salesperson_unid != ''"> <if test="salesperson_unid != null and salesperson_unid != ''">
salesperson_unid=#{salesperson_unid}, salesperson_unid=#{salesperson_unid},
</if> </if>
<if test="province != null and province != ''"> <if test="province != null and province != ''">
province=#{province}, province=#{province},
province_name=#{province_name}, province_name=#{province_name},
</if> </if>
<if test="city !=null and city != ''"> <if test="city !=null and city != ''">
city=#{city}, city=#{city},
city_name=#{city_name}, city_name=#{city_name},
</if> </if>
<if test="county != null and county != ''"> <if test="county != null and county != ''">
county=#{county}, county=#{county},
county_name=#{county_name}, county_name=#{county_name},
</if> </if>
<if test="guarantee_period != null "> <if test="guarantee_period != null ">
guarantee_period=#{guarantee_period}, guarantee_period=#{guarantee_period},
</if> </if>
<if test="sign_date != null "> <if test="sign_date != null ">
sign_date=#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, sign_date=#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if> </if>
<if test="product_line_type != null and product_line_type != ''"> <if test="product_line_type != null and product_line_type != ''">
product_line_type=#{product_line_type}, product_line_type=#{product_line_type},
</if> </if>
<if test="contract_state != null and contract_state != ''"> <if test="contract_state != null and contract_state != ''">
contract_state=#{contract_state}, contract_state=#{contract_state},
</if> </if>
<if test="contract_type != null and contract_type != ''"> <if test="contract_type != null and contract_type != ''">
contract_type=#{contract_type}, contract_type=#{contract_type},
</if> </if>
<if test="contract_amount !=null"> <if test="contract_amount !=null">
contract_amount=#{contract_amount}, contract_amount=#{contract_amount},
</if> </if>
<if test="deduct_amount !=null"> <if test="deduct_amount !=null">
deduct_amount=#{deduct_amount}, deduct_amount=#{deduct_amount},
</if> </if>
<if test="contract_amount_note != null and contract_amount_note != ''"> <if test="contract_amount_note != null and contract_amount_note != ''">
contract_amount_note=#{contract_amount_note}, contract_amount_note=#{contract_amount_note},
</if> </if>
<if test="stop_amount !=null"> <if test="stop_amount !=null">
stop_amount=#{stop_amount}, stop_amount=#{stop_amount},
</if> </if>
<if test="reback_note != null and reback_note != ''"> <if test="reback_note != null and reback_note != ''">
reback_note=#{reback_note}, reback_note=#{reback_note},
</if> </if>
<if test="exemptions_amount !=null"> <if test="exemptions_amount !=null">
exemptions_amount=#{exemptions_amount}, exemptions_amount=#{exemptions_amount},
</if> </if>
<if test="contract_remain_note != null and contract_remain_note != ''"> <if test="contract_remain_note != null and contract_remain_note != ''">
contract_remain_note=#{contract_remain_note}, contract_remain_note=#{contract_remain_note},
</if> </if>
<if test="is_archive != null and is_archive != ''"> <if test="is_archive != null and is_archive != ''">
is_archive=#{is_archive}, is_archive=#{is_archive},
</if> </if>
<if test="bad_amount !=null"> <if test="bad_amount !=null">
bad_amount=#{bad_amount}, bad_amount=#{bad_amount},
</if> </if>
<if test="bad_amount_note != null and bad_amount_note != ''"> <if test="bad_amount_note != null and bad_amount_note != ''">
bad_amount_note=#{bad_amount_note}, bad_amount_note=#{bad_amount_note},
</if> </if>
confirm_income_amount=#{confirm_income_amount}, confirm_income_amount=#{confirm_income_amount},
<if test="amount_state_unid != null and amount_state_unid != ''"> <if test="amount_state_unid != null and amount_state_unid != ''">
amount_state_unid=#{amount_state_unid}, amount_state_unid=#{amount_state_unid},
</if> </if>
<if test="start_guarantee_date != null "> <if test="start_guarantee_date != null ">
start_guarantee_date=#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, start_guarantee_date=#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if> </if>
<if test="end_guarantee_date != null "> <if test="end_guarantee_date != null ">
end_guarantee_date=#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, end_guarantee_date=#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if> </if>
<if test="mainten_start_point != null and mainten_start_point != ''"> <if test="mainten_start_point != null and mainten_start_point != ''">
mainten_start_point=#{mainten_start_point}, mainten_start_point=#{mainten_start_point},
</if> </if>
<if test="contract_note != null and contract_note != ''"> <if test="contract_note != null and contract_note != ''">
contract_note=#{contract_note}, contract_note=#{contract_note},
</if> </if>
<if test="is_delete != null and is_delete != ''"> <if test="is_delete != null and is_delete != ''">
is_delete=#{is_delete}, is_delete=#{is_delete},
</if> </if>
<if test="project_unid != null and project_unid != ''"> <if test="project_unid != null and project_unid != ''">
project_unid=#{project_unid}, project_unid=#{project_unid},
</if> </if>
<if test="customer_unid != null and customer_unid != ''"> <if test="customer_unid != null and customer_unid != ''">
customer_unid=#{customer_unid}, customer_unid=#{customer_unid},
</if> </if>
<if test="final_user != null "> <if test="final_user != null ">
final_user=#{final_user}, final_user=#{final_user},
</if> </if>
<if test="relation_customer != null and relation_customer !=''"> <if test="relation_customer != null and relation_customer !=''">
relation_customer=#{relation_customer}, relation_customer=#{relation_customer},
</if> </if>
<if test="first_industry != null and first_industry !=''"> <if test="first_industry != null and first_industry !=''">
first_industry=#{first_industry}, first_industry=#{first_industry},
</if> </if>
<if test="second_industry != null and second_industry !=''"> <if test="second_industry != null and second_industry !=''">
second_industry=#{second_industry}, second_industry=#{second_industry},
</if> </if>
<if test="final_user_name != null and final_user_name !=''"> <if test="final_user_name != null and final_user_name !=''">
final_user_name=#{final_user_name}, final_user_name=#{final_user_name},
</if> </if>
<if test="relation_customer_name != null and relation_customer_name !=''"> <if test="relation_customer_name != null and relation_customer_name !=''">
relation_customer_name=#{relation_customer_name}, relation_customer_name=#{relation_customer_name},
</if> </if>
<if test="first_industry_name != null and first_industry_name !=''"> <if test="first_industry_name != null and first_industry_name !=''">
first_industry_name=#{first_industry_name}, first_industry_name=#{first_industry_name},
</if> </if>
<if test="second_industry_name != null and second_industry_name !=''"> <if test="second_industry_name != null and second_industry_name !=''">
second_industry_name=#{second_industry_name} second_industry_name=#{second_industry_name}
</if> </if>
</set> </set>
where contract_unid=#{contract_unid} where contract_unid=#{contract_unid}
</update> </update>
<delete id="deleteOne" parameterType="java.lang.String"> <delete id="deleteOne" parameterType="java.lang.String">
<!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} --> <!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} -->
delete from tb_contract where contract_unid = #{contract_unid} delete from tb_contract where contract_unid = #{contract_unid}
</delete> </delete>
<select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int"> <select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int">
select count(1) as count from tb_contract where 1=1 select count(1) as count from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''"> <if test="contract_unid !=null and contract_unid !=''">
and and
contract_unid=#{contract_unid} contract_unid=#{contract_unid}
</if> </if>
<if test="salesperson_unids !=null"> <if test="salesperson_unids !=null">
and and
salesperson_unid in salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=","> <foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid} #{salesperson_unid}
</foreach> </foreach>
</if> </if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0"> <if test="amount_state_unids !=null and amount_state_unids.length > 0">
and and
amount_state_unid in amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=","> <foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item} #{amount_state_unid_item}
</foreach> </foreach>
</if> </if>
<if test="contract_states !=null and contract_states.length > 0"> <if test="contract_states !=null and contract_states.length > 0">
and and
contract_state in contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=","> <foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0"> <if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and and
salesperson_unid in salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=","> <foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="project_name__like !=null and project_name__like !=''"> <if test="project_name__like !=null and project_name__like !=''">
and and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%') tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if> </if>
<if test="customer_name__like !=null and customer_name__like !=''"> <if test="customer_name__like !=null and customer_name__like !=''">
and and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%') tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if> </if>
<if test="province !=null and province !=''"> <if test="province !=null and province !=''">
and and
province=#{province} province=#{province}
</if> </if>
<if test="city !=null and city !=''"> <if test="city !=null and city !=''">
and and
city=#{city} city=#{city}
</if> </if>
<if test="county !=null and county !=''"> <if test="county !=null and county !=''">
and and
county=#{county} county=#{county}
</if> </if>
<if test="guarantee_period !=null "> <if test="guarantee_period !=null ">
and and
guarantee_period=#{guarantee_period} guarantee_period=#{guarantee_period}
</if> </if>
<if test="year !=null and year !=''"> <if test="year !=null and year !=''">
and and
to_char(sign_date,'yyyy')=#{year} to_char(sign_date,'yyyy')=#{year}
</if> </if>
<if test="month !=null and month!=''"> <if test="month !=null and month!=''">
and and
to_char(sign_date,'MM')=#{month} to_char(sign_date,'MM')=#{month}
</if> </if>
<if test="product_line_type !=null and product_line_type !=''"> <if test="product_line_type !=null and product_line_type !=''">
and and
product_line_type=#{product_line_type} product_line_type=#{product_line_type}
</if> </if>
<if test="contract_state !=null and contract_state !=''"> <if test="contract_state !=null and contract_state !=''">
and and
contract_state=#{contract_state} contract_state=#{contract_state}
</if> </if>
<if test="contract_type !=null and contract_type !=''"> <if test="contract_type !=null and contract_type !=''">
and and
contract_type=#{contract_type} contract_type=#{contract_type}
</if> </if>
<if test="final_user !=null "> <if test="final_user !=null ">
and and
final_user=#{final_user} final_user=#{final_user}
</if> </if>
<if test="relation_customer !=null and relation_customer !=''"> <if test="relation_customer !=null and relation_customer !=''">
and and
relation_customer=#{relation_customer} relation_customer=#{relation_customer}
</if> </if>
<if test="first_industry !=null and first_industry !=''"> <if test="first_industry !=null and first_industry !=''">
and and
first_industry=#{first_industry} first_industry=#{first_industry}
</if> </if>
<if test="second_industry !=null and second_industry !=''"> <if test="second_industry !=null and second_industry !=''">
and and
second_industry=#{second_industry} second_industry=#{second_industry}
</if> </if>
<if test="final_user_name !=null and final_user_name !=''"> <if test="final_user_name !=null and final_user_name !=''">
and and
final_user_name=#{final_user_name} final_user_name=#{final_user_name}
</if> </if>
<if test="relation_customer_name !=null and relation_customer_name !=''"> <if test="relation_customer_name !=null and relation_customer_name !=''">
and and
relation_customer_name=#{relation_customer_name} relation_customer_name=#{relation_customer_name}
</if> </if>
<if test="first_industry_name !=null and first_industry_name !=''"> <if test="first_industry_name !=null and first_industry_name !=''">
and and
first_industry_name=#{first_industry_name} first_industry_name=#{first_industry_name}
</if> </if>
<if test="second_industry_name !=null and second_industry_name !=''"> <if test="second_industry_name !=null and second_industry_name !=''">
and and
second_industry_name=#{second_industry_name} second_industry_name=#{second_industry_name}
</if> </if>
<if test="is_archive !=null"> <if test="is_archive !=null">
and and
is_archive=#{is_archive} is_archive=#{is_archive}
</if> </if>
<if test="acceptanc_type !=null and acceptanc_type !=''"> <if test="acceptanc_type !=null and acceptanc_type !=''">
and and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type}) contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if> </if>
<if test="confirm_income_amount !=null"> <if test="confirm_income_amount !=null">
and and
confirm_income_amount=#{confirm_income_amount} confirm_income_amount=#{confirm_income_amount}
</if> </if>
<if test="amount_state_unid !=null and amount_state_unid !=''"> <if test="amount_state_unid !=null and amount_state_unid !=''">
and and
amount_state_unid=#{amount_state_unid} amount_state_unid=#{amount_state_unid}
</if> </if>
<if test="start_date != null and end_date !=null"> <if test="start_date != null and end_date !=null">
and and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} #{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="amount_start_point !=null "> <if test="amount_start_point !=null ">
and and
contract_amount <![CDATA[>=]]> #{amount_start_point} contract_amount <![CDATA[>=]]> #{amount_start_point}
</if> </if>
<if test="amount_end_point !=null "> <if test="amount_end_point !=null ">
and and
contract_amount <![CDATA[<=]]> #{amount_end_point} contract_amount <![CDATA[<=]]> #{amount_end_point}
</if> </if>
<if test="overdays_start_point !=null and overdays_end_point == null"> <if test="overdays_start_point !=null and overdays_end_point == null">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if> </if>
<if test="overdays_start_point !=null and overdays_end_point !=null "> <if test="overdays_start_point !=null and overdays_end_point !=null ">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="overdays_start_point ==null and overdays_end_point !=null"> <if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="leave_amount_start_point !=null "> <if test="leave_amount_start_point !=null ">
<!--应收款余额-->and <!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if> </if>
<if test="leave_amount_end_point !=null "> <if test="leave_amount_end_point !=null ">
and and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if> </if>
and is_delete=false and is_delete=false
and project_unid is not null and project_unid is not null
and customer_unid is not null and customer_unid is not null
</select> </select>
<select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo"> <select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo">
select select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name, contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state, guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note, contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note, cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)), is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date, amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, mainten_start_point, contract_note, is_delete, project_unid,
customer_unid, customer_unid,
(cast(CASE WHEN contract_amount IS NULL THEN 0 ELSE contract_amount END as decimal(18,2))-(select cast(CASE WHEN total_reback_view.sum IS NULL THEN 0 ELSE total_reback_view.sum END as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2)) (cast(CASE WHEN contract_amount IS NULL THEN 0 ELSE contract_amount END as decimal(18,2))-(select cast(CASE WHEN total_reback_view.sum IS NULL THEN 0 ELSE total_reback_view.sum END as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain, -cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, (select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , (select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain--> <!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain, (select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days, (select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name, (select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name, (select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay, (select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay, (select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay, (select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay, (select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date, (select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date, (select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date, (select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date, (select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date, (select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date (select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where 1=1 from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''"> <if test="contract_unid !=null and contract_unid !=''">
and and
contract_unid=#{contract_unid} contract_unid=#{contract_unid}
</if> </if>
<if test="salesperson_unids !=null"> <if test="salesperson_unids !=null">
and and
salesperson_unid in salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=","> <foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid} #{salesperson_unid}
</foreach> </foreach>
</if> </if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0"> <if test="amount_state_unids !=null and amount_state_unids.length > 0">
and and
amount_state_unid in amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=","> <foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item} #{amount_state_unid_item}
</foreach> </foreach>
</if> </if>
<if test="contract_states !=null and contract_states.length > 0"> <if test="contract_states !=null and contract_states.length > 0">
and and
contract_state in contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=","> <foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0"> <if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and and
salesperson_unid in salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=","> <foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="project_name__like !=null and project_name__like !=''"> <if test="project_name__like !=null and project_name__like !=''">
and and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%') tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if> </if>
<if test="customer_name__like !=null and customer_name__like !=''"> <if test="customer_name__like !=null and customer_name__like !=''">
and and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%') tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if> </if>
<if test="province !=null and province !=''"> <if test="province !=null and province !=''">
and and
province=#{province} province=#{province}
</if> </if>
<if test="city !=null and city !=''"> <if test="city !=null and city !=''">
and and
city=#{city} city=#{city}
</if> </if>
<if test="county !=null and county !=''"> <if test="county !=null and county !=''">
and and
county=#{county} county=#{county}
</if> </if>
<if test="guarantee_period !=null "> <if test="guarantee_period !=null ">
and and
guarantee_period=#{guarantee_period} guarantee_period=#{guarantee_period}
</if> </if>
<if test="year !=null and year !=''"> <if test="year !=null and year !=''">
and and
to_char(sign_date,'yyyy')=#{year} to_char(sign_date,'yyyy')=#{year}
</if> </if>
<if test="month !=null and month!=''"> <if test="month !=null and month!=''">
and and
to_char(sign_date,'MM')=#{month} to_char(sign_date,'MM')=#{month}
</if> </if>
<if test="product_line_type !=null and product_line_type !=''"> <if test="product_line_type !=null and product_line_type !=''">
and and
product_line_type=#{product_line_type} product_line_type=#{product_line_type}
</if> </if>
<if test="contract_state !=null and contract_state !=''"> <if test="contract_state !=null and contract_state !=''">
and and
contract_state=#{contract_state} contract_state=#{contract_state}
</if> </if>
<if test="contract_type !=null and contract_type !=''"> <if test="contract_type !=null and contract_type !=''">
and and
contract_type=#{contract_type} contract_type=#{contract_type}
</if> </if>
<if test="final_user !=null "> <if test="final_user !=null ">
and and
final_user=#{final_user} final_user=#{final_user}
</if> </if>
<if test="relation_customer !=null and relation_customer !=''"> <if test="relation_customer !=null and relation_customer !=''">
and and
relation_customer=#{relation_customer} relation_customer=#{relation_customer}
</if> </if>
<if test="first_industry !=null and first_industry !=''"> <if test="first_industry !=null and first_industry !=''">
and and
first_industry=#{first_industry} first_industry=#{first_industry}
</if> </if>
<if test="second_industry !=null and second_industry !=''"> <if test="second_industry !=null and second_industry !=''">
and and
second_industry=#{second_industry} second_industry=#{second_industry}
</if> </if>
<if test="final_user_name !=null and final_user_name !=''"> <if test="final_user_name !=null and final_user_name !=''">
and and
final_user_name=#{final_user_name} final_user_name=#{final_user_name}
</if> </if>
<if test="relation_customer_name !=null and relation_customer_name !=''"> <if test="relation_customer_name !=null and relation_customer_name !=''">
and and
relation_customer_name=#{relation_customer_name} relation_customer_name=#{relation_customer_name}
</if> </if>
<if test="first_industry_name !=null and first_industry_name !=''"> <if test="first_industry_name !=null and first_industry_name !=''">
and and
first_industry_name=#{first_industry_name} first_industry_name=#{first_industry_name}
</if> </if>
<if test="second_industry_name !=null and second_industry_name !=''"> <if test="second_industry_name !=null and second_industry_name !=''">
and and
second_industry_name=#{second_industry_name} second_industry_name=#{second_industry_name}
</if> </if>
<if test="is_archive !=null"> <if test="is_archive !=null">
and and
is_archive=#{is_archive} is_archive=#{is_archive}
</if> </if>
<if test="acceptanc_type !=null and acceptanc_type !=''"> <if test="acceptanc_type !=null and acceptanc_type !=''">
and and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type}) contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if> </if>
<if test="confirm_income_amount !=null"> <if test="confirm_income_amount !=null">
and and
confirm_income_amount=#{confirm_income_amount} confirm_income_amount=#{confirm_income_amount}
</if> </if>
<if test="amount_state_unid !=null and amount_state_unid !=''"> <if test="amount_state_unid !=null and amount_state_unid !=''">
and and
amount_state_unid=#{amount_state_unid} amount_state_unid=#{amount_state_unid}
</if> </if>
<if test="start_date != null and end_date !=null"> <if test="start_date != null and end_date !=null">
and and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} #{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="amount_start_point !=null "> <if test="amount_start_point !=null ">
and and
contract_amount <![CDATA[>=]]> #{amount_start_point} contract_amount <![CDATA[>=]]> #{amount_start_point}
</if> </if>
<if test="amount_end_point !=null "> <if test="amount_end_point !=null ">
and and
contract_amount <![CDATA[<=]]> #{amount_end_point} contract_amount <![CDATA[<=]]> #{amount_end_point}
</if> </if>
<if test="overdays_start_point !=null and overdays_end_point == null"> <if test="overdays_start_point !=null and overdays_end_point == null">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if> </if>
<if test="overdays_start_point !=null and overdays_end_point !=null "> <if test="overdays_start_point !=null and overdays_end_point !=null ">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="overdays_start_point ==null and overdays_end_point !=null"> <if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="leave_amount_start_point !=null "> <if test="leave_amount_start_point !=null ">
<!--应收款余额-->and <!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if> </if>
<if test="leave_amount_end_point !=null "> <if test="leave_amount_end_point !=null ">
and and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if> </if>
and is_delete=false and is_delete=false
and project_unid is not null and project_unid is not null
and customer_unid is not null and customer_unid is not null
<if test="limit !=null "> <if test="limit !=null ">
limit #{limit} limit #{limit}
</if> </if>
<if test="offset !=null"> <if test="offset !=null">
offset #{offset} offset #{offset}
</if> </if>
</select> </select>
<select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel"> <select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel">
select select
<if test="columns == null"> <if test="columns == null">
* *
</if> </if>
<if test="columns !=null"> <if test="columns !=null">
contract_unid, contract_unid,
<foreach collection="columns" index="index" item="column" separator=","> <foreach collection="columns" index="index" item="column" separator=",">
${column} ${column}
</foreach> </foreach>
</if> </if>
from (select from (select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,final_user_name,relation_customer_name,first_industry_name,second_industry_name, contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,final_user_name,relation_customer_name,first_industry_name,second_industry_name,
guarantee_period,to_char(sign_date, 'yyyy-MM-dd') as sign_date, product_line_type, contract_state, guarantee_period,to_char(sign_date, 'yyyy-MM-dd') as sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note, contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note, cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount, is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount,
amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date, amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, mainten_start_point, contract_note, is_delete, project_unid,
customer_unid, customer_unid,
<!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, --> <!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, -->
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition, (SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion, (SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_proportion, (SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_proportition, (SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_proportition,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_requirement, (SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_requirement, (SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_requirement, (SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_requirement, (SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_requirement,
(select cast(sum(receipt_amount) as decimal(18,2)) from tb_receipt where tb_receipt.contract_unid = tb_contract.contract_unid) as total_receipt_amount , (select cast(sum(receipt_amount) as decimal(18,2)) from tb_receipt where tb_receipt.contract_unid = tb_contract.contract_unid) as total_receipt_amount ,
to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month, to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month,
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2)) (cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, -cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , (select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain--> <!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain, (select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days, (select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name, (select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name, (select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay, (select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay, (select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay, (select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay, (select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
to_char((select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as advance_pay_date, to_char((select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as advance_pay_date,
to_char((select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as arrive_pay_date, to_char((select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as arrive_pay_date,
to_char((select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as acceptanc_pay_date, to_char((select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as acceptanc_pay_date,
to_char((select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as mainten_pay_date, to_char((select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as mainten_pay_date,
<!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date, <!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, --> (select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, -->
to_char((select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as deliver_date, to_char((select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as deliver_date,
to_char((SELECT tb_deliver_goods.goods_acceptanc_date FROM tb_deliver_goods WHERE tb_deliver_goods.deliver_unid = ( SELECT MAX ( tb_deliver_goods.deliver_unid ) FROM tb_deliver_goods WHERE tb_deliver_goods.contract_unid = tb_contract.contract_unid ) ), 'yyyy-MM-dd') as goods_acceptanc_date, to_char((SELECT tb_deliver_goods.goods_acceptanc_date FROM tb_deliver_goods WHERE tb_deliver_goods.deliver_unid = ( SELECT MAX ( tb_deliver_goods.deliver_unid ) FROM tb_deliver_goods WHERE tb_deliver_goods.contract_unid = tb_contract.contract_unid ) ), 'yyyy-MM-dd') as goods_acceptanc_date,
to_char((select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as acceptanc_date to_char((select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as acceptanc_date
from tb_contract where 1=1 from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''"> <if test="contract_unid !=null and contract_unid !=''">
and and
contract_unid=#{contract_unid} contract_unid=#{contract_unid}
</if> </if>
<if test="salesperson_unids !=null"> <if test="salesperson_unids !=null">
and and
salesperson_unid in salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=","> <foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid} #{salesperson_unid}
</foreach> </foreach>
</if> </if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0"> <if test="amount_state_unids !=null and amount_state_unids.length > 0">
and and
amount_state_unid in amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=","> <foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item} #{amount_state_unid_item}
</foreach> </foreach>
</if> </if>
<if test="contract_states !=null and contract_states.length > 0"> <if test="contract_states !=null and contract_states.length > 0">
and and
contract_state in contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=","> <foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0"> <if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and and
salesperson_unid in salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=","> <foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="project_name__like !=null and project_name__like !=''"> <if test="project_name__like !=null and project_name__like !=''">
and and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%') tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if> </if>
<if test="customer_name__like !=null and customer_name__like !=''"> <if test="customer_name__like !=null and customer_name__like !=''">
and and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%') tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if> </if>
<if test="province !=null and province !=''"> <if test="province !=null and province !=''">
and and
province=#{province} province=#{province}
</if> </if>
<if test="city !=null and city !=''"> <if test="city !=null and city !=''">
and and
city=#{city} city=#{city}
</if> </if>
<if test="county !=null and county !=''"> <if test="county !=null and county !=''">
and and
county=#{county} county=#{county}
</if> </if>
<if test="guarantee_period !=null "> <if test="guarantee_period !=null ">
and and
guarantee_period=#{guarantee_period} guarantee_period=#{guarantee_period}
</if> </if>
<if test="year !=null and year !=''"> <if test="year !=null and year !=''">
and and
to_char(sign_date,'yyyy')=#{year} to_char(sign_date,'yyyy')=#{year}
</if> </if>
<if test="month !=null and month!=''"> <if test="month !=null and month!=''">
and and
to_char(sign_date,'MM')=#{month} to_char(sign_date,'MM')=#{month}
</if> </if>
<if test="product_line_type !=null and product_line_type !=''"> <if test="product_line_type !=null and product_line_type !=''">
and and
product_line_type=#{product_line_type} product_line_type=#{product_line_type}
</if> </if>
<if test="contract_state !=null and contract_state !=''"> <if test="contract_state !=null and contract_state !=''">
and and
contract_state=#{contract_state} contract_state=#{contract_state}
</if> </if>
<if test="contract_type !=null and contract_type !=''"> <if test="contract_type !=null and contract_type !=''">
and and
contract_type=#{contract_type} contract_type=#{contract_type}
</if> </if>
<if test="final_user !=null "> <if test="final_user !=null ">
and and
final_user=#{final_user} final_user=#{final_user}
</if> </if>
<if test="relation_customer !=null and relation_customer !=''"> <if test="relation_customer !=null and relation_customer !=''">
and and
relation_customer=#{relation_customer} relation_customer=#{relation_customer}
</if> </if>
<if test="first_industry !=null and first_industry !=''"> <if test="first_industry !=null and first_industry !=''">
and and
first_industry=#{first_industry} first_industry=#{first_industry}
</if> </if>
<if test="second_industry !=null and second_industry !=''"> <if test="second_industry !=null and second_industry !=''">
and and
second_industry=#{second_industry} second_industry=#{second_industry}
</if> </if>
<if test="final_user_name !=null and final_user_name !=''"> <if test="final_user_name !=null and final_user_name !=''">
and and
final_user_name=#{final_user_name} final_user_name=#{final_user_name}
</if> </if>
<if test="relation_customer_name !=null and relation_customer_name !=''"> <if test="relation_customer_name !=null and relation_customer_name !=''">
and and
relation_customer_name=#{relation_customer_name} relation_customer_name=#{relation_customer_name}
</if> </if>
<if test="first_industry_name !=null and first_industry_name !=''"> <if test="first_industry_name !=null and first_industry_name !=''">
and and
first_industry_name=#{first_industry_name} first_industry_name=#{first_industry_name}
</if> </if>
<if test="second_industry_name !=null and second_industry_name !=''"> <if test="second_industry_name !=null and second_industry_name !=''">
and and
second_industry_name=#{second_industry_name} second_industry_name=#{second_industry_name}
</if> </if>
<if test="is_archive !=null"> <if test="is_archive !=null">
and and
is_archive=#{is_archive} is_archive=#{is_archive}
</if> </if>
<if test="acceptanc_type !=null and acceptanc_type !=''"> <if test="acceptanc_type !=null and acceptanc_type !=''">
and and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type}) contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if> </if>
<if test="confirm_income_amount !=null"> <if test="confirm_income_amount !=null">
and and
confirm_income_amount=#{confirm_income_amount} confirm_income_amount=#{confirm_income_amount}
</if> </if>
<if test="amount_state_unid !=null and amount_state_unid !=''"> <if test="amount_state_unid !=null and amount_state_unid !=''">
and and
amount_state_unid=#{amount_state_unid} amount_state_unid=#{amount_state_unid}
</if> </if>
<if test="start_date != null "> <if test="start_date != null ">
and and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date #{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date
</if> </if>
<if test="end_date!=null"> <if test="end_date!=null">
and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="amount_start_point !=null "> <if test="amount_start_point !=null ">
and and
contract_amount <![CDATA[>=]]> #{amount_start_point} contract_amount <![CDATA[>=]]> #{amount_start_point}
</if> </if>
<if test="amount_end_point !=null "> <if test="amount_end_point !=null ">
and and
contract_amount <![CDATA[<=]]> #{amount_end_point} contract_amount <![CDATA[<=]]> #{amount_end_point}
</if> </if>
<!-- <if test="overdays_start_point !=null "> <!-- <if test="overdays_start_point !=null ">
and and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) 逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if> </if>
<if test="overdays_end_point !=null "> <if test="overdays_end_point !=null ">
and and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) 逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> --> </if> -->
<if test="overdays_start_point !=null and overdays_end_point == null"> <if test="overdays_start_point !=null and overdays_end_point == null">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if> </if>
<if test="overdays_start_point !=null and overdays_end_point !=null "> <if test="overdays_start_point !=null and overdays_end_point !=null ">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="overdays_start_point ==null and overdays_end_point !=null"> <if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="leave_amount_start_point !=null "> <if test="leave_amount_start_point !=null ">
<!--应收款余额-->and <!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if> </if>
<if test="leave_amount_end_point !=null "> <if test="leave_amount_end_point !=null ">
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if> </if>
and is_delete=false and is_delete=false
and project_unid is not null and project_unid is not null
and customer_unid is not null and customer_unid is not null
) contract ) contract
order by (contract_unid,amount_state_unid) desc order by (contract_unid,amount_state_unid) desc
</select> </select>
<select id="isDelete" parameterType="String" resultType="Boolean"> <select id="isDelete" parameterType="String" resultType="Boolean">
select is_delete from tb_contract where contract_unid = #{contract_unid} select is_delete from tb_contract where contract_unid = #{contract_unid}
</select> </select>
<select id="queryList" resultType="String"> <select id="queryList" resultType="String">
select contract_unid from tb_contract where select contract_unid from tb_contract where
is_delete=false is_delete=false
<!-- and project_unid is null <!-- and project_unid is null
and customer_unid is null --> and customer_unid is null -->
</select> </select>
<select id="countNumber" resultType="int"> <select id="countNumber" resultType="int">
select count(contract_unid) from tb_contract where is_delete=false select count(contract_unid) from tb_contract where is_delete=false
</select> </select>
<delete id="actualDeleteOne" parameterType="String"> <delete id="actualDeleteOne" parameterType="String">
delete from tb_contract where contract_unid = #{contract_unid} delete from tb_contract where contract_unid = #{contract_unid}
</delete> </delete>
<select id="timeUpdate" resultType="java.lang.String"> <select id="timeUpdate" resultType="java.lang.String">
select timing_update_amount_state() select timing_update_amount_state()
</select> </select>
</mapper> </mapper>
package com.vion.financial.service.imp; package com.vion.financial.service.imp;
import java.io.IOException; import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import com.vion.financial.handler.DownLoad; import com.vion.financial.handler.DownLoad;
import com.vion.financial.handler.ImportExcel; import com.vion.financial.handler.ImportExcel;
//import com.vion.financial.handler.ImportExcel; //import com.vion.financial.handler.ImportExcel;
import com.vion.financial.handler.ImportHandle; import com.vion.financial.handler.ImportHandle;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.vion.financial.config.FinanceConfig; import com.vion.financial.config.FinanceConfig;
import com.vion.financial.entity.Appendix; import com.vion.financial.entity.Appendix;
import com.vion.financial.entity.Contract; import com.vion.financial.entity.Contract;
import com.vion.financial.entity.Customer; import com.vion.financial.entity.Customer;
import com.vion.financial.entity.DeliverGoods; import com.vion.financial.entity.DeliverGoods;
import com.vion.financial.entity.PaymentAgree; import com.vion.financial.entity.PaymentAgree;
import com.vion.financial.entity.Project; import com.vion.financial.entity.Project;
import com.vion.financial.entity.ProjectAcceptanc; import com.vion.financial.entity.ProjectAcceptanc;
import com.vion.financial.entity.Receipt; import com.vion.financial.entity.Receipt;
import com.vion.financial.entity.ReturnInfo; import com.vion.financial.entity.ReturnInfo;
import com.vion.financial.excel.ExportModel; import com.vion.financial.excel.ExportModel;
import com.vion.financial.excel.ImportModel; import com.vion.financial.excel.ImportModel;
import com.vion.financial.mapper.AppendixMapper; import com.vion.financial.mapper.AppendixMapper;
import com.vion.financial.mapper.ContractMapper; import com.vion.financial.mapper.ContractMapper;
import com.vion.financial.mapper.CustomerMapper; import com.vion.financial.mapper.CustomerMapper;
import com.vion.financial.mapper.DeliverGoodsMapper; import com.vion.financial.mapper.DeliverGoodsMapper;
import com.vion.financial.mapper.PaymentAgreeMapper; import com.vion.financial.mapper.PaymentAgreeMapper;
import com.vion.financial.mapper.ProjectAcceptancMapper; import com.vion.financial.mapper.ProjectAcceptancMapper;
import com.vion.financial.mapper.ProjectMapper; import com.vion.financial.mapper.ProjectMapper;
import com.vion.financial.mapper.ReceiptMapper; import com.vion.financial.mapper.ReceiptMapper;
import com.vion.financial.mapper.ReturnInfoMapper; import com.vion.financial.mapper.ReturnInfoMapper;
import com.vion.financial.service.ContractService; import com.vion.financial.service.ContractService;
import com.vion.financial.utils.DateUtil; import com.vion.financial.utils.DateUtil;
import com.vion.financial.utils.HttpNetClient; import com.vion.financial.utils.HttpNetClient;
import com.vion.financial.utils.JavaBean2Json; import com.vion.financial.utils.JavaBean2Json;
import com.vion.financial.vo.ContractVo; import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.FailCode; import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.ResultVo; import com.vion.financial.vo.ResultVo;
import com.vion.financial.vo.SelectVo; import com.vion.financial.vo.SelectVo;
import com.vion.financial.vo.SuccessCode; import com.vion.financial.vo.SuccessCode;
import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil; import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import cn.afterturn.easypoi.handler.inter.IExcelDataHandler; import cn.afterturn.easypoi.handler.inter.IExcelDataHandler;
@Service @Service
public class ContractServiceImpl implements ContractService { public class ContractServiceImpl implements ContractService {
Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class); Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class);
private static Map<String,String> head_title_name = new HashMap<String,String>(); private static Map<String,String> head_title_name = new HashMap<String,String>();
{ {
head_title_name.put("year","所属年份"); head_title_name.put("year","所属年份");
head_title_name.put( "product_line_type","产品线类型"); head_title_name.put( "product_line_type","产品线类型");
head_title_name.put("sign_date","签订日期"); head_title_name.put("sign_date","签订日期");
head_title_name.put("month","所属月份"); head_title_name.put("month","所属月份");
head_title_name.put("salesperson_unid","销售员"); head_title_name.put("salesperson_unid","销售员");
head_title_name.put("province_name","省"); head_title_name.put("province_name","省");
head_title_name.put("city_name","市"); head_title_name.put("city_name","市");
head_title_name.put("county_name","县"); head_title_name.put("county_name","县");
head_title_name.put("customer_name","客户名称"); head_title_name.put("customer_name","客户名称");
head_title_name.put("project_name","项目名称"); head_title_name.put("project_name","项目名称");
head_title_name.put("contract_amount","合同金额"); head_title_name.put("contract_amount","合同金额");
head_title_name.put("stop_amount","暂停金额"); head_title_name.put("stop_amount","暂停金额");
head_title_name.put("bad_amount","坏账金额"); head_title_name.put("bad_amount","坏账金额");
head_title_name.put("exemptions_amount","豁免金额"); head_title_name.put("exemptions_amount","豁免金额");
head_title_name.put("deduct_amount","折扣金额"); head_title_name.put("deduct_amount","折扣金额");
head_title_name.put("total_reback_amount","累计已收款"); head_title_name.put("total_reback_amount","累计已收款");
head_title_name.put("contract_remain","合同余额"); head_title_name.put("contract_remain","合同余额");
head_title_name.put("amount_state_unid","账款状态"); head_title_name.put("amount_state_unid","账款状态");
head_title_name.put("total_receive_amount","累计应收款"); head_title_name.put("total_receive_amount","累计应收款");
head_title_name.put("total_amount_remain","应收账款余额"); head_title_name.put("total_amount_remain","应收账款余额");
head_title_name.put("over_days","逾期天数"); head_title_name.put("over_days","逾期天数");
head_title_name.put("advance_pay","预付款金额"); head_title_name.put("advance_pay","预付款金额");
head_title_name.put("advance_pay_date","预付款到期日"); head_title_name.put("advance_pay_date","预付款到期日");
head_title_name.put("arrive_pay","到货款金额"); head_title_name.put("arrive_pay","到货款金额");
head_title_name.put("deliver_date","发货日期"); head_title_name.put("deliver_date","发货日期");
head_title_name.put("arrive_pay_date","到货款到期日"); head_title_name.put("arrive_pay_date","到货款到期日");
head_title_name.put("acceptanc_pay","验收款金额"); head_title_name.put("acceptanc_pay","验收款金额");
head_title_name.put("acceptanc_date","验收日期"); head_title_name.put("acceptanc_date","验收日期");
head_title_name.put("acceptanc_pay_date","验收款到期日"); head_title_name.put("acceptanc_pay_date","验收款到期日");
head_title_name.put("mainten_pay","质保金额"); head_title_name.put("mainten_pay","质保金额");
head_title_name.put("mainten_pay_date","质保款到期日"); head_title_name.put("mainten_pay_date","质保款到期日");
head_title_name.put("goods_acceptanc_date", "到货验收日期"); head_title_name.put("goods_acceptanc_date", "到货验收日期");
head_title_name.put("confirm_income_amount", "确认收入金额"); head_title_name.put("confirm_income_amount", "确认收入金额");
head_title_name.put("total_receipt_amount", "累计开票金额"); head_title_name.put("total_receipt_amount", "累计开票金额");
head_title_name.put("contract_note", "合同备注"); head_title_name.put("contract_note", "合同备注");
head_title_name.put("bad_amount_note", "坏账金额备注"); head_title_name.put("bad_amount_note", "坏账金额备注");
head_title_name.put("reback_note", "暂停金额备注"); head_title_name.put("reback_note", "暂停金额备注");
head_title_name.put("contract_remain_note", "豁免金额备注"); head_title_name.put("contract_remain_note", "豁免金额备注");
head_title_name.put("contract_amount_note", "抵扣金额备注"); head_title_name.put("contract_amount_note", "抵扣金额备注");
head_title_name.put("advance_pay_proporition", "预付款比例"); head_title_name.put("advance_pay_proporition", "预付款比例");
head_title_name.put("arrive_pay_proportion", "到货款比例"); head_title_name.put("arrive_pay_proportion", "到货款比例");
head_title_name.put("acceptanc_pay_proportion", "验收款比例"); head_title_name.put("acceptanc_pay_proportion", "验收款比例");
head_title_name.put("mainten_pay_proportition", "质保款比例"); head_title_name.put("mainten_pay_proportition", "质保款比例");
head_title_name.put("advance_pay_requirement", "预付款条件"); head_title_name.put("advance_pay_requirement", "预付款条件");
head_title_name.put("arrive_pay_requirement", "到货款条件"); head_title_name.put("arrive_pay_requirement", "到货款条件");
head_title_name.put("acceptanc_pay_requirement", "验收款条件"); head_title_name.put("acceptanc_pay_requirement", "验收款条件");
head_title_name.put("mainten_pay_requirement", "质保款条件"); head_title_name.put("mainten_pay_requirement", "质保款条件");
head_title_name.put("final_user_name","最终用户"); head_title_name.put("final_user_name","最终用户");
head_title_name.put("relation_customer_name","关联客户"); head_title_name.put("relation_customer_name","关联客户");
head_title_name.put("first_industry_name","一级行业"); head_title_name.put("first_industry_name","一级行业");
head_title_name.put("second_industry_name","二级行业"); head_title_name.put("second_industry_name","二级行业");
} }
private static Map<String,String> head_title_key = new HashMap<String,String>(); private static Map<String,String> head_title_key = new HashMap<String,String>();
{ {
head_title_key.put("year","year"); head_title_key.put("year","year");
head_title_key.put( "product_line_type","product_line_type_name"); head_title_key.put( "product_line_type","product_line_type_name");
head_title_key.put("sign_date","sign_date"); head_title_key.put("sign_date","sign_date");
head_title_key.put("month","month"); head_title_key.put("month","month");
head_title_key.put("salesperson_unid","salesperson_name"); head_title_key.put("salesperson_unid","salesperson_name");
head_title_key.put("province_name","province_name"); head_title_key.put("province_name","province_name");
head_title_key.put("city_name","city_name"); head_title_key.put("city_name","city_name");
head_title_key.put("county_name","county_name"); head_title_key.put("county_name","county_name");
head_title_key.put("customer_name","customer_name"); head_title_key.put("customer_name","customer_name");
head_title_key.put("project_name","project_name"); head_title_key.put("project_name","project_name");
head_title_key.put("contract_amount","contract_amount"); head_title_key.put("contract_amount","contract_amount");
head_title_key.put("stop_amount","stop_amount"); head_title_key.put("stop_amount","stop_amount");
head_title_key.put("bad_amount","bad_amount"); head_title_key.put("bad_amount","bad_amount");
head_title_key.put("exemptions_amount","exemptions_amount"); head_title_key.put("exemptions_amount","exemptions_amount");
head_title_key.put("deduct_amount","deduct_amount"); head_title_key.put("deduct_amount","deduct_amount");
head_title_key.put("total_reback_amount","total_reback_amount"); head_title_key.put("total_reback_amount","total_reback_amount");
head_title_key.put("contract_remain","contract_remain"); head_title_key.put("contract_remain","contract_remain");
head_title_key.put("amount_state_unid","amount_state_unid_name"); head_title_key.put("amount_state_unid","amount_state_unid_name");
head_title_key.put("total_receive_amount","total_receive_amount"); head_title_key.put("total_receive_amount","total_receive_amount");
head_title_key.put("total_amount_remain","total_amount_remain"); head_title_key.put("total_amount_remain","total_amount_remain");
head_title_key.put("over_days","over_days"); head_title_key.put("over_days","over_days");
head_title_key.put("advance_pay","advance_pay"); head_title_key.put("advance_pay","advance_pay");
head_title_key.put("advance_pay_date","advance_pay_date"); head_title_key.put("advance_pay_date","advance_pay_date");
head_title_key.put("arrive_pay","arrive_pay"); head_title_key.put("arrive_pay","arrive_pay");
head_title_key.put("deliver_date","deliver_date"); head_title_key.put("deliver_date","deliver_date");
head_title_key.put("arrive_pay_date","arrive_pay_date"); head_title_key.put("arrive_pay_date","arrive_pay_date");
head_title_key.put("acceptanc_pay","acceptanc_pay"); head_title_key.put("acceptanc_pay","acceptanc_pay");
head_title_key.put("acceptanc_date","acceptanc_date"); head_title_key.put("acceptanc_date","acceptanc_date");
head_title_key.put("acceptanc_pay_date","acceptanc_pay_date"); head_title_key.put("acceptanc_pay_date","acceptanc_pay_date");
head_title_key.put("mainten_pay","mainten_pay"); head_title_key.put("mainten_pay","mainten_pay");
head_title_key.put("mainten_pay_date","mainten_pay_date"); head_title_key.put("mainten_pay_date","mainten_pay_date");
head_title_key.put("goods_acceptanc_date", "goods_acceptanc_date"); head_title_key.put("goods_acceptanc_date", "goods_acceptanc_date");
head_title_key.put("confirm_income_amount", "confirm_income_amount"); head_title_key.put("confirm_income_amount", "confirm_income_amount");
head_title_key.put("total_receipt_amount", "total_receipt_amount"); head_title_key.put("total_receipt_amount", "total_receipt_amount");
head_title_key.put("contract_note", "contract_note"); head_title_key.put("contract_note", "contract_note");
head_title_key.put("bad_amount_note", "bad_amount_note"); head_title_key.put("bad_amount_note", "bad_amount_note");
head_title_key.put("reback_note", "reback_note"); head_title_key.put("reback_note", "reback_note");
head_title_key.put("contract_remain_note", "contract_remain_note"); head_title_key.put("contract_remain_note", "contract_remain_note");
head_title_key.put("contract_amount_note", "contract_amount_note"); head_title_key.put("contract_amount_note", "contract_amount_note");
head_title_key.put("advance_pay_proporition", "advance_pay_proporition"); head_title_key.put("advance_pay_proporition", "advance_pay_proporition");
head_title_key.put("arrive_pay_proportion", "arrive_pay_proportion"); head_title_key.put("arrive_pay_proportion", "arrive_pay_proportion");
head_title_key.put("acceptanc_pay_proportion", "acceptanc_pay_proportion"); head_title_key.put("acceptanc_pay_proportion", "acceptanc_pay_proportion");
head_title_key.put("mainten_pay_proportition", "mainten_pay_proportition"); head_title_key.put("mainten_pay_proportition", "mainten_pay_proportition");
head_title_key.put("advance_pay_requirement", "advance_pay_requirement"); head_title_key.put("advance_pay_requirement", "advance_pay_requirement");
head_title_key.put("arrive_pay_requirement", "arrive_pay_requirement"); head_title_key.put("arrive_pay_requirement", "arrive_pay_requirement");
head_title_key.put("acceptanc_pay_requirement", "acceptanc_pay_requirement"); head_title_key.put("acceptanc_pay_requirement", "acceptanc_pay_requirement");
head_title_key.put("mainten_pay_requirement", "mainten_pay_requirement"); head_title_key.put("mainten_pay_requirement", "mainten_pay_requirement");
head_title_key.put("final_user_name", "final_user_name"); head_title_key.put("final_user_name", "final_user_name");
head_title_key.put("relation_customer_name", "relation_customer_name"); head_title_key.put("relation_customer_name", "relation_customer_name");
head_title_key.put("first_industry_name", "first_industry_name"); head_title_key.put("first_industry_name", "first_industry_name");
head_title_key.put("second_industry_name", "second_industry_name"); head_title_key.put("second_industry_name", "second_industry_name");
} }
private static Map<String,String> num_key = new HashMap<String,String>(); private static Map<String,String> num_key = new HashMap<String,String>();
{ {
num_key.put("contract_amount","###############.00"); num_key.put("contract_amount","###############.00");
num_key.put("stop_amount","###############.00"); num_key.put("stop_amount","###############.00");
num_key.put("bad_amount","###############.00"); num_key.put("bad_amount","###############.00");
num_key.put("exemptions_amount","###############.00"); num_key.put("exemptions_amount","###############.00");
num_key.put("deduct_amount","###############.00"); num_key.put("deduct_amount","###############.00");
num_key.put("total_reback_amount","###############.00"); num_key.put("total_reback_amount","###############.00");
num_key.put("contract_remain","###############.00"); num_key.put("contract_remain","###############.00");
num_key.put("total_receive_amount","###############.00"); num_key.put("total_receive_amount","###############.00");
num_key.put("total_amount_remain","###############.00"); num_key.put("total_amount_remain","###############.00");
num_key.put("advance_pay","###############.00"); num_key.put("advance_pay","###############.00");
num_key.put("arrive_pay","###############.00"); num_key.put("arrive_pay","###############.00");
num_key.put("acceptanc_pay","###############.00"); num_key.put("acceptanc_pay","###############.00");
num_key.put("mainten_pay","###############.00"); num_key.put("mainten_pay","###############.00");
num_key.put("confirm_income_amount","###############.00"); num_key.put("confirm_income_amount","###############.00");
num_key.put("total_receipt_amount","###############.00"); num_key.put("total_receipt_amount","###############.00");
} }
@Autowired @Autowired
ContractMapper contractMapper; ContractMapper contractMapper;
@Autowired @Autowired
AppendixMapper appendixMapper; AppendixMapper appendixMapper;
@Autowired @Autowired
PaymentAgreeMapper paymentAgreeMapper; PaymentAgreeMapper paymentAgreeMapper;
@Autowired @Autowired
SuccessCode successCode; SuccessCode successCode;
@Autowired @Autowired
FailCode failCode; FailCode failCode;
@Autowired @Autowired
ProjectMapper projectMapper; ProjectMapper projectMapper;
@Autowired @Autowired
CustomerMapper customerMapper; CustomerMapper customerMapper;
@Autowired @Autowired
ReturnInfoMapper returnInfoMapper; ReturnInfoMapper returnInfoMapper;
@Autowired @Autowired
ReceiptMapper receiptMapper; ReceiptMapper receiptMapper;
@Autowired @Autowired
ProjectAcceptancMapper projectAcceptancMapper; ProjectAcceptancMapper projectAcceptancMapper;
@Autowired @Autowired
DeliverGoodsMapper deliverGoodsMapper; DeliverGoodsMapper deliverGoodsMapper;
@Autowired @Autowired
FinanceConfig financeConfig; FinanceConfig financeConfig;
/*** /***
* 新增合同信息 * 新增合同信息
*/ */
@Override @Override
public Object addOne(ContractVo contractVo) { public Object addOne(ContractVo contractVo) {
try { try {
// 先插入合同信息 // 先插入合同信息
logger.info("============新增合同 start ============"); logger.info("============新增合同 start ============");
// 根据附件unid集合更新附件表信息 // 根据附件unid集合更新附件表信息
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
if (contractMapper.queryOne(contractVo.getContract_unid()) != null) { if (contractMapper.queryOne(contractVo.getContract_unid()) != null) {
failCode.setEcode("600"); failCode.setEcode("600");
failCode.setEnote("已存在"); failCode.setEnote("已存在");
return failCode; return failCode;
} else { } else {
contractVo.setIs_delete(false); contractVo.setIs_delete(false);
contractMapper.addOne(contractVo); contractMapper.addOne(contractVo);
} }
appendix.setBusiness_table("tb_contract"); appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(contractVo.getContract_unid()); appendix.setBusiness_unid(contractVo.getContract_unid());
if(contractVo.getAppendix_unids()!=null) { if(contractVo.getAppendix_unids()!=null) {
for (int n : contractVo.getAppendix_unids()) { for (int n : contractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n); appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix); appendixMapper.updateAppendix(appendix);
} }
} }
return successCode; return successCode;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
logger.error("增加合同异常:" + e.getLocalizedMessage(), e); logger.error("增加合同异常:" + e.getLocalizedMessage(), e);
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("增加异常"); failCode.setEnote("增加异常");
return failCode; return failCode;
} }
} }
@Override @Override
public Object queryOne(String s) { public Object queryOne(String s) {
try { try {
logger.info("================查询合同start==================="); logger.info("================查询合同start===================");
Boolean isdelete = contractMapper.isDelete(s); Boolean isdelete = contractMapper.isDelete(s);
if (isdelete != null && !isdelete) { if (isdelete != null && !isdelete) {
ContractVo contractVo = contractMapper.queryOne(s); ContractVo contractVo = contractMapper.queryOne(s);
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract"); appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(s); appendix.setBusiness_unid(s);
List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix); List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix);
contractVo.setAppendix_list(appendixs); contractVo.setAppendix_list(appendixs);
return contractVo; return contractVo;
} else { } else {
failCode.setEcode("100"); failCode.setEcode("100");
failCode.setEnote("合同已删除"); failCode.setEnote("合同已删除");
return failCode; return failCode;
} }
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
/* return failCode; */ /* return failCode; */
logger.error("查询合同异常" + e.getLocalizedMessage(), e); logger.error("查询合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("查询异常"); failCode.setEnote("查询异常");
return failCode; return failCode;
} }
} }
@Override @Override
public Object updateOne(ContractVo vontractVo) { public Object updateOne(ContractVo vontractVo) {
try { try {
logger.info("======================修改合同start====================="); logger.info("======================修改合同start=====================");
contractMapper.updateOne(vontractVo); contractMapper.updateOne(vontractVo);
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract"); appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(vontractVo.getContract_unid()); appendix.setBusiness_unid(vontractVo.getContract_unid());
if(vontractVo.getAppendix_unids()!=null) { if(vontractVo.getAppendix_unids()!=null) {
for (int n : vontractVo.getAppendix_unids()) { for (int n : vontractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n); appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix); appendixMapper.updateAppendix(appendix);
} }
} }
return successCode; return successCode;
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
logger.error("修改合同异常" + e.getLocalizedMessage(), e); logger.error("修改合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("修改异常"); failCode.setEnote("修改异常");
return failCode; return failCode;
} }
} }
@Override @Override
public Object deleteOne(String s) { public Object deleteOne(String s) {
try { try {
logger.info("=================删除合同================="); logger.info("=================删除合同=================");
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
appendix.setBusiness_unid(s); appendix.setBusiness_unid(s);
// contractMapper.updateSingleContract(contractVo); // contractMapper.updateSingleContract(contractVo);
contractMapper.deleteOne(s); contractMapper.deleteOne(s);
appendixMapper.deleteAppendix(appendix); appendixMapper.deleteAppendix(appendix);
return successCode; return successCode;
} catch (Exception e) { } catch (Exception e) {
logger.error("删除合同异常" + e.getLocalizedMessage(), e); logger.error("删除合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("删除异常"); failCode.setEnote("删除异常");
return failCode; return failCode;
} }
} }
public Boolean isDelete(String s) { public Boolean isDelete(String s) {
return contractMapper.isDelete(s); return contractMapper.isDelete(s);
} }
@Override @Override
public Object queryList() { public Object queryList() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("=================查询合同编号================="); logger.info("=================查询合同编号=================");
return contractMapper.queryList(); return contractMapper.queryList();
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
logger.error("查询合同列表异常" + e.getLocalizedMessage(), e); logger.error("查询合同列表异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("查询异常"); failCode.setEnote("查询异常");
return failCode; return failCode;
} }
} }
@Override @Override
public Object selectByCondition(SelectVo selectVo) { public Object selectByCondition(SelectVo selectVo) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
ResultVo resultVo=new ResultVo(); ResultVo resultVo=new ResultVo();
logger.info("========================筛选合同列表==========================="); logger.info("========================筛选合同列表===========================");
List<Map> list_data = null; List<Map> list_data = null;
/* List<Map> list_province=null; /* List<Map> list_province=null;
List<Map> list_city=null; List<Map> list_city=null;
List<Map> list_county=null;*/ List<Map> list_county=null;*/
int count=0; int count=0;
// 调用auth服务的接口获取用户列表信息 // 调用auth服务的接口获取用户列表信息
String url = financeConfig.getAuthurl(); String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null); String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class); Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data"); list_data = (List<Map>) map.get("list_data");
if (StringUtils.isNotBlank(selectVo.getSalesperson_name__like())) { if (StringUtils.isNotBlank(selectVo.getSalesperson_name__like())) {
List<String> salesperson_unids = new ArrayList<String>(); List<String> salesperson_unids = new ArrayList<String>();
if(list_data != null && list_data.size() > 0) { if(list_data != null && list_data.size() > 0) {
String name = ""; String name = "";
for(Map _map:list_data) { for(Map _map:list_data) {
name = (String) _map.get("name"); name = (String) _map.get("name");
if(name != null && name.contains(selectVo.getSalesperson_name__like())) { if(name != null && name.contains(selectVo.getSalesperson_name__like())) {
salesperson_unids.add((String) _map.get("user_unid")); salesperson_unids.add((String) _map.get("user_unid"));
} }
} }
selectVo.setSalesperson_unids(salesperson_unids.size() > 0 ? salesperson_unids : null); selectVo.setSalesperson_unids(salesperson_unids.size() > 0 ? salesperson_unids : null);
} }
if(salesperson_unids.size() == 0) { if(salesperson_unids.size() == 0) {
resultVo.setList_data(new ArrayList<ContractVo>()); resultVo.setList_data(new ArrayList<ContractVo>());
resultVo.setList_size(selectVo.getLimit()== null ? 0 : selectVo.getLimit()); resultVo.setList_size(selectVo.getLimit()== null ? 0 : selectVo.getLimit());
resultVo.setOffset(selectVo.getOffset()== null ? 0 : selectVo.getOffset()); resultVo.setOffset(selectVo.getOffset()== null ? 0 : selectVo.getOffset());
resultVo.setTotal_number(0); resultVo.setTotal_number(0);
return resultVo; return resultVo;
} }
} }
count = contractMapper.count(selectVo); count = contractMapper.count(selectVo);
List<ContractVo> list = contractMapper.selectByCondition(selectVo); List<ContractVo> list = contractMapper.selectByCondition(selectVo);
if(list!=null) { if(list!=null) {
for (ContractVo contractVo : list) { for (ContractVo contractVo : list) {
//contractVo.setPaymentAgree_list(paymentAgreeMapper.queryPaymentAgree(contractVo.getContract_unid())); //contractVo.setPaymentAgree_list(paymentAgreeMapper.queryPaymentAgree(contractVo.getContract_unid()));
if(list_data != null && list_data.size() > 0) { if(list_data != null && list_data.size() > 0) {
for(Map _map:list_data) { for(Map _map:list_data) {
if(contractVo.getSalesperson_unid()!=null) { if(contractVo.getSalesperson_unid()!=null) {
if (contractVo.getSalesperson_unid().equals(_map.get("user_unid"))) { if (contractVo.getSalesperson_unid().equals(_map.get("user_unid"))) {
contractVo.setSalesperson_name((String) _map.get("name")); contractVo.setSalesperson_name((String) _map.get("name"));
} }
} }
} }
} }
if(contractVo.getAmount_state_unid()!=null) { if(contractVo.getAmount_state_unid()!=null) {
switch(contractVo.getAmount_state_unid()) { switch(contractVo.getAmount_state_unid()) {
case "50001" : case "50001" :
contractVo.setAmount_state_unid_name("正常验收款"); contractVo.setAmount_state_unid_name("正常验收款");
break; break;
case "50002" : case "50002" :
contractVo.setAmount_state_unid_name("正常维保"); contractVo.setAmount_state_unid_name("正常维保");
break; break;
case "50003" : case "50003" :
contractVo.setAmount_state_unid_name("正常预付款"); contractVo.setAmount_state_unid_name("正常预付款");
break; break;
case "50004" : case "50004" :
contractVo.setAmount_state_unid_name("正常到货款"); contractVo.setAmount_state_unid_name("正常到货款");
break; break;
case "50005" : case "50005" :
contractVo.setAmount_state_unid_name("正常质保款"); contractVo.setAmount_state_unid_name("正常质保款");
break; break;
case "50006" : case "50006" :
contractVo.setAmount_state_unid_name("逾期预付款"); contractVo.setAmount_state_unid_name("逾期预付款");
break; break;
case "50007" : case "50007" :
contractVo.setAmount_state_unid_name("逾期到货款"); contractVo.setAmount_state_unid_name("逾期到货款");
break; break;
case "50008" : case "50008" :
contractVo.setAmount_state_unid_name("逾期验收款"); contractVo.setAmount_state_unid_name("逾期验收款");
break; break;
case "50009" : case "50009" :
contractVo.setAmount_state_unid_name("逾期质保款"); contractVo.setAmount_state_unid_name("逾期质保款");
break; break;
case "50012" : case "50012" :
contractVo.setAmount_state_unid_name("逾期维保款"); contractVo.setAmount_state_unid_name("逾期维保款");
break; break;
case "50010" : case "50010" :
contractVo.setAmount_state_unid_name("已完成"); contractVo.setAmount_state_unid_name("已完成");
break; break;
default: default:
break; break;
} }
} }
} }
} }
resultVo.setList_data(list); resultVo.setList_data(list);
resultVo.setList_size(list.size()); resultVo.setList_size(list.size());
resultVo.setOffset(selectVo.getOffset()); resultVo.setOffset(selectVo.getOffset());
resultVo.setTotal_number(count); resultVo.setTotal_number(count);
return resultVo; return resultVo;
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
logger.error("筛选合同列表异常" + e.getLocalizedMessage(), e); logger.error("筛选合同列表异常" + e.getLocalizedMessage(), e);
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("筛选异常"); failCode.setEnote("筛选异常");
return failCode; return failCode;
} }
} }
@Override @Override
public void exportExcel(SelectVo selectVo,HttpServletResponse response) { public void exportExcel(SelectVo selectVo,HttpServletResponse response) {
logger.info("========================导出合同Excel表格==========================="); logger.info("========================导出合同Excel表格===========================");
List<Map> list_data = null; List<Map> list_data = null;
String url = financeConfig.getAuthurl(); String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null); String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class); Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data"); list_data = (List<Map>) map.get("list_data");
if (StringUtils.isNotBlank(selectVo.getSalesperson_name__like())) { if (StringUtils.isNotBlank(selectVo.getSalesperson_name__like())) {
if(list_data != null && list_data.size() > 0) { if(list_data != null && list_data.size() > 0) {
List<String> salesperson_unids = new ArrayList<String>(); List<String> salesperson_unids = new ArrayList<String>();
String name = ""; String name = "";
for(Map _map:list_data) { for(Map _map:list_data) {
name = (String) _map.get("name"); name = (String) _map.get("name");
if(name !=null && name.contains(selectVo.getSalesperson_name__like())) { if(name !=null && name.contains(selectVo.getSalesperson_name__like())) {
salesperson_unids.add((String) _map.get("user_unid")); salesperson_unids.add((String) _map.get("user_unid"));
} }
} }
selectVo.setSalesperson_unids(salesperson_unids); selectVo.setSalesperson_unids(salesperson_unids);
} }
} }
List<ExportModel> list = contractMapper.exportContracts(selectVo); List<ExportModel> list = contractMapper.exportContracts(selectVo);
for (ExportModel exportModel : list) { for (ExportModel exportModel : list) {
if(list_data != null && list_data.size() > 0) { if(list_data != null && list_data.size() > 0) {
for(Map _map:list_data) { for(Map _map:list_data) {
if (StringUtils.isNotBlank(exportModel.getSalesperson_unid()) && exportModel.getSalesperson_unid().equals(_map.get("user_unid"))) { if (StringUtils.isNotBlank(exportModel.getSalesperson_unid()) && exportModel.getSalesperson_unid().equals(_map.get("user_unid"))) {
exportModel.setSalesperson_name((String) _map.get("name")); exportModel.setSalesperson_name((String) _map.get("name"));
} }
} }
} }
if(exportModel.getAmount_state_unid()!=null) { if(exportModel.getAmount_state_unid()!=null) {
switch(exportModel.getAmount_state_unid()) { switch(exportModel.getAmount_state_unid()) {
case "50001" : case "50001" :
exportModel.setAmount_state_unid_name("正常验收款"); exportModel.setAmount_state_unid_name("正常验收款");
break; break;
case "50002" : case "50002" :
exportModel.setAmount_state_unid_name("正常维保"); exportModel.setAmount_state_unid_name("正常维保");
break; break;
case "50003" : case "50003" :
exportModel.setAmount_state_unid_name("正常预付款"); exportModel.setAmount_state_unid_name("正常预付款");
break; break;
case "50004" : case "50004" :
exportModel.setAmount_state_unid_name("正常到货款"); exportModel.setAmount_state_unid_name("正常到货款");
break; break;
case "50005" : case "50005" :
exportModel.setAmount_state_unid_name("正常质保款"); exportModel.setAmount_state_unid_name("正常质保款");
break; break;
case "50006" : case "50006" :
exportModel.setAmount_state_unid_name("逾期预付款"); exportModel.setAmount_state_unid_name("逾期预付款");
break; break;
case "50007" : case "50007" :
exportModel.setAmount_state_unid_name("逾期到货款"); exportModel.setAmount_state_unid_name("逾期到货款");
break; break;
case "50008" : case "50008" :
exportModel.setAmount_state_unid_name("逾期验收款"); exportModel.setAmount_state_unid_name("逾期验收款");
break; break;
case "50009" : case "50009" :
exportModel.setAmount_state_unid_name("逾期质保款"); exportModel.setAmount_state_unid_name("逾期质保款");
break; break;
case "50012" : case "50012" :
exportModel.setAmount_state_unid_name("逾期维保款"); exportModel.setAmount_state_unid_name("逾期维保款");
break; break;
case "50010" : case "50010" :
exportModel.setAmount_state_unid_name("已完成"); exportModel.setAmount_state_unid_name("已完成");
break; break;
default: default:
break; break;
} }
} }
if(exportModel.getProduct_line_type()!=null) { if(exportModel.getProduct_line_type()!=null) {
switch(exportModel.getProduct_line_type()) { switch(exportModel.getProduct_line_type()) {
case "20001" : case "20001" :
exportModel.setProduct_line_type_name("智慧城市"); exportModel.setProduct_line_type_name("智慧城市");
break; break;
case "20002" : case "20002" :
exportModel.setProduct_line_type_name("智慧商业"); exportModel.setProduct_line_type_name("智慧商业");
break; break;
case "20003" : case "20003" :
exportModel.setProduct_line_type_name("其它"); exportModel.setProduct_line_type_name("其它");
break; break;
default: default:
break; break;
} }
} }
} }
try { try {
DownLoad downLoad =new DownLoad(); DownLoad downLoad =new DownLoad();
if(selectVo.getColumns() != null && selectVo.getColumns().length > 0) { if(selectVo.getColumns() != null && selectVo.getColumns().length > 0) {
downLoad.dynamicExportExcel("合同Excel表格", "合同Excel表格", dynamicCreatTableHead(selectVo),dynamicCreatTableDatas(list), "合同.xls", response); downLoad.dynamicExportExcel("合同Excel表格", "合同Excel表格", dynamicCreatTableHead(selectVo),dynamicCreatTableDatas(list), "合同.xls", response);
}else { }else {
downLoad.exportExcel(list, "合同Excel表格", "合同Excel表格", ExportModel.class, "合同.xls", response); downLoad.exportExcel(list, "合同Excel表格", "合同Excel表格", ExportModel.class, "合同.xls", response);
} }
} catch (Exception e) { } catch (Exception e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
@Override @Override
public Object importExcel(MultipartFile file,String ranke) { public Object importExcel(MultipartFile file,String ranke) {
logger.info("========================导入合同Excel表格==========================="); logger.info("========================导入合同Excel表格===========================");
//ImportExcel importExcel = new ImportExcel(); //ImportExcel importExcel = new ImportExcel();
try { try {
ImportExcel importExcel = new ImportExcel(); ImportExcel importExcel = new ImportExcel();
if(!importExcel.IsIlegal(file,ranke)) { if(!importExcel.IsIlegal(file,ranke)) {
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("导入失败"); failCode.setEnote("导入失败");
return failCode; return failCode;
} }
List<List<ImportModel>> list=importExcel.Import(file); List<List<ImportModel>> list=importExcel.Import(file);
String s="s"; String s="s";
if(importExcel.flag) { if(importExcel.flag) {
s=s+"!"; s=s+"!";
logger.info(s); logger.info(s);
} }
boolean is_repeat=true; boolean is_repeat=true;
String authorization=""; String authorization="";
Set<String> repeatListId=new HashSet<String>(); Set<String> repeatListId=new HashSet<String>();
if(list.get(1).size()==0) { if(list.get(1).size()==0) {
List<Map> list_data = null; List<Map> list_data = null;
String url = financeConfig.getAuthurl(); String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null); String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class); Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data"); list_data = (List<Map>) map.get("list_data");
List<String> contractIdList=contractMapper.queryList(); List<String> contractIdList=contractMapper.queryList();
ContractVo contractVo = null; ContractVo contractVo = null;
ReturnInfo returnInfo=null; ReturnInfo returnInfo=null;
Receipt receipt=null; Receipt receipt=null;
Project project = null; Project project = null;
Customer customer = null; Customer customer = null;
ProjectAcceptanc projectAcceptanc_pre=null; ProjectAcceptanc projectAcceptanc_pre=null;
ProjectAcceptanc projectAcceptanc_end=null; ProjectAcceptanc projectAcceptanc_end=null;
PaymentAgree pre_aymentAgree=null; PaymentAgree pre_aymentAgree=null;
PaymentAgree arrival_aymentAgree=null; PaymentAgree arrival_aymentAgree=null;
PaymentAgree acceptanc_aymentAgree=null; PaymentAgree acceptanc_aymentAgree=null;
PaymentAgree mainten_aymentAgree=null; PaymentAgree mainten_aymentAgree=null;
DeliverGoods deliverGoods=null; DeliverGoods deliverGoods=null;
for(ImportModel importModel:list.get(0)) { for(ImportModel importModel:list.get(0)) {
contractVo=new ContractVo(); contractVo=new ContractVo();
returnInfo=new ReturnInfo(); returnInfo=new ReturnInfo();
receipt=new Receipt(); receipt=new Receipt();
project = new Project(); project = new Project();
customer = new Customer(); customer = new Customer();
projectAcceptanc_pre = new ProjectAcceptanc(); projectAcceptanc_pre = new ProjectAcceptanc();
projectAcceptanc_end = new ProjectAcceptanc(); projectAcceptanc_end = new ProjectAcceptanc();
pre_aymentAgree=new PaymentAgree(); pre_aymentAgree=new PaymentAgree();
arrival_aymentAgree=new PaymentAgree(); arrival_aymentAgree=new PaymentAgree();
acceptanc_aymentAgree =new PaymentAgree(); acceptanc_aymentAgree =new PaymentAgree();
mainten_aymentAgree =new PaymentAgree(); mainten_aymentAgree =new PaymentAgree();
deliverGoods = new DeliverGoods(); deliverGoods = new DeliverGoods();
contractVo.setContract_unid(importModel.getContract_unid()); contractVo.setContract_unid(importModel.getContract_unid());
contractVo.setSign_date(importModel.getSign_date()); contractVo.setSign_date(importModel.getSign_date());
if(importModel.getProduct_line_type_name()!=null) { if(importModel.getProduct_line_type_name()!=null) {
switch(importModel.getProduct_line_type_name()) { switch(importModel.getProduct_line_type_name()) {
case "智慧城市" : case "智慧城市" :
contractVo.setProduct_line_type("20001"); contractVo.setProduct_line_type("20001");
break; break;
case "智慧商业" : case "智慧商业" :
contractVo.setProduct_line_type("20002"); contractVo.setProduct_line_type("20002");
break; break;
case "其它" : case "其它" :
contractVo.setProduct_line_type("20003"); contractVo.setProduct_line_type("20003");
break; break;
default: default:
break; break;
} }
} }
if(list_data != null && list_data.size() > 0) { if(list_data != null && list_data.size() > 0) {
for(Map _map:list_data) { for(Map _map:list_data) {
if(importModel.getSalesperson_name()!=null && importModel.getSalesperson_name().equals(_map.get("name"))) { if(importModel.getSalesperson_name()!=null && importModel.getSalesperson_name().equals(_map.get("name"))) {
contractVo.setSalesperson_unid(_map.get("user_unid").toString()); contractVo.setSalesperson_unid(_map.get("user_unid").toString());
} }
} }
} }
if(contractVo.getSalesperson_unid()==null && StringUtils.isNotBlank(importModel.getSalesperson_name())) { if(contractVo.getSalesperson_unid()==null && StringUtils.isNotBlank(importModel.getSalesperson_name())) {
Map tempMap=new HashMap(); Map tempMap=new HashMap();
tempMap.put("norm_type", "employee"); tempMap.put("norm_type", "employee");
tempMap.put("username", importModel.getSalesperson_name()); tempMap.put("username", importModel.getSalesperson_name());
tempMap.put("name", importModel.getSalesperson_name()); tempMap.put("name", importModel.getSalesperson_name());
tempMap.put("password", "0000"); tempMap.put("password", "0000");
String addResult = HttpNetClient.doPost(url, JavaBean2Json.javaBean2Json(tempMap),authorization); String addResult = HttpNetClient.doPost(url, JavaBean2Json.javaBean2Json(tempMap),authorization);
Map resultMap = JavaBean2Json.Json2JavaBean(addResult, Map.class); Map resultMap = JavaBean2Json.Json2JavaBean(addResult, Map.class);
list_data.add(resultMap); list_data.add(resultMap);
System.out.println("resultMap.get(\"user_unid\")="+resultMap.get("user_unid")); System.out.println("resultMap.get(\"user_unid\")="+resultMap.get("user_unid"));
contractVo.setSalesperson_unid((String)resultMap.get("user_unid")); contractVo.setSalesperson_unid((String)resultMap.get("user_unid"));
} }
contractVo.setProvince_name(importModel.getProvince_name()); contractVo.setProvince_name(importModel.getProvince_name());
contractVo.setCity_name(importModel.getCity_name()); contractVo.setCity_name(importModel.getCity_name());
contractVo.setCounty_name(importModel.getCounty_name()); contractVo.setCounty_name(importModel.getCounty_name());
if(importModel.getProject_name()!=null) { if(importModel.getProject_name()!=null) {
if(projectMapper.selectByName(importModel.getProject_name())!=null) { if(projectMapper.selectByName(importModel.getProject_name())!=null) {
contractVo.setProject_unid(projectMapper.selectByName(importModel.getProject_name()).getProject_unid()); contractVo.setProject_unid(projectMapper.selectByName(importModel.getProject_name()).getProject_unid());
}else { }else {
project.setProject_name(importModel.getProject_name()); project.setProject_name(importModel.getProject_name());
projectMapper.addProject(project); projectMapper.addProject(project);
contractVo.setProject_unid(projectMapper.selectByName(importModel.getProject_name()).getProject_unid()); contractVo.setProject_unid(projectMapper.selectByName(importModel.getProject_name()).getProject_unid());
} }
} }
if(importModel.getCustomer_name()!=null) { if(importModel.getCustomer_name()!=null) {
if(customerMapper.selectByName(importModel.getCustomer_name())!=null) { if(customerMapper.selectByName(importModel.getCustomer_name())!=null) {
contractVo.setCustomer_unid(customerMapper.selectByName(importModel.getCustomer_name()).getCustomer_unid()); contractVo.setCustomer_unid(customerMapper.selectByName(importModel.getCustomer_name()).getCustomer_unid());
}else { }else {
customer.setCustomer_name(importModel.getCustomer_name()); customer.setCustomer_name(importModel.getCustomer_name());
customerMapper.addCustomer(customer); customerMapper.addCustomer(customer);
contractVo.setCustomer_unid(customerMapper.selectByName(importModel.getCustomer_name()).getCustomer_unid()); contractVo.setCustomer_unid(customerMapper.selectByName(importModel.getCustomer_name()).getCustomer_unid());
} }
} }
contractVo.setContract_amount(importModel.getContract_amount()); contractVo.setContract_amount(importModel.getContract_amount());
contractVo.setStop_amount(importModel.getStop_amount()); contractVo.setStop_amount(importModel.getStop_amount());
contractVo.setBad_amount(importModel.getBad_amount()); contractVo.setBad_amount(importModel.getBad_amount());
contractVo.setExemptions_amount(importModel.getExemptions_amount()); contractVo.setExemptions_amount(importModel.getExemptions_amount());
contractVo.setDeduct_amount(importModel.getDeduct_amount()); contractVo.setDeduct_amount(importModel.getDeduct_amount());
if(importModel.getContract_state_name()!=null) { if(importModel.getContract_state_name()!=null) {
switch(importModel.getContract_state_name()) { switch(importModel.getContract_state_name()) {
case "已完成": case "已完成":
contractVo.setContract_state("30001"); contractVo.setContract_state("30001");
break; break;
case "进行中": case "进行中":
contractVo.setContract_state("30003"); contractVo.setContract_state("30003");
break; break;
case "暂停": case "暂停":
contractVo.setContract_state("30004"); contractVo.setContract_state("30004");
break; break;
case "质量问题": case "质量问题":
contractVo.setContract_state("30005"); contractVo.setContract_state("30005");
break; break;
default: default:
break; break;
} }
} }
contractVo.setGuarantee_period(importModel.getGuarantee_period()); contractVo.setGuarantee_period(importModel.getGuarantee_period());
if(importModel.getContract_type() != null) { if(importModel.getContract_type() != null) {
switch(importModel.getContract_type()) { switch(importModel.getContract_type()) {
case "供货": case "供货":
contractVo.setContract_type("40001"); contractVo.setContract_type("40001");
break; break;
/* case "施工": /* case "施工":
contractVo.setContract_type("40002"); contractVo.setContract_type("40002");
break;*/ break;*/
case "集成": case "集成":
contractVo.setContract_type("40003"); contractVo.setContract_type("40003");
break; break;
case "维保": case "维保":
contractVo.setContract_type("40004"); contractVo.setContract_type("40004");
break; break;
default: default:
break; break;
} }
} }
//contractVo.setContract_type(importModel.getContract_type()); //contractVo.setContract_type(importModel.getContract_type());
if(importModel.getIs_archive() != null && importModel.getIs_archive().equals("是")) { if(importModel.getIs_archive() != null && importModel.getIs_archive().equals("是")) {
contractVo.setIs_archive(true); contractVo.setIs_archive(true);
}else if(importModel.getIs_archive() != null && importModel.getIs_archive().equals("否")) { }else if(importModel.getIs_archive() != null && importModel.getIs_archive().equals("否")) {
contractVo.setIs_archive(false); contractVo.setIs_archive(false);
} }
contractVo.setConfirm_income_amount(importModel.getConfirm_income_amount()); contractVo.setConfirm_income_amount(importModel.getConfirm_income_amount());
if(importModel.getAmount_state_name() != null) { if(importModel.getAmount_state_name() != null) {
switch(importModel.getAmount_state_name()) { switch(importModel.getAmount_state_name()) {
case "正常验收款": case "正常验收款":
contractVo.setAmount_state_unid("50001"); contractVo.setAmount_state_unid("50001");
break; break;
case "正常维保": case "正常维保":
contractVo.setAmount_state_unid("50002"); contractVo.setAmount_state_unid("50002");
break; break;
case "正常预付款": case "正常预付款":
contractVo.setAmount_state_unid("50003"); contractVo.setAmount_state_unid("50003");
break; break;
case "正常到货款": case "正常到货款":
contractVo.setAmount_state_unid("50004"); contractVo.setAmount_state_unid("50004");
break; break;
case "正常质保款": case "正常质保款":
contractVo.setAmount_state_unid("50005"); contractVo.setAmount_state_unid("50005");
break; break;
case "逾期预付款": case "逾期预付款":
contractVo.setAmount_state_unid("50006"); contractVo.setAmount_state_unid("50006");
break; break;
case "逾期到货款": case "逾期到货款":
contractVo.setAmount_state_unid("50007"); contractVo.setAmount_state_unid("50007");
break; break;
case "逾期验收款": case "逾期验收款":
contractVo.setAmount_state_unid("50008"); contractVo.setAmount_state_unid("50008");
break; break;
case "逾期质保款": case "逾期质保款":
contractVo.setAmount_state_unid("50009"); contractVo.setAmount_state_unid("50009");
break; break;
case "逾期维保款": case "逾期维保款":
contractVo.setAmount_state_unid("50012"); contractVo.setAmount_state_unid("50012");
break; break;
case "已完成": case "已完成":
contractVo.setAmount_state_unid("50010"); contractVo.setAmount_state_unid("50010");
break; break;
default: default:
break; break;
} }
} }
contractVo.setStart_guarantee_date(importModel.getStart_guarantee_date()); contractVo.setStart_guarantee_date(importModel.getStart_guarantee_date());
contractVo.setEnd_guarantee_date(importModel.getEnd_guarantee_date()); contractVo.setEnd_guarantee_date(importModel.getEnd_guarantee_date());
contractVo.setContract_amount_note(importModel.getDeduct_amount_note()); contractVo.setContract_amount_note(importModel.getDeduct_amount_note());
contractVo.setReback_note(importModel.getStop_amount_note()); contractVo.setReback_note(importModel.getStop_amount_note());
contractVo.setContract_remain_note(importModel.getExemptions_amount_note()); contractVo.setContract_remain_note(importModel.getExemptions_amount_note());
contractVo.setBad_amount_note(importModel.getBad_amount_note()); contractVo.setBad_amount_note(importModel.getBad_amount_note());
contractVo.setContract_note(importModel.getContract_note()); contractVo.setContract_note(importModel.getContract_note());
pre_aymentAgree.setContract_unid(importModel.getContract_unid()); pre_aymentAgree.setContract_unid(importModel.getContract_unid());
pre_aymentAgree.setPayment_type("100001"); pre_aymentAgree.setPayment_type("100001");
pre_aymentAgree.setPayment_progress(1); pre_aymentAgree.setPayment_progress(1);
pre_aymentAgree.setPayment_propority(importModel.getAdvance_payment_propority()); pre_aymentAgree.setPayment_propority(importModel.getAdvance_payment_propority());
pre_aymentAgree.setPayment_requirement(importModel.getAdvance_payment_requirement()); pre_aymentAgree.setPayment_requirement(importModel.getAdvance_payment_requirement());
pre_aymentAgree.setDays(importModel.getAdvance_payment_days()); pre_aymentAgree.setDays(importModel.getAdvance_payment_days());
arrival_aymentAgree.setContract_unid(importModel.getContract_unid()); arrival_aymentAgree.setContract_unid(importModel.getContract_unid());
arrival_aymentAgree.setPayment_type("100002"); arrival_aymentAgree.setPayment_type("100002");
arrival_aymentAgree.setPayment_progress(2); arrival_aymentAgree.setPayment_progress(2);
arrival_aymentAgree.setPayment_propority(importModel.getArrival_payment_propority()); arrival_aymentAgree.setPayment_propority(importModel.getArrival_payment_propority());
arrival_aymentAgree.setPayment_requirement(importModel.getArrival_payment_requirement()); arrival_aymentAgree.setPayment_requirement(importModel.getArrival_payment_requirement());
arrival_aymentAgree.setDays(importModel.getArrival_payment_days()); arrival_aymentAgree.setDays(importModel.getArrival_payment_days());
acceptanc_aymentAgree.setContract_unid(importModel.getContract_unid()); acceptanc_aymentAgree.setContract_unid(importModel.getContract_unid());
acceptanc_aymentAgree.setPayment_type("100003"); acceptanc_aymentAgree.setPayment_type("100003");
acceptanc_aymentAgree.setPayment_progress(3); acceptanc_aymentAgree.setPayment_progress(3);
acceptanc_aymentAgree.setPayment_propority(importModel.getAcceptanc_payment_propority()); acceptanc_aymentAgree.setPayment_propority(importModel.getAcceptanc_payment_propority());
acceptanc_aymentAgree.setPayment_requirement(importModel.getAcceptanc_payment_requirement()); acceptanc_aymentAgree.setPayment_requirement(importModel.getAcceptanc_payment_requirement());
acceptanc_aymentAgree.setDays(importModel.getAcceptanc_payment_days()); acceptanc_aymentAgree.setDays(importModel.getAcceptanc_payment_days());
deliverGoods.setDeliver_goods_date(importModel.getDeliver_date()); deliverGoods.setDeliver_goods_date(importModel.getDeliver_date());
deliverGoods.setGoods_acceptanc_date(importModel.getGoods_acceptanc_date()); deliverGoods.setGoods_acceptanc_date(importModel.getGoods_acceptanc_date());
deliverGoods.setContract_unid(importModel.getContract_unid()); deliverGoods.setContract_unid(importModel.getContract_unid());
mainten_aymentAgree.setContract_unid(importModel.getContract_unid()); mainten_aymentAgree.setContract_unid(importModel.getContract_unid());
if("1".equals(importModel.getMainten_payment_type())) { if("1".equals(importModel.getMainten_payment_type())) {
mainten_aymentAgree.setPayment_type("100004"); mainten_aymentAgree.setPayment_type("100004");
}else if("2".equals(importModel.getMainten_payment_type())) { }else if("2".equals(importModel.getMainten_payment_type())) {
mainten_aymentAgree.setPayment_type("100005"); mainten_aymentAgree.setPayment_type("100005");
} }
mainten_aymentAgree.setPayment_progress(4); mainten_aymentAgree.setPayment_progress(4);
mainten_aymentAgree.setPayment_propority(importModel.getMainten_payment_propority()); mainten_aymentAgree.setPayment_propority(importModel.getMainten_payment_propority());
mainten_aymentAgree.setPayment_requirement(importModel.getMainten_payment_requirement()); mainten_aymentAgree.setPayment_requirement(importModel.getMainten_payment_requirement());
mainten_aymentAgree.setDays(importModel.getMainten_payment_days()); mainten_aymentAgree.setDays(importModel.getMainten_payment_days());
returnInfo.setContract_unid(importModel.getContract_unid()); returnInfo.setContract_unid(importModel.getContract_unid());
returnInfo.setActual_reback_amount(importModel.getReback_amount()); returnInfo.setActual_reback_amount(importModel.getReback_amount());
returnInfo.setReback_date(importModel.getReback_date()); returnInfo.setReback_date(importModel.getReback_date());
returnInfo.setReback_note(importModel.getReback_note()); returnInfo.setReback_note(importModel.getReback_note());
//returnInfo.setReback_progress(1); //returnInfo.setReback_progress(1);
receipt.setContract_unid(importModel.getContract_unid()); receipt.setContract_unid(importModel.getContract_unid());
receipt.setReceipt_amount(importModel.getReceipt_amount()); receipt.setReceipt_amount(importModel.getReceipt_amount());
receipt.setOa_flow_id(importModel.getOa_flow_id()); receipt.setOa_flow_id(importModel.getOa_flow_id());
receipt.setReceipt_note(importModel.getReceipt_note()); receipt.setReceipt_note(importModel.getReceipt_note());
//receipt.setReceipt_progress(1); //receipt.setReceipt_progress(1);
if(importModel.getPre_acceptanc() != null && importModel.getPre_acceptanc().equals("是")) { if(importModel.getPre_acceptanc() != null && importModel.getPre_acceptanc().equals("是")) {
projectAcceptanc_pre.setAcceptanc_type("1"); projectAcceptanc_pre.setAcceptanc_type("1");
projectAcceptanc_pre.setContract_unid(importModel.getContract_unid()); projectAcceptanc_pre.setContract_unid(importModel.getContract_unid());
projectAcceptanc_pre.setAcceptanc_date(importModel.getPre_acceptanc_date()); projectAcceptanc_pre.setAcceptanc_date(importModel.getPre_acceptanc_date());
projectAcceptanc_pre.setAcceptanc_note(importModel.getPre_acceptanc_note()); projectAcceptanc_pre.setAcceptanc_note(importModel.getPre_acceptanc_note());
} }
if(importModel.getEnd_acceptanc() != null && importModel.getEnd_acceptanc().equals("是")) { if(importModel.getEnd_acceptanc() != null && importModel.getEnd_acceptanc().equals("是")) {
projectAcceptanc_end.setAcceptanc_type("2"); projectAcceptanc_end.setAcceptanc_type("2");
projectAcceptanc_end.setContract_unid(importModel.getContract_unid()); projectAcceptanc_end.setContract_unid(importModel.getContract_unid());
projectAcceptanc_end.setAcceptanc_date(importModel.getEnd_acceptanc_date()); projectAcceptanc_end.setAcceptanc_date(importModel.getEnd_acceptanc_date());
projectAcceptanc_end.setAcceptanc_note(importModel.getEnd_acceptanc_note()); projectAcceptanc_end.setAcceptanc_note(importModel.getEnd_acceptanc_note());
} }
if(contractIdList.contains(contractVo.getContract_unid())) { if(contractIdList.contains(contractVo.getContract_unid())) {
contractMapper.updateOne(contractVo); contractMapper.updateOne(contractVo);
} }
//ContractVo contracto=contractMapper.queryOne(contractVo.getContract_unid()); //ContractVo contracto=contractMapper.queryOne(contractVo.getContract_unid());
if(!contractIdList.contains(contractVo.getContract_unid())) { if(!contractIdList.contains(contractVo.getContract_unid())) {
contractMapper.addOne(contractVo); contractMapper.addOne(contractVo);
contractIdList.add(contractVo.getContract_unid()); contractIdList.add(contractVo.getContract_unid());
} }
//if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ) { //if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ) {
/* if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) { /* if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) {
returnInfoMapper.addReturnInfo(returnInfo); returnInfoMapper.addReturnInfo(returnInfo);
} }
if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) { if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) {
receiptMapper.addReceipt(receipt); receiptMapper.addReceipt(receipt);
} }
if(projectAcceptanc_pre.getContract_unid() != null && (projectAcceptanc_pre.getAcceptanc_date()!=null ||projectAcceptanc_pre.getAcceptanc_note()!=null ||projectAcceptanc_pre.getAcceptanc_type()!=null)) { if(projectAcceptanc_pre.getContract_unid() != null && (projectAcceptanc_pre.getAcceptanc_date()!=null ||projectAcceptanc_pre.getAcceptanc_note()!=null ||projectAcceptanc_pre.getAcceptanc_type()!=null)) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_pre); projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_pre);
} }
if(projectAcceptanc_end.getContract_unid() != null && (projectAcceptanc_end.getAcceptanc_date()!=null ||projectAcceptanc_end.getAcceptanc_note()!=null ||projectAcceptanc_end.getAcceptanc_type()!=null)) { if(projectAcceptanc_end.getContract_unid() != null && (projectAcceptanc_end.getAcceptanc_date()!=null ||projectAcceptanc_end.getAcceptanc_note()!=null ||projectAcceptanc_end.getAcceptanc_type()!=null)) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end); projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end);
} }
if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) { if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(pre_aymentAgree); paymentAgreeMapper.addPaymentAgree(pre_aymentAgree);
} }
if(arrival_aymentAgree.getPayment_propority()!=null ||arrival_aymentAgree.getPayment_requirement()!=null||arrival_aymentAgree.getDays()!=null) { if(arrival_aymentAgree.getPayment_propority()!=null ||arrival_aymentAgree.getPayment_requirement()!=null||arrival_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(arrival_aymentAgree); paymentAgreeMapper.addPaymentAgree(arrival_aymentAgree);
} }
if(acceptanc_aymentAgree.getPayment_propority()!=null ||acceptanc_aymentAgree.getPayment_requirement()!=null||acceptanc_aymentAgree.getDays()!=null) { if(acceptanc_aymentAgree.getPayment_propority()!=null ||acceptanc_aymentAgree.getPayment_requirement()!=null||acceptanc_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(acceptanc_aymentAgree); paymentAgreeMapper.addPaymentAgree(acceptanc_aymentAgree);
} }
if(mainten_aymentAgree.getPayment_propority()!=null ||mainten_aymentAgree.getPayment_requirement()!=null||mainten_aymentAgree.getDays()!=null) { if(mainten_aymentAgree.getPayment_propority()!=null ||mainten_aymentAgree.getPayment_requirement()!=null||mainten_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree); paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree);
} }
if(deliverGoods.getDeliver_goods_date()!=null || deliverGoods.getGoods_acceptanc_date()!=null) { if(deliverGoods.getDeliver_goods_date()!=null || deliverGoods.getGoods_acceptanc_date()!=null) {
deliverGoodsMapper.addDeliverGoods(deliverGoods); deliverGoodsMapper.addDeliverGoods(deliverGoods);
} }
continue; continue;
} }
}else { }else {
if(importModel.getSalesperson_name()!=null && contractVo.getContract_unid()!=null) { if(importModel.getSalesperson_name()!=null && contractVo.getContract_unid()!=null) {
is_repeat=false; is_repeat=false;
repeatListId.add(contractVo.getContract_unid()); repeatListId.add(contractVo.getContract_unid());
} }
}*/ }*/
//else {} if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ){ //else {} if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ){
//if( returnInfoMapper.queryReturnInfo(importModel.getContract_unid()).size()==0) { //if( returnInfoMapper.queryReturnInfo(importModel.getContract_unid()).size()==0) {
if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) { if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) {
returnInfoMapper.addReturnInfo(returnInfo); returnInfoMapper.addReturnInfo(returnInfo);
} }
if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) { if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) {
receiptMapper.addReceipt(receipt); receiptMapper.addReceipt(receipt);
} }
if( projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) { if( projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) {
if(projectAcceptanc_pre.getAcceptanc_date()!=null ||projectAcceptanc_pre.getAcceptanc_note()!=null ||projectAcceptanc_pre.getAcceptanc_type()!=null) { if(projectAcceptanc_pre.getAcceptanc_date()!=null ||projectAcceptanc_pre.getAcceptanc_note()!=null ||projectAcceptanc_pre.getAcceptanc_type()!=null) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_pre); projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_pre);
} }
if(projectAcceptanc_end.getAcceptanc_date()!=null ||projectAcceptanc_end.getAcceptanc_note()!=null ||projectAcceptanc_end.getAcceptanc_type()!=null) { if(projectAcceptanc_end.getAcceptanc_date()!=null ||projectAcceptanc_end.getAcceptanc_note()!=null ||projectAcceptanc_end.getAcceptanc_type()!=null) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end); projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end);
} }
}else { }else {
if(importModel.getPre_acceptanc_date()!=null ||importModel.getPre_acceptanc_note()!=null ||importModel.getPre_acceptanc()!=null ) { if(importModel.getPre_acceptanc_date()!=null ||importModel.getPre_acceptanc_note()!=null ||importModel.getPre_acceptanc()!=null ) {
//is_repeat=false; //is_repeat=false;
//repeatListId.add(contractVo.getContract_unid()); //repeatListId.add(contractVo.getContract_unid());
projectAcceptancMapper.updateProjectAcceptanc(projectAcceptanc_pre); projectAcceptancMapper.updateProjectAcceptanc(projectAcceptanc_pre);
} }
if(importModel.getEnd_acceptanc_date()!=null ||importModel.getEnd_acceptanc_note()!=null ||importModel.getEnd_acceptanc()!=null) { if(importModel.getEnd_acceptanc_date()!=null ||importModel.getEnd_acceptanc_note()!=null ||importModel.getEnd_acceptanc()!=null) {
projectAcceptancMapper.updateProjectAcceptanc(projectAcceptanc_end); projectAcceptancMapper.updateProjectAcceptanc(projectAcceptanc_end);
} }
} }
if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0) { if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0) {
if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) { if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(pre_aymentAgree); paymentAgreeMapper.addPaymentAgree(pre_aymentAgree);
} }
if(arrival_aymentAgree.getPayment_propority()!=null ||arrival_aymentAgree.getPayment_requirement()!=null||arrival_aymentAgree.getDays()!=null) { if(arrival_aymentAgree.getPayment_propority()!=null ||arrival_aymentAgree.getPayment_requirement()!=null||arrival_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(arrival_aymentAgree); paymentAgreeMapper.addPaymentAgree(arrival_aymentAgree);
} }
if(acceptanc_aymentAgree.getPayment_propority()!=null ||acceptanc_aymentAgree.getPayment_requirement()!=null||acceptanc_aymentAgree.getDays()!=null) { if(acceptanc_aymentAgree.getPayment_propority()!=null ||acceptanc_aymentAgree.getPayment_requirement()!=null||acceptanc_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(acceptanc_aymentAgree); paymentAgreeMapper.addPaymentAgree(acceptanc_aymentAgree);
} }
if(mainten_aymentAgree.getPayment_propority()!=null ||mainten_aymentAgree.getPayment_requirement()!=null||mainten_aymentAgree.getDays()!=null) { if(mainten_aymentAgree.getPayment_propority()!=null ||mainten_aymentAgree.getPayment_requirement()!=null||mainten_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree); paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree);
} }
}else { }else {
if(importModel.getAdvance_payment_propority()!=null ||importModel.getAdvance_payment_requirement()!=null||importModel.getAdvance_payment_days()!=null) { if(importModel.getAdvance_payment_propority()!=null ||importModel.getAdvance_payment_requirement()!=null||importModel.getAdvance_payment_days()!=null) {
/*is_repeat=false; /*is_repeat=false;
repeatListId.add(contractVo.getContract_unid());*/ repeatListId.add(contractVo.getContract_unid());*/
paymentAgreeMapper.updatePaymentAgree(pre_aymentAgree); paymentAgreeMapper.updatePaymentAgree(pre_aymentAgree);
} }
if(importModel.getArrival_payment_propority()!=null ||importModel.getArrival_payment_requirement()!=null||importModel.getArrival_payment_days()!=null) { if(importModel.getArrival_payment_propority()!=null ||importModel.getArrival_payment_requirement()!=null||importModel.getArrival_payment_days()!=null) {
paymentAgreeMapper.updatePaymentAgree(arrival_aymentAgree); paymentAgreeMapper.updatePaymentAgree(arrival_aymentAgree);
} }
if(importModel.getAcceptanc_payment_propority()!=null ||importModel.getAcceptanc_payment_requirement()!=null||importModel.getAcceptanc_payment_days()!=null) { if(importModel.getAcceptanc_payment_propority()!=null ||importModel.getAcceptanc_payment_requirement()!=null||importModel.getAcceptanc_payment_days()!=null) {
paymentAgreeMapper.updatePaymentAgree(acceptanc_aymentAgree); paymentAgreeMapper.updatePaymentAgree(acceptanc_aymentAgree);
} }
if(importModel.getMainten_payment_propority()!=null ||importModel.getMainten_payment_requirement()!=null||importModel.getMainten_payment_days()!=null) { if(importModel.getMainten_payment_propority()!=null ||importModel.getMainten_payment_requirement()!=null||importModel.getMainten_payment_days()!=null) {
paymentAgreeMapper.updatePaymentAgree(mainten_aymentAgree); paymentAgreeMapper.updatePaymentAgree(mainten_aymentAgree);
} }
} }
//if(deliverGoodsMapper.queryDeliverGoods(importModel.getContract_unid()).size()==0) { //if(deliverGoodsMapper.queryDeliverGoods(importModel.getContract_unid()).size()==0) {
if(deliverGoods.getDeliver_goods_date()!=null ||deliverGoods.getGoods_acceptanc_date()!=null) { if(deliverGoods.getDeliver_goods_date()!=null ||deliverGoods.getGoods_acceptanc_date()!=null) {
deliverGoodsMapper.addDeliverGoods(deliverGoods); deliverGoodsMapper.addDeliverGoods(deliverGoods);
} }
/*}else { /*}else {
if(importModel.getDeliver_date()!=null || importModel.getGoods_acceptanc_date()!=null) { if(importModel.getDeliver_date()!=null || importModel.getGoods_acceptanc_date()!=null) {
is_repeat=false; is_repeat=false;
repeatListId.add(contractVo.getContract_unid()); repeatListId.add(contractVo.getContract_unid());
} }
}*/ }*/
}if(!is_repeat) { }if(!is_repeat) {
return repeatListId; return repeatListId;
}else { }else {
return successCode; return successCode;
} }
} }
return list.get(1); return list.get(1);
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} catch (Exception e) { } catch (Exception e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("导入异常"); failCode.setEnote("导入异常");
return failCode; return failCode;
} }
/*** /***
* 动态生成表头 * 动态生成表头
* @return * @return
*/ */
private List<ExcelExportEntity> dynamicCreatTableHead(SelectVo selectVo){ private List<ExcelExportEntity> dynamicCreatTableHead(SelectVo selectVo){
String[] cloumns = selectVo.getColumns(); String[] cloumns = selectVo.getColumns();
int length = 1 + cloumns.length; int length = 1 + cloumns.length;
List<ExcelExportEntity> colList = new ArrayList<ExcelExportEntity>(length); List<ExcelExportEntity> colList = new ArrayList<ExcelExportEntity>(length);
ExcelExportEntity excelExportEntity = new ExcelExportEntity("合同编号", "contract_unid"); ExcelExportEntity excelExportEntity = new ExcelExportEntity("合同编号", "contract_unid");
colList.add(excelExportEntity); colList.add(excelExportEntity);
Object title_name = null; Object title_name = null;
Object title_key = null; Object title_key = null;
String numkey = null; String numkey = null;
for(String clo : cloumns) { for(String clo : cloumns) {
title_name = head_title_name.get(clo); title_name = head_title_name.get(clo);
title_key = head_title_key.get(clo); title_key = head_title_key.get(clo);
numkey = num_key.get(clo); numkey = num_key.get(clo);
if(title_name != null) { if(title_name != null) {
excelExportEntity = new ExcelExportEntity(head_title_name.get(clo), head_title_key.get(clo)); excelExportEntity = new ExcelExportEntity(head_title_name.get(clo), head_title_key.get(clo));
if(StringUtils.isNotBlank(numkey)) { if(StringUtils.isNotBlank(numkey)) {
excelExportEntity.setNumFormat(numkey); excelExportEntity.setNumFormat(numkey);
excelExportEntity.setType(10); excelExportEntity.setType(10);
} }
colList.add(excelExportEntity); colList.add(excelExportEntity);
} }
} }
return colList; return colList;
} }
/*** /***
*动态生成表数据 *动态生成表数据
*/ */
private List<Map<String, Object>> dynamicCreatTableDatas(List<ExportModel> list) { private List<Map<String, Object>> dynamicCreatTableDatas(List<ExportModel> list) {
List<Map<String, Object>> listValues = null; List<Map<String, Object>> listValues = null;
if(list != null && list.size() > 0 ) { if(list != null && list.size() > 0 ) {
listValues = JavaBean2Json.transBean2ListMap(list); listValues = JavaBean2Json.transBean2ListMap(list);
} }
return listValues; return listValues;
} }
} }
package com.vion.financial.vo; package com.vion.financial.vo;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.entity.Appendix; import com.vion.financial.entity.Appendix;
import com.vion.financial.entity.PaymentAgree; import com.vion.financial.entity.PaymentAgree;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer; import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
@JsonInclude(value=Include.NON_NULL) @JsonInclude(value=Include.NON_NULL)
public class ContractVo extends SelectVo{ public class ContractVo extends SelectVo{
private String contract_unid; private String contract_unid;
private String salesperson_unid; private String salesperson_unid;
private Integer project_unid; private Integer project_unid;
private String project_name; private String project_name;
private String customer_name; private String customer_name;
private Integer customer_unid; private Integer customer_unid;
private String province; private String province;
private String city; private String city;
private String county; private String county;
private Integer guarantee_period; private Integer guarantee_period;
private Date sign_date; private Date sign_date;
private String product_line_type; private String product_line_type;
private String contract_state; private String contract_state;
private String contract_type; private String contract_type;
private Double contract_amount; private Double contract_amount;
private Double deduct_amount; private Double deduct_amount;
private String contract_amount_note; private String contract_amount_note;
private Double stop_amount; private Double stop_amount;
private String reback_note; private String reback_note;
private Double exemptions_amount; private Double exemptions_amount;
private String contract_remain_note; private String contract_remain_note;
private Boolean is_archive; private Boolean is_archive;
private Double bad_amount; private Double bad_amount;
private String bad_amount_note; private String bad_amount_note;
private Double confirm_income_amount; private Double confirm_income_amount;
private String amount_state_unid; private String amount_state_unid;
private Date start_guarantee_date; private Date start_guarantee_date;
private Date end_guarantee_date; private Date end_guarantee_date;
private String mainten_start_point; private String mainten_start_point;
private String contract_note; private String contract_note;
private Boolean is_delete; private Boolean is_delete;
private List<Integer> appendix_unids; private List<Integer> appendix_unids;
private List<Appendix> appendix_list; private List<Appendix> appendix_list;
private String business_table; private String business_table;
private String business_unid; private String business_unid;
private Double total_reback_amount; private Double total_reback_amount;
private Double contract_remain; private Double contract_remain;
private Double total_receive_amount; private Double total_receive_amount;
private Double total_amount_remain; private Double total_amount_remain;
private Integer over_days; private Integer over_days;
private String year; private String year;
private String month; private String month;
private String salesperson_name; private String salesperson_name;
private String province_name; private String province_name;
private String city_name; private String city_name;
private String county_name; private String county_name;
private String product_line_type_name; private String product_line_type_name;
private String contract_state_name; private String contract_state_name;
private String contract_type_name; private String contract_type_name;
private String amount_state_unid_name; private String amount_state_unid_name;
/*@JsonIgnoreProperties(value={"total_number"}) */ /*@JsonIgnoreProperties(value={"total_number"}) */
private Integer list_size; private Integer list_size;
private Integer offset; private Integer offset;
private Double advance_pay; //预付款金额 private Double advance_pay; //预付款金额
private Double arrive_pay; private Double arrive_pay;
private Double acceptanc_pay; private Double acceptanc_pay;
private Double mainten_pay; private Double mainten_pay;
private Date advance_pay_date; //预付款到期日 private Date advance_pay_date; //预付款到期日
private Date arrive_pay_date; private Date arrive_pay_date;
private Date acceptanc_pay_date; private Date acceptanc_pay_date;
private Date mainten_pay_date; //质保款 private Date mainten_pay_date; //质保款
private Date deliver_date; //发货日期 private Date deliver_date; //发货日期
private Date acceptanc_date; //验收日期 private Date acceptanc_date; //验收日期
private List<String> salesperson_unids; private List<String> salesperson_unids;
private List<PaymentAgree> paymentAgree_list; private List<PaymentAgree> paymentAgree_list;
private List<String> contract_unids; private List<String> contract_unids;
private Integer final_user; //最终用户 private Integer final_user; //最终用户
private String relation_customer; //关联大客户 private String relation_customer; //关联大客户
private String first_industry; //一级行业 private String first_industry; //一级行业
private String second_industry; private String second_industry;
private String final_user_name; //最终用户name private String final_user_name; //最终用户name
private String relation_customer_name; //关联大客户name private String relation_customer_name; //关联大客户name
private String first_industry_name; //行业name private String first_industry_name; //行业name
private String second_industry_name; private String second_industry_name;
//private List<> payment_data; //private List<> payment_data;
public String getContract_unid() { public String getContract_unid() {
return contract_unid; return contract_unid;
} }
public void setContract_unid(String contract_unid) { public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid.trim(); this.contract_unid = contract_unid.trim();
} }
public String getSalesperson_unid() { public String getSalesperson_unid() {
return salesperson_unid; return salesperson_unid;
} }
public void setSalesperson_unid(String salesperson_unid) { public void setSalesperson_unid(String salesperson_unid) {
this.salesperson_unid = salesperson_unid; this.salesperson_unid = salesperson_unid;
} }
public Integer getProject_unid() { public Integer getProject_unid() {
return project_unid; return project_unid;
} }
public void setProject_unid(Integer project_unid) { public void setProject_unid(Integer project_unid) {
this.project_unid = project_unid; this.project_unid = project_unid;
} }
public String getProject_name() { public String getProject_name() {
return project_name; return project_name;
} }
public void setProject_name(String project_name) { public void setProject_name(String project_name) {
this.project_name = project_name; this.project_name = project_name;
} }
public String getCustomer_name() { public String getCustomer_name() {
return customer_name; return customer_name;
} }
public void setCustomer_name(String customer_name) { public void setCustomer_name(String customer_name) {
this.customer_name = customer_name; this.customer_name = customer_name;
} }
public Integer getCustomer_unid() { public Integer getCustomer_unid() {
return customer_unid; return customer_unid;
} }
public void setCustomer_unid(Integer customer_unid) { public void setCustomer_unid(Integer customer_unid) {
this.customer_unid = customer_unid; this.customer_unid = customer_unid;
} }
public String getProvince() { public String getProvince() {
return province; return province;
} }
public void setProvince(String province) { public void setProvince(String province) {
this.province = province; this.province = province;
} }
public String getCity() { public String getCity() {
return city; return city;
} }
public void setCity(String city) { public void setCity(String city) {
this.city = city; this.city = city;
} }
public String getCounty() { public String getCounty() {
return county; return county;
} }
public void setCounty(String county) { public void setCounty(String county) {
this.county = county; this.county = county;
} }
public Integer getGuarantee_period() { public Integer getGuarantee_period() {
return guarantee_period; return guarantee_period;
} }
public void setGuarantee_period(Integer guarantee_period) { public void setGuarantee_period(Integer guarantee_period) {
this.guarantee_period = guarantee_period; this.guarantee_period = guarantee_period;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getSign_date() { public Date getSign_date() {
return sign_date; return sign_date;
} }
public void setSign_date(Date sign_date) { public void setSign_date(Date sign_date) {
this.sign_date = sign_date; this.sign_date = sign_date;
} }
public String getProduct_line_type() { public String getProduct_line_type() {
return product_line_type; return product_line_type;
} }
public void setProduct_line_type(String product_line_type) { public void setProduct_line_type(String product_line_type) {
this.product_line_type = product_line_type; this.product_line_type = product_line_type;
} }
public String getContract_state() { public String getContract_state() {
return contract_state; return contract_state;
} }
public void setContract_state(String contract_state) { public void setContract_state(String contract_state) {
this.contract_state = contract_state; this.contract_state = contract_state;
} }
public String getContract_type() { public String getContract_type() {
return contract_type; return contract_type;
} }
public void setContract_type(String contract_type) { public void setContract_type(String contract_type) {
this.contract_type = contract_type; this.contract_type = contract_type;
} }
public Double getContract_amount() { public Double getContract_amount() {
return contract_amount; return contract_amount;
} }
public void setContract_amount(Double contract_amount) { public void setContract_amount(Double contract_amount) {
this.contract_amount = contract_amount; this.contract_amount = contract_amount;
} }
public Double getDeduct_amount() { public Double getDeduct_amount() {
return deduct_amount; return deduct_amount;
} }
public void setDeduct_amount(Double deduct_amount) { public void setDeduct_amount(Double deduct_amount) {
this.deduct_amount = deduct_amount; this.deduct_amount = deduct_amount;
} }
public String getContract_amount_note() { public String getContract_amount_note() {
return contract_amount_note; return contract_amount_note;
} }
public void setContract_amount_note(String contract_amount_note) { public void setContract_amount_note(String contract_amount_note) {
this.contract_amount_note = contract_amount_note; this.contract_amount_note = contract_amount_note;
} }
public Double getStop_amount() { public Double getStop_amount() {
return stop_amount; return stop_amount;
} }
public void setStop_amount(Double stop_amount) { public void setStop_amount(Double stop_amount) {
this.stop_amount = stop_amount; this.stop_amount = stop_amount;
} }
public String getReback_note() { public String getReback_note() {
return reback_note; return reback_note;
} }
public void setReback_note(String reback_note) { public void setReback_note(String reback_note) {
this.reback_note = reback_note; this.reback_note = reback_note;
} }
public Double getExemptions_amount() { public Double getExemptions_amount() {
return exemptions_amount; return exemptions_amount;
} }
public void setExemptions_amount(Double exemptions_amount) { public void setExemptions_amount(Double exemptions_amount) {
this.exemptions_amount = exemptions_amount; this.exemptions_amount = exemptions_amount;
} }
public String getContract_remain_note() { public String getContract_remain_note() {
return contract_remain_note; return contract_remain_note;
} }
public void setContract_remain_note(String contract_remain_note) { public void setContract_remain_note(String contract_remain_note) {
this.contract_remain_note = contract_remain_note; this.contract_remain_note = contract_remain_note;
} }
public Boolean getIs_archive() { public Boolean getIs_archive() {
return is_archive; return is_archive;
} }
public void setIs_archive(Boolean is_archive) { public void setIs_archive(Boolean is_archive) {
this.is_archive = is_archive; this.is_archive = is_archive;
} }
public Double getBad_amount() { public Double getBad_amount() {
return bad_amount; return bad_amount;
} }
public void setBad_amount(Double bad_amount) { public void setBad_amount(Double bad_amount) {
this.bad_amount = bad_amount; this.bad_amount = bad_amount;
} }
public String getBad_amount_note() { public String getBad_amount_note() {
return bad_amount_note; return bad_amount_note;
} }
public void setBad_amount_note(String bad_amount_note) { public void setBad_amount_note(String bad_amount_note) {
this.bad_amount_note = bad_amount_note; this.bad_amount_note = bad_amount_note;
} }
public Double getConfirm_income_amount() { public Double getConfirm_income_amount() {
return confirm_income_amount; return confirm_income_amount;
} }
public void setConfirm_income_amount(Double confirm_income_amount) { public void setConfirm_income_amount(Double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount; this.confirm_income_amount = confirm_income_amount;
} }
public String getAmount_state_unid() { public String getAmount_state_unid() {
return amount_state_unid; return amount_state_unid;
} }
public void setAmount_state_unid(String amount_state_unid) { public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid; this.amount_state_unid = amount_state_unid;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getStart_guarantee_date() { public Date getStart_guarantee_date() {
return start_guarantee_date; return start_guarantee_date;
} }
public void setStart_guarantee_date(Date start_guarantee_date) { public void setStart_guarantee_date(Date start_guarantee_date) {
this.start_guarantee_date = start_guarantee_date; this.start_guarantee_date = start_guarantee_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getEnd_guarantee_date() { public Date getEnd_guarantee_date() {
return end_guarantee_date; return end_guarantee_date;
} }
public void setEnd_guarantee_date(Date end_guarantee_date) { public void setEnd_guarantee_date(Date end_guarantee_date) {
this.end_guarantee_date = end_guarantee_date; this.end_guarantee_date = end_guarantee_date;
} }
public String getMainten_start_point() { public String getMainten_start_point() {
return mainten_start_point; return mainten_start_point;
} }
public void setMainten_start_point(String mainten_start_point) { public void setMainten_start_point(String mainten_start_point) {
this.mainten_start_point = mainten_start_point; this.mainten_start_point = mainten_start_point;
} }
public String getContract_note() { public String getContract_note() {
return contract_note; return contract_note;
} }
public void setContract_note(String contract_note) { public void setContract_note(String contract_note) {
this.contract_note = contract_note; this.contract_note = contract_note;
} }
public Boolean getIs_delete() { public Boolean getIs_delete() {
return is_delete; return is_delete;
} }
public void setIs_delete(Boolean is_delete) { public void setIs_delete(Boolean is_delete) {
this.is_delete = is_delete; this.is_delete = is_delete;
} }
public List<Integer> getAppendix_unids() { public List<Integer> getAppendix_unids() {
return appendix_unids; return appendix_unids;
} }
public void setAppendix_unids(List<Integer> appendix_unids) { public void setAppendix_unids(List<Integer> appendix_unids) {
this.appendix_unids = appendix_unids; this.appendix_unids = appendix_unids;
} }
public List<Appendix> getAppendix_list() { public List<Appendix> getAppendix_list() {
return appendix_list; return appendix_list;
} }
public void setAppendix_list(List<Appendix> appendix_list) { public void setAppendix_list(List<Appendix> appendix_list) {
this.appendix_list = appendix_list; this.appendix_list = appendix_list;
} }
public String getBusiness_table() { public String getBusiness_table() {
return business_table; return business_table;
} }
public void setBusiness_table(String business_table) { public void setBusiness_table(String business_table) {
this.business_table = business_table.trim(); this.business_table = business_table.trim();
} }
public String getBusiness_unid() { public String getBusiness_unid() {
return business_unid; return business_unid;
} }
public void setBusiness_unid(String business_unid) { public void setBusiness_unid(String business_unid) {
this.business_unid = business_unid.trim(); this.business_unid = business_unid.trim();
} }
public Double getTotal_reback_amount() { public Double getTotal_reback_amount() {
return total_reback_amount; return total_reback_amount;
} }
public void setTotal_reback_amount(Double total_reback_amount) { public void setTotal_reback_amount(Double total_reback_amount) {
this.total_reback_amount = total_reback_amount; this.total_reback_amount = total_reback_amount;
} }
public Double getContract_remain() { public Double getContract_remain() {
return contract_remain; return contract_remain;
} }
public void setContract_remain(Double contract_remain) { public void setContract_remain(Double contract_remain) {
this.contract_remain = contract_remain; this.contract_remain = contract_remain;
} }
public Double getTotal_receive_amount() { public Double getTotal_receive_amount() {
return total_receive_amount; return total_receive_amount;
} }
public void setTotal_receive_amount(Double total_receive_amount) { public void setTotal_receive_amount(Double total_receive_amount) {
this.total_receive_amount = total_receive_amount; this.total_receive_amount = total_receive_amount;
} }
public Double getTotal_amount_remain() { public Double getTotal_amount_remain() {
return total_amount_remain; return total_amount_remain;
} }
public void setTotal_amount_remain(Double total_amount_remain) { public void setTotal_amount_remain(Double total_amount_remain) {
this.total_amount_remain = total_amount_remain; this.total_amount_remain = total_amount_remain;
} }
public Integer getOver_days() { public Integer getOver_days() {
return over_days; return over_days;
} }
public void setOver_days(Integer over_days) { public void setOver_days(Integer over_days) {
this.over_days = over_days; this.over_days = over_days;
} }
public String getYear() { public String getYear() {
return year; return year;
} }
public void setYear(String year) { public void setYear(String year) {
this.year = year.trim(); this.year = year.trim();
} }
public String getMonth() { public String getMonth() {
return month; return month;
} }
public void setMonth(String month) { public void setMonth(String month) {
this.month = month.trim(); this.month = month.trim();
} }
public String getSalesperson_name() { public String getSalesperson_name() {
return salesperson_name; return salesperson_name;
} }
public void setSalesperson_name(String salesperson_name) { public void setSalesperson_name(String salesperson_name) {
this.salesperson_name = salesperson_name; this.salesperson_name = salesperson_name;
} }
public Integer getList_size() { public Integer getList_size() {
return list_size; return list_size;
} }
public void setList_size(Integer list_size) { public void setList_size(Integer list_size) {
this.list_size = list_size; this.list_size = list_size;
} }
public Integer getOffset() { public Integer getOffset() {
return offset; return offset;
} }
public void setOffset(Integer offset) { public void setOffset(Integer offset) {
this.offset = offset; this.offset = offset;
} }
public Double getAdvance_pay() { public Double getAdvance_pay() {
return advance_pay; return advance_pay;
} }
public void setAdvance_pay(Double advance_pay) { public void setAdvance_pay(Double advance_pay) {
this.advance_pay = advance_pay; this.advance_pay = advance_pay;
} }
public Double getArrive_pay() { public Double getArrive_pay() {
return arrive_pay; return arrive_pay;
} }
public void setArrive_pay(Double arrive_pay) { public void setArrive_pay(Double arrive_pay) {
this.arrive_pay = arrive_pay; this.arrive_pay = arrive_pay;
} }
public Double getAcceptanc_pay() { public Double getAcceptanc_pay() {
return acceptanc_pay; return acceptanc_pay;
} }
public void setAcceptanc_pay(Double acceptanc_pay) { public void setAcceptanc_pay(Double acceptanc_pay) {
this.acceptanc_pay = acceptanc_pay; this.acceptanc_pay = acceptanc_pay;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getAdvance_pay_date() { public Date getAdvance_pay_date() {
return advance_pay_date; return advance_pay_date;
} }
public void setAdvance_pay_date(Date advance_pay_date) { public void setAdvance_pay_date(Date advance_pay_date) {
this.advance_pay_date = advance_pay_date; this.advance_pay_date = advance_pay_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getArrive_pay_date() { public Date getArrive_pay_date() {
return arrive_pay_date; return arrive_pay_date;
} }
public void setArrive_pay_date(Date arrive_pay_date) { public void setArrive_pay_date(Date arrive_pay_date) {
this.arrive_pay_date = arrive_pay_date; this.arrive_pay_date = arrive_pay_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getAcceptanc_pay_date() { public Date getAcceptanc_pay_date() {
return acceptanc_pay_date; return acceptanc_pay_date;
} }
public void setAcceptanc_pay_date(Date acceptanc_pay_date) { public void setAcceptanc_pay_date(Date acceptanc_pay_date) {
this.acceptanc_pay_date = acceptanc_pay_date; this.acceptanc_pay_date = acceptanc_pay_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getDeliver_date() { public Date getDeliver_date() {
return deliver_date; return deliver_date;
} }
public void setDeliver_date(Date deliver_date) { public void setDeliver_date(Date deliver_date) {
this.deliver_date = deliver_date; this.deliver_date = deliver_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getAcceptanc_date() { public Date getAcceptanc_date() {
return acceptanc_date; return acceptanc_date;
} }
public void setAcceptanc_date(Date acceptanc_date) { public void setAcceptanc_date(Date acceptanc_date) {
this.acceptanc_date = acceptanc_date; this.acceptanc_date = acceptanc_date;
} }
public List<String> getSalesperson_unids() { public List<String> getSalesperson_unids() {
return salesperson_unids; return salesperson_unids;
} }
public void setSalesperson_unids(List<String> salesperson_unids) { public void setSalesperson_unids(List<String> salesperson_unids) {
this.salesperson_unids = salesperson_unids; this.salesperson_unids = salesperson_unids;
} }
public List<PaymentAgree> getPaymentAgree_list() { public List<PaymentAgree> getPaymentAgree_list() {
return paymentAgree_list; return paymentAgree_list;
} }
public void setPaymentAgree_list(List<PaymentAgree> paymentAgree_list) { public void setPaymentAgree_list(List<PaymentAgree> paymentAgree_list) {
this.paymentAgree_list = paymentAgree_list; this.paymentAgree_list = paymentAgree_list;
} }
public List<String> getContract_unids() { public List<String> getContract_unids() {
return contract_unids; return contract_unids;
} }
public void setContract_unids(List<String> contract_unids) { public void setContract_unids(List<String> contract_unids) {
this.contract_unids = contract_unids; this.contract_unids = contract_unids;
} }
public String getProvince_name() { public String getProvince_name() {
return province_name; return province_name;
} }
public void setProvince_name(String province_name) { public void setProvince_name(String province_name) {
this.province_name = province_name; this.province_name = province_name;
} }
public String getCity_name() { public String getCity_name() {
return city_name; return city_name;
} }
public void setCity_name(String city_name) { public void setCity_name(String city_name) {
this.city_name = city_name; this.city_name = city_name;
} }
public String getCounty_name() { public String getCounty_name() {
return county_name; return county_name;
} }
public void setCounty_name(String county_name) { public void setCounty_name(String county_name) {
this.county_name = county_name; this.county_name = county_name;
} }
public String getProduct_line_type_name() { public String getProduct_line_type_name() {
return product_line_type_name; return product_line_type_name;
} }
public void setProduct_line_type_name(String product_line_type_name) { public void setProduct_line_type_name(String product_line_type_name) {
this.product_line_type_name = product_line_type_name; this.product_line_type_name = product_line_type_name;
} }
public String getContract_state_name() { public String getContract_state_name() {
return contract_state_name; return contract_state_name;
} }
public void setContract_state_name(String contract_state_name) { public void setContract_state_name(String contract_state_name) {
this.contract_state_name = contract_state_name; this.contract_state_name = contract_state_name;
} }
public String getContract_type_name() { public String getContract_type_name() {
return contract_type_name; return contract_type_name;
} }
public void setContract_type_name(String contract_type_name) { public void setContract_type_name(String contract_type_name) {
this.contract_type_name = contract_type_name; this.contract_type_name = contract_type_name;
} }
public String getAmount_state_unid_name() { public String getAmount_state_unid_name() {
return amount_state_unid_name; return amount_state_unid_name;
} }
public void setAmount_state_unid_name(String amount_state_unid_name) { public void setAmount_state_unid_name(String amount_state_unid_name) {
this.amount_state_unid_name = amount_state_unid_name; this.amount_state_unid_name = amount_state_unid_name;
} }
public Double getMainten_pay() { public Double getMainten_pay() {
return mainten_pay; return mainten_pay;
} }
public void setMainten_pay(Double mainten_pay) { public void setMainten_pay(Double mainten_pay) {
this.mainten_pay = mainten_pay; this.mainten_pay = mainten_pay;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getMainten_pay_date() { public Date getMainten_pay_date() {
return mainten_pay_date; return mainten_pay_date;
} }
public void setMainten_pay_date(Date mainten_pay_date) { public void setMainten_pay_date(Date mainten_pay_date) {
this.mainten_pay_date = mainten_pay_date; this.mainten_pay_date = mainten_pay_date;
} }
public String getRelation_customer() { public String getRelation_customer() {
return relation_customer; return relation_customer;
} }
public void setRelation_customer(String relation_customer) { public void setRelation_customer(String relation_customer) {
this.relation_customer = relation_customer; this.relation_customer = relation_customer;
} }
public String getFinal_user_name() { public String getFinal_user_name() {
return final_user_name; return final_user_name;
} }
public void setFinal_user_name(String final_user_name) { public void setFinal_user_name(String final_user_name) {
this.final_user_name = final_user_name; this.final_user_name = final_user_name;
} }
public String getRelation_customer_name() { public String getRelation_customer_name() {
return relation_customer_name; return relation_customer_name;
} }
public void setRelation_customer_name(String relation_customer_name) { public void setRelation_customer_name(String relation_customer_name) {
this.relation_customer_name = relation_customer_name; this.relation_customer_name = relation_customer_name;
} }
public String getFirst_industry() { public String getFirst_industry() {
return first_industry; return first_industry;
} }
public void setFirst_industry(String first_industry) { public void setFirst_industry(String first_industry) {
this.first_industry = first_industry; this.first_industry = first_industry;
} }
public String getSecond_industry() { public String getSecond_industry() {
return second_industry; return second_industry;
} }
public void setSecond_industry(String second_industry) { public void setSecond_industry(String second_industry) {
this.second_industry = second_industry; this.second_industry = second_industry;
} }
public String getFirst_industry_name() { public String getFirst_industry_name() {
return first_industry_name; return first_industry_name;
} }
public void setFirst_industry_name(String first_industry_name) { public void setFirst_industry_name(String first_industry_name) {
this.first_industry_name = first_industry_name; this.first_industry_name = first_industry_name;
} }
public String getSecond_industry_name() { public String getSecond_industry_name() {
return second_industry_name; return second_industry_name;
} }
public void setSecond_industry_name(String second_industry_name) { public void setSecond_industry_name(String second_industry_name) {
this.second_industry_name = second_industry_name; this.second_industry_name = second_industry_name;
} }
@Override @Override
public Integer getFinal_user() { public Integer getFinal_user() {
return final_user; return final_user;
} }
@Override @Override
public void setFinal_user(Integer final_user) { public void setFinal_user(Integer final_user) {
this.final_user = final_user; this.final_user = final_user;
} }
} }
...@@ -9,7 +9,7 @@ spring: ...@@ -9,7 +9,7 @@ spring:
encoding: UTF-8 encoding: UTF-8
cache: false cache: false
datasource: datasource:
url: jdbc:postgresql://192.168.9.162:5432/financial_test url: jdbc:postgresql://192.168.9.162:5432/financial_serv
username: postgres username: postgres
password: authpass password: authpass
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
...@@ -47,6 +47,8 @@ finance: ...@@ -47,6 +47,8 @@ finance:
authurl: http://192.168.9.162:20080/api/v1/auth/users authurl: http://192.168.9.162:20080/api/v1/auth/users
appendsavepath: /data/face-web/www/static/pics/cache/finance appendsavepath: /data/face-web/www/static/pics/cache/finance
appendurl: http://192.168.9.162:20080/static/pics/cache/finance/ appendurl: http://192.168.9.162:20080/static/pics/cache/finance/
amount_state: 正常验收款:50001;正常维保:50002;正常预付款:50003;正常到货款:50004;正常质保款:50005;逾期预付款:50006;逾期到货款:50007;逾期验收款:50008;逾期质保款:50009;暂停:50010;质量问题:50011;
# provinceurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces # provinceurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces
# cityurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities # cityurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities
# countyurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities/%s/counties # countyurl: http://192.168.9.162:20080/api/v1/codes/countries/0E229CD043/provinces/%s/cities/%s/counties
...@@ -54,4 +56,6 @@ finance: ...@@ -54,4 +56,6 @@ finance:
# helperDialect: postgresql # helperDialect: postgresql
# reasonable: true # reasonable: true
# supportMethodsArguments: true # supportMethodsArguments: true
# params: count=countSql
\ No newline at end of file \ No newline at end of file
# params: count=countSql
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.ContractMapper"> <mapper namespace="com.vion.financial.mapper.ContractMapper">
<insert id="addOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true"> <insert id="addOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
INSERT INTO tb_contract( INSERT INTO tb_contract(
contract_unid contract_unid
<if test="salesperson_unid != null and salesperson_unid != ''"> <if test="salesperson_unid != null and salesperson_unid != ''">
,salesperson_unid ,salesperson_unid
</if> </if>
<if test="province != null and province != ''"> <if test="province != null and province != ''">
,province,province_name ,province,province_name
</if> </if>
<if test="city !=null and city != ''"> <if test="city !=null and city != ''">
,city,city_name ,city,city_name
</if> </if>
<if test="county != null and county != ''"> <if test="county != null and county != ''">
,county,county_name ,county,county_name
</if> </if>
<if test="guarantee_period != null"> <if test="guarantee_period != null">
,guarantee_period ,guarantee_period
</if> </if>
<if test="sign_date != null"> <if test="sign_date != null">
,sign_date ,sign_date
</if> </if>
<if test="product_line_type != null and product_line_type != ''"> <if test="product_line_type != null and product_line_type != ''">
,product_line_type ,product_line_type
</if> </if>
<if test="contract_state != null and contract_state != ''"> <if test="contract_state != null and contract_state != ''">
,contract_state ,contract_state
</if> </if>
<if test="contract_type != null and contract_type != ''"> <if test="contract_type != null and contract_type != ''">
,contract_type ,contract_type
</if> </if>
<if test="contract_amount != null "> <if test="contract_amount != null ">
,contract_amount ,contract_amount
</if> </if>
<if test="deduct_amount != null "> <if test="deduct_amount != null ">
,deduct_amount ,deduct_amount
</if> </if>
<if test="contract_amount_note != null and contract_amount_note != ''"> <if test="contract_amount_note != null and contract_amount_note != ''">
,contract_amount_note ,contract_amount_note
</if> </if>
<if test="stop_amount != null "> <if test="stop_amount != null ">
,stop_amount ,stop_amount
</if> </if>
<if test="reback_note != null and reback_note != ''"> <if test="reback_note != null and reback_note != ''">
,reback_note ,reback_note
</if> </if>
<if test="exemptions_amount != null "> <if test="exemptions_amount != null ">
,exemptions_amount ,exemptions_amount
</if> </if>
<if test="contract_remain_note != null and contract_remain_note != ''"> <if test="contract_remain_note != null and contract_remain_note != ''">
,contract_remain_note ,contract_remain_note
</if> </if>
<if test="is_archive != null and is_archive != ''"> <if test="is_archive != null and is_archive != ''">
,is_archive ,is_archive
</if> </if>
<if test="bad_amount != null "> <if test="bad_amount != null ">
,bad_amount ,bad_amount
</if> </if>
<if test="bad_amount_note != null and bad_amount_note != ''"> <if test="bad_amount_note != null and bad_amount_note != ''">
,bad_amount_note ,bad_amount_note
</if> </if>
<if test="confirm_income_amount != null "> <if test="confirm_income_amount != null ">
,confirm_income_amount ,confirm_income_amount
</if> </if>
<if test="amount_state_unid != null and amount_state_unid != ''"> <if test="amount_state_unid != null and amount_state_unid != ''">
,amount_state_unid ,amount_state_unid
</if> </if>
<if test="start_guarantee_date != null "> <if test="start_guarantee_date != null ">
,start_guarantee_date ,start_guarantee_date
</if> </if>
<if test="end_guarantee_date != null "> <if test="end_guarantee_date != null ">
,end_guarantee_date ,end_guarantee_date
</if> </if>
<if test="mainten_start_point != null and mainten_start_point != ''"> <if test="mainten_start_point != null and mainten_start_point != ''">
,mainten_start_point ,mainten_start_point
</if> </if>
<if test="contract_note != null and contract_note != ''"> <if test="contract_note != null and contract_note != ''">
,contract_note ,contract_note
</if> </if>
,is_delete ,is_delete
<if test="project_unid != null and project_unid != ''"> <if test="project_unid != null and project_unid != ''">
,project_unid ,project_unid
</if> </if>
<if test="customer_unid != null and customer_unid != ''"> <if test="customer_unid != null and customer_unid != ''">
,customer_unid ,customer_unid
</if> </if>
<if test="province_name !=null and province_name !=''"> <if test="province_name !=null and province_name !=''">
,province_name ,province_name
</if> </if>
<if test="city_name !=null and city_name !=''"> <if test="city_name !=null and city_name !=''">
,city_name ,city_name
</if> </if>
<if test="county_name !=null and county_name !=''"> <if test="county_name !=null and county_name !=''">
,county_name ,county_name
</if> </if>
) VALUES( <if test="final_user != null and final_user != ''">
#{contract_unid} ,final_user
<if test="salesperson_unid != null and salesperson_unid != ''"> </if>
,#{salesperson_unid} <if test="relation_customer != null and relation_customer != ''">
</if> ,relation_customer
<if test="province != null and province != ''"> </if>
,#{province},#{province_name} <if test="industry != null and industry != ''">
</if> ,industry
<if test="city !=null and city != ''"> </if>
, #{city},#{city_name} <if test="final_user != null and final_user != ''">
</if> ,final_user_name
<if test="county != null and county != ''"> </if>
,#{county},#{county_name} <if test="relation_customer != null and relation_customer != ''">
</if> ,relation_customer_name
<if test="guarantee_period != null "> </if>
,#{guarantee_period} <if test="industry != null and industry != ''">
</if> ,industry_name
<if test="sign_date != null "> </if>
,#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} ) VALUES(
</if> #{contract_unid}
<if test="product_line_type != null and product_line_type != ''"> <if test="salesperson_unid != null and salesperson_unid != ''">
,#{product_line_type} ,#{salesperson_unid}
</if> </if>
<if test="contract_state != null and contract_state != ''"> <if test="province != null and province != ''">
,#{contract_state} ,#{province},#{province_name}
</if> </if>
<if test="contract_type != null and contract_type != ''"> <if test="city !=null and city != ''">
,#{contract_type} , #{city},#{city_name}
</if> </if>
<if test="contract_amount != null "> <if test="county != null and county != ''">
,#{contract_amount} ,#{county},#{county_name}
</if> </if>
<if test="deduct_amount != null "> <if test="guarantee_period != null ">
,#{deduct_amount} ,#{guarantee_period}
</if> </if>
<if test="contract_amount_note != null and contract_amount_note != ''"> <if test="sign_date != null ">
,#{contract_amount_note} ,#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if> </if>
<if test="stop_amount != null "> <if test="product_line_type != null and product_line_type != ''">
,#{stop_amount} ,#{product_line_type}
</if> </if>
<if test="reback_note != null and reback_note != ''"> <if test="contract_state != null and contract_state != ''">
,#{reback_note} ,#{contract_state}
</if> </if>
<if test="exemptions_amount != null "> <if test="contract_type != null and contract_type != ''">
,#{exemptions_amount} ,#{contract_type}
</if> </if>
<if test="contract_remain_note != null and contract_remain_note != ''"> <if test="contract_amount != null ">
,#{contract_remain_note} ,#{contract_amount}
</if> </if>
<if test="is_archive != null and is_archive != ''"> <if test="deduct_amount != null ">
,#{is_archive} ,#{deduct_amount}
</if> </if>
<if test="bad_amount != null "> <if test="contract_amount_note != null and contract_amount_note != ''">
,#{bad_amount} ,#{contract_amount_note}
</if> </if>
<if test="bad_amount_note != null and bad_amount_note != ''"> <if test="stop_amount != null ">
,#{bad_amount_note} ,#{stop_amount}
</if> </if>
<if test="confirm_income_amount != null "> <if test="reback_note != null and reback_note != ''">
,#{confirm_income_amount} ,#{reback_note}
</if> </if>
<if test="amount_state_unid != null and amount_state_unid != ''"> <if test="exemptions_amount != null ">
,#{amount_state_unid} ,#{exemptions_amount}
</if> </if>
<if test="start_guarantee_date != null "> <if test="contract_remain_note != null and contract_remain_note != ''">
,#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} ,#{contract_remain_note}
</if> </if>
<if test="end_guarantee_date != null "> <if test="is_archive != null and is_archive != ''">
,#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} ,#{is_archive}
</if> </if>
<if test="mainten_start_point != null and mainten_start_point != ''"> <if test="bad_amount != null ">
,#{mainten_start_point} ,#{bad_amount}
</if> </if>
<if test="contract_note != null and contract_note != ''"> <if test="bad_amount_note != null and bad_amount_note != ''">
,#{contract_note} ,#{bad_amount_note}
</if> </if>
,false <if test="confirm_income_amount != null ">
<if test="project_unid != null and project_unid != ''"> ,#{confirm_income_amount}
,#{project_unid} </if>
</if> <if test="amount_state_unid != null and amount_state_unid != ''">
<if test="customer_unid != null and customer_unid != ''"> ,#{amount_state_unid}
,#{customer_unid} </if>
</if> <if test="start_guarantee_date != null ">
<if test="province_name !=null and province_name !=''"> ,#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
,#{province_name} </if>
</if> <if test="end_guarantee_date != null ">
<if test="city_name !=null and city_name !=''"> ,#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
,#{city_name} </if>
</if> <if test="mainten_start_point != null and mainten_start_point != ''">
<if test="county_name !=null and county_name !=''"> ,#{mainten_start_point}
,#{county_name} </if>
</if> <if test="contract_note != null and contract_note != ''">
) ,#{contract_note}
</if>
</insert> ,false
<select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String"> <if test="project_unid != null and project_unid != ''">
select ,#{project_unid}
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name, </if>
guarantee_period, sign_date, product_line_type, contract_state, <if test="customer_unid != null and customer_unid != ''">
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note, ,#{customer_unid}
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note, </if>
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)), <if test="province_name !=null and province_name !=''">
amount_state_unid, start_guarantee_date, end_guarantee_date, ,#{province_name}
mainten_start_point, contract_note, is_delete, project_unid, </if>
customer_unid, <if test="city_name !=null and city_name !=''">
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(deduct_amount as decimal(18,2))-cast(stop_amount as decimal(18,2))-cast(exemptions_amount as decimal(18,2))-cast(bad_amount as decimal(18,2))) as contract_remain, ,#{city_name}
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, </if>
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , <if test="county_name !=null and county_name !=''">
((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain , ,#{county_name}
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days, </if>
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name, <if test="final_user != null and final_user != ''">
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name, ,#{final_user}
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay, </if>
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay, <if test="relation_customer != null and relation_customer != ''">
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay, ,#{relation_customer}
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay, </if>
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date, <if test="industry != null and industry != ''">
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date, ,#{industry}
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date, </if>
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date, <if test="final_user != null and final_user != ''">
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date, ,#{final_user_name}
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date </if>
from tb_contract where contract_unid = #{contract_unid} <if test="relation_customer != null and relation_customer != ''">
</select> ,#{relation_customer_name}
<update id="updateOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true"> </if>
update tb_contract <if test="industry != null and industry != ''">
<set> ,#{industry_name}
<if test="salesperson_unid != null and salesperson_unid != ''"> </if>
salesperson_unid=#{salesperson_unid}, )
</if>
<if test="province != null and province != ''"> </insert>
province=#{province}, <select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String">
province_name=#{province_name}, select
</if> contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
<if test="city !=null and city != ''"> guarantee_period, sign_date, product_line_type, contract_state,
city=#{city}, contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
city_name=#{city_name}, cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
</if> is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
<if test="county != null and county != ''"> amount_state_unid, start_guarantee_date, end_guarantee_date,
county=#{county}, mainten_start_point, contract_note, is_delete, project_unid, final_user,relation_customer,industry, final_user_name,relation_customer_name,industry_name,
county_name=#{county_name}, customer_unid,
</if> (cast(contract_amount as decimal(18,2))-(select cast(case when total_reback_view.sum is null then 0 else total_reback_view.sum end as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
<if test="guarantee_period != null "> -cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
guarantee_period=#{guarantee_period}, (select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
</if> (select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<if test="sign_date != null "> <!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
sign_date=#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, (select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
</if> (select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
<if test="product_line_type != null and product_line_type != ''"> (select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
product_line_type=#{product_line_type}, (select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
</if> (select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
<if test="contract_state != null and contract_state != ''"> (select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
contract_state=#{contract_state}, (select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
</if> (select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
<if test="contract_type != null and contract_type != ''"> (select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
contract_type=#{contract_type}, (select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
</if> (select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
contract_amount=#{contract_amount}, (select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
deduct_amount=#{deduct_amount}, (select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
<if test="contract_amount_note != null and contract_amount_note != ''"> (select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
contract_amount_note=#{contract_amount_note}, from tb_contract where contract_unid = #{contract_unid}
</if> </select>
stop_amount=#{stop_amount}, <update id="updateOne" parameterType="com.vion.financial.vo.ContractVo" keyColumn="contract_unid" keyProperty="contract_unid" useGeneratedKeys="true">
<if test="reback_note != null and reback_note != ''"> update tb_contract
reback_note=#{reback_note}, <set>
</if> <if test="salesperson_unid != null and salesperson_unid != ''">
exemptions_amount=#{exemptions_amount}, salesperson_unid=#{salesperson_unid},
<if test="contract_remain_note != null and contract_remain_note != ''"> </if>
contract_remain_note=#{contract_remain_note}, <if test="province != null and province != ''">
</if> province=#{province},
<if test="is_archive != null and is_archive != ''"> province_name=#{province_name},
is_archive=#{is_archive}, </if>
</if> <if test="city !=null and city != ''">
bad_amount=#{bad_amount}, city=#{city},
<if test="bad_amount_note != null and bad_amount_note != ''"> city_name=#{city_name},
bad_amount_note=#{bad_amount_note}, </if>
</if> <if test="county != null and county != ''">
confirm_income_amount=#{confirm_income_amount}, county=#{county},
<if test="amount_state_unid != null and amount_state_unid != ''"> county_name=#{county_name},
amount_state_unid=#{amount_state_unid}, </if>
</if> <if test="guarantee_period != null ">
<if test="start_guarantee_date != null "> guarantee_period=#{guarantee_period},
start_guarantee_date=#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, </if>
</if> <if test="sign_date != null ">
<if test="end_guarantee_date != null "> sign_date=#{sign_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
end_guarantee_date=#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, </if>
</if> <if test="product_line_type != null and product_line_type != ''">
<if test="mainten_start_point != null and mainten_start_point != ''"> product_line_type=#{product_line_type},
mainten_start_point=#{mainten_start_point}, </if>
</if> <if test="contract_state != null and contract_state != ''">
<if test="contract_note != null and contract_note != ''"> contract_state=#{contract_state},
contract_note=#{contract_note}, </if>
</if> <if test="contract_type != null and contract_type != ''">
<if test="is_delete != null and is_delete != ''"> contract_type=#{contract_type},
is_delete=#{is_delete}, </if>
</if> <if test="contract_amount !=null">
<if test="project_unid != null and project_unid != ''"> contract_amount=#{contract_amount},
project_unid=#{project_unid}, </if>
</if> <if test="deduct_amount !=null">
<if test="customer_unid != null and customer_unid != ''"> deduct_amount=#{deduct_amount},
customer_unid=#{customer_unid} </if>
</if> <if test="contract_amount_note != null and contract_amount_note != ''">
</set> contract_amount_note=#{contract_amount_note},
where contract_unid=#{contract_unid} </if>
</update> <if test="stop_amount !=null">
<delete id="deleteOne" parameterType="java.lang.String"> stop_amount=#{stop_amount},
<!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} --> </if>
delete from tb_contract where contract_unid = #{contract_unid} <if test="reback_note != null and reback_note != ''">
</delete> reback_note=#{reback_note},
</if>
<select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int"> <if test="exemptions_amount !=null">
select count(1) as count from tb_contract where 1=1 exemptions_amount=#{exemptions_amount},
<if test="contract_unid !=null and contract_unid !=''"> </if>
and <if test="contract_remain_note != null and contract_remain_note != ''">
contract_unid=#{contract_unid} contract_remain_note=#{contract_remain_note},
</if> </if>
<if test="salesperson_unids !=null"> <if test="is_archive != null and is_archive != ''">
and is_archive=#{is_archive},
salesperson_unid in </if>
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=","> <if test="bad_amount !=null">
#{salesperson_unid} bad_amount=#{bad_amount},
</foreach> </if>
</if> <if test="bad_amount_note != null and bad_amount_note != ''">
<if test="project_name__like !=null and project_name__like !=''"> bad_amount_note=#{bad_amount_note},
and </if>
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%') confirm_income_amount=#{confirm_income_amount},
</if> <if test="amount_state_unid != null and amount_state_unid != ''">
<if test="customer_name__like !=null and customer_name__like !=''"> amount_state_unid=#{amount_state_unid},
and </if>
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%') <if test="start_guarantee_date != null ">
</if> start_guarantee_date=#{start_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
<if test="province !=null and province !=''"> </if>
and <if test="end_guarantee_date != null ">
province=#{province} end_guarantee_date=#{end_guarantee_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if> </if>
<if test="city !=null and city !=''"> <if test="mainten_start_point != null and mainten_start_point != ''">
and mainten_start_point=#{mainten_start_point},
city=#{city} </if>
</if> <if test="contract_note != null and contract_note != ''">
<if test="county !=null and county !=''"> contract_note=#{contract_note},
and </if>
county=#{county} <if test="is_delete != null and is_delete != ''">
</if> is_delete=#{is_delete},
<if test="guarantee_period !=null "> </if>
and <if test="project_unid != null and project_unid != ''">
guarantee_period=#{guarantee_period} project_unid=#{project_unid},
</if> </if>
<if test="year !=null and year !=''"> <if test="customer_unid != null and customer_unid != ''">
and customer_unid=#{customer_unid},
to_char(sign_date,'yyyy')=#{year} </if>
</if> <if test="final_user != null and final_user !=''">
<if test="month !=null and month!=''"> final_user=#{final_user},
and </if>
to_char(sign_date,'MM')=#{month} <if test="relation_customer != null and relation_customer !=''">
</if> relation_customer=#{relation_customer},
<if test="product_line_type !=null and product_line_type !=''"> </if>
and <if test="industry != null and industry !=''">
product_line_type=#{product_line_type} industry=#{industry},
</if> </if>
<if test="contract_state !=null and contract_state!=''"> <if test="final_user_name != null and final_user_name !=''">
and final_user_name=#{final_user_name},
contract_state=#{contract_state} </if>
</if> <if test="relation_customer_name != null and relation_customer_name !=''">
<if test="contract_type !=null and contract_type !=''"> relation_customer_name=#{relation_customer_name},
and </if>
contract_type=#{contract_type} <if test="industry_name != null and industry_name !=''">
</if> industry_name=#{industry_name}
<if test="is_archive !=null"> </if>
and </set>
is_archive=#{is_archive} where contract_unid=#{contract_unid}
</if> </update>
<if test="acceptanc_type !=null and acceptanc_type !=''"> <delete id="deleteOne" parameterType="java.lang.String">
and <!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} -->
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type}) delete from tb_contract where contract_unid = #{contract_unid}
</if> </delete>
<if test="confirm_income_amount !=null">
and <select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int">
confirm_income_amount=#{confirm_income_amount} select count(1) as count from tb_contract where 1=1
</if> <if test="contract_unid !=null and contract_unid !=''">
<if test="amount_state_unid !=null and amount_state_unid !=''"> and
and contract_unid=#{contract_unid}
amount_state_unid=#{amount_state_unid} </if>
</if> <if test="salesperson_unids !=null">
<if test="start_date != null and end_date !=null"> and
and salesperson_unid in
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
</if> #{salesperson_unid}
<if test="amount_start_point !=null "> </foreach>
and </if>
contract_amount <![CDATA[>=]]> #{amount_start_point} <if test="amount_state_unids !=null and amount_state_unids.length > 0">
</if> and
<if test="amount_end_point !=null "> amount_state_unid in
and <foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
contract_amount <![CDATA[<=]]> #{amount_end_point} #{amount_state_unid_item}
</if> </foreach>
<if test="overdays_start_point !=null and overdays_end_point == null"> </if>
and <if test="contract_states !=null and contract_states.length > 0">
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) and
</if> contract_state in
<if test="overdays_start_point !=null and overdays_end_point !=null "> <foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
and #{item}
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point}) </foreach>
</if> </if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) <if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
</if> and
<if test="leave_amount_start_point !=null "> salesperson_unid in
<!--应收款余额-->and <foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point}) #{item}
</if> </foreach>
<if test="leave_amount_end_point !=null "> </if>
and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point}) <if test="project_name__like !=null and project_name__like !=''">
</if> and
and is_delete=false tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
and project_unid is not null </if>
and customer_unid is not null <if test="customer_name__like !=null and customer_name__like !=''">
</select> and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
<select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo"> </if>
select <if test="province !=null and province !=''">
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name, and
guarantee_period, sign_date, product_line_type, contract_state, province=#{province}
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note, </if>
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note, <if test="city !=null and city !=''">
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)), and
amount_state_unid, start_guarantee_date, end_guarantee_date, city=#{city}
mainten_start_point, contract_note, is_delete, project_unid, </if>
customer_unid, <if test="county !=null and county !=''">
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(deduct_amount as decimal(18,2))-cast(stop_amount as decimal(18,2))-cast(exemptions_amount as decimal(18,2))-cast(bad_amount as decimal(18,2))) as contract_remain, and
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, county=#{county}
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , </if>
((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain , <if test="guarantee_period !=null ">
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days, and
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name, guarantee_period=#{guarantee_period}
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name, </if>
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay, <if test="year !=null and year !=''">
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay, and
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay, to_char(sign_date,'yyyy')=#{year}
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay, </if>
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date, <if test="month !=null and month!=''">
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date, and
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date, to_char(sign_date,'MM')=#{month}
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date, </if>
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date, <if test="product_line_type !=null and product_line_type !=''">
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date and
from tb_contract where 1=1 product_line_type=#{product_line_type}
<if test="contract_unid !=null and contract_unid !=''"> </if>
and <if test="contract_state !=null and contract_state !=''">
contract_unid=#{contract_unid} and
</if> contract_state=#{contract_state}
<if test="salesperson_unids !=null"> </if>
and <if test="contract_type !=null and contract_type !=''">
salesperson_unid in and
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=","> contract_type=#{contract_type}
#{salesperson_unid} </if>
</foreach> <if test="final_user !=null and final_user !=''">
</if> and
<if test="project_name__like !=null and project_name__like !=''"> final_user=#{final_user}
and </if>
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%') <if test="relation_customer !=null and relation_customer !=''">
</if> and
<if test="customer_name__like !=null and customer_name__like !=''"> relation_customer=#{relation_customer}
and </if>
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%') <if test="industry !=null and industry !=''">
</if> and
<if test="province !=null and province !=''"> industry=#{industry}
and </if>
province=#{province} <if test="final_user_name !=null and final_user_name !=''">
</if> and
<if test="city !=null and city !=''"> final_user_name=#{final_user_name}
and </if>
city=#{city} <if test="relation_customer_name !=null and relation_customer_name !=''">
</if> and
<if test="county !=null and county !=''"> relation_customer_name=#{relation_customer_name}
and </if>
county=#{county} <if test="industry_name !=null and industry_name !=''">
</if> and
<if test="guarantee_period !=null "> industry_name=#{industry_name}
and </if>
guarantee_period=#{guarantee_period} <if test="is_archive !=null">
</if> and
<if test="year !=null and year !=''"> is_archive=#{is_archive}
and </if>
to_char(sign_date,'yyyy')=#{year} <if test="acceptanc_type !=null and acceptanc_type !=''">
</if> and
<if test="month !=null and month!=''"> contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
and </if>
to_char(sign_date,'MM')=#{month} <if test="confirm_income_amount !=null">
</if> and
<if test="product_line_type !=null and product_line_type !=''"> confirm_income_amount=#{confirm_income_amount}
and </if>
product_line_type=#{product_line_type} <if test="amount_state_unid !=null and amount_state_unid !=''">
</if> and
<if test="contract_state !=null and contract_state!=''"> amount_state_unid=#{amount_state_unid}
and </if>
contract_state=#{contract_state} <if test="start_date != null and end_date !=null">
</if> and
<if test="contract_type !=null and contract_type !=''"> #{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
and </if>
contract_type=#{contract_type} <if test="amount_start_point !=null ">
</if> and
<if test="is_archive !=null"> contract_amount <![CDATA[>=]]> #{amount_start_point}
and </if>
is_archive=#{is_archive} <if test="amount_end_point !=null ">
</if> and
<if test="acceptanc_type !=null and acceptanc_type !=''"> contract_amount <![CDATA[<=]]> #{amount_end_point}
and </if>
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type}) <if test="overdays_start_point !=null and overdays_end_point == null">
</if> and
<if test="confirm_income_amount !=null"> <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
and </if>
confirm_income_amount=#{confirm_income_amount} <if test="overdays_start_point !=null and overdays_end_point !=null ">
</if> and
<if test="amount_state_unid !=null and amount_state_unid !=''"> <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
and </if>
amount_state_unid=#{amount_state_unid} <if test="overdays_start_point ==null and overdays_end_point !=null">
</if> contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
<if test="start_date != null "> </if>
and <if test="leave_amount_start_point !=null ">
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date <!--应收款余额-->and
</if> contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
<if test="end_date !=null"> </if>
and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <if test="leave_amount_end_point !=null ">
</if> and
<if test="amount_start_point !=null "> contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
and </if>
contract_amount <![CDATA[>=]]> #{amount_start_point} and is_delete=false
</if> and project_unid is not null
<if test="amount_end_point !=null "> and customer_unid is not null
and </select>
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if> <select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo">
<if test="overdays_start_point !=null and overdays_end_point == null"> select
and contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) guarantee_period, sign_date, product_line_type, contract_state,
</if> contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
<if test="overdays_start_point !=null and overdays_end_point !=null "> cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
and is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point}) amount_state_unid, start_guarantee_date, end_guarantee_date,
</if> mainten_start_point, contract_note, is_delete, project_unid,
<if test="overdays_start_point ==null and overdays_end_point !=null"> customer_unid,
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) (cast(CASE WHEN contract_amount IS NULL THEN 0 ELSE contract_amount END as decimal(18,2))-(select cast(CASE WHEN total_reback_view.sum IS NULL THEN 0 ELSE total_reback_view.sum END as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
</if> -cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,
<if test="leave_amount_start_point !=null "> (select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
<!--应收款余额-->and (select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point}) <!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
</if> (select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
<if test="leave_amount_end_point !=null "> (select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
and (select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point}) (select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
</if> (select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
<if test="salesperson_unid !=null and salesperson_unid !=''"> (select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
and (select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
salesperson_unid = #{salesperson_unid} (select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
</if> (select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
and is_delete=false (select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
and project_unid is not null (select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
and customer_unid is not null (select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
<if test="limit !=null "> (select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
limit #{limit} (select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
</if> from tb_contract where 1=1
<if test="offset !=null"> <if test="contract_unid !=null and contract_unid !=''">
offset #{offset} and
</if> contract_unid=#{contract_unid}
</select> </if>
<if test="salesperson_unids !=null">
and
<select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel"> salesperson_unid in
select <foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
<if test="columns == null"> #{salesperson_unid}
* </foreach>
</if> </if>
<if test="columns !=null"> <if test="amount_state_unids !=null and amount_state_unids.length > 0">
contract_unid, and
<foreach collection="columns" index="index" item="column" separator=","> amount_state_unid in
${column} <foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
</foreach> #{amount_state_unid_item}
</if> </foreach>
from (select </if>
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name, <if test="contract_states !=null and contract_states.length > 0">
guarantee_period, sign_date, product_line_type, contract_state, and
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note, contract_state in
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note, <foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)), #{item}
amount_state_unid, start_guarantee_date, end_guarantee_date, </foreach>
mainten_start_point, contract_note, is_delete, project_unid, </if>
customer_unid, <if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month, and
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(deduct_amount as decimal(18,2))-cast(stop_amount as decimal(18,2))-cast(exemptions_amount as decimal(18,2))-cast(bad_amount as decimal(18,2))) as contract_remain, salesperson_unid in
(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, <foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , #{item}
((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain , </foreach>
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days, </if>
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name, <if test="project_name__like !=null and project_name__like !=''">
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay, and
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay, tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay, </if>
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay, <if test="customer_name__like !=null and customer_name__like !=''">
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date, and
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date, tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date, </if>
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date, <if test="province !=null and province !=''">
<!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date, and
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, --> province=#{province}
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date, </if>
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date <if test="city !=null and city !=''">
from tb_contract where 1=1 and
<if test="contract_unid !=null and contract_unid !=''"> city=#{city}
and </if>
contract_unid=#{contract_unid} <if test="county !=null and county !=''">
</if> and
<if test="salesperson_unids !=null"> county=#{county}
and </if>
salesperson_unid in <if test="guarantee_period !=null ">
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=","> and
#{salesperson_unid} guarantee_period=#{guarantee_period}
</foreach> </if>
</if> <if test="year !=null and year !=''">
<if test="project_name__like !=null and project_name__like !=''"> and
and to_char(sign_date,'yyyy')=#{year}
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%') </if>
</if> <if test="month !=null and month!=''">
<if test="customer_name__like !=null and customer_name__like !=''"> and
and to_char(sign_date,'MM')=#{month}
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%') </if>
</if> <if test="product_line_type !=null and product_line_type !=''">
<if test="province !=null and province !=''"> and
and product_line_type=#{product_line_type}
province=#{province} </if>
</if> <if test="contract_state !=null and contract_state !=''">
<if test="city !=null and city !=''"> and
and contract_state=#{contract_state}
city=#{city} </if>
</if> <if test="contract_type !=null and contract_type !=''">
<if test="county !=null and county !=''"> and
and contract_type=#{contract_type}
county=#{county} </if>
</if> <if test="final_user !=null and final_user !=''">
<if test="guarantee_period !=null "> and
and final_user=#{final_user}
guarantee_period=#{guarantee_period} </if>
</if> <if test="relation_customer !=null and relation_customer !=''">
<if test="year !=null and year !=''"> and
and relation_customer=#{relation_customer}
to_char(sign_date,'yyyy')=#{year} </if>
</if> <if test="industry !=null and industry !=''">
<if test="month !=null and month!=''"> and
and industry=#{industry}
to_char(sign_date,'MM')=#{month} </if>
</if> <if test="final_user_name !=null and final_user_name !=''">
<if test="product_line_type !=null and product_line_type !=''"> and
and final_user_name=#{final_user_name}
product_line_type=#{product_line_type} </if>
</if> <if test="relation_customer_name !=null and relation_customer_name !=''">
<if test="contract_state !=null and contract_state!=''"> and
and relation_customer_name=#{relation_customer_name}
contract_state=#{contract_state} </if>
</if> <if test="industry_name !=null and industry_name !=''">
<if test="contract_type !=null and contract_type !=''"> and
and industry_name=#{industry_name}
contract_type=#{contract_type} </if>
</if> <if test="is_archive !=null">
<if test="is_archive !=null"> and
and is_archive=#{is_archive}
is_archive=#{is_archive} </if>
</if> <if test="acceptanc_type !=null and acceptanc_type !=''">
<if test="acceptanc_type !=null and acceptanc_type !=''"> and
and contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type}) </if>
</if> <if test="confirm_income_amount !=null">
<if test="confirm_income_amount !=null"> and
and confirm_income_amount=#{confirm_income_amount}
confirm_income_amount=#{confirm_income_amount} </if>
</if> <if test="amount_state_unid !=null and amount_state_unid !=''">
<if test="amount_state_unid !=null and amount_state_unid !=''"> and
and amount_state_unid=#{amount_state_unid}
amount_state_unid=#{amount_state_unid} </if>
</if> <if test="start_date != null and end_date !=null">
<if test="start_date != null "> and
and #{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date </if>
</if> <if test="amount_start_point !=null ">
<if test="end_date!=null"> and
and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} contract_amount <![CDATA[>=]]> #{amount_start_point}
</if> </if>
<if test="amount_start_point !=null "> <if test="amount_end_point !=null ">
and and
contract_amount <![CDATA[>=]]> #{amount_start_point} contract_amount <![CDATA[<=]]> #{amount_end_point}
</if> </if>
<if test="amount_end_point !=null "> <if test="overdays_start_point !=null and overdays_end_point == null">
and and
contract_amount <![CDATA[<=]]> #{amount_end_point} <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if> </if>
<!-- <if test="overdays_start_point !=null "> <if test="overdays_start_point !=null and overdays_end_point !=null ">
and and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if> </if>
<if test="overdays_end_point !=null "> <if test="overdays_start_point ==null and overdays_end_point !=null">
and contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) </if>
</if> --> <if test="leave_amount_start_point !=null ">
<if test="overdays_start_point !=null and overdays_end_point == null"> <!--应收款余额-->and
and contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point}) </if>
</if> <if test="leave_amount_end_point !=null ">
<if test="overdays_start_point !=null and overdays_end_point !=null "> and
and contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point}) </if>
</if> and is_delete=false
<if test="overdays_start_point ==null and overdays_end_point !=null"> and project_unid is not null
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point}) and customer_unid is not null
</if> <if test="limit !=null ">
<if test="leave_amount_start_point !=null "> limit #{limit}
<!--应收款余额-->and </if>
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point}) <if test="offset !=null">
</if> offset #{offset}
<if test="leave_amount_end_point !=null "> </if>
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point}) </select>
</if>
and is_delete=false
and project_unid is not null <select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel">
and customer_unid is not null select
) contract <if test="columns == null">
</select> *
</if>
<if test="columns !=null">
<select id="isDelete" parameterType="String" resultType="Boolean"> contract_unid,
select is_delete from tb_contract where contract_unid = #{contract_unid} <foreach collection="columns" index="index" item="column" separator=",">
</select> ${column}
<select id="queryList" resultType="String"> </foreach>
select contract_unid from tb_contract where </if>
is_delete=false from (select
<!-- and project_unid is null contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,final_user,relation_customer,industry,final_user_name,relation_customer_name,industry_name,
and customer_unid is null --> guarantee_period,to_char(sign_date, 'yyyy-MM-dd') as sign_date, product_line_type, contract_state,
</select> contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
<select id="countNumber" resultType="int"> cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
select count(contract_unid) from tb_contract where is_delete=false is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount,
</select> amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
<delete id="actualDeleteOne" parameterType="String"> mainten_start_point, contract_note, is_delete, project_unid,
delete from tb_contract where contract_unid = #{contract_unid} customer_unid,
</delete> <!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, -->
</mapper> (SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_proportition,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100003') as acceptanc_pay_requirement,
(SELECT tb_payment_agree.payment_requirement FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND (tb_payment_agree.payment_type = '100004' OR tb_payment_agree.payment_type = '100005')) as mainten_pay_requirement,
(select cast(sum(receipt_amount) as decimal(18,2)) from tb_receipt where tb_receipt.contract_unid = tb_contract.contract_unid) as total_receipt_amount ,
to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month,
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
<!--((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain-->
(select receive_amount_view.leave_amount_point from receive_amount_view where receive_amount_view.contract_unid=tb_contract.contract_unid) as total_amount_remain,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name,
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
to_char((select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as advance_pay_date,
to_char((select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as arrive_pay_date,
to_char((select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as acceptanc_pay_date,
to_char((select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid), 'yyyy-MM-dd') as mainten_pay_date,
<!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, -->
to_char((select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as deliver_date,
to_char((SELECT tb_deliver_goods.goods_acceptanc_date FROM tb_deliver_goods WHERE tb_deliver_goods.deliver_unid = ( SELECT MAX ( tb_deliver_goods.deliver_unid ) FROM tb_deliver_goods WHERE tb_deliver_goods.contract_unid = tb_contract.contract_unid ) ), 'yyyy-MM-dd') as goods_acceptanc_date,
to_char((select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ), 'yyyy-MM-dd') as acceptanc_date
from tb_contract where 1=1
<if test="contract_unid !=null and contract_unid !=''">
and
contract_unid=#{contract_unid}
</if>
<if test="salesperson_unids !=null">
and
salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if>
<if test="amount_state_unids !=null and amount_state_unids.length > 0">
and
amount_state_unid in
<foreach collection="amount_state_unids" index="index" item="amount_state_unid_item" open="(" close=")" separator=",">
#{amount_state_unid_item}
</foreach>
</if>
<if test="contract_states !=null and contract_states.length > 0">
and
contract_state in
<foreach collection="contract_states" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="salesperson_unid_columns !=null and salesperson_unid_columns.length > 0">
and
salesperson_unid in
<foreach collection="salesperson_unid_columns" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="project_name__like !=null and project_name__like !=''">
and
tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if>
<if test="customer_name__like !=null and customer_name__like !=''">
and
tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if>
<if test="province !=null and province !=''">
and
province=#{province}
</if>
<if test="city !=null and city !=''">
and
city=#{city}
</if>
<if test="county !=null and county !=''">
and
county=#{county}
</if>
<if test="guarantee_period !=null ">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
product_line_type=#{product_line_type}
</if>
<if test="contract_state !=null and contract_state !=''">
and
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
contract_type=#{contract_type}
</if>
<if test="final_user !=null and final_user !=''">
and
final_user=#{final_user}
</if>
<if test="relation_customer !=null and relation_customer !=''">
and
relation_customer=#{relation_customer}
</if>
<if test="industry !=null and industry !=''">
and
industry=#{industry}
</if>
<if test="final_user_name !=null and final_user_name !=''">
and
final_user_name=#{final_user_name}
</if>
<if test="relation_customer_name !=null and relation_customer_name !=''">
and
relation_customer_name=#{relation_customer_name}
</if>
<if test="industry_name !=null and industry_name !=''">
and
industry_name=#{industry_name}
</if>
<if test="is_archive !=null">
and
is_archive=#{is_archive}
</if>
<if test="acceptanc_type !=null and acceptanc_type !=''">
and
contract_unid in (select tb_project_acceptanc.contract_unid from tb_project_acceptanc where tb_project_acceptanc.acceptanc_type=#{acceptanc_type})
</if>
<if test="confirm_income_amount !=null">
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
<if test="start_date != null ">
and
#{start_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler} <![CDATA[<=]]> sign_date
</if>
<if test="end_date!=null">
and sign_date <![CDATA[<=]]> #{end_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}
</if>
<if test="amount_start_point !=null ">
and
contract_amount <![CDATA[>=]]> #{amount_start_point}
</if>
<if test="amount_end_point !=null ">
and
contract_amount <![CDATA[<=]]> #{amount_end_point}
</if>
<!-- <if test="overdays_start_point !=null ">
and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_end_point !=null ">
and
逾期天数contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if> -->
<if test="overdays_start_point !=null and overdays_end_point == null">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point})
</if>
<if test="overdays_start_point !=null and overdays_end_point !=null ">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_start_point} and over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="overdays_start_point ==null and overdays_end_point !=null">
contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[<=]]> #{overdays_end_point})
</if>
<if test="leave_amount_start_point !=null ">
<!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_start_point})
</if>
<if test="leave_amount_end_point !=null ">
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[<=]]> #{leave_amount_end_point})
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
) contract
order by (contract_unid,amount_state_unid) desc
</select>
<select id="isDelete" parameterType="String" resultType="Boolean">
select is_delete from tb_contract where contract_unid = #{contract_unid}
</select>
<select id="queryList" resultType="String">
select contract_unid from tb_contract where
is_delete=false
<!-- and project_unid is null
and customer_unid is null -->
</select>
<select id="countNumber" resultType="int">
select count(contract_unid) from tb_contract where is_delete=false
</select>
<delete id="actualDeleteOne" parameterType="String">
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select id="timeUpdate" resultType="java.lang.String">
select timing_update_amount_state()
</select>
</mapper>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<if test="payment_progress !=null and payment_progress !=''"> <if test="payment_progress !=null and payment_progress !=''">
payment_progress, payment_progress,
</if> </if>
<if test="days !=null and days !=''"> <if test="days !=null ">
days, days,
</if> </if>
<if test="payment_propority !=null and payment_propority !=''"> <if test="payment_propority !=null and payment_propority !=''">
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<if test="payment_progress !=null and payment_progress !=''"> <if test="payment_progress !=null and payment_progress !=''">
#{payment_progress}, #{payment_progress},
</if> </if>
<if test="days !=null and days !=''"> <if test="days !=null">
#{days}, #{days},
</if> </if>
<if test="payment_propority !=null and payment_propority !=''"> <if test="payment_propority !=null and payment_propority !=''">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<if test="payment_progress !=null and payment_progress !=''"> <if test="payment_progress !=null and payment_progress !=''">
payment_progress = #{payment_progress} , payment_progress = #{payment_progress} ,
</if> </if>
<if test="days !=null and days !=''"> <if test="days !=null">
days = #{days} , days = #{days} ,
</if> </if>
<if test="payment_propority !=null and payment_propority !=''"> <if test="payment_propority !=null and payment_propority !=''">
......
...@@ -7,7 +7,16 @@ ...@@ -7,7 +7,16 @@
receipt_note, receipt_note,
</if> </if>
create_date) create_date)
values( #{contract_unid},#{receipt_progress},#{receipt_amount},#{oa_flow_id}, values( #{contract_unid},
<choose>
<when test="receipt_progress == null">
(select case when max(receipt_progress) is null then 1 else max(receipt_progress)+1 end as receipt_progress from tb_receipt where tb_receipt.contract_unid=#{contract_unid})
</when>
<otherwise>
#{receipt_progress}
</otherwise>
</choose>
,#{receipt_amount},#{oa_flow_id},
<if test="receipt_note !=null and receipt_note !=''"> <if test="receipt_note !=null and receipt_note !=''">
#{receipt_note}, #{receipt_note},
</if> </if>
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<insert id="addReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo"> <insert id="addReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
insert into tb_return_info ( insert into tb_return_info (
contract_unid, contract_unid,
<if test="reback_progress !=null and reback_progress !=''">
reback_progress, reback_progress,
</if>
<if test="reback_date !=null"> <if test="reback_date !=null">
reback_date, reback_date,
</if> </if>
...@@ -17,9 +15,12 @@ ...@@ -17,9 +15,12 @@
) )
values ( values (
#{contract_unid}, #{contract_unid},
<if test="reback_progress !=null and reback_progress !=''"> <if test="reback_progress !=null">
#{reback_progress}, #{reback_progress},
</if> </if>
<if test="reback_progress ==null">
(select case when max(reback_progress) is null then 1 else max(reback_progress)+1 end as reback_progress from tb_return_info where tb_return_info.contract_unid=#{contract_unid}),
</if>
<if test="reback_date !=null"> <if test="reback_date !=null">
#{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler}, #{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!