Commit a9c90952 authored by Administrator's avatar Administrator

2018年5月29日 --智能分析平台

--4A接口登录
parent e0ccda78
......@@ -19,4 +19,5 @@
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true" />
</component>
<component name="WebServicesPlugin" addRequiredLibraries="true" />
</project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1487,28 +1487,298 @@
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://C:/Program Files/R/R-3.5.0/library/Rserve/java/REngine.jar!/" />
<root url="file://E:/" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://E:/" recursive="false" />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://C:/Program Files/R/R-3.5.0/library/Rserve/java/Rserve.jar!/" />
<root url="jar://E:/软件包/json-lib依赖jar包/commons-beanutils-1.8.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="/file">
<CLASSES />
<library>
<CLASSES>
<root url="jar://E:/软件包/json-lib依赖jar包/json-lib-2.4-jdk15.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://E:/软件包/json-lib依赖jar包/ezmorph-1.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://E:/软件包/json-lib依赖jar包/commons-logging-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://E:/软件包/json-lib依赖jar包/commons-lang-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://E:/软件包/json-lib依赖jar包/commons-collections-3.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: p6spy:p6spy:1.3" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.xfire:xfire-xmpp:1.2.6" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.xfire:xfire-aegis:1.2.6" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.xfire:xfire-core:1.2.6" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
<orderEntry type="library" name="Maven: javax.mail:mail:1.4" level="project" />
<orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.1" level="project" />
<orderEntry type="library" name="Maven: jaxen:jaxen:1.1-beta-9" level="project" />
<orderEntry type="library" name="Maven: xerces:xmlParserAPIs:2.6.2" level="project" />
<orderEntry type="library" name="Maven: xerces:xercesImpl:2.6.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.ws.commons:XmlSchema:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:wstx-asl:3.2.0" level="project" />
<orderEntry type="library" name="Maven: jdom:jdom:1.0" level="project" />
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.0" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.stax-utils:stax-utils:20040917" level="project" />
<orderEntry type="library" name="Maven: jivesoftware:smackx:1.5.0" level="project" />
<orderEntry type="library" name="Maven: jivesoftware:smack:1.5.0" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Maven: org.docx4j:docx4j:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.plutext:jaxb-svg11:1.0.2" level="project" />
<orderEntry type="library" name="Maven: org.plutext:jaxb-xslfo:1.0.1" level="project" />
<orderEntry type="library" name="Maven: org.plutext:jaxb-xmldsig-core:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.engio:mbassador:1.1.10" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:xmlgraphics-commons:1.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:fop:1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-svg-dom:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-anim:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-css:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-dom:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-parser:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-util:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-bridge:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-script:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-js:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-xml:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-awt-util:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-gvt:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-transcoder:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-svggen:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-extension:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-ext:1.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.avalon.framework:avalon-framework-api:4.3.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.avalon.framework:avalon-framework-impl:4.3.1" level="project" />
<orderEntry type="library" name="Maven: xalan:xalan:2.7.1" level="project" />
<orderEntry type="library" name="Maven: xalan:serializer:2.7.1" level="project" />
<orderEntry type="library" name="Maven: net.arnx:wmf2svg:0.9.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-scratchpad:3.8" level="project" />
<orderEntry type="library" name="Maven: org.antlr:antlr-runtime:3.3" level="project" />
<orderEntry type="library" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.10-FINAL" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.10-FINAL" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.3.0" level="project" />
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.10-FINAL" level="project" />
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
<orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.5.6" level="project" />
<orderEntry type="library" name="Maven: r:REngine:1.1.0" level="project" />
<orderEntry type="library" name="Maven: r:Rserve:1.1.0" level="project" />
<orderEntry type="library" name="Maven: r:Rsession:1.1.0" level="project" />
<orderEntry type="library" name="Maven: org.apache:elasticsearch:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-analyzers-common:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-core:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-highlighter:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-join:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-queries:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-queryparser:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:lucene-sandbox:4.6.1" level="project" />
<orderEntry type="library" name="Maven: org.apache:elasticsearch-mapper-attachments:2.0.0" level="project" />
<orderEntry type="library" name="Maven: org.springside:springside-core:4.1.0.GA" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.7.3" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.aspectj:aspectjweaver:1.7.3" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:4.2.3.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.1.0.GA" level="project" />
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:4.0.2.Final" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.15.0-GA" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:4.2.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:axis:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:activation:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:axis-ant:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:axis-schema:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:commons-discovery-0.2:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:commons-logging-1.0.4:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:jaxrpc:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:mailapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:saaj:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:wsdl4j-1.5.1:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.hp.service:xmlsec-1.3.0:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.3.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.5.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-orm:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:3.2.3.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.tomcat:tomcat-jdbc:7.0.42" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.tomcat:tomcat-juli:7.0.42" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.hp:vertica:7.0.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:3.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:3.2.3.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: opensymphony:sitemesh:2.4.2" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:jstl:1.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.2.2" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-ehcache:1.2.2" level="project" />
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.6" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.8" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:4.3.1.Final" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.0.0.GA" level="project" />
<orderEntry type="library" name="Maven: com.google:gson:2.2.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.1.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.1.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.1.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.1.5" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.5" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.0.13" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.0.13" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:log4j-over-slf4j:1.7.5" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jcl-over-slf4j:1.7.5" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jul-to-slf4j:1.7.5" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:1.15" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:14.0.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springside:springside-test:4.1.0.GA" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" 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.mockito:mockito-core:1.9.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:3.2.3.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-java:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-chrome-driver:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-firefox-driver:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-ie-driver:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-support:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.webbitserver:webbit:0.4.14" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty:3.5.2.Final" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-remote-driver:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-api:2.33.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.httpcomponents:httpclient:4.2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.httpcomponents:httpcore:4.2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.commons:commons-exec:1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.java.dev.jna:jna:3.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.java.dev.jna:platform:3.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.h2database:h2:1.3.172" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.aggregate:jetty-webapp:7.6.11.v20130520" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:javax.servlet:2.5.0.v201103041518" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty:jetty-jsp:7.6.11.v20130520" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:javax.servlet.jsp:2.1.0.v201105211820" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:org.apache.jasper.glassfish:2.1.0.v201110031002" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:javax.servlet.jsp.jstl:1.2.0.v201105211821" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:org.apache.taglibs.standard.glassfish:1.2.0.v201112081803" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:javax.el:2.1.0.v201105211819" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:com.sun.el:1.0.0.v201105211818" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.eclipse.jetty.orbit:org.eclipse.jdt.core:3.7.1" level="project" />
<orderEntry type="library" name="Maven: commons-net:commons-net:3.1" level="project" />
<orderEntry type="library" name="Maven: sun.misc:BASE64Decoder:1.0" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20080701" level="project" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="file://$MODULE_DIR$/lib" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://E:/ftp1" />
</SOURCES>
<SOURCES />
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json-lib-2.4-jdk15.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/ezmorph-1.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-logging-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-lang-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-collections-3.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-beanutils-1.8.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
......
......@@ -570,127 +570,137 @@
<artifactId>BASE64Decoder</artifactId>
<version>1.0</version>
</dependency>
<!--
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-anim</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-awt-util</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-bridge</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-css</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-dom</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-ext</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-extension</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gvt</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-js</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-parser</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-script</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-util</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-xml</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-rasterizer</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-codec</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gui-util</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-swing</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-ttf2svg</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-commons</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20080701</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-tree</artifactId>
<version>3.2</version>
</dependency> -->
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20080701</version>
</dependency>
<!--
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-anim</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-awt-util</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-bridge</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-css</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-dom</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-ext</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-extension</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gvt</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-js</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-parser</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-script</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-util</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-xml</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-rasterizer</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-codec</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gui-util</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-swing</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-ttf2svg</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-commons</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-tree</artifactId>
<version>3.2</version>
</dependency> -->
</dependencies>
<dependencyManagement>
......
......@@ -45,4 +45,29 @@ public class DepartmentDaoSupport extends DAOSupport {
return departmentList;
}
public List<DepartmentVO> findAllDepartment()
{
String sql="SELECT DEPARTMENT_ID, DEPARTMENT_CODE, DEPARTMENT_NAME, DEPARTMENT_NOTE FROM DIM_DEPARTMENT_INFO_T";
List<DepartmentVO> departmentList=new ArrayList<DepartmentVO>();
try {
ResultSet rs=this.getResultSet(sql);
while(rs.next())
{
DepartmentVO vo=new DepartmentVO();
vo.setDepartmentId(rs.getString("DEPARTMENT_ID"));
vo.setDepartmentname(rs.getString("DEPARTMENT_NAME"));
vo.setNote(rs.getString("DEPARTMENT_NOTE"));
//userInfoVO.setWorkCode(rs.getString(""));
departmentList.add(vo);
}
this.closeAll();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return departmentList;
}
}
......@@ -34,8 +34,8 @@ public class RoleInfoDaoSupport extends DAOSupport {
vo.setName(rs.getString("ROLE_NAME"));
vo.setNote(rs.getString("ROLE_DESCRIPTION"));
vo.setSafeMode(rs.getString("SAFE_MODE"));
vo.setValidBegin(rs.getDate("VALID_BEGIN"));
vo.setValidEnd(rs.getDate("VALID_END"));
vo.setValidBegin(rs.getString("VALID_BEGIN"));
vo.setValidEnd(rs.getString("VALID_END"));
resultList.add(vo);
}
this.closeAll();
......@@ -47,4 +47,31 @@ public class RoleInfoDaoSupport extends DAOSupport {
return resultList;
}
public List<WorkGroupVO> queryAllWorkGroup() {
logger.info("开始查询工作组信息-----------------");
String sql="SELECT ROLE_ID, ROLE_NAME, ROLE_DESCRIPTION, CREATE_TIME, MODIFY_TIME, ROLE_TYPE, VALID_BEGIN, VALID_END, SAFE_MODE FROM JCPZ_ROLE_INFO_T";
List<WorkGroupVO> resultList = new ArrayList<WorkGroupVO>();
try {
ResultSet rs=this.getResultSet(sql);
while(rs.next())
{
WorkGroupVO vo = new WorkGroupVO();
vo.setGroupId(rs.getString("ROLE_ID"));
vo.setGroupType(rs.getString("ROLE_TYPE"));
vo.setName(rs.getString("ROLE_NAME"));
vo.setNote(rs.getString("ROLE_DESCRIPTION"));
vo.setSafeMode(rs.getString("SAFE_MODE"));
vo.setValidBegin(rs.getString("VALID_BEGIN"));
vo.setValidEnd(rs.getString("VALID_END"));
resultList.add(vo);
}
this.closeAll();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return resultList;
}
}
......@@ -25,95 +25,302 @@ import com.hp.cmsz.entity.UserRoleInfo;
*
*/
public class UserInfoDaoSupport extends DAOSupport {
private static Logger logger = LoggerFactory
.getLogger(UserServiceImpl.class);
private static Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
// /**
// * Create a new userInfo
// *
// * @param vo
// */
// public void createUser(UserInfoVO vo) throws SQLException {
// String sql = "select jcpz_user_info_t_seq.nextval";
// ResultSet rs = this.getResultSet(sql);
// Long userId = null;
// while (rs.next())
// userId = rs.getLong(1);
// sql = "INSERT INTO JCPZ_USER_INFO_T (USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK) VALUES (";
// // 0, '', '', '', '', 0, '', '', '', '', '', '');
// sql += String.valueOf(userId) + ",";
// sql += "'" + vo.getLoginUser() + "',";
// sql += "sysdate,";
// sql += "sysdate,";
// if (vo.getNote() == null || vo.getNote().isEmpty()) {
// sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
// } else {
// sql += "'" + vo.getNote() + "',";
// }
// if (vo.getDepartmentCode() == null || vo.getDepartmentCode().isEmpty()) {
// sql += Constant.EMPTY_VALUE_FOR_4A + ",";
// } else {
// sql += vo.getDepartmentCode() + ",";
// }
// // sql += "'" + vo.getDepartmentCode() + ",";
// /*
// * String passDes = "0";
// *
// * DES des; try { des = new DES(); passDes =
// * des.encrypt(vo.getPassword()); } catch (Exception e) { // TODO
// * Auto-generated catch block e.printStackTrace(); }
// */
// sql += "'" + vo.getPassword() + "',";
// if (vo.getStaffName() == null || vo.getStaffName().isEmpty()) {
// sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
// } else {
// sql += "'" + vo.getStaffName() + "',";
// }
// if (vo.getFlag() == null || vo.getFlag().isEmpty()) {
// sql += "'1',";
// } else {
// sql += "'" + vo.getFlag() + "',";
// }
// if (vo.getValidLength() == null || vo.getValidLength().isEmpty()) {
// sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
// } else {
// sql += "'" + vo.getValidLength() + "',";
// }
// SimpleDateFormat sdf = new SimpleDateFormat(
// Constant.DATE_TIME_FORMAT_FOR_JAVA);
// if (vo.getExpireDate() == null) {
// sql += "to_timestamp('" + sdf.format(new java.util.Date()) + "','"
// + Constant.DATE_TIME_FORMAT_FOR_DB + "'),";
// } else {
// sql += "to_timestamp('" + sdf.format(vo.getExpireDate()) + "','"
// + Constant.DATE_TIME_FORMAT_FOR_DB + "'),";
// }
// if (vo.getLogLock() == null || vo.getLogLock().isEmpty()) {
// sql += "'1')";
// } else {
// sql += "'" + vo.getLogLock() + "')";
// }
// logger.info("--Create user with the SQL is:" + sql);
// this.executeSQL(sql);
// sql = "INSERT INTO JCPZ_USER_ROLE_INFO_T (USER_ROLE_ID, USER_ID, ROLE_ID) select jcpz_user_role_info_t_seq.nextval,"
// + String.valueOf(userId)
// + ",ROLE_ID FROM JCPZ_ROLE_INFO_T Where ROLE_TYPE in('"
// + vo.getWorkCode().replaceAll(",", "','") + "')"; // 0, 0);
// logger.info("--SQL to create user role is:" + sql);
// this.executeSQL(sql);
// logger.info("--After execute all of the SQL");
// this.commit();
// logger.info("--After commit");
// // this.closeAll();
//
// }
//
// /**
// *
// * @param vo
// * @return
// */
// public void modifyUserInfo(UserInfoVO vo) throws SQLException {
// StringBuffer sqlBuff = new StringBuffer();
// sqlBuff.append("UPDATE JCPZ_USER_INFO_T SET ");
// SimpleDateFormat sdf = new SimpleDateFormat(
// Constant.DATE_TIME_FORMAT_FOR_JAVA);
// sqlBuff.append(" MODIFY_TIME = sysdate,");
// if (vo.getNote() != null)
// sqlBuff.append("USER_DESCRIPTION = '" + vo.getNote() + "',");
// if (vo.getDepartmentCode() != null)
// sqlBuff.append("DEPARTMENT_ID =" + vo.getDepartmentCode() + ",");
// if (vo.getPassword() == null || vo.getPassword().isEmpty()) {
// } else {
// sqlBuff.append("PASSWORD = '" + vo.getPassword() + "',");
// }
// if (vo.getStaffName() != null)
// sqlBuff.append("STAFFNAME = '" + vo.getStaffName() + "',");
// if (vo.getFlag() != null)
// sqlBuff.append("FLAG = '" + vo.getFlag() + "',");
// if (vo.getValidLength() != null)
// sqlBuff.append(" VALID_LENGTH = '" + vo.getValidLength() + "',");
// if (vo.getExpireDate() != null)
// sqlBuff.append("EXPIRE_DATE = to_timestamp('"
// + sdf.format(vo.getExpireDate()) + "','"
// + Constant.DATE_TIME_FORMAT_FOR_DB + "'),");
// if (vo.getLogLock() != null)
// sqlBuff.append("LOG_LOCK = '" + vo.getLogLock() + "'");
// String sql = sqlBuff.toString();
// if (sql.trim().endsWith(",")) {
// sql = sql.substring(0, sql.length() - 1);
// }
// logger.info("--SQL to modify user before where is:" + sql);
// logger.info("--User ID is:" + vo.getUserID());
// sql += " WHERE USER_ID = ";
// sql += String.valueOf(vo.getUserID());
// logger.info("--SQL to modify user is:" + sql);
// this.executeSQL(sql);
// String userRolesql = "DELETE FROM JCPZ_USER_ROLE_INFO_T WHERE USER_ID ="
// + String.valueOf(vo.getUserID());
// this.executeSQL(userRolesql);
// userRolesql = "INSERT INTO JCPZ_USER_ROLE_INFO_T (USER_ROLE_ID, USER_ID, ROLE_ID) select jcpz_user_role_info_t_seq.nextval,"
// + String.valueOf(vo.getUserID())
// + ",ROLE_ID FROM JCPZ_ROLE_INFO_T Where ROLE_TYPE in('"
// + vo.getWorkCode().replaceAll(",","','") + "')"; // 0, 0);
// logger.info("--SQL to create user role is:" + userRolesql);
// this.executeSQL(userRolesql);
// this.commit();
// }
//
// /**
// *
// * @param loginUser
// * @param oldPassword
// * @param newPassword
// * @return
// */
// public void modifyUserPassword(String loginUser, String oldPassword,
// String newPassword) throws SQLException {
//
// String sql = "UPDATE JCPZ_USER_INFO_T SET PASSWORD = '" + newPassword
// + "' WHERE USER_NAME ='" + loginUser + "'";
// this.executeSQL(sql);
// this.commit();
// }
//
// /**
// *
// * @param loginUser
// */
// public void delUserInfo(String loginUser) throws SQLException {
//
// // List<UserInfoVO> vos = findByUserName(loginUser);
// // for (UserInfoVO vo : vos) {
// String sql = "UPDATE JCPZ_USER_INFO_T set LOG_LOCK='9' WHERE USER_NAME in('"
// + loginUser.replaceAll(",", "','") + "')";
// this.executeSQL(sql);
// this.commit();
// /*
// * sql = "delete from JCPZ_USER_ROLE_INFO_T WHERE USER_ID =" +
// * String.valueOf(vo.getUserID()); this.executeSQL(sql);
// */
// // }
//
// }
//
// /**
// *
// */
// public List<UserInfoVO> findByUserName(String userName) throws SQLException {
// String sql = "SELECT USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK FROM JCPZ_USER_INFO_T";
// if (null == userName || userName.trim().isEmpty()) {
//
// } else {
// sql += " where USER_NAME='" + userName + "'";
// }
//
// List<UserInfoVO> userInfoList = new ArrayList<UserInfoVO>();
// ResultSet rs = this.getResultSet(sql);
// while (rs.next()) {
// UserInfoVO userInfoVO = new UserInfoVO();
//// userInfoVO.setUserID(rs.getLong("USER_ID"));
// userInfoVO.setDepartmentCode(rs.getString("DEPARTMENT_ID"));
//// userInfoVO.setExpireDate(rs.getTimestamp("EXPIRE_DATE"));
// userInfoVO.setFlag(rs.getString("FLAG"));
// userInfoVO.setLoginUser(rs.getString("USER_NAME"));
// userInfoVO.setLogLock(rs.getString("LOG_LOCK"));
// userInfoVO.setNote(rs.getString("USER_DESCRIPTION"));
// userInfoVO.setPassword(rs.getString("PASSWORD"));
// userInfoVO.setStaffName(rs.getString("STAFFNAME"));
// userInfoVO.setValidLength(rs.getString("VALID_LENGTH"));
// // userInfoVO.setWorkCode(rs.getString(""));
// userInfoList.add(userInfoVO);
// }
// // this.closeAll();
// return userInfoList;
// }
/**
* Create a new userInfo
*
* @param vo
*利用loginuser查询用户
*/
public void createUser(UserInfoVO vo) throws SQLException {
String sql = "select jcpz_user_info_t_seq.nextval";
public List<UserInfoVO> queryUserInfo(String loginUser) throws SQLException {
String sql = "SELECT USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK FROM JCPZ_USER_INFO_T where loginUser='" + loginUser + "'";
List<UserInfoVO> userInfoList = new ArrayList<UserInfoVO>();
ResultSet rs = this.getResultSet(sql);
Long userId = null;
while (rs.next())
userId = rs.getLong(1);
sql = "INSERT INTO JCPZ_USER_INFO_T (USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK) VALUES (";
// 0, '', '', '', '', 0, '', '', '', '', '', '');
sql += String.valueOf(userId) + ",";
sql += "'" + vo.getLoginUser() + "',";
sql += "sysdate,";
sql += "sysdate,";
if (vo.getNote() == null || vo.getNote().isEmpty()) {
sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
} else {
sql += "'" + vo.getNote() + "',";
}
if (vo.getDepartmentCode() == null || vo.getDepartmentCode().isEmpty()) {
sql += Constant.EMPTY_VALUE_FOR_4A + ",";
} else {
sql += vo.getDepartmentCode() + ",";
}
// sql += "'" + vo.getDepartmentCode() + ",";
/*
* String passDes = "0";
*
* DES des; try { des = new DES(); passDes =
* des.encrypt(vo.getPassword()); } catch (Exception e) { // TODO
* Auto-generated catch block e.printStackTrace(); }
*/
sql += "'" + vo.getPassword() + "',";
if (vo.getStaffName() == null || vo.getStaffName().isEmpty()) {
sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
} else {
sql += "'" + vo.getStaffName() + "',";
}
if (vo.getFlag() == null || vo.getFlag().isEmpty()) {
sql += "'1',";
} else {
sql += "'" + vo.getFlag() + "',";
}
if (vo.getValidLength() == null || vo.getValidLength().isEmpty()) {
sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
} else {
sql += "'" + vo.getValidLength() + "',";
while (rs.next()) {
UserInfoVO userInfoVO = new UserInfoVO();
userInfoVO.setDepartmentCode(rs.getString("DEPARTMENT_ID"));
userInfoVO.setExpireDate(rs.getString("EXPIRE_DATE"));
userInfoVO.setFlag(rs.getString("FLAG"));
userInfoVO.setLoginUser(rs.getString("USER_NAME"));
userInfoVO.setLogLock(rs.getString("LOG_LOCK"));
userInfoVO.setNote(rs.getString("USER_DESCRIPTION"));
userInfoVO.setPassword(rs.getString("PASSWORD"));
userInfoVO.setStaffName(rs.getString("STAFFNAME"));
userInfoVO.setValidLength(rs.getString("VALID_LENGTH"));
userInfoVO.setWorkCode(rs.getString(""));
userInfoList.add(userInfoVO);
}
SimpleDateFormat sdf = new SimpleDateFormat(
Constant.DATE_TIME_FORMAT_FOR_JAVA);
if (vo.getExpireDate() == null) {
sql += "to_timestamp('" + sdf.format(new java.util.Date()) + "','"
+ Constant.DATE_TIME_FORMAT_FOR_DB + "'),";
} else {
sql += "to_timestamp('" + sdf.format(vo.getExpireDate()) + "','"
+ Constant.DATE_TIME_FORMAT_FOR_DB + "'),";
// this.closeAll();
return userInfoList;
}
/**
*查询用户
*/
public List<UserInfoVO> queryAllUserInfo() throws SQLException {
String sql = "SELECT USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK FROM JCPZ_USER_INFO_T";
List<UserInfoVO> userInfoList = new ArrayList<UserInfoVO>();
ResultSet rs = this.getResultSet(sql);
while (rs.next()) {
UserInfoVO userInfoVO = new UserInfoVO();
userInfoVO.setDepartmentCode(rs.getString("DEPARTMENT_ID"));
userInfoVO.setExpireDate(rs.getString("EXPIRE_DATE"));
userInfoVO.setFlag(rs.getString("FLAG"));
userInfoVO.setLoginUser(rs.getString("USER_NAME"));
userInfoVO.setLogLock(rs.getString("LOG_LOCK"));
userInfoVO.setNote(rs.getString("USER_DESCRIPTION"));
userInfoVO.setPassword(rs.getString("PASSWORD"));
userInfoVO.setStaffName(rs.getString("STAFFNAME"));
userInfoVO.setValidLength(rs.getString("VALID_LENGTH"));
userInfoVO.setWorkCode(rs.getString(""));
userInfoList.add(userInfoVO);
}
if (vo.getLogLock() == null || vo.getLogLock().isEmpty()) {
sql += "'1')";
} else {
sql += "'" + vo.getLogLock() + "')";
// this.closeAll();
return userInfoList;
}
/**
*查询用户密码
*/
public UserInfoVO getUserPwd(String loginUser) throws SQLException {
String sql = "SELECT USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK FROM JCPZ_USER_INFO_T where loginUser='" + loginUser + "'";
UserInfoVO userInfoList = new UserInfoVO();
ResultSet rs = this.getResultSet(sql);
while (rs.next()) {
UserInfoVO userInfoVO = new UserInfoVO();
userInfoVO.setDepartmentCode(rs.getString("DEPARTMENT_ID"));
userInfoVO.setExpireDate(rs.getString("EXPIRE_DATE"));
userInfoVO.setFlag(rs.getString("FLAG"));
userInfoVO.setLoginUser(rs.getString("USER_NAME"));
userInfoVO.setLogLock(rs.getString("LOG_LOCK"));
userInfoVO.setNote(rs.getString("USER_DESCRIPTION"));
userInfoVO.setPassword(rs.getString("PASSWORD"));
userInfoVO.setStaffName(rs.getString("STAFFNAME"));
userInfoVO.setValidLength(rs.getString("VALID_LENGTH"));
userInfoVO.setWorkCode(rs.getString(""));
}
logger.info("--Create user with the SQL is:" + sql);
this.executeSQL(sql);
sql = "INSERT INTO JCPZ_USER_ROLE_INFO_T (USER_ROLE_ID, USER_ID, ROLE_ID) select jcpz_user_role_info_t_seq.nextval,"
+ String.valueOf(userId)
+ ",ROLE_ID FROM JCPZ_ROLE_INFO_T Where ROLE_TYPE in('"
+ vo.getWorkCode().replaceAll(",", "','") + "')"; // 0, 0);
logger.info("--SQL to create user role is:" + sql);
this.executeSQL(sql);
logger.info("--After execute all of the SQL");
this.commit();
logger.info("--After commit");
// this.closeAll();
return userInfoList;
}
/**
*修改用户密码
*/
public int updateUserPassword(UserInfoVO userInfoVO) throws SQLException {
String sql = "UPDATE JCPZ_USER_INFO_T SET PASSWORD = '" + userInfoVO.getPassword()
+ "' WHERE USER_NAME ='" + userInfoVO.getLoginUser() + "'";
this.executeSQL(sql);
this.commit();
return 1;
}
/**
*
* @param vo
* @return
*修改用户
*/
public void modifyUserInfo(UserInfoVO vo) throws SQLException {
public int updateUserInfo(UserInfoVO vo) throws SQLException {
StringBuffer sqlBuff = new StringBuffer();
sqlBuff.append("UPDATE JCPZ_USER_INFO_T SET ");
SimpleDateFormat sdf = new SimpleDateFormat(
......@@ -144,89 +351,116 @@ public class UserInfoDaoSupport extends DAOSupport {
sql = sql.substring(0, sql.length() - 1);
}
logger.info("--SQL to modify user before where is:" + sql);
logger.info("--User ID is:" + vo.getUserID());
sql += " WHERE USER_ID = ";
sql += String.valueOf(vo.getUserID());
logger.info("--SQL to modify user is:" + sql);
this.executeSQL(sql);
String userRolesql = "DELETE FROM JCPZ_USER_ROLE_INFO_T WHERE USER_ID ="
+ String.valueOf(vo.getUserID());
String userRolesql = "DELETE FROM JCPZ_USER_ROLE_INFO_T ";
this.executeSQL(userRolesql);
userRolesql = "INSERT INTO JCPZ_USER_ROLE_INFO_T (USER_ROLE_ID, USER_ID, ROLE_ID) select jcpz_user_role_info_t_seq.nextval,"
+ String.valueOf(vo.getUserID())
userRolesql = "INSERT INTO JCPZ_USER_ROLE_INFO_T (USER_ROLE_ID, ROLE_ID) select jcpz_user_role_info_t_seq.nextval,"
+ ",ROLE_ID FROM JCPZ_ROLE_INFO_T Where ROLE_TYPE in('"
+ vo.getWorkCode().replaceAll(",","','") + "')"; // 0, 0);
logger.info("--SQL to create user role is:" + userRolesql);
this.executeSQL(userRolesql);
this.commit();
return 1;
}
/**
*
* @param loginUser
* @param oldPassword
* @param newPassword
* @return
* 新增用户
*
*/
public void modifyUserPassword(String loginUser, String oldPassword,
String newPassword) throws SQLException {
String sql = "UPDATE JCPZ_USER_INFO_T SET PASSWORD = '" + newPassword
+ "' WHERE USER_NAME ='" + loginUser + "'";
public int insertUserInfo(UserInfoVO userInfo) throws SQLException {
String sql = "select jcpz_user_info_t_seq.nextval";
ResultSet rs = this.getResultSet(sql);
Long userId = null;
while (rs.next())
userId = rs.getLong(1);
sql = "INSERT INTO JCPZ_USER_INFO_T (USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK) VALUES (";
// 0, '', '', '', '', 0, '', '', '', '', '', '');
// sql += String.valueOf(userId) + ",";
sql += "'" + userInfo.getLoginUser() + "',";
sql += "sysdate,";
sql += "sysdate,";
if (userInfo.getNote() == null || userInfo.getNote().isEmpty()) {
sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
} else {
sql += "'" + userInfo.getNote() + "',";
}
if (userInfo.getDepartmentCode() == null || userInfo.getDepartmentCode().isEmpty()) {
sql += Constant.EMPTY_VALUE_FOR_4A + ",";
} else {
sql += userInfo.getDepartmentCode() + ",";
}
// sql += "'" + vo.getDepartmentCode() + ",";
/*
* String passDes = "0";
*
* DES des; try { des = new DES(); passDes =
* des.encrypt(vo.getPassword()); } catch (Exception e) { // TODO
* Auto-generated catch block e.printStackTrace(); }
*/
sql += "'" + userInfo.getPassword() + "',";
if (userInfo.getStaffName() == null || userInfo.getStaffName().isEmpty()) {
sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
} else {
sql += "'" + userInfo.getStaffName() + "',";
}
if (userInfo.getFlag() == null || userInfo.getFlag().isEmpty()) {
sql += "'1',";
} else {
sql += "'" + userInfo.getFlag() + "',";
}
if (userInfo.getValidLength() == null || userInfo.getValidLength().isEmpty()) {
sql += "'" + Constant.EMPTY_VALUE_FOR_4A + "',";
} else {
sql += "'" + userInfo.getValidLength() + "',";
}
SimpleDateFormat sdf = new SimpleDateFormat(
Constant.DATE_TIME_FORMAT_FOR_JAVA);
if (userInfo.getExpireDate() == null) {
sql += "to_timestamp('" + sdf.format(new java.util.Date()) + "','"
+ Constant.DATE_TIME_FORMAT_FOR_DB + "'),";
} else {
sql += "to_timestamp('" + sdf.format(userInfo.getExpireDate()) + "','"
+ Constant.DATE_TIME_FORMAT_FOR_DB + "'),";
}
if (userInfo.getLogLock() == null || userInfo.getLogLock().isEmpty()) {
sql += "'1')";
} else {
sql += "'" + userInfo.getLogLock() + "')";
}
logger.info("--Create user with the SQL is:" + sql);
this.executeSQL(sql);
sql = "INSERT INTO JCPZ_USER_ROLE_INFO_T (USER_ROLE_ID, ROLE_ID) select jcpz_user_role_info_t_seq.nextval,"
// + String.valueOf(userId)
+ ",ROLE_ID FROM JCPZ_ROLE_INFO_T Where ROLE_TYPE in('"
+ userInfo.getWorkCode().replaceAll(",", "','") + "')"; // 0, 0);
logger.info("--SQL to create user role is:" + sql);
this.executeSQL(sql);
logger.info("--After execute all of the SQL");
this.commit();
logger.info("--After commit");
// this.closeAll();
return 1;
}
/**
*
* @param loginUser
* 查询用户是否存在
*
*/
public void delUserInfo(String loginUser) throws SQLException {
public int isUserExists(UserInfoVO userInfo) throws SQLException{
return 0;
}
// List<UserInfoVO> vos = findByUserName(loginUser);
// for (UserInfoVO vo : vos) {
/**
* 删除用户
*
*/
public void delUsers(String loginUser) throws SQLException {
String sql = "UPDATE JCPZ_USER_INFO_T set LOG_LOCK='9' WHERE USER_NAME in('"
+ loginUser.replaceAll(",", "','") + "')";
this.executeSQL(sql);
this.commit();
/*
* sql = "delete from JCPZ_USER_ROLE_INFO_T WHERE USER_ID =" +
* String.valueOf(vo.getUserID()); this.executeSQL(sql);
*/
// }
}
/**
*
*/
public List<UserInfoVO> findByUserName(String userName) throws SQLException {
String sql = "SELECT USER_ID, USER_NAME, CREATE_TIME, MODIFY_TIME, USER_DESCRIPTION, DEPARTMENT_ID, PASSWORD, STAFFNAME, FLAG, VALID_LENGTH, EXPIRE_DATE, LOG_LOCK FROM JCPZ_USER_INFO_T";
if (null == userName || userName.trim().isEmpty()) {
} else {
sql += " where USER_NAME='" + userName + "'";
}
List<UserInfoVO> userInfoList = new ArrayList<UserInfoVO>();
ResultSet rs = this.getResultSet(sql);
while (rs.next()) {
UserInfoVO userInfoVO = new UserInfoVO();
userInfoVO.setUserID(rs.getLong("USER_ID"));
userInfoVO.setDepartmentCode(rs.getString("DEPARTMENT_ID"));
userInfoVO.setExpireDate(rs.getTimestamp("EXPIRE_DATE"));
userInfoVO.setFlag(rs.getString("FLAG"));
userInfoVO.setLoginUser(rs.getString("USER_NAME"));
userInfoVO.setLogLock(rs.getString("LOG_LOCK"));
userInfoVO.setNote(rs.getString("USER_DESCRIPTION"));
userInfoVO.setPassword(rs.getString("PASSWORD"));
userInfoVO.setStaffName(rs.getString("STAFFNAME"));
userInfoVO.setValidLength(rs.getString("VALID_LENGTH"));
// userInfoVO.setWorkCode(rs.getString(""));
userInfoList.add(userInfoVO);
}
// this.closeAll();
return userInfoList;
}
}
......@@ -15,12 +15,46 @@ public class DepartmentVO implements Serializable {
private String note; // 备注
// public String getDepartmentId() {
// return departmentId;
// }
//
// public void setDepartmentId(String departmentId) {
// this.departmentId = departmentId;
// }
//
// public String getDepartmentname() {
// return departmentname;
// }
//
// public void setDepartmentname(String departmentname) {
// this.departmentname = departmentname;
// }
//
// public String getNote() {
// return note;
// }
//
// public void setNote(String note) {
// this.note = note;
// }
public DepartmentVO() {
}
public DepartmentVO(String departmentId, String departmentname, String note) {
this.departmentId = departmentId;
this.departmentname = departmentname;
this.note = note;
}
public String getDepartmentId() {
return departmentId;
}
public void setDepartmentId(String departmentId) {
this.departmentId = departmentId;
departmentId = departmentId.equals("") ? "0" : departmentId.trim();
this.departmentId = departmentId ;
}
public String getDepartmentname() {
......@@ -28,7 +62,8 @@ public class DepartmentVO implements Serializable {
}
public void setDepartmentname(String departmentname) {
this.departmentname = departmentname;
departmentname = departmentname.equals("") ? "0" : departmentname.trim();
this.departmentname = departmentname ;
}
public String getNote() {
......@@ -36,6 +71,13 @@ public class DepartmentVO implements Serializable {
}
public void setNote(String note) {
note = note.equals("") ? "0" : note.trim();
this.note = note;
}
@Override
public String toString() {
return "DepartmentVO [departmentId=" + departmentId + ", departmentname=" + departmentname + ", note=" + note
+ "]";
}
}
\ No newline at end of file
......@@ -16,20 +16,29 @@ public class SysLogDTO {
private String dst_port;
private String dst_mac;
private String protocol;
private String start_time;
private String end_time;
// private String start_time;
// private String end_time;
private String primary_user;
private String secondary_user;
private String operation;
private String content;
private String dev_ip;
private String dev_port;
private String dev_mac;
private String authen_status;
private String sensitive_name;
private String sensitive_range;
private String sensitive_type;
private String is_remark;
private String remark_type;
private String remark_code;
private String menuname;
private String menucode;
// private String dev_ip;
// private String dev_port;
// private String dev_mac;
// private String authen_status;
private String log_level;
private String session_id;
private String param_len;
private String param;
private String result_status;
public String getOperation() {
return operation;
......@@ -104,18 +113,18 @@ public class SysLogDTO {
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getStart_time() {
return start_time;
}
public void setStart_time(String start_time) {
this.start_time = start_time;
}
public String getEnd_time() {
return end_time;
}
public void setEnd_time(String end_time) {
this.end_time = end_time;
}
// public String getStart_time() {
// return start_time;
// }
// public void setStart_time(String start_time) {
// this.start_time = start_time;
// }
// public String getEnd_time() {
// return end_time;
// }
// public void setEnd_time(String end_time) {
// this.end_time = end_time;
// }
public String getPrimary_user() {
return primary_user;
}
......@@ -128,30 +137,30 @@ public class SysLogDTO {
public void setSecondary_user(String secondary_user) {
this.secondary_user = secondary_user;
}
public String getDev_ip() {
return dev_ip;
}
public void setDev_ip(String dev_ip) {
this.dev_ip = dev_ip;
}
public String getDev_port() {
return dev_port;
}
public void setDev_port(String dev_port) {
this.dev_port = dev_port;
}
public String getDev_mac() {
return dev_mac;
}
public void setDev_mac(String dev_mac) {
this.dev_mac = dev_mac;
}
public String getAuthen_status() {
return authen_status;
}
public void setAuthen_status(String authen_status) {
this.authen_status = authen_status;
}
// public String getDev_ip() {
// return dev_ip;
// }
// public void setDev_ip(String dev_ip) {
// this.dev_ip = dev_ip;
// }
// public String getDev_port() {
// return dev_port;
// }
// public void setDev_port(String dev_port) {
// this.dev_port = dev_port;
// }
// public String getDev_mac() {
// return dev_mac;
// }
// public void setDev_mac(String dev_mac) {
// this.dev_mac = dev_mac;
// }
// public String getAuthen_status() {
// return authen_status;
// }
// public void setAuthen_status(String authen_status) {
// this.authen_status = authen_status;
// }
public String getLog_level() {
return log_level;
}
......@@ -176,8 +185,80 @@ public class SysLogDTO {
public void setParam(String param) {
this.param = param;
}
/* public String formatStr(){
public String getSensitive_name() {
return sensitive_name;
}
public void setSensitive_name(String sensitive_name) {
this.sensitive_name = sensitive_name;
}
public String getSensitive_range() {
return sensitive_range;
}
public void setSensitive_range(String sensitive_range) {
this.sensitive_range = sensitive_range;
}
public String getSensitive_type() {
return sensitive_type;
}
public void setSensitive_type(String sensitive_type) {
this.sensitive_type = sensitive_type;
}
public String getIs_remark() {
return is_remark;
}
public void setIs_remark(String is_remark) {
this.is_remark = is_remark;
}
public String getRemark_type() {
return remark_type;
}
public void setRemark_type(String remark_type) {
this.remark_type = remark_type;
}
public String getRemark_code() {
return remark_code;
}
public void setRemark_code(String remark_code) {
this.remark_code = remark_code;
}
public String getMenuname() {
return menuname;
}
public void setMenuname(String menuname) {
this.menuname = menuname;
}
public String getMenucode() {
return menucode;
}
public void setMenucode(String menucode) {
this.menucode = menucode;
}
public String getResult_status() {
return result_status;
}
public void setResult_status(String result_status) {
this.result_status = result_status;
}
/* public String formatStr(){
StringBuffer sb = new StringBuffer();
Method[] methods = null;
methods = this.getClass().getDeclaredMethods();
......
package com.cmsz.vo;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
public class UserInfoVO implements Serializable{
......@@ -10,7 +13,7 @@ public class UserInfoVO implements Serializable{
*/
private static final long serialVersionUID = -675389784876238114L;
private Long userID;
// private Long userID;
private String loginUser; //登录用户(账号)
......@@ -22,7 +25,8 @@ public class UserInfoVO implements Serializable{
private String validLength; //有效期
private Date expireDate; //失效时间
// private Date expireDate; //失效时间
private String expireDate;
private String logLock; //锁定状态)//0,禁用;1,启用;9删除
......@@ -31,103 +35,321 @@ public class UserInfoVO implements Serializable{
private String workCode; //所属工作组,多个组用逗号隔开,//所属工作组代码
private String note; //备注
public Long getUserID() {
return userID;
private String userKey;
private String msisdn;
private String mail;
private String updateBy;
private String updateTime;
// public Long getUserID() {
// return userID;
// }
//
// public void setUserID(Long userID) {
// this.userID = userID;
// }
//
// public String getLoginUser() {
// return loginUser;
// }
//
// public void setLoginUser(String loginUser) {
// this.loginUser = loginUser;
// }
//
// public String getPassword() {
// return password;
// }
//
// public void setPassword(String password) {
// this.password = password;
// }
//
// public String getStaffName() {
// return staffName;
// }
//
// public void setStaffName(String staffName) {
// this.staffName = staffName;
// }
//
// public String getFlag() {
// return flag;
// }
//
// public void setFlag(String flag) {
// this.flag = flag;
// }
//
// public String getValidLength() {
// return validLength;
// }
//
// public void setValidLength(String validLength) {
// this.validLength = validLength;
// }
//
// public String getExpireDate() {
// return expireDate;
// }
//
// public void setExpireDate(String expireDate) {
// this.expireDate = expireDate;
// }
//
// public String getLogLock() {
// return logLock;
// }
//
// public void setLogLock(String logLock) {
// this.logLock = logLock;
// }
//
// public String getDepartmentCode() {
// return departmentCode;
// }
//
// public void setDepartmentCode(String departmentCode) {
// this.departmentCode = departmentCode;
// }
//
// public String getWorkCode() {
// return workCode;
// }
//
// public void setWorkCode(String workCode) {
// this.workCode = workCode;
// }
//
// public String getNote() {
// return note;
// }
//
// public void setNote(String note) {
// this.note = note;
// }
//
// @Override
// public String toString() {
// return "UserInfoVO [loginUser=" + loginUser + ", password=" + password
// + ", staffName=" + staffName + ", flag=" + flag
// + ", validLength=" + validLength + ", expireDate=" + expireDate
// + ", logLock=" + logLock + ", departmentCode=" + departmentCode
// + ", workCode=" + workCode + ", note=" + note + "]";
// }
public static UserInfoVO getaddUserInfo(UserInfoVO user){
Calendar calendar = Calendar.getInstance();
SimpleDateFormat sdfymdhms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (user == null) {
return null;
}
if(user.getUpdateBy() == null){
user.setUpdateBy(user.getLoginUser());
}
if(user.getUpdateTime() == null){
user.setUpdateTime(sdfymdhms.format(calendar.getTime()));
}
if(user.getMsisdn() == null){
user.setMsisdn("");
}
if(user.getMail() == null){
user.setMail("");
}
if(user.getNote() == null){
user.setNote("");
}
user.setExpireDate(user.getExpireDate().substring(0,10));
return user;
}
public void setUserID(Long userID) {
this.userID = userID;
public static List<UserInfoVO> getUserInfoVerification(List<UserInfoVO> arry) {
if (arry == null) {
return null;
}
for (int i = 0; i < arry.size(); i++) {
if (arry.get(i).getLoginUser() == null) {
arry.get(i).setLoginUser("0");
}
if (arry.get(i).getPassword() == null) {
arry.get(i).setPassword("0");
}
if (arry.get(i).getStaffName() == null) {
arry.get(i).setStaffName("0");
}
if (arry.get(i).getFlag() == null) {
arry.get(i).setFlag("0");
}
if (arry.get(i).getValidLength() == null) {
arry.get(i).setValidLength("0");
}else{
arry.get(i).setValidLength("365");
}
if (arry.get(i).getExpireDate() == null) {
arry.get(i).setExpireDate("0");
}else{
arry.get(i).setExpireDate(arry.get(i).getExpireDate()+" 00:00:00");
}
if (arry.get(i).getLogLock() == null) {
arry.get(i).setLogLock("0");
}
if (arry.get(i).getDepartmentCode() == null) {
arry.get(i).setDepartmentCode("0");
}
if (arry.get(i).getWorkCode() == null) {
arry.get(i).setWorkCode("0");
}
if (arry.get(i).getNote() == null) {
arry.get(i).setNote("0");
}
}
return arry;
}
public UserInfoVO() {
}
public UserInfoVO(String staffName) {
this.staffName = staffName;
}
public String getLoginUser() {
return loginUser;
}
public void setLoginUser(String loginUser) {
this.loginUser = loginUser;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
this.flag = "y";
}
public String getValidLength() {
return validLength;
}
public void setValidLength(String validLength) {
this.validLength = validLength;
}
public Date getExpireDate() {
return expireDate;
}
public void setExpireDate(Date expireDate) {
this.expireDate = expireDate;
}
public String getLogLock() {
return logLock;
}
public void setLogLock(String logLock) {
this.logLock = logLock;
this.logLock = "1";
}
public String getDepartmentCode() {
return departmentCode;
}
public void setDepartmentCode(String departmentCode) {
departmentCode = departmentCode.equals("") ? "0" : departmentCode.trim();
this.departmentCode = departmentCode;
}
public String getWorkCode() {
return workCode;
}
public void setWorkCode(String workCode) {
workCode = workCode.equals("") ? "0" : workCode.trim();
this.workCode = workCode;
}
public String getNote() {
return note;
}
public void setNote(String note) {
note = note.equals("") ? "0" : note.trim();
this.note = note;
}
public String getMsisdn() {
return msisdn;
}
public void setMsisdn(String msisdn) {
msisdn = msisdn.equals("") ? "0" : msisdn.trim();
this.msisdn = msisdn;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
mail = mail.equals("") ? "0" : mail.trim();
this.mail = mail;
}
public String getUserKey() {
return userKey;
}
public void setUserKey(String userKey) {
this.userKey = userKey;
}
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
expireDate = expireDate.equals("") ? "0" : expireDate.trim();
this.expireDate = expireDate;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
updateBy = updateBy.equals("") ? "0" : updateBy.trim();
this.updateBy = updateBy;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
updateTime = updateTime.equals("") ? "0" : updateTime.trim();
this.updateTime = updateTime;
}
@Override
public String toString() {
return "UserInfoVO [loginUser=" + loginUser + ", password=" + password
+ ", staffName=" + staffName + ", flag=" + flag
+ ", validLength=" + validLength + ", expireDate=" + expireDate
+ ", logLock=" + logLock + ", departmentCode=" + departmentCode
+ ", workCode=" + workCode + ", note=" + note + "]";
return "UserInfo [loginUser=" + loginUser + ", userKey=" + userKey + ", staffName=" + staffName + ", msisdn="
+ msisdn + ", mail=" + mail + ", password=" + password + ", flag=" + flag + ", validLength="
+ validLength + ", expireDate=" + expireDate + ", updateBy=" + updateBy + ", updateTime=" + updateTime
+ ", logLock=" + logLock + ", departmentCode=" + departmentCode + ", workCode=" + workCode + ", note="
+ note + "]";
}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.cmsz.vo;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
public class WorkGroupVO implements Serializable {
......@@ -19,18 +20,114 @@ public class WorkGroupVO implements Serializable {
private String safeMode; //权限属性
private Date validBegin; //有效起始时间
private Date validEnd; //有效终止时间
// private Date validBegin; //有效起始时间
//
// private Date validEnd; //有效终止时间
private String note; //备注
public String getSafeMode() {
return safeMode;
private String validBegin;// (有效起始时间)
private String validEnd;// (有效终止时间)
private String updateBy;
private String updateTime;
// public String getSafeMode() {
// return safeMode;
// }
//
// public void setSafeMode(String safeMode) {
// this.safeMode = safeMode;
// }
//
// public String getGroupId() {
// return groupId;
// }
//
// public void setGroupId(String groupId) {
// this.groupId = groupId;
// }
//
// public String getName() {
// return name;
// }
//
// public void setName(String name) {
// this.name = name;
// }
//
// public String getGroupType() {
// return groupType;
// }
//
// public void setGroupType(String groupType) {
// this.groupType = groupType;
// }
//
// public String getNote() {
// return note;
// }
//
// public void setNote(String note) {
// this.note = note;
// }
//
// public String getValidBegin() {
// return validBegin;
// }
//
// public void setValidBegin(String validBegin) {
// this.validBegin = validBegin;
// }
//
// public String getValidEnd() {
// return validEnd;
// }
//
// public void setValidEnd(String validEnd) {
// this.validEnd = validEnd;
// }
//
// public static long getSerialversionuid() {
// return serialVersionUID;
// }
public static List<WorkGroupVO> getWorkGroupVerification(List<WorkGroupVO> arry){
if (arry == null) {
return null;
}
for (int i = 0; i < arry.size(); i++) {
if (arry.get(i).getValidBegin() == null) {
arry.get(i).setValidBegin("0");
}else{
arry.get(i).setValidBegin("365");
}
if(arry.get(i).getValidEnd() == null){
arry.get(i).setValidEnd("0");
}else{
arry.get(i).setValidEnd(arry.get(i).getValidEnd()+" 00:00:00");
}
}
return arry;
}
public void setSafeMode(String safeMode) {
public WorkGroupVO(String groupId, String name, String groupType, String safeMode, String validBegin, String validEnd,
String note, String updateBy, String updateTime) {
this.groupId = groupId;
this.name = name;
this.groupType = groupType;
this.safeMode = safeMode;
this.validBegin = validBegin;
this.validEnd = validEnd;
this.note = note;
this.updateBy = updateBy;
this.updateTime = updateTime;
}
public WorkGroupVO() {
}
public String getGroupId() {
......@@ -54,34 +151,70 @@ public class WorkGroupVO implements Serializable {
}
public void setGroupType(String groupType) {
groupType = groupType.equals("") ? "0" : groupType.trim();
this.groupType = groupType;
}
public String getNote() {
return note;
public String getSafeMode() {
return safeMode;
}
public void setNote(String note) {
this.note = note;
public void setSafeMode(String safeMode) {
safeMode = safeMode.equals("") ? "0" : safeMode.trim();
this.safeMode = safeMode;
}
public Date getValidBegin() {
public String getValidBegin() {
return validBegin;
}
public void setValidBegin(Date validBegin) {
public void setValidBegin(String validBegin) {
validBegin = validBegin.equals("") ? "0" : validBegin.trim();
this.validBegin = validBegin;
}
public Date getValidEnd() {
public String getValidEnd() {
return validEnd;
}
public void setValidEnd(Date validEnd) {
public void setValidEnd(String validEnd) {
validEnd = validEnd.equals("") ? "0" : validEnd.trim();
this.validEnd = validEnd;
}
public static long getSerialversionuid() {
return serialVersionUID;
public String getNote() {
return note;
}
public void setNote(String note) {
note = note.equals("") ? "0" : note.trim();
this.note = note;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
updateBy = updateBy.equals("") ? "0" : updateBy.trim();
this.updateBy = updateBy;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
updateTime = updateTime.equals("") ? "0" : updateTime.trim();
this.updateTime = updateTime;
}
@Override
public String toString() {
return "WorkGroup [groupId=" + groupId + ", name=" + name + ", groupType=" + groupType + ", safeMode="
+ safeMode + ", validBegin=" + validBegin + ", validEnd=" + validEnd + ", note=" + note + ", updateBy="
+ updateBy + ", updateTime=" + updateTime + "]";
}
}
......@@ -8,6 +8,8 @@ import com.cmsz.vo.DepartmentVO;
public interface DepartmentService{
/*查询部门列表*/
public List<DepartmentVO> queryDepartment (String departmentId);
// public List<DepartmentVO> queryDepartment (String departmentId);
public String queryDepartment (String departmentId);
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.cmsz.vo.WorkGroupVO;
public interface GroupService {
/*查询工作组 */
public List<WorkGroupVO> queryWorkGroup(String groupId);
// public List<WorkGroupVO> queryWorkGroup(String groupId);
public String queryWorkGroup(String groupId);
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import com.cmsz.vo.ResultVO;
public interface LoginSwitchService {
public ResultVO loginModChg(String flag);
// public ResultVO loginModChg(String flag);
public String loginModChg(String flag);
}
\ No newline at end of file
......@@ -8,18 +8,23 @@ import com.cmsz.vo.UserInfoVO;
public interface UserService {
/*查询用户 */
public List<UserInfoVO> queryUserInfo(String loginUser);
// public List<UserInfoVO> queryUserInfo(String loginUser);
public String queryUserInfo(String loginUser);
/*新增用户*/
public ResultVO addUserInfo(UserInfoVO userInfo);
// public ResultVO addUserInfo(UserInfoVO userInfo);
public String addUserInfo(String userInfo);
/*修改用户 */
public ResultVO modifyUserInfo(UserInfoVO userInfo);
// public ResultVO modifyUserInfo(UserInfoVO userInfo);
public String modifyUserInfo(String userInfo);
/*修改密码*/
public ResultVO modifyUserPassword(String loginUser, String oldPassword, String newPassword);
// public ResultVO modifyUserPassword(String loginUser, String oldPassword, String newPassword);
public String modifyUserPwd(String json);
/* 删除用户*/
public ResultVO delUserInfo(String loginUsers);
// public ResultVO delUserInfo(String loginUsers);
public String delUserInfo(String loginUsers);
}
\ No newline at end of file
......@@ -3,6 +3,10 @@ package com.cmsz.ws.impl;
import java.util.ArrayList;
import java.util.List;
import com.hp.cmsz.entity.Department;
import net.sf.json.JSONArray;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -10,38 +14,70 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.cmsz.dao.DepartmentDaoSupport;
import com.cmsz.vo.DepartmentVO;
import com.cmsz.ws.DepartmentService;
import com.hp.cmsz.entity.Department;
import com.hp.cmsz.repository.DepartmentDao;
public class DepartmentServiceImpl implements DepartmentService {
private static Logger logger = LoggerFactory.getLogger(DepartmentServiceImpl.class);
@Autowired
// private DepartmentDaoSupport departmentDao;
private DepartmentDaoSupport departmentDao;
/**
* 查询部门列表
*/
public List<DepartmentVO> queryDepartment (String departmentId) {
logger.info("开始查询部门列表信息-----------------");
DepartmentDaoSupport departmentDao=new DepartmentDaoSupport();
List<DepartmentVO> resultList = new ArrayList<DepartmentVO>();
//List<Department> departmentList = new ArrayList<Department>();
/*if (departmentId.equals("") || departmentId == null) {//为空
departmentList = (List<Department>) departmentDao.findAll();
} else {
departmentList = (List<Department>) departmentDao.findByDepartmentId(Long.valueOf(departmentId));
// public List<DepartmentVO> queryDepartment (String departmentId) {
// logger.info("开始查询部门列表信息-----------------");
// DepartmentDaoSupport departmentDao=new DepartmentDaoSupport();
// List<DepartmentVO> resultList = new ArrayList<DepartmentVO>();
// //List<Department> departmentList = new ArrayList<Department>();
// /*if (departmentId.equals("") || departmentId == null) {//为空
// departmentList = (List<Department>) departmentDao.findAll();
// } else {
// departmentList = (List<Department>) departmentDao.findByDepartmentId(Long.valueOf(departmentId));
// }
//
// */
// resultList=departmentDao.findByDepartmentId(departmentId);
// /*for (int i = 0; i < departmentList.size(); i++) {
// DepartmentVO vo = new DepartmentVO();
// vo.setDepartmentId(String.valueOf(departmentList.get(i).getDepartmentId()));
// resultList.add(vo);
// }*/
// return resultList;
// }
public String queryDepartment(String departmentId) {
String lu = "";
if(departmentId != null && !departmentId.equals("")){
JSONObject joo = JSONObject.fromObject(departmentId);
lu = (String) joo.get("departmentId");
}
*/
resultList=departmentDao.findByDepartmentId(departmentId);
/*for (int i = 0; i < departmentList.size(); i++) {
DepartmentVO vo = new DepartmentVO();
vo.setDepartmentId(String.valueOf(departmentList.get(i).getDepartmentId()));
resultList.add(vo);
}*/
return resultList;
logger.info("查询用户部门操作:参数为 "+lu);
List<DepartmentVO> lists = new ArrayList<DepartmentVO>();
if(lu!=null && !lu.equals("")){
lists = departmentDao.findByDepartmentId(lu);
} else{
lists = departmentDao.findAllDepartment();
}
JSONArray ja = new JSONArray();
try {
if(lists != null){
int num = lists.size(); //行数
//AES aes = new AES(); // 模糊化处理AES方式加解密
System.out.println("同步业务系统数量="+ num);
for (int i = 0; i < num; i++){
JSONObject jo = new JSONObject();
jo.put("departmentId", lists.get(i).getDepartmentId());
jo.put("departmentname", lists.get(i).getDepartmentname());
jo.put("note", lists.get(i).getNote());
ja.add(jo);
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return ja.toString();
}
}
......@@ -3,6 +3,9 @@ package com.cmsz.ws.impl;
import java.util.ArrayList;
import java.util.List;
import net.sf.json.JSONArray;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -15,33 +18,75 @@ public class GroupServiceImpl implements GroupService {
private static Logger logger = LoggerFactory.getLogger(GroupServiceImpl.class);
@Autowired
// private RoleInfoDao roleInfoDao;
private RoleInfoDaoSupport roleInfoDao;
/**
* 查询工作组
*/
public List<WorkGroupVO> queryWorkGroup(String groupId) {
logger.info("开始查询工作组信息-----------------");
RoleInfoDaoSupport roleInfoDao=new RoleInfoDaoSupport();
List<WorkGroupVO> resultList = new ArrayList<WorkGroupVO>();
//List<RoleInfo> roleInfoList = new ArrayList<RoleInfo>();;
/*if (groupId.equals("") || groupId == null) {//为空
roleInfoList = (List<RoleInfo>) roleInfoDao.findAll();
// public List<WorkGroupVO> queryWorkGroup(String groupId) {
// logger.info("开始查询工作组信息-----------------");
// RoleInfoDaoSupport roleInfoDao=new RoleInfoDaoSupport();
// List<WorkGroupVO> resultList = new ArrayList<WorkGroupVO>();
// //List<RoleInfo> roleInfoList = new ArrayList<RoleInfo>();;
// /*if (groupId.equals("") || groupId == null) {//为空
// roleInfoList = (List<RoleInfo>) roleInfoDao.findAll();
// } else {
// roleInfoList = (List<RoleInfo>) roleInfoDao.findByRoleId(Long.valueOf(groupId));
// }
// for (int i = 0; i < roleInfoList.size(); i++) {
// WorkGroupVO vo = new WorkGroupVO();
// vo.setGroupId(String.valueOf(roleInfoList.get(i).getRoleId()));
// vo.setGroupType(roleInfoList.get(i).getRoleType());
// vo.setName(roleInfoList.get(i).getRoleName());
// vo.setNote(roleInfoList.get(i).getRoleDescription());
// vo.setSafeMode(roleInfoList.get(i).getSafeMode());
// vo.setValidBegin(roleInfoList.get(i).getValidBegin());
// vo.setValidEnd(roleInfoList.get(i).getValidEnd());
// resultList.add(vo);
// }*/
// resultList=roleInfoDao.queryWorkGroup(groupId);
// return resultList;
// }
public String queryWorkGroup(String groupId) {
String lu = "";
if(groupId != null && !groupId.equals("")){
JSONObject joo = JSONObject.fromObject(groupId);
lu = (String) joo.get("groupId");
}
logger.info("查询用户工作组操作:参数为 "+lu);
List<WorkGroupVO> workList = new ArrayList<WorkGroupVO>();
if (lu != null && !lu.equals("")) {
workList = roleInfoDao.queryWorkGroup(lu);
} else {
roleInfoList = (List<RoleInfo>) roleInfoDao.findByRoleId(Long.valueOf(groupId));
workList = roleInfoDao.queryAllWorkGroup();
}
workList = WorkGroupVO.getWorkGroupVerification(workList);
JSONArray ja = new JSONArray();
try {
if(workList != null){
int num = workList.size(); //行数
//AES aes = new AES(); // 模糊化处理AES方式加解密
System.out.println("同步业务系统数量="+ num);
for (int i = 0; i < num; i++){
JSONObject jo = new JSONObject();
jo.put("groupId", workList.get(i).getGroupId());
jo.put("name", workList.get(i).getName());
jo.put("groupType", workList.get(i).getGroupType());
jo.put("safeMode", workList.get(i).getSafeMode());
jo.put("validBegin", workList.get(i).getValidBegin());
jo.put("validEnd", workList.get(i).getValidEnd());
jo.put("note", workList.get(i).getNote());
ja.add(jo);
}
}
} catch (JSONException e) {
e.printStackTrace();
}
for (int i = 0; i < roleInfoList.size(); i++) {
WorkGroupVO vo = new WorkGroupVO();
vo.setGroupId(String.valueOf(roleInfoList.get(i).getRoleId()));
vo.setGroupType(roleInfoList.get(i).getRoleType());
vo.setName(roleInfoList.get(i).getRoleName());
vo.setNote(roleInfoList.get(i).getRoleDescription());
vo.setSafeMode(roleInfoList.get(i).getSafeMode());
vo.setValidBegin(roleInfoList.get(i).getValidBegin());
vo.setValidEnd(roleInfoList.get(i).getValidEnd());
resultList.add(vo);
}*/
resultList=roleInfoDao.queryWorkGroup(groupId);
return resultList;
return ja.toString();
}
}
package com.cmsz.ws.impl;
import com.hp.cmsz.repository.UserInfoDao;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cmsz.vo.ResultVO;
import com.cmsz.ws.LoginSwitchService;
import org.springframework.beans.factory.annotation.Autowired;
public class LoginSwitchServiceImpl implements LoginSwitchService {
private static Logger logger = LoggerFactory.getLogger(LoginSwitchServiceImpl.class);
public ResultVO loginModChg(String flag) {
logger.info("开始切换系统登录模式----------------");
ResultVO resultVO = new ResultVO();
String descript = "";
/*
if (!"0".equals(flag) && !"1".equals(flag)) {
descript = "开关标志无效";
} else {
try {
loginSwitchDAO.updateLoginModel(flag);
} catch (Exception e) {
descript = "登录模式切换失败";
e.printStackTrace();
}
@Autowired
private LoginSwitchService loginSwitchService;
// public ResultVO loginModChg(String flag) {
//
// logger.info("开始切换系统登录模式----------------");
//
// ResultVO resultVO = new ResultVO();
// String descript = "";
// /*
// if (!"0".equals(flag) && !"1".equals(flag)) {
// descript = "开关标志无效";
// } else {
// try {
// loginSwitchDAO.updateLoginModel(flag);
// } catch (Exception e) {
// descript = "登录模式切换失败";
// e.printStackTrace();
// }
// }
// if(descript == "")
// resultVO.setResult("0");
// else
// resultVO.setResult("1");
// */
// resultVO.setResultDesc(descript);
// return resultVO;
// }
/**
* 开关标志位 0 打开 1 关闭
*/
public String loginModChg(String flag) {
JSONObject joo = JSONObject.fromObject(flag);
String lu = (String) joo.get("flag");
JSONObject jo = new JSONObject();
logger.info("切换登陆接口(开关表)操作:参数为 "+lu);
int code = Integer.parseInt(loginSwitchService.loginModChg(lu));
if(code!=1){ //失败
logger.info("切换失败!");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "切换失败!"); // 操作结果描述
return jo.toString();
}else{
logger.info("切换成功!");
jo.put("result", "0"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "切换成功!"); // 操作结果描述
return jo.toString();
}
if(descript == "")
resultVO.setResult("0");
else
resultVO.setResult("1");
*/
resultVO.setResultDesc(descript);
return resultVO;
}
}
......@@ -7,6 +7,11 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.hp.cmsz.commons.utils.AES;
import net.sf.json.JSONArray;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -23,11 +28,15 @@ import com.hp.cmsz.service.authoritymanage.AuthorityManageService;
public class UserServiceImpl implements UserService {
private static Logger logger = LoggerFactory
.getLogger(UserServiceImpl.class);
private static Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
private AES aes = new AES();
public SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Autowired
private UserInfoDaoSupport userInfoDao;
/*
* @Autowired private UserInfoDao userInfoDao;
*
......@@ -37,329 +46,611 @@ public class UserServiceImpl implements UserService {
*
* @Autowired // 自动加载 private AuthorityManageService authorityManageService;
*/
/**
* 新增用户
*/
public ResultVO addUserInfo(UserInfoVO vo) {
logger.info("--Begin to add user---------");
ResultVO resultVO = new ResultVO();
UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
String descript = "";
if (vo.getLoginUser() == null || vo.getLoginUser().equals("")) {
descript = "登录帐号不能为空";
} else if (vo.getPassword() == null || vo.getPassword().equals("")) {
descript = "用户密码不能为空";
} else if (vo.getDepartmentCode() == null
|| vo.getDepartmentCode().equals("")) {
descript = "部门编码不能为空";
} else if (vo.getWorkCode() == null || vo.getWorkCode().equals("")) {
descript = "工作组编号不能为空";
} else {
try {
List<UserInfoVO> userInfos = userInfoDao.findByUserName(vo
.getLoginUser());
if (userInfos != null && userInfos.size() > 0) {
logger.info("--List size is:" + userInfos.size());
descript = "登录帐号已存在";
} else {
// /**
// * 新增用户
// */
// public ResultVO addUserInfo(UserInfoVO vo) {
// logger.info("--Begin to add user---------");
// ResultVO resultVO = new ResultVO();
// UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
// String descript = "";
// if (vo.getLoginUser() == null || vo.getLoginUser().equals("")) {
// descript = "登录帐号不能为空";
// } else if (vo.getPassword() == null || vo.getPassword().equals("")) {
// descript = "用户密码不能为空";
// } else if (vo.getDepartmentCode() == null
// || vo.getDepartmentCode().equals("")) {
// descript = "部门编码不能为空";
// } else if (vo.getWorkCode() == null || vo.getWorkCode().equals("")) {
// descript = "工作组编号不能为空";
// } else {
// try {
// List<UserInfoVO> userInfos = userInfoDao.findByUserName(vo
// .getLoginUser());
// if (userInfos != null && userInfos.size() > 0) {
// logger.info("--List size is:" + userInfos.size());
// descript = "登录帐号已存在";
// } else {
//
// userInfoDao.createUser(vo);
// userInfoDao.closeAll();
// /*
// * UserInfo newUserInfo = new UserInfo();
// * newUserInfo.setUserName(vo.getLoginUser());
// * SimpleDateFormat formatDate = new
// * SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date date =new
// * Date(); newUserInfo.setCreateTime(new
// * Timestamp(formatDate
// * .parse(formatDate.format(date)).getTime()));
// * newUserInfo.setModifyTime(new
// * Timestamp(formatDate.parse(formatDate
// * .format(date)).getTime()));
// * newUserInfo.setUserDescription(vo.getNote());
// * newUserInfo.
// * setDepartmentId(Long.valueOf(vo.getDepartmentCode()));
// * newUserInfo.setPassword(vo.getPassword());
// * newUserInfo.setStaffname(vo.getStaffName());
// * newUserInfo.setFlag(vo.getFlag());
// * newUserInfo.setValidLength(vo.getValidLength());
// * newUserInfo.setExpireDate(vo.getExpireDate());
// * newUserInfo.setLogLock(vo.getLogLock());
// * userInfoDao.save(newUserInfo);//添加用户
// *
// * //添加用户对应的角色信息 String []roles = null; if
// * (vo.getWorkCode().indexOf(",") !=-1 ) { roles =
// * vo.getWorkCode().split("\\,"); } else { roles[0] =
// * vo.getWorkCode(); } for (int i = 0; i < roles.length;
// * i++) { UserRoleInfo ur = new UserRoleInfo();
// * ur.setUserId(newUserInfo.getUserId()); RoleInfo roleInfo
// * = roleInfoDao.findByRoleType(roles[i]);
// * ur.setRoleId(roleInfo.getRoleId());
// * userRoleInfoDao.save(ur); }
// */
//
// }
//
// } catch (SQLException e) {
// descript = "添加用户失败";
// e.printStackTrace();
// try {
// userInfoDao.rollback();
// userInfoDao.closeAll();
// } catch (SQLException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
// }
// }
// if ("".equals(descript))
// resultVO.setResult("0");
// else
// resultVO.setResult("1");
// resultVO.setResultDesc(descript);
//
// return resultVO;
//
// }
//
// /**
// * 删除用户
// */
// public ResultVO delUserInfo(String loginUser) {
// logger.info("开始删除用户----------");
// ResultVO resultVO = new ResultVO();
// String descript = "";
// if (loginUser.equals("") || loginUser == null) {
// descript = "用户帐号不能为空";
// } else {
// UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
// try {
//
// userInfoDao.delUserInfo(loginUser);
// userInfoDao.closeAll();
// /*
// * UserInfo userInfo = userInfoDao.findByUserName(loginUser);
// * authorityManageService.deleteUserInfoByUserId(userInfo
// * .getUserId());
// * authorityManageService.deleteUserRoleInfoByUserId(userInfo
// * .getUserId());
// */
// } catch (SQLException e) {
// descript = "删除用户失败";
// e.printStackTrace();
// try {
// userInfoDao.rollback();
// userInfoDao.closeAll();
// } catch (SQLException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
// }
// }
// if ("".equals(descript))
// resultVO.setResult("0");
// else
// resultVO.setResult("1");
// resultVO.setResultDesc(descript);
//
// return resultVO;
// }
//
// /**
// * 更新用户
// */
// public ResultVO modifyUserInfo(UserInfoVO vo) {
// logger.info("开始修改用户信息----------");
// ResultVO resultVO = new ResultVO();
// UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
// String descript = "";
// if (vo.getLoginUser() == null || vo.getLoginUser().equals("")) {
// descript = "登录帐号不能为空";
// } else {
// try {
// List<UserInfoVO> userInfoVOs = userInfoDao.findByUserName(vo
// .getLoginUser());
// if (userInfoVOs == null || userInfoVOs.size() == 0) {
// descript = "要更新的用户不存在";
// } else {
// for (UserInfoVO userInfoVO : userInfoVOs) {
// userInfoDao.modifyUserInfo(userInfoVO);
// }
// userInfoDao.closeAll();
// /*
// * userInfo.setUserName(vo.getLoginUser()); SimpleDateFormat
// * formatDate = new SimpleDateFormat(
// * "yyyy-MM-dd hh:mm:ss"); Date date = new Date();
// * userInfo.setModifyTime(new Timestamp(formatDate.parse(
// * formatDate.format(date)).getTime()));
// * userInfo.setUserDescription(vo.getNote());
// * userInfo.setDepartmentId(Long.valueOf(vo
// * .getDepartmentCode()));
// * userInfo.setPassword(vo.getPassword());
// * userInfo.setStaffname(vo.getStaffName());
// * userInfo.setFlag(vo.getFlag());
// * userInfo.setValidLength(vo.getValidLength());
// * userInfo.setExpireDate(vo.getExpireDate());
// * userInfo.setLogLock(vo.getLogLock());
// * userInfoDao.save(userInfo);
// *
// * authorityManageService.deleteUserRoleInfoByUserId(userInfo
// * .getUserId()); String[] roles = null; if
// * (vo.getWorkCode().indexOf(",") != -1) { roles =
// * vo.getWorkCode().split("\\,"); } else { roles[0] =
// * vo.getWorkCode(); } for (int i = 0; i < roles.length;
// * i++) { UserRoleInfo ur = new UserRoleInfo();
// * ur.setUserId(userInfo.getUserId()); RoleInfo roleInfo =
// * roleInfoDao .findByRoleType(roles[i]);
// * ur.setRoleId(roleInfo.getRoleId());
// * userRoleInfoDao.save(ur); }
// */
// }
// } catch (SQLException e) {
// descript = "用户信息更新失败";
// e.printStackTrace();
// try {
// userInfoDao.rollback();
// userInfoDao.closeAll();
// } catch (SQLException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
//
// }
//
// }
// if ("".equals(descript))
// resultVO.setResult("0");
// else
// resultVO.setResult("1");
// resultVO.setResultDesc(descript);
// return resultVO;
// }
//
// /**
// * 修改密码
// */
// public ResultVO modifyUserPassword(String loginUser, String oldPassword,
// String newPassword) {
// logger.info("开始更新用户密码----------");
// ResultVO resultVO = new ResultVO();
// String descript = "";
// if (loginUser.equals("") || loginUser == null) {
// descript = "登录帐号不能为空";
// } else if (newPassword.equals("") || newPassword == null) {
// descript = "新密码不能为空";
// } else {
// UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
// try {
// userInfoDao.modifyUserPassword(loginUser, oldPassword,
// newPassword);
// userInfoDao.closeAll();
// } catch (SQLException e) {
// descript = "修改密码失败";
// e.printStackTrace();
// try {
// userInfoDao.rollback();
// userInfoDao.closeAll();
// } catch (SQLException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
// }
// /*
// * UserInfo userInfo = userInfoDao.findByUserName(loginUser); if
// * (userInfo == null) { descript = "登录帐号不存在"; } else {
// * authorityManageService.modifyUserPassword(loginUser, oldPassword,
// * newPassword); }
// */
// }
//
// if ("".equals(descript))
// resultVO.setResult("0");
// else
// resultVO.setResult("1");
// resultVO.setResultDesc(descript);
// return resultVO;
// }
//
// /**
// * 查询用户
// */
// public List<UserInfoVO> queryUserInfo(String loginUser) {
// // logger.info("Begin to run---------------");
// List<UserInfoVO> userList = new ArrayList<UserInfoVO>();
// UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
// try {
// userList = userInfoDao.findByUserName(loginUser);
// userInfoDao.closeAll();
// } catch (SQLException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// // userList.add(userInfoVO);
// // List<UserInfo> userInfoList = new ArrayList<UserInfo>();
// /*
// * userInfoList=authorityManageService.getAllUserInfo();
// *
// * if ("".equals(loginUser)|| loginUser == null) {
// * logger.info("--lginUser is null"); //userInfoList = (List<UserInfo>)
// * userInfoDao.findAll();
// * userInfoList=authorityManageService.getAllUserInfo();
// *
// * } else { //userInfoList = (List<UserInfo>)
// * userInfoDao.findByUserName(loginUser);
// * logger.info("--llginUser is not null"); UserInfo
// * userInfo=authorityManageService.getUserInfoByUserName(loginUser);
// * userInfoList.add(userInfo); }
// */
// /*
// * for (int i = 0; i < userInfoList.size(); i++) { UserInfoVO vo = new
// * UserInfoVO();
// * vo.setDepartmentCode(String.valueOf(userInfoList.get(i).
// * getDepartmentId()));
// * vo.setExpireDate(userInfoList.get(i).getExpireDate());
// * vo.setFlag(userInfoList.get(i).getFlag());
// * vo.setLoginUser(userInfoList.get(i).getUserName());
// * vo.setLogLock(userInfoList.get(i).getLogLock());
// * vo.setNote(userInfoList.get(i).getUserDescription());
// * vo.setPassword(userInfoList.get(i).getPassword());
// * vo.setStaffName(userInfoList.get(i).getStaffname());
// * vo.setValidLength(userInfoList.get(i).getValidLength());
// * List<UserRoleInfo> userRoleInfoList =
// * authorityManageService.getUserRoleInfoByUserId
// * (userInfoList.get(i).getUserId()); List<String> roleTypeList = new
// * ArrayList<String>();
// */
// /*
// * for (int t = 0; t < userRoleInfoList.size(); t++) { String roleType =
// * authorityManageService
// * ..findByRoleId(userRoleInfoList.get(t).getRoleId()).getRoleType();
// * roleTypeList.add(roleType); } String roleTypeListStr =
// * CommonUtil.toString(roleTypeList, ",");
// * vo.setWorkCode(roleTypeListStr);
// */
//
// // userList.add(vo);
// // }
//
// return userList;
// }
//
// public Date getFormatDate(String date) {
// if (date == null || "".equals(date)) {
// return null;
// }
// try {
// return sdf.parse(date);
// } catch (ParseException e) {
// logger.error("日起转换错误:" + e.getMessage());
// return null;
// }
// }
//
// public String getFormatDate(Date date) {
// if (date == null)
// return "";
// return sdf.format(date);
// }
userInfoDao.createUser(vo);
userInfoDao.closeAll();
/*
* UserInfo newUserInfo = new UserInfo();
* newUserInfo.setUserName(vo.getLoginUser());
* SimpleDateFormat formatDate = new
* SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date date =new
* Date(); newUserInfo.setCreateTime(new
* Timestamp(formatDate
* .parse(formatDate.format(date)).getTime()));
* newUserInfo.setModifyTime(new
* Timestamp(formatDate.parse(formatDate
* .format(date)).getTime()));
* newUserInfo.setUserDescription(vo.getNote());
* newUserInfo.
* setDepartmentId(Long.valueOf(vo.getDepartmentCode()));
* newUserInfo.setPassword(vo.getPassword());
* newUserInfo.setStaffname(vo.getStaffName());
* newUserInfo.setFlag(vo.getFlag());
* newUserInfo.setValidLength(vo.getValidLength());
* newUserInfo.setExpireDate(vo.getExpireDate());
* newUserInfo.setLogLock(vo.getLogLock());
* userInfoDao.save(newUserInfo);//添加用户
*
* //添加用户对应的角色信息 String []roles = null; if
* (vo.getWorkCode().indexOf(",") !=-1 ) { roles =
* vo.getWorkCode().split("\\,"); } else { roles[0] =
* vo.getWorkCode(); } for (int i = 0; i < roles.length;
* i++) { UserRoleInfo ur = new UserRoleInfo();
* ur.setUserId(newUserInfo.getUserId()); RoleInfo roleInfo
* = roleInfoDao.findByRoleType(roles[i]);
* ur.setRoleId(roleInfo.getRoleId());
* userRoleInfoDao.save(ur); }
*/
}
/**
* 查询用户
*/
public String queryUserInfo(String loginUser) {
} catch (SQLException e) {
descript = "添加用户失败";
e.printStackTrace();
try {
userInfoDao.rollback();
userInfoDao.closeAll();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
String lu = "";
if(loginUser != null && !loginUser.equals("")){
JSONObject jo = JSONObject.fromObject(loginUser);
lu = aes.decrypt(jo.getString("loginUser"));
}
if ("".equals(descript))
resultVO.setResult("0");
else
resultVO.setResult("1");
resultVO.setResultDesc(descript);
return resultVO;
}
/**
* 删除用户
*/
public ResultVO delUserInfo(String loginUser) {
logger.info("开始删除用户----------");
ResultVO resultVO = new ResultVO();
String descript = "";
if (loginUser.equals("") || loginUser == null) {
descript = "用户帐号不能为空";
} else {
UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
logger.info("查询用户信息操作:参数账号为 " + lu);
List<UserInfoVO> users = new ArrayList<UserInfoVO>();
if (lu != null && !lu.equals("")) {
try {
userInfoDao.delUserInfo(loginUser);
userInfoDao.closeAll();
/*
* UserInfo userInfo = userInfoDao.findByUserName(loginUser);
* authorityManageService.deleteUserInfoByUserId(userInfo
* .getUserId());
* authorityManageService.deleteUserRoleInfoByUserId(userInfo
* .getUserId());
*/
users = userInfoDao.queryUserInfo(lu);
} catch (SQLException e) {
descript = "删除用户失败";
e.printStackTrace();
try {
userInfoDao.rollback();
userInfoDao.closeAll();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
if ("".equals(descript))
resultVO.setResult("0");
else
resultVO.setResult("1");
resultVO.setResultDesc(descript);
return resultVO;
}
/**
* 更新用户
*/
public ResultVO modifyUserInfo(UserInfoVO vo) {
logger.info("开始修改用户信息----------");
ResultVO resultVO = new ResultVO();
UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
String descript = "";
if (vo.getLoginUser() == null || vo.getLoginUser().equals("")) {
descript = "登录帐号不能为空";
} else {
try {
List<UserInfoVO> userInfoVOs = userInfoDao.findByUserName(vo
.getLoginUser());
if (userInfoVOs == null || userInfoVOs.size() == 0) {
descript = "要更新的用户不存在";
} else {
for (UserInfoVO userInfoVO : userInfoVOs) {
userInfoDao.modifyUserInfo(userInfoVO);
}
userInfoDao.closeAll();
/*
* userInfo.setUserName(vo.getLoginUser()); SimpleDateFormat
* formatDate = new SimpleDateFormat(
* "yyyy-MM-dd hh:mm:ss"); Date date = new Date();
* userInfo.setModifyTime(new Timestamp(formatDate.parse(
* formatDate.format(date)).getTime()));
* userInfo.setUserDescription(vo.getNote());
* userInfo.setDepartmentId(Long.valueOf(vo
* .getDepartmentCode()));
* userInfo.setPassword(vo.getPassword());
* userInfo.setStaffname(vo.getStaffName());
* userInfo.setFlag(vo.getFlag());
* userInfo.setValidLength(vo.getValidLength());
* userInfo.setExpireDate(vo.getExpireDate());
* userInfo.setLogLock(vo.getLogLock());
* userInfoDao.save(userInfo);
*
* authorityManageService.deleteUserRoleInfoByUserId(userInfo
* .getUserId()); String[] roles = null; if
* (vo.getWorkCode().indexOf(",") != -1) { roles =
* vo.getWorkCode().split("\\,"); } else { roles[0] =
* vo.getWorkCode(); } for (int i = 0; i < roles.length;
* i++) { UserRoleInfo ur = new UserRoleInfo();
* ur.setUserId(userInfo.getUserId()); RoleInfo roleInfo =
* roleInfoDao .findByRoleType(roles[i]);
* ur.setRoleId(roleInfo.getRoleId());
* userRoleInfoDao.save(ur); }
*/
}
users = userInfoDao.queryAllUserInfo();
} catch (SQLException e) {
descript = "用户信息更新失败";
e.printStackTrace();
try {
userInfoDao.rollback();
userInfoDao.closeAll();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
if ("".equals(descript))
resultVO.setResult("0");
else
resultVO.setResult("1");
resultVO.setResultDesc(descript);
return resultVO;
}
/**
* 修改密码
*/
public ResultVO modifyUserPassword(String loginUser, String oldPassword,
String newPassword) {
logger.info("开始更新用户密码----------");
ResultVO resultVO = new ResultVO();
String descript = "";
if (loginUser.equals("") || loginUser == null) {
descript = "登录帐号不能为空";
} else if (newPassword.equals("") || newPassword == null) {
descript = "新密码不能为空";
} else {
UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
try {
userInfoDao.modifyUserPassword(loginUser, oldPassword,
newPassword);
userInfoDao.closeAll();
} catch (SQLException e) {
descript = "修改密码失败";
e.printStackTrace();
try {
userInfoDao.rollback();
userInfoDao.closeAll();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
List<UserInfoVO> list= UserInfoVO.getUserInfoVerification(users);
JSONArray ja = new JSONArray();
try {
if(list != null){
int num = list.size(); //行数
AES aes = new AES(); // 模糊化处理AES方式加解密
System.out.println("同步业务系统数量="+ num);
for (int i = 0; i < num; i++){
JSONObject jo = new JSONObject();
jo.put("loginUser", aes.encrypt(list.get(i).getLoginUser())); // 登录用户(账号)
jo.put("password", aes.encrypt(list.get(i).getPassword())); // 密码(密文)//4A方提供加解密方式
jo.put("staffName", aes.encrypt(list.get(i).getStaffName())); // (姓名)
jo.put("flag", list.get(i).getFlag()); //(有效标志)
jo.put("validLength", list.get(i).getValidLength()); //(有效期)
jo.put("expireDate", list.get(i).getExpireDate()); //(失效时间)
jo.put("logLock", list.get(i).getLogLock()); //(锁定状态)//0,禁用;1,启用;9删除
jo.put("departmentCode", list.get(i).getDepartmentCode()); //(所属部门)
jo.put("workCode", list.get(i).getWorkCode()); //(所属工作组,多个组用逗号隔开)
jo.put("note", list.get(i).getNote()); //(备注)
ja.add(jo);
}
}
/*
* UserInfo userInfo = userInfoDao.findByUserName(loginUser); if
* (userInfo == null) { descript = "登录帐号不存在"; } else {
* authorityManageService.modifyUserPassword(loginUser, oldPassword,
* newPassword); }
*/
} catch (JSONException e) {
e.printStackTrace();
}
if ("".equals(descript))
resultVO.setResult("0");
else
resultVO.setResult("1");
resultVO.setResultDesc(descript);
return resultVO;
return ja.toString();
}
/**
* 查询用户
* 添加用户
*
*
*/
public List<UserInfoVO> queryUserInfo(String loginUser) {
// logger.info("Begin to run---------------");
List<UserInfoVO> userList = new ArrayList<UserInfoVO>();
UserInfoDaoSupport userInfoDao = new UserInfoDaoSupport();
try {
userList = userInfoDao.findByUserName(loginUser);
userInfoDao.closeAll();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
public String addUserInfo(String userInfo) {
List<UserInfoVO> list = new ArrayList<UserInfoVO>();
UserInfoVO userInfoVO = new UserInfoVO();
if (userInfo != null && !userInfo.equals("")) {
JSONObject joo = JSONObject.fromObject(userInfo);
userInfoVO.setLoginUser(aes.decrypt(joo.getString("loginUser")));
userInfoVO.setPassword(aes.decrypt(joo.getString("password")));
userInfoVO.setStaffName(aes.decrypt(joo.getString("staffName")));
userInfoVO.setFlag(joo.getString("flag"));
userInfoVO.setValidLength(joo.getString("validLength"));
userInfoVO.setExpireDate(joo.getString("expireDate"));
userInfoVO.setLogLock(joo.getString("logLock"));
userInfoVO.setDepartmentCode(joo.getString("departmentCode"));
userInfoVO.setWorkCode(joo.getString("workCode"));
userInfoVO.setNote(joo.getString("note"));
}
// userList.add(userInfoVO);
// List<UserInfo> userInfoList = new ArrayList<UserInfo>();
/*
* userInfoList=authorityManageService.getAllUserInfo();
*
* if ("".equals(loginUser)|| loginUser == null) {
* logger.info("--lginUser is null"); //userInfoList = (List<UserInfo>)
* userInfoDao.findAll();
* userInfoList=authorityManageService.getAllUserInfo();
*
* } else { //userInfoList = (List<UserInfo>)
* userInfoDao.findByUserName(loginUser);
* logger.info("--llginUser is not null"); UserInfo
* userInfo=authorityManageService.getUserInfoByUserName(loginUser);
* userInfoList.add(userInfo); }
*/
/*
* for (int i = 0; i < userInfoList.size(); i++) { UserInfoVO vo = new
* UserInfoVO();
* vo.setDepartmentCode(String.valueOf(userInfoList.get(i).
* getDepartmentId()));
* vo.setExpireDate(userInfoList.get(i).getExpireDate());
* vo.setFlag(userInfoList.get(i).getFlag());
* vo.setLoginUser(userInfoList.get(i).getUserName());
* vo.setLogLock(userInfoList.get(i).getLogLock());
* vo.setNote(userInfoList.get(i).getUserDescription());
* vo.setPassword(userInfoList.get(i).getPassword());
* vo.setStaffName(userInfoList.get(i).getStaffname());
* vo.setValidLength(userInfoList.get(i).getValidLength());
* List<UserRoleInfo> userRoleInfoList =
* authorityManageService.getUserRoleInfoByUserId
* (userInfoList.get(i).getUserId()); List<String> roleTypeList = new
* ArrayList<String>();
*/
/*
* for (int t = 0; t < userRoleInfoList.size(); t++) { String roleType =
* authorityManageService
* ..findByRoleId(userRoleInfoList.get(t).getRoleId()).getRoleType();
* roleTypeList.add(roleType); } String roleTypeListStr =
* CommonUtil.toString(roleTypeList, ",");
* vo.setWorkCode(roleTypeListStr);
*/
// userList.add(vo);
// }
JSONObject jo = new JSONObject();
return userList;
}
logger.info("新增用户信息操作:参数为 " + userInfo.toString());
if (isUserExists(userInfoVO) == 0) {
// Md5PasswordEncoder md5 = new Md5PasswordEncoder();
// userInfoVO.setPassword(md5.encodePassword(Base64Utils.decode(RSAUtils.decryptStringByJs(userInfoVO.getPassword())), null));
public Date getFormatDate(String date) {
if (date == null || "".equals(date)) {
return null;
}
try {
return sdf.parse(date);
} catch (ParseException e) {
logger.error("日起转换错误:" + e.getMessage());
return null;
userInfoVO = UserInfoVO.getaddUserInfo(userInfoVO);
int code = 0;
try {
code = userInfoDao.insertUserInfo(userInfoVO);
} catch (SQLException e) {
e.printStackTrace();
}
if (code != 1) {
logger.info("新增用户信息失败");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "新增用户失败"); // 操作结果描述
return jo.toString();
} else {
List<UserInfoVO> usersnew = new ArrayList<UserInfoVO>();
try {
usersnew = userInfoDao.queryUserInfo(userInfoVO.getLoginUser());
} catch (SQLException e) {
e.printStackTrace();
}
// userGroupMapper.insertUserGroupInfo(new UserGroup(userInfoVO.getWorkCode(),usersnew.get(0).getUserKey(),"2"));
logger.info("新增用户信息成功");
jo.put("result", "0"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "新增用户成功"); // 操作结果描述
return jo.toString();
}
} else {
logger.info("账号已存在!");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "账号已存在!"); // 操作结果描述
return jo.toString();
}
}
public String getFormatDate(Date date) {
if (date == null)
return "";
return sdf.format(date);
}
/**
* 修改用户
*/
public String modifyUserInfo(String userInfo) {
List<UserInfoVO> list = new ArrayList<UserInfoVO>();
UserInfoVO userInfoVO = new UserInfoVO();
if(userInfo != null && !userInfo.equals("")){
JSONObject joo = JSONObject.fromObject(userInfo);
userInfoVO.setLoginUser(aes.decrypt(joo.getString("loginUser")));
userInfoVO.setPassword(aes.decrypt(joo.getString("password")));
userInfoVO.setStaffName(aes.decrypt(joo.getString("staffName")));
userInfoVO.setFlag(joo.getString("flag"));
userInfoVO.setValidLength(joo.getString("validLength"));
userInfoVO.setExpireDate(joo.getString("expireDate"));
userInfoVO.setLogLock(joo.getString("logLock"));
userInfoVO.setDepartmentCode(joo.getString("departmentCode"));
userInfoVO.setWorkCode(joo.getString("workCode"));
userInfoVO.setNote(joo.getString("note"));
}
JSONObject jo = new JSONObject();
String pass = "";
pass = userInfoVO.getPassword();
if(pass.length() != 0){
// Md5PasswordEncoder md5 = new Md5PasswordEncoder();
// userInfoVO.setPassword(md5.encodePassword(Base64Utils.decode(RSAUtils.decryptStringByJs(pass)), null));
}else{
userInfoVO.setPassword(""); //如果密码为空,则不修改密码
}
userInfoVO = userInfoVO.getaddUserInfo(userInfoVO);
logger.info("修改用户信息操作:参数为 " + userInfo.toString());
int exists = isUserExists(userInfoVO);
if (exists == 0) {
logger.info("账号不存在!");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "账号不存在,账号信息修改失败!"); // 操作结果描述
return jo.toString();
} else {
int code = 0;
try {
code = userInfoDao.updateUserInfo(userInfoVO);
} catch (SQLException e) {
e.printStackTrace();
}
if (code != 1) {
logger.info("修改用户信息失败");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "修改用户失败"); // 操作结果描述
return jo.toString();
} else {
logger.info("修改用户信息成功");
jo.put("result", "0"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "修改用户成功"); // 操作结果描述
return jo.toString();
}
}
}
/**
* 修改用户密码
*/
public String modifyUserPwd(String json) {
String loginUser = "";
String oldPassword = "";
String newPassword = "";
if(json != null && !json.equals("")){
JSONObject joo = JSONObject.fromObject(json);
loginUser = aes.decrypt(joo.getString("loginUser"));
//oldPassword = aes.decrypt(joo.getString("oldPassword")); //原密码为空
newPassword = aes.decrypt(joo.getString("newPassword"));
}
JSONObject jo = new JSONObject();
logger.info("修改用户密码信息操作:参数账号为 " + loginUser);
if (StringUtils.isEmpty(loginUser)) {
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "用户账号为空"); // 操作结果描述
return jo.toString();
}
if (StringUtils.isEmpty(newPassword)) {
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "新密码为空"); // 操作结果描述
return jo.toString();
}
// Md5PasswordEncoder md5 = new Md5PasswordEncoder();
// newPassword = md5.encodePassword(Base64Utils.decode(RSAUtils.decryptStringByJs(newPassword)), null);
UserInfoVO user = null;
try {
user = userInfoDao.getUserPwd(loginUser);
} catch (SQLException e) {
e.printStackTrace();
}
user.setLoginUser(loginUser);
user.setPassword(newPassword);
int code = 0;
try {
code = userInfoDao.updateUserPassword(user);
} catch (SQLException e) {
e.printStackTrace();
}
if (code != 1) { // 失败
logger.info("修改用户密码失败");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "修改密码失败"); // 操作结果描述
return jo.toString();
} else {
logger.info("修改用户密码成功");
jo.put("result", "0"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "修改密码成功"); // 操作结果描述
return jo.toString();
}
}
/**
* 删除用户
*/
public String delUserInfo(String loginUsers) {
String lu = "";
if(loginUsers != null && !loginUsers.equals("")){
JSONObject joo = JSONObject.fromObject(loginUsers);
lu = (String) aes.decrypt(joo.getString("loginUsers"));
}
JSONObject jo = new JSONObject();
if (StringUtils.isNotEmpty(lu)) {
String[] accounts = lu.split(",");
String[] accountskey = new String[accounts.length];
// List<UserInfo> key= userMapper.getUserGroup(accounts);
// for(int i=0;i<key.size();i++){
// accountskey[i] = key.get(i).getUserKey();
// }
try {
userInfoDao.delUsers(String.valueOf(accounts));
} catch (SQLException e) {
e.printStackTrace();
}
// userGroupMapper.delUsersGroup(accountskey);
logger.info("删除用户成功");
jo.put("result", "0"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "删除用户成功"); // 操作结果描述
return jo.toString();
} else {
logger.info("账户不能为空");
jo.put("result", "1"); // 操作结果:0 成功、1 失败
jo.put("resultDesc", "账户不能为空"); // 操作结果描述
return jo.toString();
}
}
public int isUserExists(UserInfoVO userInfoVO) {
try {
return userInfoDao.isUserExists(userInfoVO);
} catch (SQLException e) {
e.printStackTrace();
}
return 0;
}
}
package com.hp.cmsz.commons.utils;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* AES方式加解密算法
* @author venus4A
*/
public class AES {
/**
* 由服务端提供给调用者的一个用于数据加密的共享密钥
*/
private String _publicKey = null;
/**
*
* @param publicKey AES密钥
*/
public AES() {
String publicKey = "jKV4GEAwBtcyehND";
_publicKey = publicKey;
}
public static final String KEY_ALGORITHM = "AES";
public static final String CIPHER_ALGORITHM = "AES/CTR/PKCS5Padding";
public static final String ivParameter = "1234567890abcdef";
/**
* 解密
* @param data
* @return
*/
public String decrypt(String data) {
try {
SecretKeySpec skeySpec = new SecretKeySpec(_publicKey.getBytes("ASCII"), KEY_ALGORITHM);
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
IvParameterSpec iv = new IvParameterSpec(ivParameter.getBytes());
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
byte[] encrypted1 = new BASE64Decoder().decodeBuffer(data);
byte[] original = cipher.doFinal(encrypted1);
String originalString = new String(original, "utf-8");
return originalString;
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
/**
* 加密
* @param data
* @return
*/
public String encrypt(String data) {
try {
IvParameterSpec iv = new IvParameterSpec(ivParameter.getBytes());
SecretKeySpec sKeySpec = new SecretKeySpec(_publicKey.getBytes(), KEY_ALGORITHM);
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
cipher.init(Cipher.ENCRYPT_MODE, sKeySpec, iv);
byte[] encrypted = cipher.doFinal(data.getBytes("utf-8"));
return new BASE64Encoder().encode(encrypted);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void main(String[] args) throws Exception {
//举例
String str = "111111";
AES aes = new AES();
str = aes.encrypt(str);
System.out.println("加密="+str);
str = aes.decrypt(str);
System.out.println("解密="+str);
}
}
......@@ -18,6 +18,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.hp.cmsz.commons.utils.*;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.shiro.SecurityUtils;
......@@ -30,16 +31,9 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.google.gson.Gson;
import com.hp.cmsz.commons.utils.Constant;
import com.hp.cmsz.commons.utils.DES;
import com.hp.cmsz.commons.utils.PropertiesUtil;
import com.hp.cmsz.commons.utils.TokenProcessor;
import com.hp.cmsz.entity.UserInfo;
import com.hp.cmsz.entity.XcdDetailInfoView;
import com.hp.cmsz.entity.XcdWarningInfoView;
......@@ -78,7 +72,7 @@ public class IndexController {
/*
* @RequestParam("username") String username,
*
*
* @RequestParam("password") String password,
*/
HttpServletRequest request, Map map) throws IOException {
......@@ -106,7 +100,7 @@ public class IndexController {
*
* }
*/
// map.put("loginState", "loginSuccess");
map.put("loginState", "loginSuccess");
UserInfo userinfo = (UserInfo) SecurityUtils.getSubject().getSession()
......@@ -117,25 +111,25 @@ public class IndexController {
}
// Add by Huach on 20140803 begin
return PageURLController.index;
// return nextUrl(request);
// return PageURLController.index;
return nextUrl(request);
// Add by Huach on 20140803 end
}
@RequestMapping(method = RequestMethod.POST)
public String fail(HttpServletRequest request,
// @RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String
// userName,
@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String
userName,
Model model, Map map) {
// model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM,
// userName);
// map.put("loginState", "loginFail");
model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM,
userName);
map.put("loginState", "loginFail");
// Add by Huach on 20140803 begin
return PageURLController.index;
// return PageURLController.index;
// return nextUrl(request);
return nextUrl(request);
// Add by Huach on 20140803 end
}
......@@ -349,8 +343,10 @@ public class IndexController {
.findUserInfoByLoginName(accountId);
String password = "";
try {
DES des = new DES();
password = des.decrypt(userinfo.getPassword());
AES aes = new AES();
password = aes.decrypt(userinfo.getPassword());
// DES des = new DES();20180509注释
// password = des.decrypt(userinfo.getPassword());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
......@@ -381,8 +377,9 @@ public class IndexController {
request.setAttribute(
FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME,
Constant.MUST_LOGIN_FROM_4A);
// prompt = "该系统已被4A平台接管,请通过4A平台登录!";
// 强制退出认证
String prompt = "";
prompt = "该系统已被4A平台接管,请通过4A平台登录!";
// 强制退出认证
request.getSession().setAttribute(
Constant.CURRENT_USER_SESSION, null);
return PageURLController.index;
......@@ -409,14 +406,14 @@ public class IndexController {
log.info("--4A Request IP is:" + IPof4a);
log.info("--Request IP is:" + remoteIP + " and query string is:"
+ queryString);
// if (IPof4a.equals(remoteIP)||(queryString!=null &&
// queryString.startsWith(Constant.PARAMETER_OF_4A_TOKEN) &&
// (queryString.split(Constant.SEPARATOR_OF_TOKEN)).length==4)) {
// return true;
// } else {
// return false;
// }
return true;
if (IPof4a.equals(remoteIP)||(queryString!=null &&
queryString.startsWith(Constant.PARAMETER_OF_4A_TOKEN) &&
(queryString.split(Constant.SEPARATOR_OF_TOKEN)).length==4)) {
return true;
} else {
return false;
}
// return true;
}
private boolean isAuthenticate(HttpServletRequest request) {
......
......@@ -39,13 +39,14 @@ public class FourAService {
log.info("---Show service list in ForAService begin---");
UserService userService=new UserServiceImpl();
List<UserInfoVO> userInfoVOs=userService.queryUserInfo("");
// List<UserInfoVO> userInfoVOs=userService.queryUserInfo("");
String userInfoVOs=userService.queryUserInfo("");
//List<UserInfo> userInfos=authorityManageService.getAllUserInfo();
for (UserInfoVO user:userInfoVOs)
{
log.info("---User:"+user);
}
// for (UserInfoVO user:userInfoVOs)
// {
// log.info("---User:"+user);
// }
log.info("---User:"+userInfoVOs);
return PageURLController.FOUR_A_SERVICE_LIST;
}
......
......@@ -4,8 +4,10 @@ linux_server_ip=localhost
4a.server.ip=172.16.8.121
4a.login.url=http://172.16.8.121:8080/venus4a/TicketloginAction.do?method=appLoginResult
4a.logout.url=http://172.16.8.121:8080/venus4a/TicketloginAction.do?method=appExit
4a.syslog.ip=172.16.8.117
4a.syslog.port=514
#4a.syslog.ip=172.16.8.117
4a.syslog.ip=192.168.117.75
#4a.syslog.port=514
4a.syslog.port=51455
local.ip.prefix=192.168
#set system parameters for 4A by huach on 20140802 end
#vertica database setting
......@@ -28,8 +30,8 @@ jdbc.database=ccolap
#jdbc.username=szcm
#jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver
jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
#jdbc.url=jdbc:vertica://192.168.127.58:5433/vertica_prd
#jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
jdbc.url=jdbc:vertica://192.168.127.58:5433/vertica_prd
jdbc.username=ccolap
jdbc.password=hg.2015
##test
......
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="disablePrettyXML" value="true"/>
<parameter name="adminPassword" value="admin"/>
<parameter name="attachments.Directory" value=""/>
<parameter name="dotNetSoapEncFix" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="sendXsiTypes" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<requestFlow>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
<!-- 4A用户信息同步接口 -->
<service name="UserService" provider="java:RPC">
<parameter name="className" value="com.cmsz.ws.UserService"/>
<parameter name="allowedMethods" value="queryUserInfo,addUserInfo,modifyUserInfo,modifyUserPwd,delUserInfo"/>
</service>
<!-- 4A工作组信息同步接口 -->
<service name="GroupService" provider="java:RPC">
<parameter name="className" value="com.cmsz.ws.GroupService"/>
<parameter name="allowedMethods" value="queryWorkGroup"/>
</service>
<!-- 4A部门同步接口 -->
<service name="DepartmentService" provider="java:RPC">
<parameter name="className" value="com.cmsz.ws.DepartmentService"/>
<parameter name="allowedMethods" value="queryDepartment"/>
</service>
<!-- 4A认证开关接口 -->
<service name="LoginSwitchService" provider="java:RPC">
<parameter name="className" value="com.cmsz.ws.LoginSwitchService"/>
<parameter name="allowedMethods" value="loginModChg"/>
</service>
</deployment>
\ No newline at end of file
......@@ -11,6 +11,7 @@
classpath*:/applicationContext.xml,
<!-- classpath*:/xfire-servlet.xml,
classpath:org/codehaus/xfire/spring/xfire.xml, -->
classpath*:/applicationContext-shiro.xml
</param-value>
</context-param>
......@@ -123,42 +124,53 @@
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- begin XFire 配置 -->
<!-- Commented by Huach on 20140725 begin
<!--&lt;!&ndash; begin XFire 配置 &ndash;&gt;-->
<!--&lt;!&ndash; Commented by Huach on 20140725 begin-->
<!--<servlet>-->
<!--<servlet-name>xfire</servlet-name>-->
<!--<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>-->
<!--</servlet>-->
<!--<servlet-mapping>-->
<!--<servlet-name>xfire</servlet-name>-->
<!--<url-pattern>*.ws</url-pattern>-->
<!--</servlet-mapping>-->
<!--&ndash;&gt;-->
<!--&lt;!&ndash; 配合Spring容器中XFire一起工作的Servlet &ndash;&gt;-->
<!--<servlet>-->
<!--<servlet-name>XFireServlet</servlet-name>-->
<!--<display-name>XFire Servlet</display-name>-->
<!--<servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class>-->
<!--&lt;!&ndash; <servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class> &ndash;&gt;-->
<!--<load-on-startup>2</load-on-startup> -->
<!--</servlet>-->
<!--<servlet-mapping>-->
<!--<servlet-name>XFireServlet</servlet-name>-->
<!--<url-pattern>/services/*</url-pattern>-->
<!--</servlet-mapping>-->
<!--&lt;!&ndash; -->
<!--<servlet>-->
<!--<servlet-name>xfireServlet</servlet-name>-->
<!--<servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class>-->
<!--</servlet>-->
<!--<servlet-mapping>-->
<!--<servlet-name>xfireServlet</servlet-name>-->
<!--<url-pattern>/services/*</url-pattern>-->
<!--</servlet-mapping> -->
<!--&ndash;&gt;-->
<!--&lt;!&ndash; end XFire 配置 &ndash;&gt;-->
<!-- begin AxisServlet 配置 -->
<servlet>
<servlet-name>xfire</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfire</servlet-name>
<url-pattern>*.ws</url-pattern>
</servlet-mapping>
-->
<!-- 配合Spring容器中XFire一起工作的Servlet -->
<servlet>
<servlet-name>XFireServlet</servlet-name>
<display-name>XFire Servlet</display-name>
<servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class>
<!-- <servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class> -->
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>XFireServlet</servlet-name>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<!--
<servlet>
<servlet-name>xfireServlet</servlet-name>
<servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfireServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
-->
<!-- end XFire 配置 -->
<!-- end AxisServlet 配置 -->
<session-config>
<session-timeout>20</session-timeout>
......
......@@ -4,8 +4,10 @@ linux_server_ip=localhost
4a.server.ip=172.16.8.121
4a.login.url=http://172.16.8.121:8080/venus4a/TicketloginAction.do?method=appLoginResult
4a.logout.url=http://172.16.8.121:8080/venus4a/TicketloginAction.do?method=appExit
4a.syslog.ip=172.16.8.117
4a.syslog.port=514
#4a.syslog.ip=172.16.8.117
4a.syslog.ip=192.168.117.75
#4a.syslog.port=514
4a.syslog.port=51455
local.ip.prefix=192.168
#set system parameters for 4A by huach on 20140802 end
#vertica database setting
......@@ -28,8 +30,8 @@ jdbc.database=ccolap
#jdbc.username=szcm
#jdbc.password=szcm
jdbc.driver=com.vertica.jdbc.Driver
jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
#jdbc.url=jdbc:vertica://192.168.127.58:5433/vertica_prd
#jdbc.url=jdbc:vertica://hg-computer:5433/cmsz_ccolap
jdbc.url=jdbc:vertica://192.168.127.58:5433/vertica_prd
jdbc.username=ccolap
jdbc.password=hg.2015
##test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment