初始化
commit
e5a54177d5
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="conf"/>
|
||||
<classpathentry kind="src" output="target/jjwms" path="src/webapp"/>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" output="target/jjwms" path="www/com.dev.swms.SWMS"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/acegisecurity/jars/acegi-security-0.8.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/gxt/jars/gwtext-2.0.5.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/telnetd/jars/telnetd-2.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/ognl/jars/ognl-2.6.5.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/hibernate/jars/hibernate-3.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/ehcache/jars/ehcache-1.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-nodep-2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/asm/jars/asm-2.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/antlr/jars/antlr-2.7.6rc1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.6.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/odmg/jars/odmg-3.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/xalan/jars/xalan-2.4.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-2m.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-2.0-rc3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jta/jars/jta-1.0.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/javamail/jars/mail-1.3.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jaf/jars/activation-1.0.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/gwt/jars/gwt-user-1.5.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/gwt/jars/gwt-servlet-1.5.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/opensaml/jars/opensaml-1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/xml-apis/jars/xml-apis-1.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/xmlsec/jars/xmlsec-20050514.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/xstream/jars/xstream-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/quartz/jars/quartz-1.5.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/mysql/jars/mysql-connector-java-5.0.3-bin.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/ojdbc/jars/ojdbc14-10.2.0.1.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/proxool/jars/proxool-0.8.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymock-1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servlet-api-2.4-20040521.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-cli/jars/commons-cli-1.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/mssql/jars/msbase-2000.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/mssql/jars/mssqlserver-2000.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/mssql/jars/msutil-2000.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/org.mortbay.jetty.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/org.mortbay.jmx.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/jasper-compiler.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/jasper-runtime.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/javax.servlet.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/low-server-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/report-center-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/telnet-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/web-client-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jxl/jars/jxl-2.6.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-dep-1.3.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/struts-menu/jars/struts-menu-2.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/htmlparser/jars/htmlparser-1.5.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/jaxen/jars/jaxen-1.1-beta-5.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/eclipse/jars/jdt-compiler-3.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/http/jars/httpclient-4.2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/http/jars/httpcore-4.2.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/pdfbox/jars/pdfbox-2.0.12.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/pdfbox/jars/fontbox-2.0.12.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/pdfbox/jars/itextpdf-5.5.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/json-lib-2.1-jdk15.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/json-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/ezmorph-1.0.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/high-server-1.1.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.5.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-jdbc-4.3.3.RELEASE.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-web-1.2.6.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-web-4.1.5.RELEASE.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-context-4.1.5.RELEASE.jar"/>
|
||||
<classpathentry kind="lib" path="pager-taglib-2.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/pinyin/jars/pinyin4j-2.5.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/fastjson-1.2.7.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/json-simple-1.1.1.jar"/>
|
||||
<classpathentry kind="output" path="target/jjwms/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>jjwms</name>
|
||||
<comment>使用energy框架的E-LOG Enterprise WMS</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#Thu May 14 13:42:18 CST 2015
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@echo off
|
||||
java -Xmx512M -cp "%~dp0\src\main\java;%~dp0\target\wms\WEB-INF\classes;%~dp0\..\web_client\src;%~dp0\..\web_client\target\classes;%~dp0\..\report_center\src\main\java;%~dp0\..\report_center\target\classes;%MAVEN_REPO%\gwt\jars\gwt-user-1.5.3.jar;%MAVEN_REPO%\gwt\jars\gwt-dev-windows-1.5.3.jar;%MAVEN_REPO%\gxt\jars\gwtext-2.0.5.jar;" com.google.gwt.dev.GWTCompiler -out "%~dp0\www" %* com.dev.swms.SWMS
|
||||
if ERRORLEVEL 1 goto error
|
||||
if ERRORLEVEL 0 goto exit
|
||||
:error
|
||||
pause
|
||||
:exit
|
||||
Binary file not shown.
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
|
||||
#
|
||||
# This software is the confidential and proprietary information of dev
|
||||
# Information Technology Co.,Ltd. ("Confidential Information"). You shall not
|
||||
# disclose such Confidential Information and shall use it only in
|
||||
# accordance with the terms of the license agreement you entered into
|
||||
# with dev.
|
||||
#
|
||||
# dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
# SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
# PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
# SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
# THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
#
|
||||
# $Id: project.properties,v 1.2 2010/06/01 09:21:36 peng.lei Exp $
|
||||
|
||||
maven.compile.target=1.5
|
||||
maven.compile.source=1.5
|
||||
|
||||
maven.docs.outputencoding=UTF-8
|
||||
|
||||
maven.javadoc.links=\
|
||||
http://java.sun.com/j2se/1.5/docs/api/
|
||||
|
||||
maven.license.licenseFile=${basedir}/../LICENSE.txt
|
||||
|
||||
maven.compile.encoding=UTF-8
|
||||
|
|
@ -0,0 +1,781 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<project>
|
||||
<pomVersion>1</pomVersion>
|
||||
<id>jjwms</id>
|
||||
<name>jjwms</name>
|
||||
<currentVersion>1.1.1</currentVersion>
|
||||
<groupId>e2wms</groupId>
|
||||
<package>com.dev.${pom.artifactId}</package>
|
||||
|
||||
<organization>
|
||||
<name>dev Information Technology Co., Ltd.</name>
|
||||
<url>http://www.dev.com/</url>
|
||||
<logo>/images/dev-logo.gif</logo>
|
||||
</organization>
|
||||
<inceptionYear>2006</inceptionYear>
|
||||
|
||||
<description><![CDATA[
|
||||
使用energy框架的E-LOG Enterprise WMS
|
||||
]]></description>
|
||||
<shortDescription>E-LOG Enterprise WMS</shortDescription>
|
||||
|
||||
<siteAddress>dev.net</siteAddress>
|
||||
<url>http://${pom.artifactId}.${pom.siteAddress}/</url>
|
||||
<siteDirectory>/www/develop/${pom.artifactId}</siteDirectory>
|
||||
<distributionSite>${pom.siteAddress}</distributionSite>
|
||||
<distributionDirectory>/www/repository</distributionDirectory>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The dev Software License</name>
|
||||
<url>http://scm.${pom.siteAddress}/viewcvs.cgi/*checkout*/${pom.artifactId}/LICENSE.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anonymous@scm.${pom.siteAddress}:/home/cvsroot:${pom.artifactId}</connection>
|
||||
<developerConnection>scm:cvs:ext:${maven.username}@scm.${pom.siteAddress}:/home/cvsroot:${pom.artifactId}</developerConnection>
|
||||
<url>http://scm.${pom.siteAddress}/viewcvs.cgi/${pom.artifactId}/</url>
|
||||
</repository>
|
||||
|
||||
<versions>
|
||||
</versions>
|
||||
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>${pom.artifactId} Commit List</name>
|
||||
<subscribe>${pom.artifactId}-commit-subscribe@${pom.siteAddress}</subscribe>
|
||||
<unsubscribe>${pom.artifactId}-commit-unsubscribe@${pom.siteAddress}</unsubscribe>
|
||||
<archive>http://list.${pom.siteAddress}/pipermail/${pom.artifactId}-commit/</archive>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
|
||||
<developers>
|
||||
</developers>
|
||||
|
||||
<dependencies>
|
||||
<!-- acegi -->
|
||||
<dependency>
|
||||
<groupId>acegisecurity</groupId>
|
||||
<artifactId>acegi-security</artifactId>
|
||||
<version>0.8.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://acegisecurity.sourceforge.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<!-- energy -->
|
||||
<dependency>
|
||||
<groupId>web</groupId>
|
||||
<artifactId>low-server</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://energy.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>web</groupId>
|
||||
<artifactId>report-center</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://energy.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>web</groupId>
|
||||
<artifactId>high-server</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://energy.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>web</groupId>
|
||||
<artifactId>web-client</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://energy.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>web</groupId>
|
||||
<artifactId>telnet</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://energy.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gxt</groupId>
|
||||
<artifactId>gwtext</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/gxt/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>telnetd</groupId>
|
||||
<artifactId>telnetd</artifactId>
|
||||
<version>2.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/telnetd/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ognl</groupId>
|
||||
<artifactId>ognl</artifactId>
|
||||
<version>2.6.5</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.ognl.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<!-- logging -->
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/logging/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.12</version>
|
||||
<type>jar</type>
|
||||
<url>http://logging.apache.org/log4j/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- hibernate -->
|
||||
<dependency>
|
||||
<groupId>hibernate</groupId>
|
||||
<artifactId>hibernate</artifactId>
|
||||
<version>3.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.hibernate.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
<type>jar</type>
|
||||
<url>http://ehcache.sourceforge.net/</url>
|
||||
<version>1.2</version>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib</artifactId>
|
||||
<version>nodep-2.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://cglib.sourceforge.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>2.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://asm.objectweb.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>antlr</groupId>
|
||||
<artifactId>antlr</artifactId>
|
||||
<version>2.7.6rc1</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.antlr.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/collections/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://dom4j.sourceforge.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>odmg</groupId>
|
||||
<artifactId>odmg</artifactId>
|
||||
<version>3.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.odmg.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://xml.apache.org/xalan-j/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- spring -->
|
||||
<dependency>
|
||||
<groupId>springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
<version>2m</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.springframework.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>springframework</groupId>
|
||||
<artifactId>spring-mock</artifactId>
|
||||
<version>2.0-rc3</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.springframework.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jta</groupId>
|
||||
<artifactId>jta</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/jta/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javamail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/javamail/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jaf</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/javabeans/jaf/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/javabeans/jaf/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
<version>1.5.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/javabeans/jaf/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/codec/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/commons-httpclient/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>http</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.2.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/javabeans/jaf/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/fileupload/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-digester</groupId>
|
||||
<artifactId>commons-digester</artifactId>
|
||||
<version>1.7</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/digester/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- efirsta -->
|
||||
<dependency>
|
||||
<groupId>opensaml</groupId>
|
||||
<artifactId>opensaml</artifactId>
|
||||
<version>1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/opensaml/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/xml-apis/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xmlsec</groupId>
|
||||
<artifactId>xmlsec</artifactId>
|
||||
<version>20050514</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/xmlsec/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- dbcp -->
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/dbcp/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-pool</groupId>
|
||||
<artifactId>commons-pool</artifactId>
|
||||
<version>1.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/pool/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<!-- others -->
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/lang/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/beanutils/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://xstream.codehaus.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dbunit</groupId>
|
||||
<artifactId>dbunit</artifactId>
|
||||
<version>2.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.dbunit.org/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>quartz</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
<version>1.5.2</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.ibiblio.org/maven/quartz/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- jdbc -->
|
||||
<dependency>
|
||||
<groupId>hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>1.8.0.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://hsqldb.sourceforge.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.0.3-bin</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.mysql.com/products/connector/j/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ojdbc</groupId>
|
||||
<artifactId>ojdbc14</artifactId>
|
||||
<version>10.2.0.1.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>proxool</groupId>
|
||||
<artifactId>proxool</artifactId>
|
||||
<version>0.8.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://proxool.sourceforge.net/</url>
|
||||
</dependency>
|
||||
|
||||
<!-- unittest -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.junit.org/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.easymock.org/</url>
|
||||
</dependency>
|
||||
|
||||
<!-- buildtime -->
|
||||
<dependency>
|
||||
<groupId>servletapi</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.4-20040521</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/servlet</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
<version>1.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/commons/cli/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- mssql -->
|
||||
<dependency>
|
||||
<groupId>mssql</groupId>
|
||||
<artifactId>msbase</artifactId>
|
||||
<version>2000</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/mssql/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mssql</groupId>
|
||||
<artifactId>mssqlserver</artifactId>
|
||||
<version>2000</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/mssql/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mssql</groupId>
|
||||
<artifactId>msutil</artifactId>
|
||||
<version>2000</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/mssql/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>5.1.10</version>
|
||||
<jar>org.mortbay.jetty.jar</jar>
|
||||
<type>jar</type>
|
||||
<url>http://jetty.dev.dtdns.net/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>jmx</artifactId>
|
||||
<version>5.1.10</version>
|
||||
<jar>org.mortbay.jmx.jar</jar>
|
||||
<type>jar</type>
|
||||
<url>http://jetty.dev.dtdns.net/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>jasper-compiler</artifactId>
|
||||
<jar>jasper-compiler.jar</jar>
|
||||
<type>jar</type>
|
||||
<url>http://jetty.dev.dtdns.net/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>jasper-runtime</artifactId>
|
||||
<jar>jasper-runtime.jar</jar>
|
||||
<type>jar</type>
|
||||
<url>http://jetty.dev.dtdns.net/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
<jar>javax.servlet.jar</jar>
|
||||
<type>jar</type>
|
||||
<url>http://jetty.dev.dtdns.net/</url>
|
||||
</dependency>
|
||||
<!-- energy-telnet needs -->
|
||||
<dependency>
|
||||
<groupId>velocity</groupId>
|
||||
<artifactId>velocity-dep</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/velocity/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>struts-menu</groupId>
|
||||
<artifactId>struts-menu</artifactId>
|
||||
<version>2.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://struts-menu.sourceforge.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>htmlparser</groupId>
|
||||
<artifactId>htmlparser</artifactId>
|
||||
<version>1.5</version>
|
||||
<type>jar</type>
|
||||
<url>http://htmlparser.sourceforge.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jxl</groupId>
|
||||
<artifactId>jxl</artifactId>
|
||||
<version>2.6</version>
|
||||
<type>jar</type>
|
||||
<url>http://energy.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<!-- jaxen -->
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>1.1-beta-5</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/jaxen/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>eclipse</groupId>
|
||||
<artifactId>jdt-compiler</artifactId>
|
||||
<version>3.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://eclipse.org/jdt/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<nagEmailAddress>${pom.artifactId}-commit@${pom.siteAddress}</nagEmailAddress>
|
||||
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<!-- J A R R E S O U R C E S -->
|
||||
<!-- Resources that are packaged up inside the JAR file -->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${pom.build.sourceDirectory}</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.html</include>
|
||||
<include>**/*.css</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${pom.build.sourceDirectory}/../resource</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<!-- Unit test classes -->
|
||||
<!-- <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
|
||||
<unitTest>
|
||||
<includes>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${pom.build.unitTestSourceDirectory}</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/webapp/WEB-INF/classes</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/test/data</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.dat</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</unitTest> -->
|
||||
</build>
|
||||
|
||||
<reports>
|
||||
<report>maven-changelog-plugin</report>
|
||||
<report>maven-developer-activity-plugin</report>
|
||||
<report>maven-file-activity-plugin</report>
|
||||
<report>maven-checkstyle-plugin</report>
|
||||
<report>maven-pmd-plugin</report>
|
||||
<report>maven-simian-plugin</report>
|
||||
<report>maven-jdepend-plugin</report>
|
||||
<report>maven-junit-report-plugin</report>
|
||||
<report>maven-license-plugin</report>
|
||||
<report>maven-javadoc-plugin</report>
|
||||
<report>maven-jxr-plugin</report>
|
||||
<report>maven-tasklist-plugin</report>
|
||||
<report>maven-changes-plugin</report>
|
||||
<report>maven-faq-plugin</report>
|
||||
</reports>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
import org.mortbay.http.SocketListener;
|
||||
import org.mortbay.jetty.Server;
|
||||
|
||||
public class AjaxJettyLauncher {
|
||||
protected int port = 8088;
|
||||
protected String contextName = "jjwms";
|
||||
protected String deployPath = "";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
AjaxJettyLauncher jl = new AjaxJettyLauncher();
|
||||
jl.init();
|
||||
jl.run();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
}
|
||||
|
||||
protected void run() throws Exception {
|
||||
Server server = new Server();
|
||||
SocketListener listener = new SocketListener();
|
||||
listener.setPort(getPort()); server.addListener(listener);
|
||||
server.addWebApplication("/" + getContextName() , getDeployPath());
|
||||
server.start();
|
||||
}
|
||||
|
||||
protected int getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
protected String getContextName() {
|
||||
return contextName;
|
||||
|
||||
}
|
||||
|
||||
protected String getDeployPath() {
|
||||
if (deployPath.length() == 0) {
|
||||
deployPath = "./target/" + contextName + "/";
|
||||
}
|
||||
return deployPath;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import com.dev.kangaroo.context.ContextLoader;
|
||||
|
||||
public class TelnetLuncher {
|
||||
private ContextLoader contextLoader;
|
||||
private String locatorFactorySelector = "classpath:telnet-beanRefContext.xml";
|
||||
private String parentContextKey = "com.dev.telnet";
|
||||
|
||||
public String getLocatorFactorySelector() {
|
||||
return locatorFactorySelector;
|
||||
}
|
||||
public void setLocatorFactorySelector(String locatorFactorySelector) {
|
||||
this.locatorFactorySelector = locatorFactorySelector;
|
||||
}
|
||||
public String getParentContextKey() {
|
||||
return parentContextKey;
|
||||
}
|
||||
public void setParentContextKey(String parentContextKey) {
|
||||
this.parentContextKey = parentContextKey;
|
||||
}
|
||||
public static void main(String[] args){
|
||||
TelnetLuncher luncher = new TelnetLuncher();
|
||||
luncher.startServer();
|
||||
}
|
||||
public void startServer(){
|
||||
this.contextLoader = new ContextLoader();
|
||||
this.contextLoader.setLocatorFactorySelector(locatorFactorySelector);
|
||||
this.contextLoader.setParentContextKey(parentContextKey);
|
||||
this.contextLoader.createApplicationContext();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC
|
||||
"-//SPRING//DTD BEAN//EN"
|
||||
"http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<!--
|
||||
Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
|
||||
|
||||
This software is the confidential and proprietary information of dev
|
||||
Information Technology Co.,Ltd. ("Confidential Information"). You shall not
|
||||
disclose such Confidential Information and shall use it only in
|
||||
accordance with the terms of the license agreement you entered into
|
||||
with dev.
|
||||
|
||||
dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
-->
|
||||
<!-- $Id: actionContext.xml,v 1.2 2010/06/01 09:14:16 peng.lei Exp $ -->
|
||||
|
||||
<beans>
|
||||
<bean id="warehouseHolderAction" class="com.dev.swms.server.action.WarehouseHolderAction" singleton="false"/>
|
||||
|
||||
<bean id="pickingAllocateAction" class="com.dev.swms.server.action.PickingAllocateAction" singleton="true">
|
||||
<constructor-arg index="0">
|
||||
<ref bean="pickTicketManager"/>
|
||||
</constructor-arg>
|
||||
<constructor-arg index="1">
|
||||
<ref bean="waveDocManager"/>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC
|
||||
"-//SPRING//DTD BEAN//EN"
|
||||
"http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<!--
|
||||
Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
|
||||
|
||||
This software is the confidential and proprietary information of dev
|
||||
Information Technology Co.,Ltd. ("Confidential Information"). You shall not
|
||||
disclose such Confidential Information and shall use it only in
|
||||
accordance with the terms of the license agreement you entered into
|
||||
with dev.
|
||||
|
||||
dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
-->
|
||||
<!-- $Id: adapterContext.xml,v 1.2 2010/06/01 09:14:16 peng.lei Exp $ -->
|
||||
<beans>
|
||||
<!-- 自动调度任务清单 -->
|
||||
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
|
||||
<property name="triggers">
|
||||
<list>
|
||||
<!-- <ref bean="daemonStorageDailyComputeCronTrigger"/> -->
|
||||
<!-- <ref bean="inventoryCountCronTrigger"/> -->
|
||||
<!-- <ref bean="batchSendLogsTrigger"/> -->
|
||||
<!-- <ref bean="dealReceivedLogsTrigger"/> -->
|
||||
<!-- <ref bean="itemTrigger"/> -->
|
||||
<!-- <ref bean="addressTrigger"/> -->
|
||||
<!-- <ref bean="unitTrigger"/> -->
|
||||
|
||||
<!-- <ref bean="outReturnTrigger"/> -->
|
||||
|
||||
<!-- <ref bean="returnTrigger"/> -->
|
||||
<!-- <ref bean="projectTrigger"/> -->
|
||||
<!-- <ref bean="warehouseTrigger"/> -->
|
||||
|
||||
<!-- <ref bean="diaryTrigger"/> -->
|
||||
<!-- <ref bean="getWmsItemTrigger"/> -->
|
||||
<!-- <ref bean="outTrigger"/> -->
|
||||
<!-- <ref bean="downloadTrigger"/> -->
|
||||
<!-- <ref bean="purchaseTrigger"/> -->
|
||||
<!-- <ref bean="getWmsPickTicketTrigger"/> -->
|
||||
<!-- <ref bean="getWmsAsnTrigger"/> -->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 定时调度计算每日进出存数据 -->
|
||||
<bean id="daemonStorageDailyComputeJob"
|
||||
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject">
|
||||
<ref bean="inventoryManager"/>
|
||||
</property>
|
||||
<property name="targetMethod">
|
||||
<value>compute</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="daemonStorageDailyComputeCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<ref local="daemonStorageDailyComputeJob"/>
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>0 00 1 * * ?</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 定时调度计算库存积数 -->
|
||||
<bean id="inventoryCountComputeJob"
|
||||
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject">
|
||||
<ref bean="inventoryCountManager"/>
|
||||
</property>
|
||||
<property name="targetMethod">
|
||||
<value>countInventoty</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="inventoryCountCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<ref local="inventoryCountComputeJob"/>
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>00 00 23 * * ?</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--定时发送READY状态的log消息-->
|
||||
<bean id="batchSendLogsTrigger"
|
||||
class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="batchSendLogsJob"/>
|
||||
<property name="startDelay" value="10000"/>
|
||||
<property name="repeatInterval" value="1000"/>
|
||||
<property name="repeatCount" value="0"/>
|
||||
</bean>
|
||||
<bean id="batchSendLogsJob"
|
||||
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="adapterLauncher"/>
|
||||
<property name="targetMethod" value="batchSendLogs"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理接收到的log消息 -->
|
||||
<bean id="dealReceivedLogsTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="dealReceivedLogsJob"/>
|
||||
<property name="startDelay" value="10000"/>
|
||||
<property name="repeatInterval" value="1000"/>
|
||||
<property name="repeatCount" value="0"/>
|
||||
</bean>
|
||||
<bean id="dealReceivedLogsJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="adapterLauncher"/>
|
||||
<property name="targetMethod" value="dealReceivedLogs"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Item品项信息 -->
|
||||
<bean id="itemTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="itemJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="itemJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealItem"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Address地址信息 -->
|
||||
<bean id="addressTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="addressJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="addressJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealAddress"/>
|
||||
</bean>
|
||||
<!-- 定时处理王品对接Unit单位信息 -->
|
||||
<bean id="unitTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="unitJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="unitJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealUnit"/>
|
||||
</bean>
|
||||
<!-- 定时处理王品对接Out销售信息 -->
|
||||
<bean id="outTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="outJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/30 8-18 * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="outJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealOut"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接OutReturn销售退货信息 -->
|
||||
<bean id="outReturnTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="outReturnJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="outReturnJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealOutReturn"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Purchase采购信息 -->
|
||||
<bean id="purchaseTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="purchaseJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/30 8-18 * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="purchaseJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealPurchase"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Return采购退货信息 -->
|
||||
<bean id="returnTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="returnJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="returnJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealReturn"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Project项目信息 -->
|
||||
<bean id="projectTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="projectJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="projectJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealProject"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Warehouse仓库信息 -->
|
||||
<bean id="warehouseTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="warehouseJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="warehouseJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealWarehouse"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Download下载信息 -->
|
||||
<bean id="downloadTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="downloadJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 30 23 * * ? </value>
|
||||
<!-- <value>0 0/1 * * * ? </value> -->
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="downloadJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealDownload"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接Diary日记账信息 -->
|
||||
<bean id="diaryTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="diaryJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="diaryJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="itemJobLauncher"/>
|
||||
<property name="targetMethod" value="dealDiary"/>
|
||||
</bean>
|
||||
<!-- 定时处理王品对接货品信息 -->
|
||||
<bean id="getWmsItemTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="getWmsItemJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/5 * * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="getWmsItemJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="interfaceItemManager"/>
|
||||
<property name="targetMethod" value="getWmsItem"/>
|
||||
</bean>
|
||||
<!-- 定时处理王品对接出库单信息 -->
|
||||
<bean id="getWmsPickTicketTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="getWmsPickTicketJob"/>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/30 8-18 * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="getWmsPickTicketJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="interfaceItemManager"/>
|
||||
<property name="targetMethod" value="getWmsPickTicket"/>
|
||||
</bean>
|
||||
|
||||
<!-- 定时处理王品对接入库单信息 -->
|
||||
<bean id="getWmsAsnTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail" ref="getWmsAsnJob"/>
|
||||
<property name="cronExpression">
|
||||
<value> 0 0/30 8-18 * * ? </value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="getWmsAsnJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="interfaceItemManager"/>
|
||||
<property name="targetMethod" value="getWmsAsn"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,390 @@
|
|||
package com.dev.energy.server.model.security;
|
||||
|
||||
import com.dev.energy.server.model.Entity;
|
||||
import com.dev.energy.server.model.IUser;
|
||||
import com.dev.energy.server.model.security.Group;
|
||||
import com.dev.energy.server.model.security.Role;
|
||||
import com.dev.energy.server.model.welcomepage.WelcomePage;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
public class User extends Entity implements IUser {
|
||||
|
||||
private static final long serialVersionUID = 92093521336156558L;
|
||||
private String loginName;
|
||||
private String name;
|
||||
private String password;
|
||||
private String email;
|
||||
//性别 所属部门 职务 电话
|
||||
private String sex;
|
||||
private String department;
|
||||
private String job;
|
||||
private String tel;
|
||||
private String remark;
|
||||
private boolean enabled = true;
|
||||
private boolean locked;
|
||||
private Locale locale = Locale.getDefault();
|
||||
private Date expiryDate;
|
||||
private Date passwordExpiryDate;
|
||||
protected String referenceModel;
|
||||
private Set<Group> groups = new HashSet<Group>();
|
||||
private Set roles = new HashSet();
|
||||
protected String strExtend1;
|
||||
protected String strExtend2;
|
||||
protected String strExtend3;
|
||||
protected String strExtend4;
|
||||
protected String strExtend5;
|
||||
protected Long longExtend1;
|
||||
protected Long longExtend2;
|
||||
protected Long longExtend3;
|
||||
private WelcomePage firstPage;
|
||||
private Boolean isTms;
|
||||
private Boolean isWms;
|
||||
private Boolean isPortal;
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getDepartment() {
|
||||
return department;
|
||||
}
|
||||
|
||||
public void setDepartment(String department) {
|
||||
this.department = department;
|
||||
}
|
||||
|
||||
public String getJob() {
|
||||
return job;
|
||||
}
|
||||
|
||||
public void setJob(String job) {
|
||||
this.job = job;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public WelcomePage getFirstPage() {
|
||||
return this.firstPage;
|
||||
}
|
||||
|
||||
public void setFirstPage(WelcomePage firstPage) {
|
||||
this.firstPage = firstPage;
|
||||
}
|
||||
|
||||
public User() {
|
||||
this.isTms = Boolean.FALSE;
|
||||
this.isWms = Boolean.FALSE;
|
||||
this.isPortal = Boolean.FALSE;
|
||||
}
|
||||
|
||||
public User(String loginName, String name, String password, boolean enabled, boolean locked) {
|
||||
this.isTms = Boolean.FALSE;
|
||||
this.isWms = Boolean.FALSE;
|
||||
this.isPortal = Boolean.FALSE;
|
||||
this.loginName = loginName;
|
||||
this.name = name;
|
||||
this.password = password;
|
||||
this.enabled = enabled;
|
||||
this.locked = locked;
|
||||
}
|
||||
|
||||
public void changePassword(String newPassword) {
|
||||
this.setPassword(newPassword);
|
||||
}
|
||||
|
||||
public void enable() {
|
||||
this.setEnabled(true);
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
public void lock() {
|
||||
this.setLocked(true);
|
||||
}
|
||||
|
||||
public void unlock() {
|
||||
this.setLocked(false);
|
||||
}
|
||||
|
||||
public boolean isAccountNonExpired() {
|
||||
return this.getExpiryDate() == null || this.getExpiryDate().compareTo(new Date()) > 0;
|
||||
}
|
||||
|
||||
public boolean isCredentialsNonExpired() {
|
||||
return this.getExpiryDate() == null || this.getPasswordExpiryDate().compareTo(new Date()) > 0;
|
||||
}
|
||||
|
||||
public String getLoginName() {
|
||||
return this.loginName;
|
||||
}
|
||||
|
||||
public void setLoginName(String loginName) {
|
||||
this.loginName = loginName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return this.password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public boolean isLocked() {
|
||||
return this.locked;
|
||||
}
|
||||
|
||||
public void setLocked(boolean locked) {
|
||||
this.locked = locked;
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
return this.locale;
|
||||
}
|
||||
|
||||
public void setLocale(Locale locale) {
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
public Date getExpiryDate() {
|
||||
return this.expiryDate;
|
||||
}
|
||||
|
||||
public void setExpiryDate(Date expiryDate) {
|
||||
this.expiryDate = expiryDate;
|
||||
}
|
||||
|
||||
public Date getPasswordExpiryDate() {
|
||||
return this.passwordExpiryDate;
|
||||
}
|
||||
|
||||
public void setPasswordExpiryDate(Date passwordExpiryDate) {
|
||||
this.passwordExpiryDate = passwordExpiryDate;
|
||||
}
|
||||
|
||||
public Set<Group> getGroups() {
|
||||
return this.groups;
|
||||
}
|
||||
|
||||
public void setGroups(Set groups) {
|
||||
this.groups = groups;
|
||||
}
|
||||
|
||||
public String getReferenceModel() {
|
||||
return this.referenceModel;
|
||||
}
|
||||
|
||||
public void setReferenceModel(String referenceModel) {
|
||||
this.referenceModel = referenceModel;
|
||||
}
|
||||
|
||||
public Long getLongExtend1() {
|
||||
return this.longExtend1;
|
||||
}
|
||||
|
||||
public void setLongExtend1(Long longExtend1) {
|
||||
this.longExtend1 = longExtend1;
|
||||
}
|
||||
|
||||
public Long getLongExtend2() {
|
||||
return this.longExtend2;
|
||||
}
|
||||
|
||||
public void setLongExtend2(Long longExtend2) {
|
||||
this.longExtend2 = longExtend2;
|
||||
}
|
||||
|
||||
public Long getLongExtend3() {
|
||||
return this.longExtend3;
|
||||
}
|
||||
|
||||
public void setLongExtend3(Long longExtend3) {
|
||||
this.longExtend3 = longExtend3;
|
||||
}
|
||||
|
||||
public String getStrExtend1() {
|
||||
return this.strExtend1;
|
||||
}
|
||||
|
||||
public void setStrExtend1(String strExtend1) {
|
||||
this.strExtend1 = strExtend1;
|
||||
}
|
||||
|
||||
public String getStrExtend2() {
|
||||
return this.strExtend2;
|
||||
}
|
||||
|
||||
public void setStrExtend2(String strExtend2) {
|
||||
this.strExtend2 = strExtend2;
|
||||
}
|
||||
|
||||
public String getStrExtend3() {
|
||||
return this.strExtend3;
|
||||
}
|
||||
|
||||
public void setStrExtend3(String strExtend3) {
|
||||
this.strExtend3 = strExtend3;
|
||||
}
|
||||
|
||||
public String getStrExtend4() {
|
||||
return this.strExtend4;
|
||||
}
|
||||
|
||||
public void setStrExtend4(String strExtend4) {
|
||||
this.strExtend4 = strExtend4;
|
||||
}
|
||||
|
||||
public String getStrExtend5() {
|
||||
return this.strExtend5;
|
||||
}
|
||||
|
||||
public void setStrExtend5(String strExtend5) {
|
||||
this.strExtend5 = strExtend5;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if(this == o) {
|
||||
return true;
|
||||
} else if(!(o instanceof User)) {
|
||||
return false;
|
||||
} else {
|
||||
User user = (User)o;
|
||||
return this.loginName.equals(user.loginName);
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.loginName.hashCode();
|
||||
}
|
||||
|
||||
public Set getRoles() {
|
||||
return this.roles;
|
||||
}
|
||||
|
||||
public boolean isAdmin() {
|
||||
HashSet roles = new HashSet(this.getRoles());
|
||||
Iterator var3 = this.getGroups().iterator();
|
||||
|
||||
while(var3.hasNext()) {
|
||||
Group role = (Group)var3.next();
|
||||
roles.addAll(role.getRoles());
|
||||
}
|
||||
|
||||
var3 = roles.iterator();
|
||||
|
||||
Role role1;
|
||||
do {
|
||||
if(!var3.hasNext()) {
|
||||
return this.loginName.equalsIgnoreCase("admin");
|
||||
}
|
||||
|
||||
role1 = (Role)var3.next();
|
||||
} while(!role1.equals(Role.SUPERVISOR) && !role1.isAdvanced());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setRoles(Set roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public void addRole(Role role) {
|
||||
if(this.roles == null) {
|
||||
this.roles = new HashSet();
|
||||
}
|
||||
|
||||
this.roles.add(role);
|
||||
}
|
||||
|
||||
public void addGroup(Group group) {
|
||||
if(this.groups == null) {
|
||||
this.groups = new HashSet();
|
||||
}
|
||||
|
||||
this.groups.add(group);
|
||||
}
|
||||
|
||||
public void removeRole(Role role) {
|
||||
if(this.roles != null) {
|
||||
this.roles.remove(role);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeGroup(Group group) {
|
||||
if(this.groups != null) {
|
||||
this.groups.remove(group);
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean getIsTms() {
|
||||
return this.isTms;
|
||||
}
|
||||
|
||||
public void setIsTms(Boolean isTms) {
|
||||
this.isTms = isTms;
|
||||
}
|
||||
|
||||
public Boolean getIsWms() {
|
||||
return this.isWms;
|
||||
}
|
||||
|
||||
public void setIsWms(Boolean isWms) {
|
||||
this.isWms = isWms;
|
||||
}
|
||||
|
||||
public Boolean getIsPortal() {
|
||||
return this.isPortal;
|
||||
}
|
||||
|
||||
public void setIsPortal(Boolean isPortal) {
|
||||
this.isPortal = isPortal;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<!--
|
||||
Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
|
||||
|
||||
This software is the confidential and proprietary information of dev
|
||||
Information Technology Co.,Ltd. ("Confidential Information"). You shall not
|
||||
disclose such Confidential Information and shall use it only in
|
||||
accordance with the terms of the license agreement you entered into
|
||||
with dev.
|
||||
|
||||
dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
-->
|
||||
<!-- $Id: user.hbm.xml,v 1.1.1.1 2011/06/11 08:49:57 Administrator Exp $ -->
|
||||
|
||||
<hibernate-mapping>
|
||||
<class name="com.dev.energy.server.model.security.User" table="USERS">
|
||||
<cache usage="nonstrict-read-write"/>
|
||||
<id name="id" column="ID" type="long">
|
||||
<generator class="native">
|
||||
<param name="sequence">seq_user</param>
|
||||
<param name="parameters">START WITH 200000</param>
|
||||
</generator>
|
||||
</id>
|
||||
<discriminator column="DISCRIMINATOR" type="string"/>
|
||||
<property name="loginName" type="string">
|
||||
<column name="LOGIN_NAME" not-null="true" unique-key="UK_USERS" length="50"/>
|
||||
</property>
|
||||
<property name="name" type="string">
|
||||
<column name="NAME" not-null="true" length="20"/>
|
||||
</property>
|
||||
<property name="password" type="string">
|
||||
<column name="PASSWORD" not-null="true" length="100"/>
|
||||
</property>
|
||||
<property name="email" type="string">
|
||||
<column name="EMAIL" length="100"/>
|
||||
</property>
|
||||
<property name="sex" type="string">
|
||||
<column name="sex" length="100"/>
|
||||
</property>
|
||||
<property name="job" type="string">
|
||||
<column name="job" length="100"/>
|
||||
</property>
|
||||
<property name="tel" type="string">
|
||||
<column name="tel" length="100"/>
|
||||
</property>
|
||||
<property name="remark" type="string">
|
||||
<column name="remark" length="100"/>
|
||||
</property>
|
||||
<property name="department" type="string">
|
||||
<column name="department" length="100"/>
|
||||
</property>
|
||||
<property name="enabled" type="true_false">
|
||||
<column name="ENABLED" not-null="true"/>
|
||||
</property>
|
||||
<property name="locked" type="true_false">
|
||||
<column name="LOCKED" not-null="true"/>
|
||||
</property>
|
||||
<property name="locale" type="locale">
|
||||
<column name="LOCALE" length="50" not-null="true"/>
|
||||
</property>
|
||||
<property name="expiryDate" column="EXPIRY_DATE" type="date"/>
|
||||
<property name="passwordExpiryDate" column="PASSWORD_EXPIRY_DATE" type="date"/>
|
||||
<property name="referenceModel" type="string">
|
||||
<column name="REF_MODEL" length="255"/>
|
||||
</property>
|
||||
<property name="longExtend1" column="LONG_EXTEND1" type="long"/>
|
||||
<property name="longExtend2" column="LONG_EXTEND2" type="long"/>
|
||||
<property name="longExtend3" column="LONG_EXTEND3" type="long"/>
|
||||
<property name="strExtend1" column="STR_EXTEND1" type="string" length="255"/>
|
||||
<property name="strExtend2" column="STR_EXTEND2" type="string" length="255"/>
|
||||
<property name="strExtend3" column="STR_EXTEND3" type="string" length="255"/>
|
||||
<property name="strExtend4" column="STR_EXTEND4" type="string" length="255"/>
|
||||
<property name="strExtend5" column="STR_EXTEND5" type="string" length="255"/>
|
||||
<property name="isTms" column ="IS_TMS" type="boolean"/>
|
||||
<property name="isWms" column ="IS_WMS" type="boolean"/>
|
||||
<property name="isPortal" column ="IS_PORTAL" type="boolean"/>
|
||||
<set name="groups" table="GROUP_USER" lazy="true">
|
||||
<key column="USER_ID"/>
|
||||
<many-to-many class="com.dev.energy.server.model.security.Group" column="GROUP_ID"/>
|
||||
</set>
|
||||
<set name="roles" table="ROLE_USER" lazy="true">
|
||||
<key column="USER_ID"/>
|
||||
<many-to-many class="com.dev.energy.server.model.security.Role" column="ROLE_ID"/>
|
||||
</set>
|
||||
<many-to-one name="firstPage" class="com.dev.energy.server.model.welcomepage.WelcomePage">
|
||||
<column name="FIRST_PAGE_ID"/>
|
||||
</many-to-one>
|
||||
</class>
|
||||
<query name="GetUserByLoginName">
|
||||
<![CDATA[from User user where upper(user.loginName) = upper(:loginName)]]>
|
||||
</query>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<module>
|
||||
<inherits name="com.gwtext.GwtExt"/>
|
||||
<inherits name='com.dev.repc.ReportCenter'/>
|
||||
<inherits name='com.dev.energy.ApplicationWindow'/>
|
||||
<entry-point class='com.dev.swms.client.SWMS'/>
|
||||
<stylesheet src="css/UIinventoryVisibility.css"/>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.dev.swms.client;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.widgets.Button;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.ToolbarButton;
|
||||
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
|
||||
import com.gwtext.client.widgets.layout.VerticalLayout;
|
||||
import com.gwtext.client.widgets.tree.TreeNode;
|
||||
import com.dev.energy.client.ApplicationWindow;
|
||||
import com.dev.energy.client.config.page.IMainPageConfig;
|
||||
import com.dev.energy.client.config.page.PageConfig;
|
||||
import com.dev.energy.client.config.page.ReportPageConfig;
|
||||
import com.dev.energy.client.context.ConfigContext;
|
||||
import com.dev.energy.client.rpc.AjaxServiceUtil;
|
||||
import com.dev.energy.client.rpc.AsyncCallBackAdapter;
|
||||
import com.dev.energy.client.rpc.CatchPageConfigAsync;
|
||||
import com.dev.energy.client.rpc.CommitServiceAsync;
|
||||
import com.dev.energy.client.template.AbstractCustomPageTemplate;
|
||||
import com.dev.energy.client.template.EditPageTemplate;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.client.ui.page.IPopupPage;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
*/
|
||||
public class SWMS extends ApplicationWindow {
|
||||
|
||||
public static ToolbarButton changeWarehouse;
|
||||
|
||||
public void initNativeMethod() {
|
||||
}
|
||||
|
||||
public void afterInitializingUI() {
|
||||
}
|
||||
|
||||
public void afterInitConfigContext() {
|
||||
}
|
||||
|
||||
public void topLinkContent(final Element td) {
|
||||
}
|
||||
|
||||
public void topLinkContent2(Element td) {
|
||||
DOM.setInnerHTML(td , " ");
|
||||
}
|
||||
|
||||
public void setOtherInfo(final String otherMessage) {
|
||||
changeWarehouse = new ToolbarButton(otherMessage){
|
||||
public void setText(String text) {
|
||||
super.setText("<font color='#0000FF'>" + text + "</font>");
|
||||
}
|
||||
};
|
||||
toolbar.addFill();
|
||||
toolbar.addSeparator();
|
||||
toolbar.addButton(changeWarehouse);
|
||||
toolbar.addSeparator();
|
||||
ToolbarButton changePassword = new ToolbarButton("<font color='#0000FF'>" + LocaleUtils.getText("eidtUserPassword") + "</font>",new ButtonListenerAdapter(){
|
||||
public void onClick(Button button, EventObject e) {
|
||||
changePage2("eidtUserPassword");
|
||||
}
|
||||
});
|
||||
toolbar.addButton(changePassword);
|
||||
AsyncCallBackAdapter acba = new AsyncCallBackAdapter() {
|
||||
public void exec() {
|
||||
CommitServiceAsync serviceAsync
|
||||
= AjaxServiceUtil
|
||||
.initialAsyncService(ConfigContext.DEFAULT);
|
||||
serviceAsync.executeCustom("warehouseManager","getThisWarehouse",new HashMap(),this);
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
final Map map = (Map)result;
|
||||
changeWarehouse.addListener(new ButtonListenerAdapter(){
|
||||
public void onClick(Button button, EventObject e) {
|
||||
changePopPage("switchWareHousePage",map);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
public void onFailure() {}
|
||||
};
|
||||
acba.exec("");
|
||||
|
||||
}
|
||||
|
||||
public void bottomLinkContent2(Element td) {
|
||||
}
|
||||
public static void changePage2(final String pageId) {
|
||||
context.getPageConfig(pageId,new CatchPageConfigAsync(){
|
||||
|
||||
public void afterInvotion(PageConfig pageConfig) {
|
||||
if(pageConfig instanceof ReportPageConfig){
|
||||
changPagePri3(pageConfig, new TreeNode());
|
||||
}else{
|
||||
changPagePri2(pageConfig);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
public static void changPagePri2(PageConfig pageConfig){
|
||||
if(!(pageConfig instanceof IMainPageConfig)){
|
||||
final IPopupPage iPage = pageConfig.createPage(new HashMap(),null);
|
||||
if(iPage instanceof EditPageTemplate){
|
||||
((EditPageTemplate)iPage).show();
|
||||
((EditPageTemplate)iPage).initData();
|
||||
}
|
||||
ApplicationWindow.getCurrentMessageLabel().setText("");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static void changPagePri3(PageConfig pageConfig , TreeNode node){
|
||||
// ApplicationWindow.aw.pageConfig = pageConfig;
|
||||
if(pageConfig instanceof IMainPageConfig){
|
||||
// ApplicationWindow.aw.onHistoryChanged(pageConfig.getId() , node);
|
||||
Panel panel = new Panel();
|
||||
panel.setAutoDestroy(true);
|
||||
panel.setLayout(new VerticalLayout());
|
||||
IPage page = ((ReportPageConfig)pageConfig).createPage(panel);
|
||||
pages.put(pageConfig.getId() , page);
|
||||
addTabPanel(page.getTitle(),panel,pageConfig.getId() , node);
|
||||
}
|
||||
}
|
||||
|
||||
public static void changePopPage(final String pageId,final Map map) {
|
||||
context.getPageConfig(pageId,new CatchPageConfigAsync(){
|
||||
public void afterInvotion(PageConfig pageConfig) {
|
||||
pageConfig.setTitle(LocaleUtils.getText(pageId));
|
||||
IPopupPage iPage = pageConfig.createPage(map,null);
|
||||
if(iPage instanceof AbstractCustomPageTemplate){
|
||||
((AbstractCustomPageTemplate)iPage).show();
|
||||
((AbstractCustomPageTemplate)iPage).initData();
|
||||
}
|
||||
ApplicationWindow.getCurrentMessageLabel().setText("");
|
||||
return;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void drawNorthPanel(Panel northPanel) {
|
||||
northPanel.setHeight(60);
|
||||
northPanel.setPaddings(0);
|
||||
northPanel.setHtml("<IFRAME NAME='north_frame' width='100%' height='100%' frameborder=0 scrolling=no src='north.html' ></IFRAME>");
|
||||
}
|
||||
|
||||
public void drawSouthPanel(Panel southPanel) {
|
||||
southPanel.setHeight(20);
|
||||
southPanel.setPaddings(0);
|
||||
southPanel.setBorder(false);
|
||||
southPanel.setHtml("<IFRAME NAME='south_frame' width='100%' height='100%' frameborder=0 scrolling=no src='south.html' ></IFRAME>");
|
||||
}
|
||||
|
||||
public native Element getDownloadIframeHandle()/*-{
|
||||
return $wnd.document.getElementById('__tms_dl');
|
||||
}-*/;
|
||||
public native void setDownloadIframeSrc(String src)/*-{
|
||||
$wnd.document.getElementById('__tms_dl').src = src;
|
||||
}-*/;
|
||||
|
||||
public void appendBottomCompanyName(Element td) {
|
||||
DOM.setInnerHTML(td , LocaleUtils.getText("logo.company.name"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bottomLinkContent(Element td) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.dev.swms.client.ui.companent;
|
||||
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventPreview;
|
||||
import com.google.gwt.user.client.ui.MouseListener;
|
||||
import com.google.gwt.user.client.ui.MouseListenerAdapter;
|
||||
import com.google.gwt.user.client.ui.MouseListenerCollection;
|
||||
import com.google.gwt.user.client.ui.SourcesMouseEvents;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_IV;
|
||||
import com.dev.swms.client.ui.page.Sub_W_Image_Panel;
|
||||
|
||||
public final class DraggableUiColumnChartWrapper extends UiColumnChart
|
||||
implements SourcesMouseEvents,EventPreview
|
||||
{
|
||||
private MouseListenerCollection mouseListeners = new MouseListenerCollection();
|
||||
public void addMouseListener(MouseListener l){
|
||||
mouseListeners.add(l);
|
||||
}
|
||||
public void removeMouseListener(MouseListener l){
|
||||
mouseListeners.remove(l);
|
||||
}
|
||||
public void onBrowserEvent(Event event) {
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONMOUSEDOWN:
|
||||
case Event.ONMOUSEUP:
|
||||
case Event.ONMOUSEMOVE:
|
||||
case Event.ONMOUSEOVER:
|
||||
case Event.ONMOUSEOUT:
|
||||
case Event.MOUSEEVENTS:
|
||||
mouseListeners.fireMouseEvent(this, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public DraggableUiColumnChartWrapper(final JB_IV iv, final Sub_W_Image_Panel wPanel){
|
||||
super(iv,wPanel);
|
||||
DOM.setStyleAttribute(getElement(),"position","absolute");
|
||||
//We don't want to lose anything already sunk,
|
||||
//so just ORing it to what's already there.
|
||||
DOM.sinkEvents(getElement(),DOM.getEventsSunk(getElement())|Event.MOUSEEVENTS);
|
||||
addMouseListener(new DraggableMouseListener(iv,wPanel));
|
||||
}
|
||||
|
||||
public boolean onEventPreview(Event event) {
|
||||
if (DOM.eventGetType(event) == Event.ONMOUSEDOWN &&
|
||||
DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {
|
||||
DOM.eventPreventDefault(event);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private class DraggableMouseListener
|
||||
extends MouseListenerAdapter {
|
||||
|
||||
private boolean dragging = false;
|
||||
private int dragStartX;
|
||||
private int dragStartY;
|
||||
|
||||
Sub_W_Image_Panel wPanel;
|
||||
JB_IV iv;
|
||||
|
||||
public DraggableMouseListener(JB_IV iv,Sub_W_Image_Panel w){
|
||||
this.wPanel = w;
|
||||
this.iv = iv;
|
||||
}
|
||||
|
||||
public void onMouseDown(Widget sender, int x, int y) {
|
||||
dragging = true;
|
||||
// capturing the mouse to the dragged widget.
|
||||
DOM.setCapture(getElement());
|
||||
dragStartX = x;
|
||||
dragStartY = y;
|
||||
}
|
||||
|
||||
public void onMouseUp(Widget sender, int x, int y) {
|
||||
dragging = false;
|
||||
DOM.releaseCapture(getElement());
|
||||
Page_IV_DataAccessor pid = new Page_IV_DataAccessor(wPanel);
|
||||
pid.setCur_JB_IV(iv);
|
||||
pid.setCur_JB_IV_POS(sender.getAbsoluteLeft()-CT_IV.DEFAULT_OFF_WIDTH,
|
||||
sender.getAbsoluteTop()-CT_IV.DEFAULT_OFF_HEIGHT);
|
||||
pid.updateIVData();
|
||||
}
|
||||
|
||||
public void onMouseMove(Widget sender, int x, int y) {
|
||||
if (dragging) {
|
||||
// we don't want the widget to go off-screen, so the top/left
|
||||
// values should always remain be positive.
|
||||
int newX = Math.max(0, x + getAbsoluteLeft() - dragStartX);
|
||||
int newY = Math.max(0, y + getAbsoluteTop() - dragStartY);
|
||||
DOM.setStyleAttribute(getElement(), "left", ""+newX);
|
||||
DOM.setStyleAttribute(getElement(), "top", ""+newY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void onMouseEnter(Widget sender){
|
||||
applyToolTips(iv);
|
||||
}
|
||||
|
||||
}
|
||||
/* factory method:
|
||||
public static DraggableWidgetWrapper makeDraggable(UiColumnChart widget) {
|
||||
return new DraggableWidgetWrapper(widget);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package com.dev.swms.client.ui.companent;
|
||||
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventPreview;
|
||||
import com.google.gwt.user.client.ui.MouseListener;
|
||||
import com.google.gwt.user.client.ui.MouseListenerAdapter;
|
||||
import com.google.gwt.user.client.ui.MouseListenerCollection;
|
||||
import com.google.gwt.user.client.ui.SourcesMouseEvents;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
import com.dev.swms.client.ui.page.Sub_Z_Image_Panel;
|
||||
|
||||
public final class DraggableUiPieChartWrapper extends UiPieChart
|
||||
implements SourcesMouseEvents,EventPreview {
|
||||
private MouseListenerCollection mouseListeners = new MouseListenerCollection();
|
||||
public void addMouseListener(MouseListener l){
|
||||
mouseListeners.add(l);
|
||||
}
|
||||
public void removeMouseListener(MouseListener l){
|
||||
mouseListeners.remove(l);
|
||||
}
|
||||
public void onBrowserEvent(Event event) {
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONMOUSEDOWN:
|
||||
case Event.ONMOUSEUP:
|
||||
case Event.ONMOUSEMOVE:
|
||||
case Event.ONMOUSEOVER:
|
||||
case Event.ONMOUSEOUT:
|
||||
case Event.MOUSEEVENTS:
|
||||
mouseListeners.fireMouseEvent(this, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public DraggableUiPieChartWrapper(final JB_Zone_IV ziv, final Sub_Z_Image_Panel zPanel){
|
||||
super(ziv,zPanel);
|
||||
DOM.setStyleAttribute(getElement(),"position","absolute");
|
||||
//We don't want to lose anything already sunk,
|
||||
//so just ORing it to what's already there.
|
||||
DOM.sinkEvents(getElement(),DOM.getEventsSunk(getElement())|Event.MOUSEEVENTS);
|
||||
addMouseListener(new DraggableMouseListener(ziv,zPanel));
|
||||
}
|
||||
|
||||
public boolean onEventPreview(Event event) {
|
||||
if (DOM.eventGetType(event) == Event.ONMOUSEDOWN &&
|
||||
DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {
|
||||
DOM.eventPreventDefault(event);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private class DraggableMouseListener extends MouseListenerAdapter {
|
||||
|
||||
private boolean dragging = false;
|
||||
private int dragStartX;
|
||||
private int dragStartY;
|
||||
|
||||
Sub_Z_Image_Panel zPanel;
|
||||
JB_Zone_IV ziv;
|
||||
|
||||
public DraggableMouseListener(JB_Zone_IV ziv, Sub_Z_Image_Panel zPanel){
|
||||
this.zPanel = zPanel;
|
||||
this.ziv = ziv;
|
||||
}
|
||||
|
||||
public void onMouseDown(Widget sender, int x, int y) {
|
||||
dragging = true;
|
||||
// capturing the mouse to the dragged widget.
|
||||
DOM.setCapture(getElement());
|
||||
dragStartX = x;
|
||||
dragStartY = y;
|
||||
}
|
||||
|
||||
public void onMouseUp(Widget sender, int x, int y) {
|
||||
dragging = false;
|
||||
DOM.releaseCapture(getElement());
|
||||
Page_IV_DataAccessor pid = new Page_IV_DataAccessor(zPanel);
|
||||
pid.setCur_JB_Zone_IV(ziv);
|
||||
pid.setCur_JB_Zone_IV_POS(sender.getAbsoluteLeft()-CT_IV.DEFAULT_OFF_WIDTH,
|
||||
sender.getAbsoluteTop()-CT_IV.DEFAULT_OFF_HEIGHT);
|
||||
pid.updateZIVData();
|
||||
}
|
||||
|
||||
public void onMouseMove(Widget sender, int x, int y) {
|
||||
if (dragging) {
|
||||
// we don't want the widget to go off-screen, so the top/left
|
||||
// values should always remain be positive.
|
||||
int newX = Math.max(0, x + getAbsoluteLeft() - dragStartX);
|
||||
int newY = Math.max(0, y + getAbsoluteTop() - dragStartY);
|
||||
DOM.setStyleAttribute(getElement(), "left", ""+newX);
|
||||
DOM.setStyleAttribute(getElement(), "top", ""+newY);
|
||||
|
||||
ziv.setLoc_xPos(sender.getAbsoluteLeft()-CT_IV.DEFAULT_OFF_WIDTH);
|
||||
ziv.setLoc_yPos(sender.getAbsoluteTop()-CT_IV.DEFAULT_OFF_HEIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
public void onMouseEnter(Widget sender){
|
||||
applyToolTips(ziv);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.dev.swms.client.ui.companent;
|
||||
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.ClickListenerCollection;
|
||||
import com.google.gwt.user.client.ui.SourcesClickEvents;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class UiClickedPanel extends VerticalPanel implements SourcesClickEvents{
|
||||
|
||||
protected ClickListenerCollection clickedCollections;
|
||||
|
||||
protected static final String DEFAULT_CLICKEDPANEL_STYLE = "iv_clicked_vertical_panel";
|
||||
|
||||
public UiClickedPanel(){
|
||||
this.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONMOUSEWHEEL|Event.ONDBLCLICK);
|
||||
this.setStyleName(DEFAULT_CLICKEDPANEL_STYLE);
|
||||
}
|
||||
|
||||
public void addClickListener(ClickListener listener) {
|
||||
if(clickedCollections == null) {
|
||||
clickedCollections = new ClickListenerCollection();
|
||||
}
|
||||
clickedCollections.add(listener);
|
||||
}
|
||||
public void removeClickListener(ClickListener listener) {
|
||||
if(clickedCollections != null) {
|
||||
clickedCollections.remove(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void onBrowserEvent(Event event) {
|
||||
switch (event.getTypeInt()) {
|
||||
case Event.ONDBLCLICK:
|
||||
if(clickedCollections != null) {
|
||||
clickedCollections.fireClick(this);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.dev.swms.client.ui.companent;
|
||||
|
||||
import com.google.gwt.i18n.client.NumberFormat;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.gwtext.client.widgets.HTMLPanel;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_IV;
|
||||
import com.dev.swms.client.ui.page.Sub_W_Image_Panel;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* @version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class UiColumnChart extends UiColumnChartParent {
|
||||
public UiColumnChart(final JB_IV iv,final Sub_W_Image_Panel wPanel ) {
|
||||
|
||||
final UiClickedPanel mainPanel = new UiClickedPanel();
|
||||
|
||||
VerticalPanel panel = new VerticalPanel();
|
||||
panel.setSize(DEFAULT_WIDTH + "" , DEFAULT_HEIGHT + "");
|
||||
panel.setStyleName(DEFAULT_VERTICAL_PANEL);
|
||||
if(iv.getIv_rate() >0) {
|
||||
HTMLPanel yChart = new HTMLPanel(
|
||||
"<div style=\"background:" + CT_IV.DEFAULT_CHART_COLOR + ";width:" + DEFAULT_WIDTH + "px;height:" + DEFAULT_HEIGHT + "px;\"> </div>");
|
||||
yChart.setWidth(DEFAULT_WIDTH);
|
||||
yChart.setFrame(false);
|
||||
yChart.setHeight(Integer.valueOf(NumberFormat.getFormat(CT_IV.DEFAULT_INTEGER_FORMAT).format(DEFAULT_HEIGHT*iv.getIv_rate())));
|
||||
panel.add(yChart);
|
||||
panel.setCellVerticalAlignment(yChart , HasVerticalAlignment.ALIGN_BOTTOM);
|
||||
panel.setCellHeight(yChart,"100%");
|
||||
|
||||
}else{
|
||||
Label l = new Label();
|
||||
l.setWidth(DEFAULT_WIDTH + "px");
|
||||
panel.add(l);
|
||||
}
|
||||
|
||||
Label label = new Label(NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(iv.getIv_rate()));
|
||||
mainPanel.add(label);
|
||||
mainPanel.setCellHorizontalAlignment(label,HasHorizontalAlignment.ALIGN_CENTER);
|
||||
mainPanel.setCellVerticalAlignment(label , HasVerticalAlignment.ALIGN_TOP);
|
||||
|
||||
mainPanel.add(panel);
|
||||
mainPanel.setCellVerticalAlignment(panel, HasVerticalAlignment.ALIGN_BOTTOM);
|
||||
|
||||
|
||||
mainPanel.addClickListener(new ClickListener(){
|
||||
public void onClick(Widget sender) {
|
||||
wPanel.curIVDataAccessor().setCur_JB_IV(iv);
|
||||
wPanel.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_OPEN_Z_IMAGE_PANEL);
|
||||
}
|
||||
});
|
||||
|
||||
this.add(mainPanel);
|
||||
this.setPopupPosition(iv.toXY()[0] + CT_IV.DEFAULT_OFF_WIDTH , iv.toXY()[1] + CT_IV.DEFAULT_OFF_HEIGHT);
|
||||
this.applyToolTips(iv);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.dev.swms.client.ui.companent;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.ui.PopupPanel;
|
||||
import com.gwtext.client.widgets.ToolTip;
|
||||
import com.dev.swms.client.ui.javabean.JB_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
import com.dev.swms.client.ui.util.Ui_Pie_Chart_Util;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:e2wms $Date$Version:V1.1
|
||||
*/
|
||||
public class UiColumnChartParent extends PopupPanel {
|
||||
protected static final int DEFAULT_WIDTH = 15;
|
||||
protected static final int DEFAULT_HEIGHT = 50;
|
||||
protected static final String DEFAULT_UI_CC_SUBPANEL_STYLE = "ui_cc_subpanel_style";
|
||||
protected static final String DEFAULT_UI_CC_MAINPANEL_STYLE = "ui_cc_mainpanel_style";
|
||||
protected static final String DEFAULT_VERTICAL_PANEL = "iv_cc_vertical_panel";
|
||||
|
||||
protected void applyToolTips(IsSerializable iv) {
|
||||
if(iv == null) return;
|
||||
ToolTip tt = null;
|
||||
if(iv instanceof JB_IV) {
|
||||
tt = new ToolTip(Ui_Pie_Chart_Util.generateChartToolTip((JB_IV)iv));
|
||||
} else if(iv instanceof JB_Zone_IV) {
|
||||
tt = new ToolTip(Ui_Pie_Chart_Util.generatePieToolTip((JB_Zone_IV)iv));
|
||||
}
|
||||
if(tt != null) {
|
||||
tt.setWidth(300);
|
||||
tt.setMinWidth(200);
|
||||
tt.setMaxWidth(500);
|
||||
tt.applyTo(this.getElement());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
package com.dev.swms.client.ui.companent;
|
||||
|
||||
import com.google.gwt.i18n.client.NumberFormat;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.gwtext.client.widgets.HTMLPanel;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
import com.dev.swms.client.ui.page.Sub_Z_Image_Panel;
|
||||
|
||||
//package com.dev.swms.client.ui.companent;
|
||||
//
|
||||
//import com.google.gwt.i18n.client.NumberFormat;
|
||||
//import com.google.gwt.user.client.ui.ClickListener;
|
||||
//import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
//import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
//import com.google.gwt.user.client.ui.Label;
|
||||
//import com.google.gwt.user.client.ui.PopupPanel;
|
||||
//import com.google.gwt.user.client.ui.Widget;
|
||||
//import com.gwtext.client.data.ArrayReader;
|
||||
//import com.gwtext.client.data.FieldDef;
|
||||
//import com.gwtext.client.data.FloatFieldDef;
|
||||
//import com.gwtext.client.data.MemoryProxy;
|
||||
//import com.gwtext.client.data.RecordDef;
|
||||
//import com.gwtext.client.data.Store;
|
||||
//import com.gwtext.client.data.StringFieldDef;
|
||||
//import com.gwtext.client.widgets.chart.yui.PieChart;
|
||||
//import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
//import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
//import com.dev.swms.client.ui.page.Sub_Z_Image_Panel;
|
||||
//
|
||||
///**
|
||||
// * @author dev
|
||||
// * @version $Project:swms $Date$Version:V1.1
|
||||
// */
|
||||
//public class UiPieChart extends PopupPanel {
|
||||
//
|
||||
// protected static final int DEFAULT_WIDTH = 50;
|
||||
// protected static final int DEFAULT_HEIGHT = 50;
|
||||
//
|
||||
// protected static final int DEFAULT_OFF_X = 60;
|
||||
//// protected static final int DEFAULT_OFF_Y = 60;
|
||||
//
|
||||
// public static final String DEFAULT_X_FIELD = "location_rate";
|
||||
// public static final String DEFAULT_Y_FIELD = "location_name";
|
||||
//
|
||||
// protected PieChart chart;
|
||||
//
|
||||
// public UiPieChart(final JB_Zone_IV ziv , final Sub_Z_Image_Panel zPanel) {
|
||||
// this.initPieChart(ziv);
|
||||
// UiClickedPanel mainPanel = new UiClickedPanel();
|
||||
// mainPanel.setSize(DEFAULT_WIDTH + "" , DEFAULT_HEIGHT + "");
|
||||
//
|
||||
// Label label = new Label(NumberFormat.getPercentFormat().format(ziv.getLoc_rate()));
|
||||
// mainPanel.add(label);
|
||||
// mainPanel.setCellHorizontalAlignment(label,HasHorizontalAlignment.ALIGN_CENTER);
|
||||
// mainPanel.setCellVerticalAlignment(label , HasVerticalAlignment.ALIGN_TOP);
|
||||
//
|
||||
// mainPanel.add(chart);
|
||||
// mainPanel.setCellVerticalAlignment(chart, HasVerticalAlignment.ALIGN_BOTTOM);
|
||||
// mainPanel.setCellHorizontalAlignment(chart,HasHorizontalAlignment.ALIGN_CENTER);
|
||||
// mainPanel.addClickListener(new ClickListener(){
|
||||
//
|
||||
// public void onClick(Widget sender) {
|
||||
// zPanel.curIVDataAccessor().setCur_JB_Zone_IV(ziv);
|
||||
// zPanel.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL);
|
||||
// }
|
||||
//
|
||||
// });
|
||||
// this.add(mainPanel);
|
||||
// this.setPopupPosition(ziv.getLoc_xPos() + DEFAULT_OFF_X , ziv.getLoc_yPos() + DEFAULT_OFF_Y);
|
||||
// }
|
||||
//
|
||||
// protected void initPieChart(JB_Zone_IV ziv) {
|
||||
// MemoryProxy proxy = new MemoryProxy(ziv.to2Array());
|
||||
// RecordDef recordDef = new RecordDef(new FieldDef[] {
|
||||
// new StringFieldDef(DEFAULT_Y_FIELD), new FloatFieldDef(DEFAULT_X_FIELD)}
|
||||
// );
|
||||
// ArrayReader reader = new ArrayReader(recordDef);
|
||||
// Store store = new Store(proxy, reader);
|
||||
// store.load();
|
||||
// chart = new PieChart();
|
||||
// chart.setBodyBorder(false);
|
||||
// chart.setBorder(false);
|
||||
// chart.setWMode("transparent");
|
||||
// chart.setStore(store);
|
||||
// chart.setDataField(DEFAULT_X_FIELD);
|
||||
// chart.setCategoryField(DEFAULT_Y_FIELD);
|
||||
// chart.setExpressInstall("js/yui/assets/expressinstall.swf");
|
||||
// chart.setWidth(DEFAULT_WIDTH);
|
||||
// chart.setHeight(DEFAULT_HEIGHT);
|
||||
// chart.setAutoShow(true);
|
||||
// }
|
||||
//}
|
||||
|
||||
public class UiPieChart extends UiColumnChartParent {
|
||||
|
||||
public UiPieChart(final JB_Zone_IV ziv,final Sub_Z_Image_Panel zPanel ) {
|
||||
final UiClickedPanel mainPanel = new UiClickedPanel();
|
||||
VerticalPanel panel = new VerticalPanel();
|
||||
panel.setSize(DEFAULT_WIDTH + "" , DEFAULT_HEIGHT + "");
|
||||
panel.setStyleName(DEFAULT_VERTICAL_PANEL);
|
||||
if(ziv.getLoc_rate() > 0) {
|
||||
HTMLPanel yChart = new HTMLPanel(
|
||||
"<div style=\"background:"+ CT_IV.DEFAULT_CHART_COLOR + ";width:" + DEFAULT_WIDTH + "px;height:" + DEFAULT_HEIGHT + "px;\"> </div>");
|
||||
yChart.setWidth(DEFAULT_WIDTH);
|
||||
yChart.setFrame(false);
|
||||
yChart.setHeight(Integer.valueOf(NumberFormat.getFormat(CT_IV.DEFAULT_INTEGER_FORMAT).format(DEFAULT_HEIGHT*ziv.getLoc_rate())));
|
||||
panel.add(yChart);
|
||||
panel.setCellVerticalAlignment(yChart , HasVerticalAlignment.ALIGN_BOTTOM);
|
||||
panel.setCellHeight(yChart,"100%");
|
||||
}else {
|
||||
Label l = new Label();
|
||||
l.setWidth(DEFAULT_WIDTH + "px");
|
||||
panel.add(l);
|
||||
}
|
||||
|
||||
Label label = new Label(NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(ziv.getLoc_rate()));
|
||||
mainPanel.add(label);
|
||||
mainPanel.setCellHorizontalAlignment(label,HasHorizontalAlignment.ALIGN_CENTER);
|
||||
mainPanel.setCellVerticalAlignment(label , HasVerticalAlignment.ALIGN_TOP);
|
||||
|
||||
mainPanel.add(panel);
|
||||
mainPanel.setCellVerticalAlignment(panel, HasVerticalAlignment.ALIGN_BOTTOM);
|
||||
|
||||
mainPanel.addClickListener(new ClickListener(){
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
zPanel.curIVDataAccessor().setCur_JB_Zone_IV(ziv);
|
||||
zPanel.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL);
|
||||
}
|
||||
|
||||
});
|
||||
this.add(mainPanel);
|
||||
this.setPopupPosition(ziv.toXY()[0] + CT_IV.DEFAULT_OFF_WIDTH , ziv.toXY()[1] + CT_IV.DEFAULT_OFF_HEIGHT);
|
||||
//this.applyToolTips(ziv);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.dev.swms.client.ui.constant;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class CT_IV implements IsSerializable{
|
||||
/** 缺省道、排、行、列的数量 */
|
||||
public static final int DEFAULT_AISLE = 10;
|
||||
public static final int DEFAULT_LINE = 10;
|
||||
public static final int DEFAULT_ROW = 5;
|
||||
public static final int DEFAULT_COL = 10;
|
||||
/** 缺省X,Y离左上角(0,0)的坐标偏差 */
|
||||
public static final int DEFAULT_OFF_HEIGHT = 80;
|
||||
public static final int DEFAULT_OFF_WIDTH = 25;
|
||||
/** 缺省容积率%格式 */
|
||||
public static final String DEFAULT_PERCENT_FORMAT = "##0.##%";
|
||||
public static final String DEFAULT_INTEGER_FORMAT = "##0";
|
||||
/** 缺省柱图的色标 */
|
||||
public static final String DEFAULT_CHART_COLOR = "red";
|
||||
/** 缺省带背景面板样式,如仓库布局Panel */
|
||||
public static final String DEFAULT_BODYSTYLE = "text-align:center;padding:1px 1px;" +
|
||||
"border:1px dotted #99bbe8;background:#dfe8f6 url(images/grid-back.gif) repeat left top;" +
|
||||
"color:#15428b;cursor:default;margin:0px;" +
|
||||
"font:bold 11px tahoma,arial,sans-serif;";
|
||||
/** 导航条箭头IMG */
|
||||
public static final String DEFAULT_ARROW_IMG = "<img src='images/rule_arrow.gif'/>";
|
||||
/** 缺省带背景图片的面板,如仓库布局Panel */
|
||||
public static final String DEFAULT_IMAGE_STYLE = "iv_sub_image_panel";
|
||||
/** 仓库可视化后台manager */
|
||||
public static final String IV_MANAGER = "warehouseManager";
|
||||
/** 获取后台仓库可视化的方法 */
|
||||
public static final String IV_INIT_DATA = "init_WM_IV";
|
||||
|
||||
//新增方法
|
||||
/** 修改后台仓库可视化的方法 */
|
||||
public static final String IV_UPDATE_DATA = "update_WM_IV";
|
||||
public static final String ZIV_UPDATE_DATA = "update_WM_ZIV";
|
||||
|
||||
/** 获取库区的可视化的方法 */
|
||||
public static final String IV_INIT_ZONE_DATA = "init_Zone_IV";
|
||||
/** 获取库位的道排可视化的方法 */
|
||||
public static final String IV_INIT_LOCATION_DATA = "init_Location_IV";
|
||||
/** 获取库位行列可视化的方法 */
|
||||
public static final String IV_INIT_LOCATION_RC_DATA = "init_Location_RC_IV";
|
||||
/** 获取库存详细的方法 */
|
||||
public static final String IV_INIT_INVENTORY_DATA = "init_Inventory_Data";
|
||||
/** 结果集标识key */
|
||||
public static final String IV_RESULT = "iv_result";
|
||||
/** 仓库ID */
|
||||
public static final String IV_WH_ID = "wh_id";
|
||||
/**仓库的坐标*/
|
||||
public static final String IV_WH_XPOS = "wh_xPos";
|
||||
public static final String IV_WH_YPOS = "wh_yPos";
|
||||
|
||||
/** 库区ID */
|
||||
public static final String IV_ZONE_ID = "zone_id";
|
||||
/**库区的坐标*/
|
||||
public static final String IV_ZONE_XPOS = "zone_xPos";
|
||||
public static final String IV_ZONE_YPOS = "zone_yPos";
|
||||
|
||||
/** 道 */
|
||||
public static final String IV_AISLE = "aisle";
|
||||
/** 排 */
|
||||
public static final String IV_LINE = "line";
|
||||
/** 行 */
|
||||
public static final String IV_ROW = "row";
|
||||
/** 列 */
|
||||
public static final String IV_COL = "col";
|
||||
/** 仓库可视化对象 */
|
||||
public static final String IV_JB_IV = "jb_iv";
|
||||
/** 库位ID */
|
||||
public static final String IV_LOCATION_ID = "loc_id";
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.dev.swms.client.ui.constant;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class CT_PA implements IsSerializable {
|
||||
|
||||
/** 发货单后台manager */
|
||||
public static final String PA_MANAGER = "pickTicketManager";
|
||||
|
||||
/** 波次后台manager */
|
||||
public static final String WD_MANAGER = "waveDocManager";
|
||||
|
||||
public static final String PT_RESULT = "pt_result";
|
||||
public static final String PD_RESULT = "pd_result";
|
||||
public static final String PTA_RESULT = "pta_result";
|
||||
public static final String PTAD_RESULT = "ptad_result";
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
package com.dev.swms.client.ui.customUI;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.FocusListener;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.dev.energy.client.config.page.TableConfig;
|
||||
import com.dev.energy.client.rpc.AsyncCallBackAdapter;
|
||||
import com.dev.energy.client.ui.RemoteUI;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.client.ui.table.RowData;
|
||||
|
||||
public class CustomRemoteUI extends RemoteUI{
|
||||
|
||||
public CustomRemoteUI(IPage ownerPage) {
|
||||
super(ownerPage);
|
||||
}
|
||||
|
||||
protected void addTextFocusListener() {
|
||||
textBox.addFocusListener(new FocusListener(){
|
||||
|
||||
public void onFocus(Widget sender) {
|
||||
if(rowData!=null) {
|
||||
textBox.setText(rowData.getColumnValue(1).toString());
|
||||
}
|
||||
// textBox.setText(code);
|
||||
textBox.setStyleName("popwin_input01_on");
|
||||
}
|
||||
|
||||
public void onLostFocus(Widget sender) {
|
||||
String value = textBox.getText().trim();
|
||||
if(value == null || value.equals("")){
|
||||
resetValue();
|
||||
|
||||
textBox.setStyleName("popwin_input01");
|
||||
return;
|
||||
}
|
||||
if(rowData!=null && value.equals(rowData.getColumnValue(1).toString()) ) {
|
||||
if(rowData.getColumnValues().size() > 2){
|
||||
textBox.setText(rowData.getColumnValue(displayColumn - 1).toString());
|
||||
}else{
|
||||
textBox.setText(rowData.getColumnValue(1).toString());
|
||||
}
|
||||
textBox.setStyleName("popwin_input01");
|
||||
return;
|
||||
}
|
||||
isShow = false;
|
||||
if(getPercentSignPosition().equals("both"))
|
||||
invokeRemoteQuery("%"+textBox.getText()+"%");
|
||||
else if(getPercentSignPosition().equals("left"))
|
||||
invokeRemoteQuery("%"+textBox.getText());
|
||||
else
|
||||
invokeRemoteQuery(textBox.getText()+"%");
|
||||
textBox.setStyleName("popwin_input02");
|
||||
}
|
||||
});
|
||||
|
||||
image.addClickListener(new ClickListener(){
|
||||
public void onClick(Widget sender) {
|
||||
textBox.setFocus(false);
|
||||
isShow = false;
|
||||
SelectorTemplate template = new CustomSelectorTemplate(ownerPage,title,true);
|
||||
template.setPopupPosition(image.getAbsoluteLeft(),image.getAbsoluteTop(),true);
|
||||
template.draw();
|
||||
template.query();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void invokeRemoteQuery(final String value){
|
||||
if(value == null || value.equals("")){
|
||||
entityId = null;
|
||||
code = "";
|
||||
return;
|
||||
}
|
||||
SelectorTemplate template = new CustomSelectorTemplate(ownerPage,title,false);
|
||||
template.setPopupPosition(image.getAbsoluteLeft(),image.getAbsoluteTop(),true);
|
||||
template.draw();
|
||||
template.query(value);
|
||||
}
|
||||
|
||||
public SelectorTableUI getSelectorTableUI(SelectorTemplate s,TableConfig t,IPage page){
|
||||
return new CustomSelectorTableUI(s,t , page);
|
||||
}
|
||||
|
||||
public class CustomSelectorTemplate extends SelectorTemplate{
|
||||
|
||||
public CustomSelectorTemplate(IPage parentPage, String uiTitle, boolean onImageClick) {
|
||||
super(parentPage, uiTitle, onImageClick);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class CustomSelectorTableUI extends SelectorTableUI{
|
||||
|
||||
public CustomSelectorTableUI(SelectorTemplate template, TableConfig tableConfig, IPage ownerPage) {
|
||||
super(template, tableConfig, ownerPage);
|
||||
}
|
||||
|
||||
public void pagingPage(final String codeValue,final int currentPage) {
|
||||
AsyncCallBackAdapter acba = new AsyncCallBackAdapter() {
|
||||
|
||||
public void exec() {
|
||||
// RemoteQueryServiceAsync serviceAsync = AjaxServiceUtil.initialAsyncQueryService(tableConfig.getPageId());
|
||||
// tableConfig.setCurrentPage(currentPage);
|
||||
// Map map = template.getFormParams(getQueryParams("param",codeValue));
|
||||
// serviceAsync.customRemoteQuery(hql,tableConfig,map,this);
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
List rowDatas = ((TableConfig)result).getTableRows();
|
||||
// onDataReturned((TableConfig)result);
|
||||
if(rowDatas.size() == 0){
|
||||
selectNoneValue();
|
||||
}
|
||||
else if(rowDatas.size() == 1){
|
||||
setValueImpl((RowData) rowDatas.get(0));
|
||||
}
|
||||
else{
|
||||
if(!isShow){
|
||||
template.show();
|
||||
isShow = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
// acba.exec(tableConfig.getPageId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,213 @@
|
|||
package com.dev.swms.client.ui.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_IV_List;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_Inventory;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV_List;
|
||||
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
import com.dev.energy.client.data.DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Page_IV_DataAccessor extends DataAccessor{
|
||||
|
||||
/** 消息句柄--初始化库存可视化 */
|
||||
public static final String MSG_INIT_IV_DATA = "msg_initIVDatas";
|
||||
public static final String MSG_INIT_ZONE_DATAS = "init_zone_datas";
|
||||
public static final String MSG_INIT_LOCATION_DATAS = "msg_init_location_datas";
|
||||
public static final String MSG_INIT_LOCATION_RC_DATAS = "msg_init_location_rc_datas";
|
||||
public static final String MSG_INIT_INVENTORY_DATAS = "msg_init_inventory_datas";
|
||||
public static final String MSG_CLOSE_ALL_COLUMN_CHART = "msg_close_charts";
|
||||
public static final String MSG_REFRESH_NAVIGATE_PANEL = "msg_refresh_navigate";
|
||||
public static final String MSG_OPEN_W_IMAGE_PANEL = "msg_open_w_panel";
|
||||
public static final String MSG_OPEN_Z_IMAGE_PANEL = "msg_open_z_panel";
|
||||
public static final String MSG_OPEN_L_IMAGE_PANEL = "msg_open_l_panel";
|
||||
|
||||
public static final String MSG_UPDATE_IV_DATA = "msg_updateIVData";
|
||||
public static final String MSG_UPDATE_ZIV_DATA = "msg_updateZIVData";
|
||||
|
||||
/** 所有仓库的容积率 */
|
||||
private List<JB_IV> ivs;
|
||||
/** 所有库区的容积率 */
|
||||
private List<JB_Zone_IV> zivs;
|
||||
/** 所有库位道排的容积率 */
|
||||
private List<JB_Location_IV_List> livs;
|
||||
/** 所有库位层列的容积率 */
|
||||
private List<JB_Location_RC_IV_List> lrivs;
|
||||
/** 所有库存 */
|
||||
private List<JB_Location_Inventory> lis;
|
||||
/** 当前选中的仓库 */
|
||||
private JB_IV cur_JB_IV;
|
||||
/** 当前选中的库区 */
|
||||
private JB_Zone_IV cur_JB_Zone_IV;
|
||||
|
||||
public Page_IV_DataAccessor(IMessagePage page) {
|
||||
super(page);
|
||||
}
|
||||
/** 远程调用后台方法获取库存可视化数据 */
|
||||
public void initIVDatas(){
|
||||
this.remoteCall(MSG_INIT_IV_DATA , CT_IV.IV_MANAGER , CT_IV.IV_INIT_DATA , new HashMap());
|
||||
}
|
||||
//远程调用后台方法改变库存可视化数据中的坐标值
|
||||
public void updateIVData(){
|
||||
this.remoteCall(MSG_UPDATE_IV_DATA,CT_IV.IV_MANAGER,CT_IV.IV_UPDATE_DATA,construct_WarehousePos_Param());
|
||||
}
|
||||
public void updateZIVData(){
|
||||
this.remoteCall(MSG_UPDATE_ZIV_DATA,CT_IV.IV_MANAGER,CT_IV.ZIV_UPDATE_DATA,construct_ZonePos_Param());
|
||||
}
|
||||
/** 异步获取后台的库区容积率 */
|
||||
public void initZoneIvDatas() {
|
||||
this.remoteCall(MSG_INIT_ZONE_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_ZONE_DATA ,construct_Zone_Param());
|
||||
}
|
||||
/** 异步获取后台的库位道排容积率 */
|
||||
public void initLocationIvDatas() {
|
||||
this.remoteCall(MSG_INIT_LOCATION_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_LOCATION_DATA ,construct_Location_Param());
|
||||
}
|
||||
/** 异步获取后台的库位层列容积率 */
|
||||
public void initLocationIvRCDatas(Map params) {
|
||||
this.remoteCall(MSG_INIT_LOCATION_RC_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_LOCATION_RC_DATA ,params);
|
||||
}
|
||||
/** 异步获取后台的库存信息 */
|
||||
public void initInventoryDatas(Map params) {
|
||||
this.remoteCall(MSG_INIT_INVENTORY_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_INVENTORY_DATA ,params);
|
||||
}
|
||||
|
||||
/** 设置当前正在操作的仓库容积对象 */
|
||||
public void setCur_JB_IV(JB_IV cur_JB_IV) {
|
||||
this.cur_JB_IV = cur_JB_IV;
|
||||
}
|
||||
public void setCur_JB_IV_POS(int cur_JB_IV_XPOS,int cur_JB_IV_YPOS){
|
||||
this.cur_JB_IV.setX_Pos(cur_JB_IV_XPOS);
|
||||
this.cur_JB_IV.setY_Pos(cur_JB_IV_YPOS);
|
||||
}
|
||||
|
||||
public void setCur_JB_Zone_IV(JB_Zone_IV ziv) {
|
||||
this.cur_JB_Zone_IV = ziv;
|
||||
}
|
||||
public void setCur_JB_Zone_IV_POS(int cur_JB_Zone_IV_XPOS,int cur_JB_Zone_IV_YPOS){
|
||||
this.cur_JB_Zone_IV.setLoc_xPos(cur_JB_Zone_IV_XPOS);
|
||||
this.cur_JB_Zone_IV.setLoc_yPos(cur_JB_Zone_IV_YPOS);
|
||||
}
|
||||
|
||||
public JB_Zone_IV getCur_JB_Zone_IV(){
|
||||
return this.cur_JB_Zone_IV;
|
||||
}
|
||||
|
||||
public JB_IV current_JB_IV(){
|
||||
return this.cur_JB_IV;
|
||||
}
|
||||
|
||||
public List<JB_IV> all_IV() {
|
||||
return this.ivs;
|
||||
}
|
||||
|
||||
public List<JB_Zone_IV> all_Zone_IV() {
|
||||
return this.zivs;
|
||||
}
|
||||
|
||||
public List<JB_Location_IV_List> all_Location_IV(){
|
||||
return this.livs;
|
||||
}
|
||||
|
||||
public List<JB_Location_RC_IV_List> all_Location_RC_IV(){
|
||||
return this.lrivs;
|
||||
}
|
||||
|
||||
public List<JB_Location_Inventory> all_Location_Inv(){
|
||||
return this.lis;
|
||||
}
|
||||
|
||||
public JB_Location_IV getCur_JB_Location_IV(int row ,int col) {
|
||||
return this.livs.get(row).get(col);
|
||||
}
|
||||
|
||||
//param of the current warehousePos param
|
||||
public Map construct_WarehousePos_Param(){
|
||||
Map<String,Long> param = new HashMap<String,Long>();
|
||||
param.put(CT_IV.IV_WH_ID , this.cur_JB_IV.getIv_wh_id());
|
||||
|
||||
Integer itx = new Integer(this.cur_JB_IV.getX_Pos());
|
||||
Long lox = new Long(itx.longValue());
|
||||
|
||||
Integer ity = new Integer(this.cur_JB_IV.getY_Pos());
|
||||
Long loy = new Long(ity.longValue());
|
||||
|
||||
param.put(CT_IV.IV_WH_XPOS,lox);
|
||||
param.put(CT_IV.IV_WH_YPOS,loy);
|
||||
return param;
|
||||
|
||||
}
|
||||
//param of zone pos
|
||||
public Map construct_ZonePos_Param(){
|
||||
Map<String,Long> param = new HashMap<String,Long>();
|
||||
param.put(CT_IV.IV_ZONE_ID , this.cur_JB_Zone_IV.getLoc_id());
|
||||
|
||||
Integer itx = new Integer(this.cur_JB_Zone_IV.getLoc_xPos());
|
||||
Long lox = new Long(itx.longValue());
|
||||
|
||||
Integer ity = new Integer(this.cur_JB_Zone_IV.getLoc_yPos());
|
||||
Long loy = new Long(ity.longValue());
|
||||
|
||||
param.put(CT_IV.IV_ZONE_XPOS,lox);
|
||||
param.put(CT_IV.IV_ZONE_YPOS,loy);
|
||||
return param;
|
||||
|
||||
}
|
||||
|
||||
public Map construct_Zone_Param() {
|
||||
Map<String,Long> param = new HashMap<String,Long>();
|
||||
param.put(CT_IV.IV_WH_ID , this.cur_JB_IV.getIv_wh_id());
|
||||
return param;
|
||||
}
|
||||
|
||||
private Map construct_Location_Param(){
|
||||
Map<String,Long> params = new HashMap<String,Long>();
|
||||
params.put(CT_IV.IV_ZONE_ID , this.getCur_JB_Zone_IV().getLoc_id());
|
||||
return params;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void onSuccess(String message, Map result) {
|
||||
if(MSG_INIT_IV_DATA.equals(message)) {
|
||||
this.ivs = (List) result.get(CT_IV.IV_RESULT);
|
||||
this.sendMessage(MSG_INIT_IV_DATA);
|
||||
}else if(MSG_INIT_ZONE_DATAS.equals(message)) {
|
||||
this.zivs = (List)result.get(CT_IV.IV_RESULT);
|
||||
this.sendMessage(MSG_INIT_ZONE_DATAS);
|
||||
}else if(MSG_INIT_LOCATION_DATAS.equals(message)) {
|
||||
this.livs = (List)result.get(CT_IV.IV_RESULT);
|
||||
this.sendMessage(MSG_INIT_LOCATION_DATAS);
|
||||
}else if(MSG_INIT_LOCATION_RC_DATAS.equals(message)) {
|
||||
this.lrivs = (List)result.get(CT_IV.IV_RESULT);
|
||||
this.sendMessage(MSG_INIT_LOCATION_RC_DATAS);
|
||||
}else if(MSG_INIT_INVENTORY_DATAS.equals(message)) {
|
||||
this.lis = (List)result.get(CT_IV.IV_RESULT);
|
||||
this.sendMessage(MSG_INIT_INVENTORY_DATAS);
|
||||
}else if(MSG_UPDATE_IV_DATA.equals(message)){
|
||||
this.sendMessage(MSG_UPDATE_IV_DATA);
|
||||
System.out.println("Success!!!");
|
||||
}else if(MSG_UPDATE_ZIV_DATA.equals(message)){
|
||||
this.sendMessage(MSG_UPDATE_ZIV_DATA);
|
||||
System.out.println("SuccessAgain!!!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onFailure(String message, Map result) {
|
||||
|
||||
}
|
||||
|
||||
public boolean onTimeOutFailure(String message) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
package com.dev.swms.client.ui.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dev.swms.client.ui.constant.CT_PA;
|
||||
import com.dev.swms.client.ui.javabean.PT_ALLOCATED;
|
||||
import com.dev.swms.client.ui.javabean.PT_AVAILABLE;
|
||||
import com.dev.swms.client.ui.javabean.PT_DETAILS;
|
||||
import com.dev.swms.client.ui.javabean.PT_INFO;
|
||||
import com.dev.energy.client.data.DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
|
||||
public class Page_PA_DataAccessor extends DataAccessor {
|
||||
|
||||
|
||||
public static final String INIT_PICK_TICKETS_INFO = "init_pick_tickets_info";
|
||||
public static final String INIT_DETAILS_INFO = "initDetailsInfo";
|
||||
public static final String INIT_AVAILABLE_INFO = "initAvailableInfo";
|
||||
public static final String INIT_ALLOCATED_INFO = "initAllocatedInfo";
|
||||
public static final String AUTO_ALLOCATE_INFO = "autoAllocateInfo";
|
||||
public static final String CANCELL_ALLOCATE_INFO = "cancellAllocateInfo";
|
||||
public static final String MANUAL_ALLOCATE_INFO = "manualAllocateInfo";
|
||||
|
||||
public static final String INIT_WAVE_DOC_INFO = "init_wave_doc_info";
|
||||
public static final String INIT_WD_DETAILS_INFO = "initWDDetailsInfo";
|
||||
public static final String INIT_WD_AVAILABLE_INFO = "initWDAvailableInfo";
|
||||
public static final String INIT_WD_ALLOCATED_INFO = "initWDAllocatedInfo";
|
||||
public static final String AUTO_WD_ALLOCATE_INFO = "autoWDAllocateInfo";
|
||||
public static final String CANCELL_WD_ALLOCATE_INFO = "cancellWDAllocateInfo";
|
||||
public static final String MANUAL_WD_ALLOCATE_INFO = "manualWDAllocateInfo";
|
||||
|
||||
|
||||
/**当前选中的发货单*/
|
||||
private PT_INFO curPickTicket;
|
||||
|
||||
/**同一发货单的明细*/
|
||||
private List<PT_DETAILS> pds;
|
||||
|
||||
/**同一条明细的库存*/
|
||||
private List<PT_AVAILABLE> ptas;
|
||||
|
||||
/**同一发货单的已分配记录*/
|
||||
private List<PT_ALLOCATED> ptad;
|
||||
|
||||
/**当前选中的发货单明细号*/
|
||||
private Long ptdId;
|
||||
|
||||
/**当前选中的波次明细号*/
|
||||
private Long wddId;
|
||||
|
||||
/**页面标志*/
|
||||
private String flag;
|
||||
|
||||
public Long getPtdId() {
|
||||
return ptdId;
|
||||
}
|
||||
|
||||
public void setPtdId(Long ptdId) {
|
||||
this.ptdId = ptdId;
|
||||
}
|
||||
|
||||
public Long getWddId() {
|
||||
return wddId;
|
||||
}
|
||||
|
||||
public void setWddId(Long wddId) {
|
||||
this.wddId = wddId;
|
||||
}
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public List<PT_DETAILS> all_PDS(){
|
||||
return this.pds;
|
||||
}
|
||||
|
||||
public List<PT_AVAILABLE> all_PTAS(){
|
||||
return this.ptas;
|
||||
}
|
||||
|
||||
|
||||
public List<PT_ALLOCATED> all_PTAD(){
|
||||
return this.ptad;
|
||||
}
|
||||
|
||||
public PT_INFO currentPickTicket() {
|
||||
return this.curPickTicket;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setCurPickTicket(PT_INFO curPickTicket) {
|
||||
this.curPickTicket = curPickTicket;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Page_PA_DataAccessor(IMessagePage page) {
|
||||
super(page);
|
||||
}
|
||||
|
||||
|
||||
/*异步获取后台发货单信息*/
|
||||
public void initPickTicketInfo(Map params) {
|
||||
this.remoteCall(INIT_PICK_TICKETS_INFO,CT_PA.PA_MANAGER,"init_PA_INFO",params);
|
||||
}
|
||||
/*异步获取后台发货单明细信息*/
|
||||
public void initDetailsInfo(Map params) {
|
||||
this.remoteCall(INIT_DETAILS_INFO,CT_PA.PA_MANAGER,"init_PD_INFO",params);
|
||||
}
|
||||
/*异步获取后台一条发货单明细的库存信息*/
|
||||
public void initAvailableInfo(Map params) {
|
||||
this.remoteCall(INIT_AVAILABLE_INFO,CT_PA.PA_MANAGER,"init_AL_INFO",params);
|
||||
}
|
||||
|
||||
/*异步获取后台发货单已分配信息*/
|
||||
public void initAllocatedInfo(Map params) {
|
||||
this.remoteCall(INIT_ALLOCATED_INFO,CT_PA.PA_MANAGER,"init_ALD_INFO",params);
|
||||
}
|
||||
//发货单整单分配
|
||||
public void atuoAllocate(Map params){
|
||||
this.remoteCall(AUTO_ALLOCATE_INFO,CT_PA.PA_MANAGER,"auto_Allocate",params);
|
||||
}
|
||||
|
||||
//发货单取消分配
|
||||
public void cancellAllocate(Map params){
|
||||
this.remoteCall(CANCELL_ALLOCATE_INFO,CT_PA.PA_MANAGER,"cancell_Allocate",params);
|
||||
}
|
||||
|
||||
//发货单部分分配
|
||||
public void manualAllocate(Map params){
|
||||
this.remoteCall(MANUAL_ALLOCATE_INFO,CT_PA.PA_MANAGER,"manual_Allocate",params);
|
||||
}
|
||||
|
||||
|
||||
/*异步获取后台波次信息*/
|
||||
public void initWaveDocInfo(Map params) {
|
||||
this.remoteCall(INIT_WAVE_DOC_INFO,CT_PA.WD_MANAGER,"init_WD_INFO",params);
|
||||
}
|
||||
|
||||
/*异步获取后台波次明细信息*/
|
||||
public void initWaveDocDetailsInfo(Map params) {
|
||||
this.remoteCall(INIT_WD_DETAILS_INFO,CT_PA.WD_MANAGER,"init_WDD_INFO",params);
|
||||
}
|
||||
/*异步获取后台一条波次明细的库存信息*/
|
||||
public void initWaveDocAvailableInfo(Map params) {
|
||||
this.remoteCall(INIT_WD_AVAILABLE_INFO,CT_PA.WD_MANAGER,"init_WDAL_INFO",params);
|
||||
}
|
||||
|
||||
/*异步获取后台波次已分配信息*/
|
||||
public void initWaveDocAllocatedInfo(Map params) {
|
||||
this.remoteCall(INIT_WD_ALLOCATED_INFO,CT_PA.WD_MANAGER,"init_WDALD_INFO",params);
|
||||
}
|
||||
//波次整单分配
|
||||
public void atuoWaveDocAllocate(Map params){
|
||||
this.remoteCall(AUTO_WD_ALLOCATE_INFO,CT_PA.WD_MANAGER,"auto_WD_Allocate",params);
|
||||
}
|
||||
|
||||
//波次取消分配
|
||||
public void cancellWaveDocAllocate(Map params){
|
||||
this.remoteCall(CANCELL_WD_ALLOCATE_INFO,CT_PA.WD_MANAGER,"cancell_WD_Allocate",params);
|
||||
}
|
||||
|
||||
//波次部分分配
|
||||
public void manualWaveDocAllocate(Map params){
|
||||
this.remoteCall(MANUAL_WD_ALLOCATE_INFO,CT_PA.WD_MANAGER,"manual_WD_Allocate",params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String message, Map result) {
|
||||
// TODO Auto-generated method stub
|
||||
System.out.print("读数据失败!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String message, Map result) {
|
||||
if(INIT_PICK_TICKETS_INFO.equals(message)) {
|
||||
this.curPickTicket= (PT_INFO)result.get(CT_PA.PT_RESULT);
|
||||
this.sendMessage(INIT_PICK_TICKETS_INFO);
|
||||
}else if(INIT_WAVE_DOC_INFO.equals(message)) {
|
||||
this.curPickTicket= (PT_INFO)result.get(CT_PA.PT_RESULT);
|
||||
this.sendMessage(INIT_WAVE_DOC_INFO);
|
||||
}else if(INIT_DETAILS_INFO.equals(message)){
|
||||
this.pds= (List)result.get(CT_PA.PD_RESULT);
|
||||
this.sendMessage(INIT_DETAILS_INFO);
|
||||
}else if(INIT_WD_DETAILS_INFO.equals(message)){
|
||||
this.pds= (List)result.get(CT_PA.PD_RESULT);
|
||||
this.sendMessage(INIT_WD_DETAILS_INFO);
|
||||
}else if(INIT_AVAILABLE_INFO.equals(message)){
|
||||
this.ptas= (List)result.get(CT_PA.PTA_RESULT);
|
||||
this.sendMessage(INIT_AVAILABLE_INFO);
|
||||
}else if(INIT_WD_AVAILABLE_INFO.equals(message)){
|
||||
this.ptas= (List)result.get(CT_PA.PTA_RESULT);
|
||||
this.sendMessage(INIT_WD_AVAILABLE_INFO);
|
||||
}else if(INIT_ALLOCATED_INFO.equals(message)){
|
||||
this.ptad= (List)result.get(CT_PA.PTAD_RESULT);
|
||||
this.sendMessage(INIT_ALLOCATED_INFO);
|
||||
}else if(INIT_WD_ALLOCATED_INFO.equals(message)){
|
||||
this.ptad= (List)result.get(CT_PA.PTAD_RESULT);
|
||||
this.sendMessage(INIT_WD_ALLOCATED_INFO);
|
||||
}else if(AUTO_ALLOCATE_INFO.equals(message)){
|
||||
reloadPT(result);
|
||||
this.sendMessage(AUTO_ALLOCATE_INFO);
|
||||
}else if(AUTO_WD_ALLOCATE_INFO.equals(message)){
|
||||
reloadWD(result);
|
||||
this.sendMessage(AUTO_WD_ALLOCATE_INFO);
|
||||
}else if(CANCELL_ALLOCATE_INFO.equals(message)){
|
||||
reloadPT(result);
|
||||
this.sendMessage(CANCELL_ALLOCATE_INFO);
|
||||
}else if(CANCELL_WD_ALLOCATE_INFO.equals(message)){
|
||||
reloadWD(result);
|
||||
this.sendMessage(CANCELL_WD_ALLOCATE_INFO);
|
||||
}else if(MANUAL_ALLOCATE_INFO.equals(message)){
|
||||
final Map result1 = new HashMap();
|
||||
result1.put("pickTicketId", curPickTicket.getId());
|
||||
reloadPT(result1);
|
||||
this.sendMessage(MANUAL_ALLOCATE_INFO);
|
||||
}else if(MANUAL_WD_ALLOCATE_INFO.equals(message)){
|
||||
final Map result1 = new HashMap();
|
||||
result1.put("waveDocId", curPickTicket.getId());
|
||||
reloadWD(result1);
|
||||
this.sendMessage(MANUAL_WD_ALLOCATE_INFO);
|
||||
}
|
||||
}
|
||||
/*重新初始化发货单信息*/
|
||||
public void reloadPT(Map result){
|
||||
initPickTicketInfo(result);
|
||||
initDetailsInfo(result);
|
||||
initAllocatedInfo(result);
|
||||
}
|
||||
/*重新初始化波次信息*/
|
||||
public void reloadWD(Map result){
|
||||
initWaveDocInfo(result);
|
||||
initWaveDocDetailsInfo(result);
|
||||
initWaveDocAllocatedInfo(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTimeOutFailure(String message) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*库存占用比对象
|
||||
*/
|
||||
public class JB_IV implements IsSerializable {
|
||||
|
||||
private Long iv_wh_id;
|
||||
private String iv_wh_name;
|
||||
private Double iv_rate;
|
||||
private int x_Pos;
|
||||
private int y_Pos;
|
||||
private String image_url;//库区布局图
|
||||
|
||||
public String getImage_url() {
|
||||
return image_url;
|
||||
}
|
||||
|
||||
public void setImage_url(String image_url) {
|
||||
this.image_url = image_url;
|
||||
}
|
||||
|
||||
public JB_IV(){}
|
||||
|
||||
public JB_IV(Object id, Object name , Object rate , Object xPos , Object yPos , Object image) {
|
||||
this(id,name,rate,xPos,yPos);
|
||||
this.image_url = image == null?"" : (String)image;
|
||||
}
|
||||
|
||||
public JB_IV(Object id, Object name , Object rate , Object xPos , Object yPos) {
|
||||
this((Long)id,(String)name,(Double)rate);
|
||||
this.x_Pos = (Integer)xPos;
|
||||
this.y_Pos = (Integer)yPos;
|
||||
}
|
||||
|
||||
public JB_IV(Long id, String name , Double rate) {
|
||||
this.iv_wh_id = id;
|
||||
this.iv_wh_name = name;
|
||||
this.iv_rate = rate == null ? 0D : rate;
|
||||
}
|
||||
|
||||
|
||||
public int getX_Pos() {
|
||||
return x_Pos;
|
||||
}
|
||||
|
||||
public void setX_Pos(int pos) {
|
||||
x_Pos = pos;
|
||||
}
|
||||
|
||||
public int getY_Pos() {
|
||||
return y_Pos;
|
||||
}
|
||||
|
||||
public void setY_Pos(int pos) {
|
||||
y_Pos = pos;
|
||||
}
|
||||
|
||||
public Double getIv_rate() {
|
||||
return iv_rate;
|
||||
}
|
||||
public void setIv_rate(Double iv_rate) {
|
||||
this.iv_rate = iv_rate;
|
||||
}
|
||||
public Long getIv_wh_id() {
|
||||
return iv_wh_id;
|
||||
}
|
||||
public void setIv_wh_id(Long iv_wh_id) {
|
||||
this.iv_wh_id = iv_wh_id;
|
||||
}
|
||||
public String getIv_wh_name() {
|
||||
return iv_wh_name;
|
||||
}
|
||||
public void setIv_wh_name(String iv_wh_name) {
|
||||
this.iv_wh_name = iv_wh_name;
|
||||
}
|
||||
/** 转化为二维数组 */
|
||||
public Object[][] to2Array() {
|
||||
return new Object[][]{
|
||||
new Object[]{this.getIv_wh_name() , this.getIv_rate()}
|
||||
};
|
||||
}
|
||||
/** 获取坐标值 */
|
||||
public int[] toXY() {
|
||||
return new int[]{this.x_Pos , this.y_Pos};
|
||||
}
|
||||
|
||||
/** 转化为数组 */
|
||||
public String[] toStrArray() {
|
||||
return new String[]{this.iv_wh_name , this.x_Pos + "" , this.y_Pos + ""};
|
||||
}
|
||||
|
||||
/** 属性中文称呼数组 */
|
||||
public static String[] toLocaliedArray() {
|
||||
return new String[]{
|
||||
"序号",
|
||||
"仓库名称",
|
||||
"仓库容积率",
|
||||
"X坐标",
|
||||
"Y坐标",
|
||||
"仓库布局图"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class JB_Location_IV implements IsSerializable {
|
||||
|
||||
private Long loc_id;
|
||||
private int loc_aisle;
|
||||
private int loc_line;
|
||||
private Double loc_rate;
|
||||
|
||||
public JB_Location_IV(){}
|
||||
|
||||
public JB_Location_IV(Object id,Object line , Object aisle,Object rate) {
|
||||
this.loc_id = (Long)id;
|
||||
this.loc_rate = ((Double)rate > 1D ? 1D:(Double)rate);
|
||||
this.loc_aisle = (Integer)aisle;
|
||||
this.loc_line = (Integer)line;
|
||||
}
|
||||
|
||||
public JB_Location_IV(Object line , Object aisle,Object rate) {
|
||||
this(null,line,aisle,rate);
|
||||
}
|
||||
|
||||
public int getLoc_aisle() {
|
||||
return loc_aisle;
|
||||
}
|
||||
|
||||
public void setLoc_aisle(int loc_aisle) {
|
||||
this.loc_aisle = loc_aisle;
|
||||
}
|
||||
|
||||
public Long getLoc_id() {
|
||||
return loc_id;
|
||||
}
|
||||
|
||||
public void setLoc_id(Long loc_id) {
|
||||
this.loc_id = loc_id;
|
||||
}
|
||||
|
||||
public int getLoc_line() {
|
||||
return loc_line;
|
||||
}
|
||||
|
||||
public void setLoc_line(int loc_line) {
|
||||
this.loc_line = loc_line;
|
||||
}
|
||||
|
||||
public Double getLoc_rate() {
|
||||
return loc_rate;
|
||||
}
|
||||
|
||||
public void setLoc_rate(Double loc_rate) {
|
||||
this.loc_rate = loc_rate;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
JB_Location_IV castOther = (JB_Location_IV)obj;
|
||||
return this.loc_aisle == castOther.getLoc_aisle() && this.loc_line == castOther.getLoc_line();
|
||||
}
|
||||
|
||||
public int hashCode(){
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class JB_Location_IV_List extends ArrayList<JB_Location_IV> implements IsSerializable{
|
||||
|
||||
public JB_Location_IV_List(){
|
||||
super();
|
||||
}
|
||||
|
||||
public Object[] toArray() {
|
||||
Object[] objs = new Object[this.size() + 1];
|
||||
int i = 0;
|
||||
for(JB_Location_IV liv : this) {
|
||||
if(i == 0) {
|
||||
objs[0] = liv.getLoc_line() + "排";
|
||||
}
|
||||
objs[++i] = liv.getLoc_rate();
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,181 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class JB_Location_Inventory implements IsSerializable {
|
||||
|
||||
private Long id;
|
||||
private String org_name;
|
||||
private String loc_code;
|
||||
private String item_code;
|
||||
private String item_name;
|
||||
private String lot;
|
||||
private String unit;
|
||||
private double quantity;
|
||||
private double weight;
|
||||
private double volume;
|
||||
private int age;
|
||||
private String lp;
|
||||
|
||||
public JB_Location_Inventory(){
|
||||
}
|
||||
/** 两个日期之间间隔的天数 */
|
||||
public Integer getBetweenDays(Date sDate,Date eDate) {
|
||||
long DAY = 24L * 60L * 60L * 1000L;
|
||||
return new Integer((int)((eDate.getTime() - sDate.getTime())/DAY));
|
||||
}
|
||||
|
||||
public JB_Location_Inventory(Object id ,Object org_name, Object loc_code,Object code,Object name
|
||||
,Object lot,Object unit,Object quantity,Object weight,Object volume , Object age , Object lp){
|
||||
this(id ,org_name, loc_code,code, name, lot, unit, quantity, weight, volume);
|
||||
this.age = age == null ? 0 : getBetweenDays((Date)age , new Date());
|
||||
this.lp = lp == null ? " " : (String)lp;
|
||||
}
|
||||
|
||||
public JB_Location_Inventory(Object id ,Object org_name, Object loc_code,Object code,Object name
|
||||
,Object lot,Object unit,Object quantity,Object weight,Object volume){
|
||||
this.id = (Long)id;
|
||||
this.org_name = (String)org_name;
|
||||
this.loc_code = (String)loc_code;
|
||||
this.item_code = (String)code;
|
||||
this.item_name = (String)name;
|
||||
this.lot = (lot == null ? " ":lot.toString());
|
||||
this.unit = (String)unit;
|
||||
this.quantity = (Double)quantity;
|
||||
this.weight = (Double)weight;
|
||||
this.volume = (Double)volume;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getLp() {
|
||||
return lp;
|
||||
}
|
||||
|
||||
public void setLp(String lp) {
|
||||
this.lp = lp;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getItem_code() {
|
||||
return item_code;
|
||||
}
|
||||
public void setItem_code(String item_code) {
|
||||
this.item_code = item_code;
|
||||
}
|
||||
public String getItem_name() {
|
||||
return item_name;
|
||||
}
|
||||
public void setItem_name(String item_name) {
|
||||
this.item_name = item_name;
|
||||
}
|
||||
public String getLoc_code() {
|
||||
return loc_code;
|
||||
}
|
||||
public void setLoc_code(String loc_code) {
|
||||
this.loc_code = loc_code;
|
||||
}
|
||||
public String getLot() {
|
||||
return lot;
|
||||
}
|
||||
public void setLot(String lot) {
|
||||
this.lot = lot;
|
||||
}
|
||||
public double getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
public void setQuantity(double quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
public double getVolume() {
|
||||
return volume;
|
||||
}
|
||||
public void setVolume(double volume) {
|
||||
this.volume = volume;
|
||||
}
|
||||
public double getWeight() {
|
||||
return weight;
|
||||
}
|
||||
public void setWeight(double weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public String getOrg_name() {
|
||||
return org_name;
|
||||
}
|
||||
|
||||
public void setOrg_name(String org_name) {
|
||||
this.org_name = org_name;
|
||||
}
|
||||
|
||||
public Object[] toArray(){
|
||||
return new Object[]{
|
||||
this.org_name,
|
||||
this.loc_code,
|
||||
this.item_code,
|
||||
this.item_name,
|
||||
this.lot,
|
||||
this.unit,
|
||||
this.quantity,
|
||||
this.weight,
|
||||
this.volume,
|
||||
this.age,
|
||||
this.lp
|
||||
};
|
||||
}
|
||||
|
||||
public static String[] propertyToArray(){
|
||||
return new String[]{
|
||||
"org_name",
|
||||
"loc_code",
|
||||
"item_code",
|
||||
"item_name",
|
||||
"lot",
|
||||
"unit",
|
||||
"quantity",
|
||||
"weight",
|
||||
"volume",
|
||||
"age",
|
||||
"lp"
|
||||
};
|
||||
}
|
||||
|
||||
public static String[] localizedToArray(){
|
||||
return new String[]{
|
||||
"货主",
|
||||
"库位",
|
||||
"货品编码",
|
||||
"货品名称",
|
||||
"批次属性",
|
||||
"包装",
|
||||
"库存数量",
|
||||
"重量",
|
||||
"体积",
|
||||
"库龄",
|
||||
"托盘号"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class JB_Location_RC_IV implements IsSerializable {
|
||||
|
||||
private Long id;
|
||||
private int row;
|
||||
private int col;
|
||||
private int aisle;
|
||||
private int line;
|
||||
private double rate;
|
||||
private String code;
|
||||
private String name;
|
||||
private double length;// 长
|
||||
private double width;// 宽
|
||||
private double height;// 高
|
||||
private double totalWeight;//总重量
|
||||
private double totalVolume;//总体积
|
||||
private double totalQuantity;//总件数
|
||||
private int totalLP;//总托数
|
||||
private double fullRate;//库满度
|
||||
|
||||
public JB_Location_RC_IV(){}
|
||||
|
||||
public JB_Location_RC_IV(Object row,Object col,Object rate) {
|
||||
this.rate = (Double)rate;
|
||||
this.row = (Integer)row;
|
||||
this.col = (Integer)col;
|
||||
}
|
||||
|
||||
public double getFullRate() {
|
||||
return fullRate;
|
||||
}
|
||||
|
||||
public void setFullRate(double fullRate) {
|
||||
this.fullRate = fullRate;
|
||||
}
|
||||
|
||||
public double getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
public void setLength(double length) {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
public double getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(double height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getTotalLP() {
|
||||
return totalLP;
|
||||
}
|
||||
|
||||
public void setTotalLP(int totalLP) {
|
||||
this.totalLP = totalLP;
|
||||
}
|
||||
|
||||
public double getTotalQuantity() {
|
||||
return totalQuantity;
|
||||
}
|
||||
|
||||
public void setTotalQuantity(double totalQuantity) {
|
||||
this.totalQuantity = totalQuantity;
|
||||
}
|
||||
|
||||
public double getTotalVolume() {
|
||||
return totalVolume;
|
||||
}
|
||||
|
||||
public void setTotalVolume(double totalVolume) {
|
||||
this.totalVolume = totalVolume;
|
||||
}
|
||||
|
||||
public double getTotalWeight() {
|
||||
return totalWeight;
|
||||
}
|
||||
|
||||
public void setTotalWeight(double totalWeight) {
|
||||
this.totalWeight = totalWeight;
|
||||
}
|
||||
|
||||
public double getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public void setWidth(double width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
public int getCol() {
|
||||
return col;
|
||||
}
|
||||
public void setCol(int col) {
|
||||
this.col = col;
|
||||
}
|
||||
public double getRate() {
|
||||
return rate;
|
||||
}
|
||||
public void setRate(double rate) {
|
||||
this.rate = rate;
|
||||
}
|
||||
public int getRow() {
|
||||
return row;
|
||||
}
|
||||
public void setRow(int row) {
|
||||
this.row = row;
|
||||
}
|
||||
|
||||
public int getAisle() {
|
||||
return aisle;
|
||||
}
|
||||
|
||||
public void setAisle(int aisle) {
|
||||
this.aisle = aisle;
|
||||
}
|
||||
|
||||
public int getLine() {
|
||||
return line;
|
||||
}
|
||||
|
||||
public void setLine(int line) {
|
||||
this.line = line;
|
||||
}
|
||||
|
||||
public String[] toTipArray(){
|
||||
return new String[]{
|
||||
this.code,
|
||||
this.length + "",
|
||||
this.width + "",
|
||||
this.height + "",
|
||||
this.totalQuantity + "",
|
||||
this.totalWeight + "",
|
||||
this.totalVolume + "",
|
||||
this.totalLP + "",
|
||||
this.fullRate + ""
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class JB_Location_RC_IV_List extends ArrayList<JB_Location_RC_IV> implements IsSerializable {
|
||||
|
||||
public JB_Location_RC_IV_List(){
|
||||
super();
|
||||
}
|
||||
|
||||
public Object[] toArray() {
|
||||
Object[] objs = new Object[this.size() + 1];
|
||||
int i = 0;
|
||||
for(JB_Location_RC_IV riv : this) {
|
||||
if(i == 0) {
|
||||
objs[0] = riv.getRow() + "层";
|
||||
}
|
||||
objs[++i] = riv.getRate();
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class JB_Zone_IV implements IsSerializable {
|
||||
|
||||
private Long loc_id;
|
||||
private String loc_name;
|
||||
private String loc_code;
|
||||
private Double loc_rate;
|
||||
private Integer loc_xPos;
|
||||
private Integer loc_yPos;
|
||||
|
||||
public JB_Zone_IV(){}
|
||||
|
||||
public JB_Zone_IV(Object id , Object code, Object name , Object rate ,Object x , Object y){
|
||||
this.loc_id = (Long)id;
|
||||
this.loc_code = (String)code;
|
||||
this.loc_name = (String)name;
|
||||
this.loc_rate = rate == null ? 0D: (Double)rate;
|
||||
this.loc_xPos = (Integer)x;
|
||||
this.loc_yPos = (Integer)y;
|
||||
}
|
||||
|
||||
public String getLoc_code() {
|
||||
return loc_code;
|
||||
}
|
||||
|
||||
public void setLoc_code(String loc_code) {
|
||||
this.loc_code = loc_code;
|
||||
}
|
||||
|
||||
public Long getLoc_id() {
|
||||
return loc_id;
|
||||
}
|
||||
|
||||
public void setLoc_id(Long loc_id) {
|
||||
this.loc_id = loc_id;
|
||||
}
|
||||
|
||||
public String getLoc_name() {
|
||||
return loc_name;
|
||||
}
|
||||
|
||||
public void setLoc_name(String loc_name) {
|
||||
this.loc_name = loc_name;
|
||||
}
|
||||
|
||||
public Double getLoc_rate() {
|
||||
return loc_rate;
|
||||
}
|
||||
|
||||
public void setLoc_rate(Double loc_rate) {
|
||||
this.loc_rate = loc_rate;
|
||||
}
|
||||
|
||||
public Integer getLoc_xPos() {
|
||||
return loc_xPos;
|
||||
}
|
||||
|
||||
public void setLoc_xPos(Integer loc_xPos) {
|
||||
this.loc_xPos = loc_xPos;
|
||||
}
|
||||
|
||||
public Integer getLoc_yPos() {
|
||||
return loc_yPos;
|
||||
}
|
||||
|
||||
public void setLoc_yPos(Integer loc_yPos) {
|
||||
this.loc_yPos = loc_yPos;
|
||||
}
|
||||
|
||||
public int[] toXY() {
|
||||
return new int[]{this.loc_xPos , this.loc_yPos};
|
||||
}
|
||||
|
||||
public String[] toStrArray() {
|
||||
return new String[]{this.loc_code , this.loc_name , this.loc_xPos + "" , this.loc_yPos + ""};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import java.util.Date;
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class PT_ALLOCATED implements IsSerializable {
|
||||
//任务号
|
||||
private Long taskId;
|
||||
//库存代号
|
||||
private String locationCode;
|
||||
//货品代号
|
||||
private String itemCode;
|
||||
//货品名称
|
||||
private String itemName;
|
||||
//包装单位
|
||||
private String packageUnit;
|
||||
//计划移位数量
|
||||
private double planQuantity;
|
||||
//计划移位数量MU
|
||||
private double planQuantityMU;
|
||||
//取消分配数量
|
||||
private Integer manualQuantity;
|
||||
//批次属性
|
||||
private String lotInfor;
|
||||
//存货日期
|
||||
private Date inventoryStorageDate;
|
||||
private String inventorySOI;
|
||||
|
||||
public PT_ALLOCATED(){
|
||||
|
||||
}
|
||||
|
||||
public PT_ALLOCATED(Object taskId,Object locationCode,Object itemCode,Object itemName,
|
||||
Object packageUnit,Object planQuantity,Object planQuantityMU,Object manualQuantity,
|
||||
Object lotInfor,Object inventoryStorageDate,Object inventorySOI){
|
||||
this.taskId = (Long)taskId;
|
||||
this.locationCode = (String)locationCode;
|
||||
this.itemCode = (String)itemCode;
|
||||
this.itemName = itemName == null?"" : (String)itemName;
|
||||
this.packageUnit = (String)packageUnit;
|
||||
this.planQuantity = planQuantity == null ? 0D : (Double)planQuantity;
|
||||
this.planQuantityMU = planQuantityMU == null ? 0D : (Double)planQuantityMU;
|
||||
this.manualQuantity = 0;
|
||||
this.lotInfor = lotInfor == null?" " : lotInfor.toString();
|
||||
this.inventoryStorageDate = (Date)inventoryStorageDate;
|
||||
this.inventorySOI = inventorySOI == null?"" : (String)inventorySOI;
|
||||
}
|
||||
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getLocationCode() {
|
||||
return locationCode;
|
||||
}
|
||||
|
||||
public void setLocationCode(String locationCode) {
|
||||
this.locationCode = locationCode;
|
||||
}
|
||||
|
||||
public String getItemCode() {
|
||||
return itemCode;
|
||||
}
|
||||
|
||||
public void setItemCode(String itemCode) {
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public String getPackageUnit() {
|
||||
return packageUnit;
|
||||
}
|
||||
|
||||
public void setPackageUnit(String packageUnit) {
|
||||
this.packageUnit = packageUnit;
|
||||
}
|
||||
|
||||
public double getPlanQuantity() {
|
||||
return planQuantity;
|
||||
}
|
||||
|
||||
public void setPlanQuantity(double planQuantity) {
|
||||
this.planQuantity = planQuantity;
|
||||
}
|
||||
|
||||
public double getPlanQuantityMU() {
|
||||
return planQuantityMU;
|
||||
}
|
||||
|
||||
public void setPlanQuantityMU(double planQuantityMU) {
|
||||
this.planQuantityMU = planQuantityMU;
|
||||
}
|
||||
|
||||
public double getManualQuantity() {
|
||||
return manualQuantity;
|
||||
}
|
||||
|
||||
public void setManualQuantity(Integer manualQuantity) {
|
||||
this.manualQuantity = manualQuantity;
|
||||
}
|
||||
|
||||
public String getLotInfor() {
|
||||
return lotInfor;
|
||||
}
|
||||
|
||||
public void setLotInfor(String lotInfor) {
|
||||
this.lotInfor = lotInfor;
|
||||
}
|
||||
|
||||
public Date getInventoryStorageDate() {
|
||||
return inventoryStorageDate;
|
||||
}
|
||||
|
||||
public void setInventoryStorageDate(Date inventoryStorageDate) {
|
||||
this.inventoryStorageDate = inventoryStorageDate;
|
||||
}
|
||||
|
||||
public String getInventorySOI() {
|
||||
return inventorySOI;
|
||||
}
|
||||
|
||||
public void setInventorySOI(String inventorySOI) {
|
||||
this.inventorySOI = inventorySOI;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import java.util.Date;
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class PT_AVAILABLE implements IsSerializable {
|
||||
//库位号
|
||||
private Long inventoryId;
|
||||
//库位代号
|
||||
private String locationCode;
|
||||
//货品代号
|
||||
private String itemCode;
|
||||
//货品名称
|
||||
private String itemName;
|
||||
//包装单位
|
||||
private String packageUnit;
|
||||
//折算系数
|
||||
private Integer packageUnitConvertFigure;
|
||||
//库存数量
|
||||
private double inventoryQuantity;
|
||||
//可用数量
|
||||
private double inventoryAvailableQuantity;
|
||||
//手工分配数量
|
||||
private double inventoryManualQuantity;
|
||||
//批次号
|
||||
private String itemKeyLot;
|
||||
//批次属性
|
||||
private String lotInfor;
|
||||
//存货日期
|
||||
private Date inventoryStorageDate;
|
||||
//SOI
|
||||
private String inventorySOI;
|
||||
|
||||
public PT_AVAILABLE(){
|
||||
|
||||
}
|
||||
public PT_AVAILABLE(Object inventoryId,Object locationCode,Object itemCode,Object itemName,
|
||||
Object packageUnit,Object packageUnitConvertFigure,Object inventoryQuantity,Object inventoryAvailableQuantity,
|
||||
Object inventoryManualQuantity,Object itemKeyLot,Object lotInfor,Object inventoryStorageDate,Object inventorySOI){
|
||||
this.inventoryId = (Long)inventoryId;
|
||||
this.locationCode = (String)locationCode;
|
||||
this.itemCode = (String)itemCode;
|
||||
this.itemName = itemName == null?"" : (String)itemName;
|
||||
this.packageUnit = (String)packageUnit;
|
||||
this.packageUnitConvertFigure = packageUnitConvertFigure == null ? 0 : (Integer)packageUnitConvertFigure;
|
||||
this.inventoryQuantity = inventoryQuantity == null ? 0D : (Double)inventoryQuantity;
|
||||
this.inventoryAvailableQuantity = (Double)inventoryAvailableQuantity;
|
||||
this.inventoryManualQuantity = 0D;
|
||||
this.itemKeyLot = itemKeyLot == null?"" : (String)itemKeyLot;
|
||||
this.lotInfor = lotInfor == null?"" : lotInfor.toString();
|
||||
this.inventoryStorageDate = (Date)inventoryStorageDate;
|
||||
this.inventorySOI = inventorySOI == null?"" : (String)inventorySOI;
|
||||
}
|
||||
|
||||
public Long getInventoryId() {
|
||||
return inventoryId;
|
||||
}
|
||||
public void setInventoryId(Long inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
public String getLocationCode() {
|
||||
return locationCode;
|
||||
}
|
||||
public void setLocationCode(String locationCode) {
|
||||
this.locationCode = locationCode;
|
||||
}
|
||||
public String getItemCode() {
|
||||
return itemCode;
|
||||
}
|
||||
public void setItemCode(String itemCode) {
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
public String getPackageUnit() {
|
||||
return packageUnit;
|
||||
}
|
||||
public void setPackageUnit(String packageUnit) {
|
||||
this.packageUnit = packageUnit;
|
||||
}
|
||||
public Integer getPackageUnitConvertFigure() {
|
||||
return packageUnitConvertFigure;
|
||||
}
|
||||
public void setPackageUnitConvertFigure(Integer packageUnitConvertFigure) {
|
||||
this.packageUnitConvertFigure = packageUnitConvertFigure;
|
||||
}
|
||||
public double getInventoryQuantity() {
|
||||
return inventoryQuantity;
|
||||
}
|
||||
public void setInventoryQuantity(double inventoryQuantity) {
|
||||
this.inventoryQuantity = inventoryQuantity;
|
||||
}
|
||||
public double getInventoryAvailableQuantity() {
|
||||
return inventoryAvailableQuantity;
|
||||
}
|
||||
public void setInventoryAvailableQuantity(double inventoryAvailableQuantity) {
|
||||
this.inventoryAvailableQuantity = inventoryAvailableQuantity;
|
||||
}
|
||||
public double getInventoryManualQuantity() {
|
||||
return inventoryManualQuantity;
|
||||
}
|
||||
public void setInventoryManualQuantity(double inventoryManualQuantity) {
|
||||
this.inventoryManualQuantity = inventoryManualQuantity;
|
||||
}
|
||||
public String getItemKeyLot() {
|
||||
return itemKeyLot;
|
||||
}
|
||||
public void setItemKeyLot(String itemKeyLot) {
|
||||
this.itemKeyLot = itemKeyLot;
|
||||
}
|
||||
public String getLotInfor() {
|
||||
return lotInfor;
|
||||
}
|
||||
public void setLotInfor(String lotInfor) {
|
||||
this.lotInfor = lotInfor;
|
||||
}
|
||||
public Date getInventoryStorageDate() {
|
||||
return inventoryStorageDate;
|
||||
}
|
||||
public void setInventoryStorageDate(Date inventoryStorageDate) {
|
||||
this.inventoryStorageDate = inventoryStorageDate;
|
||||
}
|
||||
public String getInventorySOI() {
|
||||
return inventorySOI;
|
||||
}
|
||||
public void setInventorySOI(String inventorySOI) {
|
||||
this.inventorySOI = inventorySOI;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,368 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
|
||||
public class PT_DETAILS implements IsSerializable {
|
||||
|
||||
private Long pickTicketDetailId;
|
||||
private Long itemId;
|
||||
private Long packageUnitId;
|
||||
|
||||
private Integer packageUnitConvertFigure;
|
||||
|
||||
private String itemCode;
|
||||
private String itemName;
|
||||
private String packageUnit;
|
||||
|
||||
private double orderQuantity;
|
||||
private double orderQtyOfMasterUnit;
|
||||
private double preAllocatedQuantity;
|
||||
private double allocatedQuantity;
|
||||
private double pickedQuantity;
|
||||
private double shippedQuantity;
|
||||
|
||||
private String newLotInfo;
|
||||
private String propC1;
|
||||
private String propC2;
|
||||
private String propC3;
|
||||
private String propC4;
|
||||
private String propC5;
|
||||
private String propC6;
|
||||
private String propC7;
|
||||
private String propC8;
|
||||
private String propC9;
|
||||
|
||||
private String propN1;
|
||||
private String propN2;
|
||||
private String propN3;
|
||||
|
||||
private String propD1;
|
||||
private String propD2;
|
||||
private String propD3;
|
||||
|
||||
private String propL1;
|
||||
private String propL2;
|
||||
private String propL3;
|
||||
|
||||
public PT_DETAILS(){
|
||||
|
||||
}
|
||||
|
||||
public PT_DETAILS(Object pickTicketDetailId,Object itemId,Object packageUnitId,Object packageUnitConvertFigure,
|
||||
Object itemCode,Object itemName,Object packageUnit,Object orderQuantity,Object orderQtyOfMasterUnit,
|
||||
Object preAllocatedQuantity,Object allocatedQuantity,Object pickedQuantity,Object shippedQuantity,
|
||||
Object newLotInfo,Object propC1,Object propC2,Object propC3,Object propC4,Object propC5,Object propC6,
|
||||
Object propC7,Object propC8,Object propC9,Object propN1,Object propN2,Object propN3,Object propD1,
|
||||
Object propD2,Object propD3,Object propL1,Object propL2,Object propL3){
|
||||
|
||||
this.pickTicketDetailId = (Long)pickTicketDetailId;
|
||||
this.itemId = (Long)itemId;
|
||||
this.packageUnitId = (Long)packageUnitId;
|
||||
this.packageUnitConvertFigure = (Integer)packageUnitConvertFigure;
|
||||
this.itemCode = (String)itemCode;
|
||||
this.itemName = (String)itemName;
|
||||
this.packageUnit = (String)packageUnit;
|
||||
this.orderQuantity = (Double)orderQuantity;
|
||||
this.orderQtyOfMasterUnit = (Double)orderQtyOfMasterUnit;
|
||||
this.preAllocatedQuantity = (Double)preAllocatedQuantity;
|
||||
this.allocatedQuantity = (Double)allocatedQuantity;
|
||||
this.pickedQuantity = pickedQuantity == null? 0D : (Double)pickedQuantity;
|
||||
this.shippedQuantity = shippedQuantity == null? 0D : (Double)shippedQuantity;
|
||||
//this.newLotInfo = (NewLotInfo)newLotInfo;
|
||||
this.propC1 = propC1 == null?"" : (String)propC1;
|
||||
this.propC2 = propC2 == null?"" : (String)propC2;
|
||||
this.propC3 = propC3 == null?"" : (String)propC3;
|
||||
this.propC4 = propC4 == null?"" : (String)propC4;
|
||||
this.propC5 = propC5 == null?"" : (String)propC5;
|
||||
this.propC6 = propC6 == null?"" : (String)propC6;
|
||||
this.propC7 = propC7 == null?"" : (String)propC7;
|
||||
this.propC8 = propC8 == null?"" : (String)propC8;
|
||||
this.propC9 = propC9 == null?"" : (String)propC9;
|
||||
this.propN1 = propN1 == null?"" : (String)propN1;
|
||||
this.propN2 = propN2 == null?"" : (String)propN2;
|
||||
this.propN3 = propN3 == null?"" : (String)propN3;
|
||||
this.propD1 = propD1 == null?"" : (String)propD1;
|
||||
this.propD2 = propD2 == null?"" : (String)propD2;
|
||||
this.propD3 = propD3 == null?"" : (String)propD3;
|
||||
this.propL1 = propL1 == null?"" : (String)propL1;
|
||||
this.propL2 = propL2 == null?"" : (String)propL2;
|
||||
this.propL3 = propL3 == null?"" : (String)propL3;
|
||||
this.newLotInfo = this.toLotInfor(this.propC1, this.propC2, this.propC3, this.propC4, this.propC5, this.propC6, this.propC7, this.propC8,
|
||||
this.propC9, this.propN1, this.propN2, this.propN3, this.propD1, this.propD2, this.propD3, this.propL1, this.propL2, this.propL3);
|
||||
}
|
||||
|
||||
|
||||
public String toLotInfor(String propC1,String propC2,String propC3,String propC4,String propC5,String propC6,
|
||||
String propC7,String propC8,String propC9,String propN1,String propN2,String propN3,String propD1,
|
||||
String propD2,String propD3,String propL1,String propL2,String propL3){
|
||||
|
||||
String result = "";
|
||||
if(propC1 != null && !"".equals(propC1)){
|
||||
result += "#" + propC1;
|
||||
}
|
||||
if(propC2 != null && !"".equals(propC2)){
|
||||
result += "#" + propC2;
|
||||
}
|
||||
if(propC3 != null && !"".equals(propC3)){
|
||||
result += "#" + propC3;
|
||||
}
|
||||
if(propC4 != null && !"".equals(propC4)){
|
||||
result += "#" + propC4;
|
||||
}
|
||||
if(propC5 != null && !"".equals(propC5)){
|
||||
result += "#" + propC5;
|
||||
}
|
||||
if(propC6 != null && !"".equals(propC6)){
|
||||
result += "#" + propC6;
|
||||
}
|
||||
if(propC7 != null && !"".equals(propC7)){
|
||||
result += "#" + propC7;
|
||||
}
|
||||
if(propC8 != null && !"".equals(propC8)){
|
||||
result += "#" + propC8;
|
||||
}
|
||||
if(propC9 != null && !"".equals(propC9)){
|
||||
result += "#" + propC9;
|
||||
}
|
||||
if(propN1 != null && !"".equals(propN1)){
|
||||
result += "#" + propN1;
|
||||
}
|
||||
if(propN2 != null && !"".equals(propN2)){
|
||||
result += "#" + propN2;
|
||||
}
|
||||
if(propN3 != null && !"".equals(propN3)){
|
||||
result += "#" + propN3;
|
||||
}
|
||||
if(propD1 != null && !"".equals(propD1)){
|
||||
result += "#" + propD1;
|
||||
}
|
||||
if(propD2 != null && !"".equals(propD2)){
|
||||
result += "#" + propD2;
|
||||
}
|
||||
if(propD3 != null && !"".equals(propD3)){
|
||||
result += "#" + propD3;
|
||||
}
|
||||
if(propL1 != null && !"".equals(propL1)){
|
||||
result += "#" + propL1;
|
||||
}
|
||||
if(this.propL2 != null && !"".equals(propL2)){
|
||||
result += "#" + propL2;
|
||||
}
|
||||
if(propL3 != null && !"".equals(propL3)){
|
||||
result += "#" + propL3;
|
||||
}
|
||||
|
||||
if( result != null ){
|
||||
result = result.replaceFirst("#", "");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long getPickTicketDetailId() {
|
||||
return pickTicketDetailId;
|
||||
}
|
||||
public void setPickTicketDetailId(Long pickTicketDetailId) {
|
||||
this.pickTicketDetailId = pickTicketDetailId;
|
||||
}
|
||||
public Long getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
public void setItemId(Long itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
public Long getPackageUnitId() {
|
||||
return packageUnitId;
|
||||
}
|
||||
public void setPackageUnitId(Long packageUnitId) {
|
||||
this.packageUnitId = packageUnitId;
|
||||
}
|
||||
public Integer getPackageUnitConvertFigure() {
|
||||
return packageUnitConvertFigure;
|
||||
}
|
||||
public void setPackageUnitConvertFigure(Integer packageUnitConvertFigure) {
|
||||
this.packageUnitConvertFigure = packageUnitConvertFigure;
|
||||
}
|
||||
public String getItemCode() {
|
||||
return itemCode;
|
||||
}
|
||||
public void setItemCode(String itemCode) {
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
public String getPackageUnit() {
|
||||
return packageUnit;
|
||||
}
|
||||
public void setPackageUnit(String packageUnit) {
|
||||
this.packageUnit = packageUnit;
|
||||
}
|
||||
public double getOrderQuantity() {
|
||||
return orderQuantity;
|
||||
}
|
||||
public void setOrderQuantity(double orderQuantity) {
|
||||
this.orderQuantity = orderQuantity;
|
||||
}
|
||||
public double getPreAllocatedQuantity() {
|
||||
return preAllocatedQuantity;
|
||||
}
|
||||
public void setPreAllocatedQuantity(double preAllocatedQuantity) {
|
||||
this.preAllocatedQuantity = preAllocatedQuantity;
|
||||
}
|
||||
public double getAllocatedQuantity() {
|
||||
return allocatedQuantity;
|
||||
}
|
||||
public void setAllocatedQuantity(double allocatedQuantity) {
|
||||
this.allocatedQuantity = allocatedQuantity;
|
||||
}
|
||||
public double getPickedQuantity() {
|
||||
return pickedQuantity;
|
||||
}
|
||||
public void setPickedQuantity(double pickedQuantity) {
|
||||
this.pickedQuantity = pickedQuantity;
|
||||
}
|
||||
public double getShippedQuantity() {
|
||||
return shippedQuantity;
|
||||
}
|
||||
public void setShippedQuantity(double shippedQuantity) {
|
||||
this.shippedQuantity = shippedQuantity;
|
||||
}
|
||||
public String getLotInfor() {
|
||||
return newLotInfo;
|
||||
}
|
||||
public void setLotInfor(String newLotInfo) {
|
||||
this.newLotInfo = newLotInfo;
|
||||
}
|
||||
|
||||
public String getPropC1() {
|
||||
return propC1;
|
||||
}
|
||||
public void setPropC1(String propC1) {
|
||||
this.propC1 = propC1;
|
||||
}
|
||||
public String getPropC2() {
|
||||
return propC2;
|
||||
}
|
||||
public void setPropC2(String propC2) {
|
||||
this.propC2 = propC2;
|
||||
}
|
||||
public String getPropC3() {
|
||||
return propC3;
|
||||
}
|
||||
public void setPropC3(String propC3) {
|
||||
this.propC3 = propC3;
|
||||
}
|
||||
public String getPropC4() {
|
||||
return propC4;
|
||||
}
|
||||
public void setPropC4(String propC4) {
|
||||
this.propC4 = propC4;
|
||||
}
|
||||
public String getPropC5() {
|
||||
return propC5;
|
||||
}
|
||||
public void setPropC5(String propC5) {
|
||||
this.propC5 = propC5;
|
||||
}
|
||||
public String getPropC6() {
|
||||
return propC6;
|
||||
}
|
||||
public void setPropC6(String propC6) {
|
||||
this.propC6 = propC6;
|
||||
}
|
||||
public String getPropC7() {
|
||||
return propC7;
|
||||
}
|
||||
public void setPropC7(String propC7) {
|
||||
this.propC7 = propC7;
|
||||
}
|
||||
public String getPropC8() {
|
||||
return propC8;
|
||||
}
|
||||
public void setPropC8(String propC8) {
|
||||
this.propC8 = propC8;
|
||||
}
|
||||
public String getPropC9() {
|
||||
return propC9;
|
||||
}
|
||||
public void setPropC9(String propC9) {
|
||||
this.propC9 = propC9;
|
||||
}
|
||||
public String getPropN1() {
|
||||
return propN1;
|
||||
}
|
||||
public void setPropN1(String propN1) {
|
||||
this.propN1 = propN1;
|
||||
}
|
||||
public String getPropN2() {
|
||||
return propN2;
|
||||
}
|
||||
public void setPropN2(String propN2) {
|
||||
this.propN2 = propN2;
|
||||
}
|
||||
public String getPropN3() {
|
||||
return propN3;
|
||||
}
|
||||
public void setPropN3(String propN3) {
|
||||
this.propN3 = propN3;
|
||||
}
|
||||
public String getPropD1() {
|
||||
return propD1;
|
||||
}
|
||||
public void setPropD1(String propD1) {
|
||||
this.propD1 = propD1;
|
||||
}
|
||||
public String getPropD2() {
|
||||
return propD2;
|
||||
}
|
||||
public void setPropD2(String propD2) {
|
||||
this.propD2 = propD2;
|
||||
}
|
||||
public String getPropD3() {
|
||||
return propD3;
|
||||
}
|
||||
public void setPropD3(String propD3) {
|
||||
this.propD3 = propD3;
|
||||
}
|
||||
public String getPropL1() {
|
||||
return propL1;
|
||||
}
|
||||
public void setPropL1(String propL1) {
|
||||
this.propL1 = propL1;
|
||||
}
|
||||
public String getPropL2() {
|
||||
return propL2;
|
||||
}
|
||||
public void setPropL2(String propL2) {
|
||||
this.propL2 = propL2;
|
||||
}
|
||||
public String getPropL3() {
|
||||
return propL3;
|
||||
}
|
||||
public void setPropL3(String propL3) {
|
||||
this.propL3 = propL3;
|
||||
}
|
||||
|
||||
public double getOrderQtyOfMasterUnit() {
|
||||
return orderQtyOfMasterUnit;
|
||||
}
|
||||
|
||||
public void setOrderQtyOfMasterUnit(double orderQtyOfMasterUnit) {
|
||||
this.orderQtyOfMasterUnit = orderQtyOfMasterUnit;
|
||||
}
|
||||
|
||||
public Object[] toArray(){
|
||||
return new Object[]{this.pickTicketDetailId,this.itemId,this.packageUnitId,this.packageUnitConvertFigure,
|
||||
this.itemCode,this.itemName,this.packageUnit,this.orderQuantity,this.orderQtyOfMasterUnit,
|
||||
this.preAllocatedQuantity,this.allocatedQuantity,this.pickedQuantity,this.shippedQuantity,
|
||||
this.newLotInfo,this.propC1,this.propC2,this.propC3,this.propC4,this.propC5,this.propC6,
|
||||
this.propC7,this.propC8,this.propC9,this.propN1,this.propN2,this.propN3,this.propD1,
|
||||
this.propD2,this.propD3,this.propL1,this.propL2,this.propL3
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.dev.swms.client.ui.javabean;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class PT_INFO implements IsSerializable {
|
||||
|
||||
private Long id;
|
||||
/** 发货单号 */
|
||||
private String code;
|
||||
/** 订单数量 */
|
||||
private double orderQuantity;
|
||||
/** 预分配数量 */
|
||||
private double preAllocatedQuantity;
|
||||
/** 已分配数量 */
|
||||
private double allocatedQuantity;
|
||||
/** 拣货数量 */
|
||||
private double pickedQuantity;
|
||||
|
||||
public PT_INFO(){
|
||||
|
||||
}
|
||||
public PT_INFO(Long id,Object code,Object orderQuantity,Object preAllocatedQuantity,Object allocatedQuantity,Object pickedQuantity){
|
||||
this.id = (Long)id;
|
||||
this.code = (String)code;
|
||||
this.orderQuantity = (Double)orderQuantity;
|
||||
this.preAllocatedQuantity = (Double)preAllocatedQuantity;
|
||||
this.allocatedQuantity = (Double)allocatedQuantity;
|
||||
this.pickedQuantity = (Double)pickedQuantity;
|
||||
}
|
||||
|
||||
public PT_INFO(Object code,Object orderQuantity,Object preAllocatedQuantity,Object allocatedQuantity,Object pickedQuantity){
|
||||
this(null,code,orderQuantity,preAllocatedQuantity,allocatedQuantity,pickedQuantity);
|
||||
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public double getOrderQuantity() {
|
||||
return orderQuantity;
|
||||
}
|
||||
|
||||
public void setOrderQuantity(double orderQuantity) {
|
||||
this.orderQuantity = orderQuantity;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public double getPreAllocatedQuantity() {
|
||||
return preAllocatedQuantity;
|
||||
}
|
||||
|
||||
|
||||
public void setPreAllocatedQuantity(double preAllocatedQuantity) {
|
||||
this.preAllocatedQuantity = preAllocatedQuantity;
|
||||
}
|
||||
|
||||
|
||||
public double getAllocatedQuantity() {
|
||||
return allocatedQuantity;
|
||||
}
|
||||
|
||||
|
||||
public void setAllocatedQuantity(double allocatedQuantity) {
|
||||
this.allocatedQuantity = allocatedQuantity;
|
||||
}
|
||||
|
||||
|
||||
public double getPickedQuantity() {
|
||||
return pickedQuantity;
|
||||
}
|
||||
|
||||
|
||||
public void setPickedQuantity(double pickedQuantity) {
|
||||
this.pickedQuantity = pickedQuantity;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,325 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.core.Position;
|
||||
import com.gwtext.client.data.Node;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.TabPanel;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.gwtext.client.widgets.tree.TreeNode;
|
||||
import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
|
||||
import com.dev.energy.client.rpc.DefineRPCAdapter;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description 抽象边框布局西边面板
|
||||
*
|
||||
*/
|
||||
|
||||
public class AbstractWestPanel extends Panel {
|
||||
protected BrowseRulePage mainPage;
|
||||
|
||||
protected WestTreePanel treePanel;
|
||||
|
||||
protected TabPanel tabPanel;
|
||||
|
||||
protected Node currentNode;
|
||||
|
||||
protected boolean isExpand = false;
|
||||
|
||||
private String managerName;
|
||||
|
||||
|
||||
/**
|
||||
* 左边树上的Tab标题
|
||||
*/
|
||||
protected String westTitle = "";
|
||||
|
||||
public AbstractWestPanel(String title,BrowsPutRackRulePage browsPutRackRulePage,String managerName){
|
||||
this.westTitle = title;
|
||||
this.mainPage = browsPutRackRulePage;
|
||||
this.managerName = managerName;
|
||||
init();
|
||||
draw();
|
||||
}
|
||||
|
||||
public AbstractWestPanel(String title,BrowsPickItemRulePage browsPickItemRulePage,String managerName){
|
||||
this.westTitle = title;
|
||||
this.mainPage = browsPickItemRulePage;
|
||||
this.managerName = managerName;
|
||||
init();
|
||||
draw();
|
||||
}
|
||||
|
||||
|
||||
protected void init() {
|
||||
setTitle(westTitle);
|
||||
setLayout(new FitLayout());
|
||||
setWidth(210);
|
||||
setCollapsible(false);
|
||||
setHideCollapseTool(true);
|
||||
|
||||
tabPanel = new TabPanel();
|
||||
tabPanel.setActiveTab(0);
|
||||
tabPanel.setDeferredRender(true);
|
||||
tabPanel.setTabPosition(Position.TOP);
|
||||
treePanel = new WestTreePanel("");
|
||||
}
|
||||
protected void draw() {
|
||||
// tabPanel.add(treePanel);
|
||||
add(treePanel);
|
||||
rpcInitTree(null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步触发选择组织下拉列表,获得组织下所有客户,承运商
|
||||
* @param params
|
||||
*/
|
||||
protected void rpcInitTree(Map params){
|
||||
DefineRPCAdapter rcp = new DefineRPCAdapter() {
|
||||
public void successProcessor(Map map) {
|
||||
List items = (List) map.get("result");
|
||||
appendChildRoot(treePanel.getRoot(),items,"rule_node_root.gif");
|
||||
}
|
||||
};
|
||||
rcp.ajaxRpcCallBackExec(this.managerName,
|
||||
"getPutRackRuleByWareHouseId",
|
||||
params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 往传入节点中追加子节点
|
||||
* @param rootNode
|
||||
* @param items
|
||||
* @param icon
|
||||
*/
|
||||
|
||||
protected void appendChildRoot(Node rootNode,List items,final String icon){
|
||||
|
||||
//如果当前规则列表为空,则构造一个临时对象用于打开右边规则显示面板,方便用户新增操作
|
||||
if(items.size() <= 0) {
|
||||
TreeNode node = new TreeNode();
|
||||
node.setUserObject(new CustomEntity());
|
||||
addNodeClickListener(node);
|
||||
onNodeClick(node,null);
|
||||
return;
|
||||
}
|
||||
for(Iterator it = items.iterator();it.hasNext();){
|
||||
CustomEntity entity = (CustomEntity)it.next();
|
||||
TreeNode node = createTreeNode(entity,icon);
|
||||
rootNode.appendChild(node);
|
||||
if(((CustomEntity)node.getUserObject()).getType()!=2){
|
||||
node.appendChild(createDefaultTreeNode());
|
||||
|
||||
//构造一个临时对象用于打开右边规则显示面板,方便用户新增操作
|
||||
TreeNode temp = new TreeNode();
|
||||
temp.setUserObject(new CustomEntity());
|
||||
onNodeClick(temp,null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理传入节点
|
||||
* @param root
|
||||
*/
|
||||
protected void clearRoot(Node root){
|
||||
Node[] node = root.getChildNodes();
|
||||
for (int i = 0; i < node.length; i++) {
|
||||
root.removeChild(node[i]);
|
||||
}
|
||||
}
|
||||
|
||||
protected void addNodeClickListener(TreeNode node) {
|
||||
node.addListener(new TreeNodeListenerAdapter() {
|
||||
public void onExpand(Node node) {
|
||||
onNodeExpand(node);
|
||||
}
|
||||
public void onClick(Node node, EventObject e) {
|
||||
onNodeClick(node,e);
|
||||
}
|
||||
public void onCollapse(Node node) {
|
||||
collapseNode(node);
|
||||
clearRoot(node);
|
||||
node.appendChild(createDefaultTreeNode());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击节点
|
||||
* @param node
|
||||
* @param e
|
||||
*/
|
||||
protected void onNodeClick(final Node node, final EventObject e){
|
||||
currentNode = node;
|
||||
final Object userObject = node.getUserObject();
|
||||
mainPage.displayRule((CustomEntity)userObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 展开节点
|
||||
* @param node
|
||||
*/
|
||||
protected void onNodeExpand(Node node){
|
||||
currentNode = node;
|
||||
if(refreshParent){
|
||||
refreshParent = false;
|
||||
return;
|
||||
}
|
||||
if(!((TreeNode)node).isExpandable())
|
||||
refreshCurrentNode(node,false);
|
||||
else
|
||||
node.removeChild(node.getFirstChild());
|
||||
}
|
||||
|
||||
/**
|
||||
*刷新当前节点
|
||||
*
|
||||
*/
|
||||
public void refreshCurrentNode(){
|
||||
refreshCurrentNode(currentNode,true);
|
||||
}
|
||||
boolean refreshParent = false;
|
||||
/**
|
||||
* 刷新当前父节点
|
||||
*
|
||||
*/
|
||||
public void refreshParentNode(){
|
||||
Node node = currentNode.getParentNode();
|
||||
if(node.getUserObject() == null){
|
||||
node = currentNode;
|
||||
}
|
||||
currentNode = node;
|
||||
((TreeNode)currentNode).setExpandable(true);
|
||||
clearRoot(currentNode);
|
||||
currentNode.appendChild(createDefaultTreeNode());
|
||||
refreshParent = true;
|
||||
refreshCurrentNode(currentNode,true);
|
||||
}
|
||||
|
||||
public void refreshCurrentNode(Node refreshNode){
|
||||
currentNode = refreshNode;
|
||||
refreshCurrentNode(currentNode,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建默认,查询中节点
|
||||
* @return
|
||||
*/
|
||||
protected Node createDefaultTreeNode(){
|
||||
TreeNode defaltNode = new TreeNode("查找");
|
||||
defaltNode.setId("searching");
|
||||
defaltNode.setIcon("images/silk/treeLoading.gif");
|
||||
defaltNode.setDisabled(true);
|
||||
return defaltNode;
|
||||
}
|
||||
|
||||
protected Node createNoFindChildNode(String text){
|
||||
TreeNode defaltNode = new TreeNode(text);
|
||||
defaltNode.setDisabled(true);
|
||||
return defaltNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建树节点
|
||||
* @param userObject
|
||||
* @param icon
|
||||
* @return
|
||||
*/
|
||||
protected TreeNode createTreeNode(final CustomEntity userObject,final String icon){
|
||||
TreeNode node = new TreeNode();
|
||||
node.setId(userObject.getId() + userObject.getName() + userObject.getRandomNum());
|
||||
node.setText(userObject.getName());
|
||||
node.setUserObject(userObject);
|
||||
|
||||
if(!StringUtils.isEmpty(icon))
|
||||
node.setIcon("images/" + icon);
|
||||
addNodeClickListener(node);
|
||||
return node;
|
||||
}
|
||||
|
||||
protected void setNodeText(Node node,String text){
|
||||
((TreeNode)node).setText(text);
|
||||
}
|
||||
|
||||
/**
|
||||
* 展开传入节点,并设置展开属性
|
||||
* @param node
|
||||
*/
|
||||
protected void expandNode(Node node){
|
||||
((TreeNode)node).setExpandable(true);
|
||||
((TreeNode)node).expand();
|
||||
}
|
||||
|
||||
/**
|
||||
* 收缩传入节点
|
||||
* @param node
|
||||
*/
|
||||
protected void collapseNode(Node node){
|
||||
((TreeNode)node).setExpandable(false);
|
||||
((TreeNode)node).collapse();
|
||||
}
|
||||
|
||||
public Node getCurrentNode() {
|
||||
return currentNode;
|
||||
}
|
||||
|
||||
public void setCurrentNode(Node currentNode) {
|
||||
this.currentNode = currentNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 展开客户,承运商树节点,回调后添加子节点
|
||||
* @param node
|
||||
* @param map
|
||||
*/
|
||||
private void expandCompanyNode(final Node node,Map map){
|
||||
clearRoot(node);
|
||||
expandNode(node);
|
||||
appendChildRoot(node,(List)map.get("billTypes"),"rule_node_child.gif");
|
||||
}
|
||||
|
||||
/**
|
||||
* 展开客户节点,异步获得子节点
|
||||
* @param node
|
||||
* @param params
|
||||
* @param showMsg
|
||||
*/
|
||||
private void rpcCompanyNode(final Node node,Map params,final boolean showMsg){
|
||||
DefineRPCAdapter rcp = new DefineRPCAdapter() {
|
||||
public void successProcessor(Map map) {
|
||||
expandCompanyNode(node,map);
|
||||
}
|
||||
};
|
||||
rcp.rpcCallBackExec(this.managerName,
|
||||
"getBillTypeByCompanyId",
|
||||
params,showMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新传入树节点
|
||||
* @param node
|
||||
* @param showMsg
|
||||
*/
|
||||
protected void refreshCurrentNode(final Node node,final boolean showMsg){
|
||||
final Object userObject = node.getUserObject();
|
||||
Map params = new HashMap();
|
||||
params.put("id", ((CustomEntity)userObject).getId());
|
||||
if(((CustomEntity)userObject).getType()==1){//如果点击的节点是客户
|
||||
rpcCompanyNode(node,params,showMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.Window;
|
||||
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.gwtext.client.core.Margins;
|
||||
import com.gwtext.client.core.RegionPosition;
|
||||
|
||||
import com.gwtext.client.widgets.Component;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.TabPanel;
|
||||
import com.gwtext.client.widgets.layout.BorderLayout;
|
||||
import com.gwtext.client.widgets.layout.BorderLayoutData;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
|
||||
import com.dev.energy.client.rpc.DefineRPCAdapter;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
public class BrowsPickItemRulePage extends BrowseRulePage {
|
||||
protected transient TabPanel centerPanel;
|
||||
|
||||
protected transient Panel container;
|
||||
|
||||
protected transient Panel introPanel;
|
||||
|
||||
protected transient Panel westPanel;
|
||||
|
||||
protected transient AbstractWestPanel aw;
|
||||
|
||||
protected CustomEntity mainNodeObj;
|
||||
|
||||
public void draw(VerticalPanel content) {
|
||||
initContainer();
|
||||
content.add(container);
|
||||
|
||||
}
|
||||
|
||||
public BrowsPickItemRulePage(){
|
||||
params = new HashMap();
|
||||
}
|
||||
|
||||
protected void initContainer(){
|
||||
this.pageConfig.setTitle("拣货策略管理");
|
||||
|
||||
container = new Panel();
|
||||
container.setWidth(Window.getClientWidth() - 30);
|
||||
container.setHeight(Window.getClientHeight() - 130);
|
||||
container.setLayout(new BorderLayout());
|
||||
|
||||
centerPanel = new TabPanel();
|
||||
centerPanel.setBodyBorder(false);
|
||||
centerPanel.setEnableTabScroll(true);
|
||||
centerPanel.setAutoDestroy(false);
|
||||
centerPanel.setActiveTab(0);
|
||||
|
||||
Panel centerPanelWrappper = new Panel();
|
||||
centerPanelWrappper.setLayout(new FitLayout());
|
||||
centerPanelWrappper.setBorder(false);
|
||||
centerPanelWrappper.setBodyBorder(false);
|
||||
|
||||
westPanel = getWestPanel();
|
||||
westPanel.setAutoDestroy(true);
|
||||
westPanel.setBorder(true);
|
||||
westPanel.setBodyBorder(true);
|
||||
|
||||
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
|
||||
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
|
||||
BorderLayoutData westLayoutData = new BorderLayoutData(RegionPosition.WEST);
|
||||
westLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
westLayoutData.setCMargins(new Margins(1, 1, 1, 1));
|
||||
westLayoutData.setMinSize(155);
|
||||
westLayoutData.setMaxSize(350);
|
||||
westLayoutData.setSplit(true);
|
||||
|
||||
introPanel = new Panel("策略详情");
|
||||
introPanel.setPaddings(10);
|
||||
introPanel.setLayout(new FitLayout());
|
||||
introPanel.setAutoShow(false);
|
||||
introPanel.setAutoScroll(true);
|
||||
|
||||
centerPanel.add(introPanel, centerLayoutData);
|
||||
centerPanelWrappper.add(centerPanel);
|
||||
|
||||
container.add(westPanel,westLayoutData);
|
||||
container.add(centerPanelWrappper, centerLayoutData);
|
||||
}
|
||||
|
||||
public Panel getWestPanel() {
|
||||
aw =new AbstractWestPanel("",this,"pickItemRuleManager");
|
||||
return aw;
|
||||
|
||||
}
|
||||
|
||||
public void addConterPanel(Component component){
|
||||
centerPanel.clear();
|
||||
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
|
||||
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
centerPanel.add(component,centerLayoutData);
|
||||
centerPanel.setActiveTab(0);
|
||||
}
|
||||
|
||||
public void resetConterPanel(){
|
||||
addConterPanel(introPanel);
|
||||
}
|
||||
|
||||
public void displayRule(CustomEntity nodeObj){
|
||||
mainNodeObj = nodeObj;
|
||||
rpcGetTreeByUserObj(nodeObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据传入的节点信息,得到相关策略
|
||||
* @param params
|
||||
*/
|
||||
protected void rpcGetTreeByUserObj(CustomEntity nodeObj){
|
||||
Map params = new HashMap();
|
||||
params.put("nodeObj",nodeObj);
|
||||
DefineRPCAdapter rcp = new DefineRPCAdapter() {
|
||||
public void successProcessor(Map map) {
|
||||
List rules = (List)map.get("result");
|
||||
disRules(rules);
|
||||
}
|
||||
};
|
||||
rcp.ajaxRpcCallBackExec("pickItemRuleManager",
|
||||
"getPutRackRules",params);
|
||||
}
|
||||
|
||||
private void disRules(List rules){
|
||||
|
||||
addConterPanel(new ListRuleGridPanel(rules,"pick",this,mainNodeObj));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示策略信息
|
||||
* @return
|
||||
*/
|
||||
private String getNoticePanel(DisplayEntity displayEntity) {
|
||||
String html = "";
|
||||
html += "<TR style=\" line-height:30px;font-weight:normal; color:#666666;\" >"+
|
||||
"<TD style=\" border-bottom:1px solid #a0c8e0;vertical-align:middle;\" >"+displayEntity.getLeftDis()+
|
||||
" <img src=\"images/silk/user_female.gif\" /> ";
|
||||
|
||||
if(!StringUtils.isEmpty(displayEntity.getDefaultLocation())){
|
||||
html += "<img src=\"images/silk/flag_green.gif\" /> "+displayEntity.getDefaultLocation()+"("+displayEntity.getMothed()+")";
|
||||
}
|
||||
if(!StringUtils.isEmpty(displayEntity.getPosition())){
|
||||
html += "<img src=\"images/silk/flag_red.gif\" /> "+displayEntity.getPosition()+"("+displayEntity.getMothed()+")";
|
||||
}
|
||||
|
||||
html +="</TD></TR>";
|
||||
|
||||
return html;
|
||||
}
|
||||
public void reload() {
|
||||
|
||||
//刷新父节点,显示新加节点
|
||||
aw.clearRoot(aw.treePanel.getRoot());
|
||||
aw.rpcInitTree(null);
|
||||
//刷新右边规则面板
|
||||
displayRule(mainNodeObj);
|
||||
}
|
||||
|
||||
public void release() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.gwtext.client.core.Margins;
|
||||
import com.gwtext.client.core.RegionPosition;
|
||||
import com.gwtext.client.widgets.Component;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.TabPanel;
|
||||
import com.gwtext.client.widgets.layout.BorderLayout;
|
||||
import com.gwtext.client.widgets.layout.BorderLayoutData;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.dev.energy.client.rpc.DefineRPCAdapter;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
public class BrowsPutRackRulePage extends BrowseRulePage{
|
||||
protected transient TabPanel centerPanel;
|
||||
|
||||
protected transient Panel container;
|
||||
|
||||
protected transient Panel introPanel;
|
||||
|
||||
protected CustomEntity mainNodeObj;
|
||||
|
||||
protected transient AbstractWestPanel aw;
|
||||
|
||||
public void draw(VerticalPanel content) {
|
||||
initContainer();
|
||||
content.add(container);
|
||||
}
|
||||
|
||||
public BrowsPutRackRulePage(){
|
||||
params = new HashMap();
|
||||
}
|
||||
|
||||
protected void initContainer(){
|
||||
this.pageConfig.setTitle("上架策略管理");
|
||||
|
||||
container = new Panel();
|
||||
container.setWidth(Window.getClientWidth() - 30);
|
||||
container.setHeight(Window.getClientHeight() - 130);
|
||||
container.setLayout(new BorderLayout());
|
||||
|
||||
centerPanel = new TabPanel();
|
||||
centerPanel.setBodyBorder(false);
|
||||
centerPanel.setEnableTabScroll(true);
|
||||
centerPanel.setAutoDestroy(false);
|
||||
centerPanel.setActiveTab(0);
|
||||
|
||||
Panel centerPanelWrappper = new Panel();
|
||||
centerPanelWrappper.setLayout(new FitLayout());
|
||||
centerPanelWrappper.setBorder(false);
|
||||
centerPanelWrappper.setBodyBorder(false);
|
||||
|
||||
Panel westPanel = getWestPanel();
|
||||
westPanel.setAutoDestroy(true);
|
||||
westPanel.setBorder(true);
|
||||
westPanel.setBodyBorder(true);
|
||||
|
||||
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
|
||||
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
|
||||
BorderLayoutData westLayoutData = new BorderLayoutData(RegionPosition.WEST);
|
||||
westLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
westLayoutData.setCMargins(new Margins(1, 1, 1, 1));
|
||||
westLayoutData.setMinSize(155);
|
||||
westLayoutData.setMaxSize(350);
|
||||
westLayoutData.setSplit(true);
|
||||
|
||||
introPanel = new Panel("策略详情");
|
||||
introPanel.setPaddings(10);
|
||||
introPanel.setLayout(new FitLayout());
|
||||
introPanel.setAutoShow(true);
|
||||
introPanel.setAutoScroll(true);
|
||||
centerPanel.add(introPanel, centerLayoutData);
|
||||
centerPanelWrappper.add(centerPanel);
|
||||
|
||||
container.add(westPanel,westLayoutData);
|
||||
container.add(centerPanelWrappper, centerLayoutData);
|
||||
}
|
||||
|
||||
public Panel getWestPanel() {
|
||||
aw =new AbstractWestPanel("",this,"putRackRuleManager");
|
||||
return aw;
|
||||
}
|
||||
|
||||
public void addConterPanel(Component component){
|
||||
centerPanel.clear();
|
||||
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
|
||||
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
centerPanel.add(component,centerLayoutData);
|
||||
centerPanel.setActiveTab(0);
|
||||
}
|
||||
|
||||
public void resetConterPanel(){
|
||||
addConterPanel(introPanel);
|
||||
}
|
||||
|
||||
public void displayRule(CustomEntity nodeObj){
|
||||
mainNodeObj = nodeObj;
|
||||
rpcGetTreeByUserObj(nodeObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据传入的节点信息,得到相关策略
|
||||
* @param params
|
||||
*/
|
||||
protected void rpcGetTreeByUserObj(CustomEntity nodeObj){
|
||||
Map params = new HashMap();
|
||||
params.put("nodeObj",nodeObj);
|
||||
DefineRPCAdapter rcp = new DefineRPCAdapter() {
|
||||
public void successProcessor(Map map) {
|
||||
List rules = (List)map.get("result");
|
||||
disRules(rules);
|
||||
}
|
||||
};
|
||||
rcp.ajaxRpcCallBackExec("putRackRuleManager",
|
||||
"getPutRackRules",params);
|
||||
}
|
||||
|
||||
private void disRules(List rules){
|
||||
addConterPanel(new ListRuleGridPanel(rules,"put",this,mainNodeObj));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 显示策略信息
|
||||
* @return
|
||||
*/
|
||||
private String getNoticePanel(DisplayEntity displayEntity) {
|
||||
String html = "";
|
||||
html += "<TR style=\" line-height:30px;font-weight:normal; color:#666666;\">"+
|
||||
"<TD style=\" border-bottom:1px solid #a0c8e0;vertical-align:middle;\">"+displayEntity.getLeftDis()+
|
||||
" <img src=\"images/rule_arrow.gif\" /> ";
|
||||
|
||||
if(!StringUtils.isEmpty(displayEntity.getDefaultLocation())){
|
||||
html += "<img src=\"images/rule_location.gif\" /> "+displayEntity.getDefaultLocation()+"("+displayEntity.getMothed()+")";
|
||||
}
|
||||
if(!StringUtils.isEmpty(displayEntity.getPosition())){
|
||||
html += "<img src=\"images/rule_position.gif\" /> "+displayEntity.getPosition()+"("+displayEntity.getMothed()+")";
|
||||
}
|
||||
|
||||
html +="</TD></TR>";
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
|
||||
//刷新父节点,显示新加节点
|
||||
aw.clearRoot(aw.treePanel.getRoot());
|
||||
aw.rpcInitTree(null);
|
||||
//刷新右边规则面板
|
||||
displayRule(mainNodeObj);
|
||||
}
|
||||
|
||||
public void release() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.dev.energy.client.template.BaseCustomMaintainTemplate;
|
||||
|
||||
public abstract class BrowseRulePage extends BaseCustomMaintainTemplate
|
||||
implements IsSerializable {
|
||||
public abstract void displayRule(CustomEntity nodeObj);
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public class CustomEntity implements IsSerializable {
|
||||
|
||||
|
||||
protected Long id;
|
||||
|
||||
protected Long companyId;
|
||||
|
||||
protected Long billTypeId;
|
||||
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* 区别该对象是声明对象:1:客户,2:订单类型
|
||||
*/
|
||||
protected int type=0;
|
||||
|
||||
protected double randomNum = .0;//取一个随机数,避免不同节点上的userObject相同
|
||||
|
||||
public double getRandomNum() {
|
||||
return randomNum;
|
||||
}
|
||||
|
||||
public void setRandomNum(double randomNum) {
|
||||
this.randomNum = randomNum;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getBillTypeId() {
|
||||
return billTypeId;
|
||||
}
|
||||
|
||||
public void setBillTypeId(Long billTypeId) {
|
||||
this.billTypeId = billTypeId;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class DisplayEntity implements IsSerializable{
|
||||
protected Long id;
|
||||
|
||||
protected String leftDis;
|
||||
|
||||
protected String position;
|
||||
|
||||
protected String defaultLocation;
|
||||
|
||||
protected String mothed;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDefaultLocation() {
|
||||
return defaultLocation;
|
||||
}
|
||||
|
||||
public void setDefaultLocation(String defaultLocation) {
|
||||
this.defaultLocation = defaultLocation;
|
||||
}
|
||||
|
||||
public String getLeftDis() {
|
||||
return leftDis;
|
||||
}
|
||||
|
||||
public void setLeftDis(String leftDis) {
|
||||
this.leftDis = leftDis;
|
||||
}
|
||||
|
||||
public String getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(String position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public String getMothed() {
|
||||
return mothed;
|
||||
}
|
||||
|
||||
public void setMothed(String mothed) {
|
||||
this.mothed = mothed;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,261 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.data.ArrayReader;
|
||||
import com.gwtext.client.data.FieldDef;
|
||||
import com.gwtext.client.data.MemoryProxy;
|
||||
import com.gwtext.client.data.Record;
|
||||
import com.gwtext.client.data.RecordDef;
|
||||
import com.gwtext.client.data.Store;
|
||||
import com.gwtext.client.data.StringFieldDef;
|
||||
import com.gwtext.client.widgets.grid.ColumnConfig;
|
||||
import com.gwtext.client.widgets.grid.ColumnModel;
|
||||
import com.gwtext.client.widgets.grid.GridPanel;
|
||||
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
|
||||
import com.gwtext.client.widgets.menu.BaseItem;
|
||||
import com.gwtext.client.widgets.menu.Item;
|
||||
import com.gwtext.client.widgets.menu.Menu;
|
||||
import com.gwtext.client.widgets.menu.event.BaseItemListenerAdapter;
|
||||
import com.dev.energy.client.ApplicationWindow;
|
||||
import com.dev.energy.client.config.page.PageConfig;
|
||||
import com.dev.energy.client.rpc.CatchPageConfigAsync;
|
||||
import com.dev.energy.client.rpc.DefineRPCAdapter;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.client.ui.page.IPopupPage;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
public class ListRuleGridPanel extends GridPanel {
|
||||
protected Menu ruleMenu ;
|
||||
|
||||
protected BrowseRulePage parentPage;
|
||||
|
||||
protected CustomEntity mainNodeObj;
|
||||
|
||||
public ListRuleGridPanel(){
|
||||
addGridRowListener();
|
||||
}
|
||||
|
||||
public ListRuleGridPanel(List rules, String pageType, BrowseRulePage rulePage, CustomEntity nodeObj){
|
||||
parentPage = rulePage;
|
||||
|
||||
mainNodeObj = nodeObj;
|
||||
|
||||
init(rules,pageType);
|
||||
|
||||
ruleMenu = getMenu(pageType);
|
||||
|
||||
addGridRowListener();
|
||||
}
|
||||
|
||||
private void init(List rules, String pageType){
|
||||
RecordDef recordDef = new RecordDef(
|
||||
new FieldDef[]{new StringFieldDef("id"),
|
||||
new StringFieldDef("rule")
|
||||
}
|
||||
);
|
||||
|
||||
Object[][] data = getRuleData(rules,pageType);
|
||||
MemoryProxy proxy = new MemoryProxy(data);
|
||||
|
||||
ArrayReader reader = new ArrayReader(recordDef);
|
||||
Store store = new Store(proxy, reader);
|
||||
store.load();
|
||||
this.setStore(store);
|
||||
|
||||
ColumnConfig[] columns = new ColumnConfig[]{
|
||||
new ColumnConfig("id", "id", 0, true, null, "id"),
|
||||
new ColumnConfig("策略详情", "rule", 750, true, null, "rule")
|
||||
};
|
||||
|
||||
columns[0].setHidden(true);
|
||||
|
||||
ColumnModel columnModel = new ColumnModel(columns);
|
||||
this.setColumnModel(columnModel);
|
||||
|
||||
this.setFrame(true);
|
||||
this.setStripeRows(true);
|
||||
|
||||
|
||||
this.setHeight(350);
|
||||
this.setWidth(750);
|
||||
this.setTitle("策略详情");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void addGridRowListener() {
|
||||
this.addGridListener(new GridListenerAdapter() {
|
||||
public void onContextMenu(EventObject e) {
|
||||
e.stopEvent();
|
||||
int count = ListRuleGridPanel.this.getSelectionModel().getCount();
|
||||
|
||||
if(count==0){
|
||||
ruleMenu.getItems()[0].setDisabled(false);
|
||||
ruleMenu.getItems()[1].setDisabled(true);
|
||||
ruleMenu.getItems()[2].setDisabled(true);
|
||||
}else{
|
||||
if(count==1){
|
||||
ruleMenu.getItems()[0].setDisabled(false);
|
||||
ruleMenu.getItems()[1].setDisabled(false);
|
||||
ruleMenu.getItems()[2].setDisabled(false);
|
||||
}else{
|
||||
ruleMenu.getItems()[0].setDisabled(false);
|
||||
ruleMenu.getItems()[1].setDisabled(true);
|
||||
ruleMenu.getItems()[2].setDisabled(false);
|
||||
}
|
||||
}
|
||||
ruleMenu.showAt(e.getXY());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Object[][] getRuleData(List rules, String pageType) {
|
||||
int len = rules.size();
|
||||
Object[][] objs = new Object[len][];
|
||||
for (int i = 0; i < len; i++) {
|
||||
DisplayEntity displayEntity = (DisplayEntity)rules.get(i);
|
||||
String htmlStr=getNoticePanel(displayEntity,pageType);
|
||||
Object[] obj = new Object[]{displayEntity.getId()+"",new HTML(htmlStr)};
|
||||
objs[i] = obj;
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示策略信息
|
||||
* @return
|
||||
*/
|
||||
private String getNoticePanel(DisplayEntity displayEntity, String pageType) {
|
||||
String html = "";
|
||||
html += "<TR>"+
|
||||
"<TD style=\" border-bottom:1px solid #a0c8e0;vertical-align:middle;\">"+displayEntity.getLeftDis()+
|
||||
" <img src=\"images/rule_arrow.gif\" /> ";
|
||||
|
||||
if(!StringUtils.isEmpty(displayEntity.getDefaultLocation())){
|
||||
html += "<img src=\"images/rule_location.gif\" /> "+displayEntity.getDefaultLocation()+"-"+displayEntity.getMothed();
|
||||
}
|
||||
if(!StringUtils.isEmpty(displayEntity.getPosition())){
|
||||
html += "<img src=\"images/rule_position.gif\" /> "+displayEntity.getPosition()+"("+displayEntity.getMothed()+")";
|
||||
}
|
||||
|
||||
html +="</TD></TR>";
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
private void createPageForUpdate(final Map params, final String pageId) {
|
||||
ApplicationWindow.context.getPageConfig(pageId,
|
||||
new CatchPageConfigAsync() {
|
||||
public void afterInvotion(PageConfig pageConfig) {
|
||||
IPopupPage page = pageConfig.createPage(params, parentPage);
|
||||
page.show();
|
||||
page.initData();
|
||||
// parentPage.displayRule(mainNodeObj);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Menu getMenu(String pageType){
|
||||
Menu menu = new Menu();
|
||||
if(pageType.equals("put")){
|
||||
Item newPutRuleItem = new Item("新增策略",
|
||||
new BaseItemListenerAdapter() {
|
||||
public void onClick(BaseItem item, EventObject e) {
|
||||
final Map params = new HashMap();
|
||||
createPageForUpdate(params,"editPutRackRulePage");
|
||||
}
|
||||
});
|
||||
Item mdfPutRuleItem = new Item("修改策略",
|
||||
new BaseItemListenerAdapter() {
|
||||
public void onClick(BaseItem item, EventObject e) {
|
||||
final Map params = new HashMap();
|
||||
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
|
||||
params.put("id",new Long(records[0].getAsInteger("id")));
|
||||
params.put(IPage.IS_EDIT_PAGE,true);
|
||||
createPageForUpdate(params,"editPutRackRulePage");
|
||||
}
|
||||
});
|
||||
Item delPutRuleItem = new Item("删除策略",
|
||||
new BaseItemListenerAdapter() {
|
||||
public void onClick(BaseItem item, EventObject e) {
|
||||
final Map params = new HashMap();
|
||||
params.put("pageType","put");
|
||||
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
|
||||
List<Long> ids = new ArrayList<Long>();
|
||||
for(int i=0;i<records.length;i++){
|
||||
ids.add(new Long(records[i].getAsInteger("id")));
|
||||
}
|
||||
params.put("ids",ids);
|
||||
asyncDeleteRules(params);
|
||||
}
|
||||
});
|
||||
menu.addItem(newPutRuleItem);
|
||||
menu.addItem(mdfPutRuleItem);
|
||||
menu.addItem(delPutRuleItem);
|
||||
}else{
|
||||
Item newPickRuleItem = new Item("新增策略",
|
||||
new BaseItemListenerAdapter() {
|
||||
public void onClick(BaseItem item, EventObject e) {
|
||||
final Map params = new HashMap();
|
||||
createPageForUpdate(params,"editPickItemRulePage");
|
||||
}
|
||||
});
|
||||
Item mdfPickRuleItem = new Item("修改策略",
|
||||
new BaseItemListenerAdapter() {
|
||||
public void onClick(BaseItem item, EventObject e) {
|
||||
final Map params = new HashMap();
|
||||
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
|
||||
params.put("id",new Long(records[0].getAsInteger("id")));
|
||||
params.put(IPage.IS_EDIT_PAGE,true);
|
||||
createPageForUpdate(params,"editPickItemRulePage");
|
||||
}
|
||||
});
|
||||
Item delPickRuleItem = new Item("删除策略",
|
||||
new BaseItemListenerAdapter() {
|
||||
public void onClick(BaseItem item, EventObject e) {
|
||||
final Map params = new HashMap();
|
||||
params.put("pageType","pick");
|
||||
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
|
||||
List<Long> ids = new ArrayList<Long>();
|
||||
for(int i=0;i<records.length;i++){
|
||||
ids.add(new Long(records[i].getAsInteger("id")));
|
||||
}
|
||||
params.put("ids",ids);
|
||||
asyncDeleteRules(params);
|
||||
}
|
||||
});
|
||||
menu.addItem(newPickRuleItem);
|
||||
menu.addItem(mdfPickRuleItem);
|
||||
menu.addItem(delPickRuleItem);
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* 费用明细查看
|
||||
*/
|
||||
private void asyncDeleteRules(final Map params){
|
||||
DefineRPCAdapter rcp = new DefineRPCAdapter() {
|
||||
public void successProcessor(Map map) {
|
||||
parentPage.displayRule(mainNodeObj);
|
||||
}
|
||||
};
|
||||
String pageType = (String)params.get("pageType");
|
||||
if(pageType.equals("put")){
|
||||
rcp.ajaxRpcCallBackExec("putRackRuleManager","deletePutRackRule",
|
||||
params);
|
||||
}else{
|
||||
rcp.ajaxRpcCallBackExec("pickItemRuleManager","deletePickItemRule",
|
||||
params);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.energy.client.template.BaseCustomPopupTemplate;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
|
||||
public class ManualAllocateWaveDoc extends BaseCustomPopupTemplate implements
|
||||
IsSerializable {
|
||||
public ManualAllocateWaveDoc(){}
|
||||
/** 绘制主面板--主入口 */
|
||||
public void draw(VerticalPanel content) {
|
||||
super.draw(content);
|
||||
this.initDataAccessor();
|
||||
this.initDatas();
|
||||
this.drawMainPanel(content);
|
||||
|
||||
}
|
||||
|
||||
private void initDatas() {
|
||||
String flag = "waveDocPage";
|
||||
Long waveDocId = (Long) params.get(IPage.ENTITY_ID);
|
||||
final Map<String,Long> param = new HashMap<String,Long>();
|
||||
param.put("waveDocId", waveDocId);
|
||||
this.curPADataAccessor().setFlag(flag);
|
||||
this.curPADataAccessor().initWaveDocInfo(param);
|
||||
this.curPADataAccessor().initWaveDocDetailsInfo(param);
|
||||
this.curPADataAccessor().initWaveDocAllocatedInfo(param);
|
||||
}
|
||||
|
||||
/** 绘制主面板 */
|
||||
protected void drawMainPanel(com.google.gwt.user.client.ui.VerticalPanel content) {
|
||||
content.add(new Sub_PA_Panel(this));
|
||||
}
|
||||
/** 初始化数据存储区 */
|
||||
protected void initDataAccessor() {
|
||||
this.data = new Page_PA_DataAccessor(this);
|
||||
}
|
||||
|
||||
protected Page_PA_DataAccessor curPADataAccessor() {
|
||||
return (Page_PA_DataAccessor)this.data;
|
||||
}
|
||||
|
||||
|
||||
public String getTitle(){
|
||||
return "部分分配";
|
||||
}
|
||||
public void release() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.dev.swms.client.ui.constant.CT_PA;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.energy.client.template.BaseCustomPopupTemplate;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
public class ManualPickingAllocate extends BaseCustomPopupTemplate implements
|
||||
IsSerializable {
|
||||
|
||||
public ManualPickingAllocate(){}
|
||||
/** 绘制主面板--主入口 */
|
||||
public void draw(VerticalPanel content) {
|
||||
super.draw(content);
|
||||
this.initDataAccessor();
|
||||
this.initDatas();
|
||||
this.drawMainPanel(content);
|
||||
|
||||
}
|
||||
|
||||
private void initDatas() {
|
||||
String flag = "pickTicketPage";
|
||||
Long pickTicketId = (Long) params.get(IPage.ENTITY_ID);
|
||||
final Map<String,Long> param = new HashMap<String,Long>();
|
||||
param.put("pickTicketId", pickTicketId);
|
||||
this.curPADataAccessor().setFlag(flag);
|
||||
this.curPADataAccessor().initPickTicketInfo(param);
|
||||
this.curPADataAccessor().initDetailsInfo(param);
|
||||
this.curPADataAccessor().initAllocatedInfo(param);
|
||||
}
|
||||
|
||||
/** 绘制主面板 */
|
||||
protected void drawMainPanel(com.google.gwt.user.client.ui.VerticalPanel content) {
|
||||
content.add(new Sub_PA_Panel(this));
|
||||
}
|
||||
/** 初始化数据存储区 */
|
||||
protected void initDataAccessor() {
|
||||
this.data = new Page_PA_DataAccessor(this);
|
||||
}
|
||||
|
||||
protected Page_PA_DataAccessor curPADataAccessor() {
|
||||
return (Page_PA_DataAccessor)this.data;
|
||||
}
|
||||
|
||||
|
||||
public String getTitle(){
|
||||
return LocaleUtils.getText("manualPickingAllocatePage");
|
||||
}
|
||||
|
||||
public void release() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public List<String> getLocaleMessageKeys() {
|
||||
List<String> keys = new ArrayList<String>();
|
||||
keys.add("manualPickingAllocatePage");
|
||||
keys.add("allocating");
|
||||
keys.add("cancelAllocate");
|
||||
keys.add("waveDoc.code");
|
||||
keys.add("pickTicket.code");
|
||||
keys.add("pickTicket.orderQuantity");
|
||||
keys.add("pickTicket.preAllocatedQuantity");
|
||||
keys.add("pickTicket.allocatedQuantity");
|
||||
keys.add("pickTicket.pickedQuantity");
|
||||
keys.add("item.code");
|
||||
keys.add("item.name");
|
||||
keys.add("packageUnit.unit");
|
||||
keys.add("item.code");
|
||||
keys.add("pickTicketDetail.orderQuantity");
|
||||
keys.add("pickTicketDetail.orderQtyOfMasterUnit");
|
||||
keys.add("pickTicketDetail.preAllocatedQuantity");
|
||||
keys.add("pickTicketDetail.allocatedQuantity");
|
||||
keys.add("pickTicketDetail.pickedQuantity");
|
||||
keys.add("pickTicketDetail.shippedQuantity");
|
||||
keys.add("lotInfor");
|
||||
keys.add("location.code");
|
||||
keys.add("packageUnit.convertFigure");
|
||||
keys.add("inventory.quantity");
|
||||
keys.add("inventory.availableQuantity");
|
||||
keys.add("inventory.manualQuantity");
|
||||
keys.add("itemKey.lot");
|
||||
keys.add("inventory.storageDate");
|
||||
keys.add("inventory.SOI");
|
||||
keys.add("task.packageUnit");
|
||||
keys.add("task.planQuantity");
|
||||
keys.add("task.planQuantityMU");
|
||||
keys.add("pickedRecord.manualQuantity");
|
||||
keys.add("task.storageDate");
|
||||
keys.add("task.SOI");
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.energy.client.template.BaseCustomMaintainTemplate;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Page_InventoryVisibility extends BaseCustomMaintainTemplate
|
||||
implements IsSerializable {
|
||||
|
||||
/** 背景主面板--用于仓库地域分布显示 */
|
||||
protected transient Panel imagePanel;
|
||||
/** 绘制主面板--主入口 */
|
||||
public void draw(VerticalPanel content) {
|
||||
super.draw(content);
|
||||
this.initDataAccessor();
|
||||
this.drawMainPanel(content);
|
||||
// this.initIVDatas();
|
||||
}
|
||||
/** 绘制主面板 */
|
||||
protected void drawMainPanel(VerticalPanel content) {
|
||||
content.add(new Sub_IV_Panel(this));
|
||||
}
|
||||
/** 初始化数据存储区 */
|
||||
protected void initDataAccessor() {
|
||||
this.data = new Page_IV_DataAccessor(this);
|
||||
}
|
||||
/** 获取当前的数据存储区对象实例 */
|
||||
protected Page_IV_DataAccessor curIVDataAccessor() {
|
||||
return (Page_IV_DataAccessor)this.data;
|
||||
}
|
||||
/** 初始化库存可视化的数据 */
|
||||
protected void initIVDatas() {
|
||||
this.curIVDataAccessor().initIVDatas();
|
||||
}
|
||||
|
||||
public void userFinalize() {
|
||||
this.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART);
|
||||
}
|
||||
|
||||
public String getTitle(){
|
||||
return "库存可视化";
|
||||
}
|
||||
|
||||
public void onPageUnselected() {
|
||||
this.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART);
|
||||
}
|
||||
|
||||
public void userChangeTab() {
|
||||
this.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART);
|
||||
}
|
||||
public void release() {
|
||||
|
||||
}
|
||||
public List<String> getLocaleMessageKeys() {
|
||||
List<String> keys = new ArrayList<String>();
|
||||
keys.add("aisle_1");
|
||||
keys.add("aisle_2");
|
||||
keys.add("aisle_3");
|
||||
keys.add("aisle_4");
|
||||
keys.add("aisle_5");
|
||||
keys.add("aisle_6");
|
||||
keys.add("aisle_7");
|
||||
keys.add("aisle_8");
|
||||
keys.add("aisle_9");
|
||||
keys.add("aisle_10");
|
||||
|
||||
keys.add("col_1");
|
||||
keys.add("col_2");
|
||||
keys.add("col_3");
|
||||
keys.add("col_4");
|
||||
keys.add("col_5");
|
||||
keys.add("col_6");
|
||||
keys.add("col_7");
|
||||
keys.add("col_8");
|
||||
keys.add("col_9");
|
||||
keys.add("col_10");
|
||||
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public abstract class Sub_Abstract_Panel extends AbstractSupportPanel {
|
||||
|
||||
public Sub_Abstract_Panel(IMessagePage page, String name) {
|
||||
super(page, name);
|
||||
}
|
||||
|
||||
protected Page_IV_DataAccessor curDataAccessor() {
|
||||
return (Page_IV_DataAccessor)this.getData();
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
if(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART.equals(message)) {
|
||||
this.hideCharts();
|
||||
}
|
||||
}
|
||||
|
||||
public void hideCharts(){}
|
||||
}
|
||||
|
|
@ -0,0 +1,248 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.core.TextAlign;
|
||||
import com.gwtext.client.data.ArrayReader;
|
||||
import com.gwtext.client.data.FieldDef;
|
||||
import com.gwtext.client.data.IntegerFieldDef;
|
||||
import com.gwtext.client.data.MemoryProxy;
|
||||
import com.gwtext.client.data.RecordDef;
|
||||
import com.gwtext.client.data.Store;
|
||||
import com.gwtext.client.data.StringFieldDef;
|
||||
import com.gwtext.client.widgets.Button;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
|
||||
import com.gwtext.client.widgets.form.NumberField;
|
||||
import com.gwtext.client.widgets.grid.ColumnConfig;
|
||||
import com.gwtext.client.widgets.grid.ColumnModel;
|
||||
import com.gwtext.client.widgets.grid.EditorGridPanel;
|
||||
import com.gwtext.client.widgets.grid.GridEditor;
|
||||
import com.gwtext.client.widgets.grid.GridPanel;
|
||||
import com.gwtext.client.widgets.grid.RowSelectionModel;
|
||||
import com.gwtext.client.widgets.grid.event.GridRowListener;
|
||||
import com.gwtext.client.widgets.layout.RowLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayoutData;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.PT_ALLOCATED;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
public class Sub_AllocatedTable_Panel extends AbstractSupportPanel {
|
||||
|
||||
protected final static String DEFAULT_NAME = "pickTicketAllocated_Panel";
|
||||
transient EditorGridPanel allocatedTable;
|
||||
private RecordDef recordDef;
|
||||
private ColumnModel columnModel;
|
||||
private Store store1;
|
||||
private MemoryProxy proxy1;
|
||||
private ArrayReader reader;
|
||||
transient Button cancellAllocateButton;
|
||||
private String flag;
|
||||
private static final DateTimeFormat dateFormater = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
|
||||
public Sub_AllocatedTable_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.drawWidget();
|
||||
}
|
||||
|
||||
private void drawWidget() {
|
||||
flag = curPADataAccessor().getFlag();
|
||||
recordDef = new RecordDef(new FieldDef[] {
|
||||
new IntegerFieldDef("task.id"),
|
||||
new StringFieldDef("location.code"),
|
||||
new StringFieldDef("item.code"),
|
||||
new StringFieldDef("item.name"),
|
||||
new StringFieldDef("task.packageUnit"),
|
||||
new IntegerFieldDef("task.planQuantity"),
|
||||
new IntegerFieldDef("task.planQuantityMU"),
|
||||
new IntegerFieldDef("pickedRecord.manualQuantity"),
|
||||
new StringFieldDef("lotInfor"),
|
||||
new StringFieldDef("task.storageDate"),
|
||||
new StringFieldDef("task.SOI")
|
||||
});
|
||||
|
||||
ColumnConfig tiColumn = new ColumnConfig(LocaleUtils.getText("task.id"), "task.id");
|
||||
tiColumn.setHidden(true);
|
||||
|
||||
|
||||
ColumnConfig lcColumn = new ColumnConfig(LocaleUtils.getText("location.code"), "location.code", 150);
|
||||
lcColumn.setAlign(TextAlign.CENTER);
|
||||
lcColumn.setSortable(true);
|
||||
|
||||
ColumnConfig icColumn = new ColumnConfig(LocaleUtils.getText("item.code"), "item.code", 150);
|
||||
icColumn.setAlign(TextAlign.CENTER);
|
||||
icColumn.setSortable(true);
|
||||
|
||||
ColumnConfig inColumn = new ColumnConfig(LocaleUtils.getText("item.name"), "item.name", 200);
|
||||
inColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig tpColumn = new ColumnConfig(LocaleUtils.getText("task.packageUnit"), "task.packageUnit", 80);
|
||||
tpColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig tp1Column = new ColumnConfig(LocaleUtils.getText("task.planQuantity"), "task.planQuantity", 100);
|
||||
tp1Column.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig tp2Column = new ColumnConfig(LocaleUtils.getText("task.planQuantityMU"), "task.planQuantityMU", 150);
|
||||
tp2Column.setAlign(TextAlign.CENTER);
|
||||
|
||||
NumberField numberField = new NumberField();
|
||||
numberField.setAllowBlank(false);
|
||||
numberField.setAllowNegative(false);
|
||||
|
||||
ColumnConfig pmColumn = new ColumnConfig(LocaleUtils.getText("pickedRecord.manualQuantity"), "pickedRecord.manualQuantity", 100);
|
||||
pmColumn.setAlign(TextAlign.CENTER);
|
||||
pmColumn.setEditor(new GridEditor(numberField));
|
||||
|
||||
ColumnConfig lColumn = new ColumnConfig(LocaleUtils.getText("lotInfor"), "lotInfor", 150);
|
||||
lColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig tsColumn = new ColumnConfig(LocaleUtils.getText("task.storageDate"), "task.storageDate", 150);
|
||||
tsColumn.setAlign(TextAlign.CENTER);
|
||||
tsColumn.setSortable(true);
|
||||
|
||||
|
||||
ColumnConfig tSColumn = new ColumnConfig(LocaleUtils.getText("task.SOI"),"task.SOI", 100);
|
||||
tSColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
|
||||
|
||||
columnModel = new ColumnModel(new ColumnConfig[]{
|
||||
tiColumn,lcColumn,icColumn,inColumn,tpColumn,tp1Column,
|
||||
tp2Column,pmColumn,lColumn,tsColumn,tSColumn
|
||||
});
|
||||
|
||||
proxy1 = new MemoryProxy(new String[][]{});
|
||||
reader = new ArrayReader(recordDef);
|
||||
store1 = new Store(proxy1, reader);
|
||||
store1.load();
|
||||
allocatedTable = new EditorGridPanel();
|
||||
allocatedTable.setLayout(new RowLayout());
|
||||
allocatedTable.setAutoScroll(true);
|
||||
allocatedTable.setStore(store1);
|
||||
|
||||
allocatedTable.setClicksToEdit(1);
|
||||
allocatedTable.setSelectionModel(new RowSelectionModel(false));
|
||||
|
||||
allocatedTable.setColumnModel(columnModel);
|
||||
|
||||
ButtonListenerAdapter listener = new ButtonListenerAdapter() {
|
||||
public void onClick(Button button, EventObject e) {
|
||||
//取消分配
|
||||
cancellAllocate();
|
||||
}
|
||||
};
|
||||
cancellAllocateButton = new Button("取消分配",listener);
|
||||
cancellAllocateButton.setDisabled(true);
|
||||
|
||||
allocatedTable.addGridRowListener(new GridRowListener(){
|
||||
public void onRowClick(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
cancellAllocateButton.setDisabled(false);
|
||||
}
|
||||
|
||||
public void onRowContextMenu(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onRowDblClick(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
});
|
||||
Panel panel = new Panel();
|
||||
panel.add(cancellAllocateButton);
|
||||
this.setLayout(new RowLayout());
|
||||
this.add(allocatedTable,new RowLayoutData("94%"));
|
||||
this.add(panel,new RowLayoutData("6%"));
|
||||
|
||||
}
|
||||
|
||||
//取消分配
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void cancellAllocate() {
|
||||
final Map param = new HashMap();
|
||||
if(flag == "pickTicketPage"){
|
||||
//存放发货单ID,以便取消分配后刷新信息
|
||||
Long pickTicketId = this.curPADataAccessor().currentPickTicket().getId();
|
||||
param.put("pickTicketId", pickTicketId);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//存放波次ID,以便取消分配后刷新信息
|
||||
Long waveDocId = this.curPADataAccessor().currentPickTicket().getId();
|
||||
param.put("waveDocId", waveDocId);
|
||||
}
|
||||
final Map subParam = new HashMap();
|
||||
|
||||
for(int i=0; i<allocatedTable.getStore().getCount();i++){
|
||||
if(allocatedTable.getSelectionModel().isSelected(i)){
|
||||
Long taskId = Long.valueOf(allocatedTable.getStore().getAt(i).getAsString("task.id"));
|
||||
Double availableQuantity = Double.valueOf(allocatedTable.getStore().getAt(i).getAsString("task.planQuantityMU"));
|
||||
Double manualQuantity = Double.valueOf(allocatedTable.getStore().getAt(i).getAsString("pickedRecord.manualQuantity"));
|
||||
if(manualQuantity.doubleValue() > availableQuantity.doubleValue()){
|
||||
Window.alert(LocaleUtils.getText("pickedQuantity.not.enough"));
|
||||
return;
|
||||
}
|
||||
subParam.put(taskId, manualQuantity);
|
||||
|
||||
}
|
||||
}
|
||||
param.put(IPage.TABLE_INPUT_VALUES, subParam);
|
||||
if(flag == "pickTicketPage"){
|
||||
//发货单取消分配
|
||||
this.curPADataAccessor().cancellAllocate(param);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//波次取消分配
|
||||
this.curPADataAccessor().cancellWaveDocAllocate(param);
|
||||
}
|
||||
}
|
||||
|
||||
public Page_PA_DataAccessor curPADataAccessor() {
|
||||
return (Page_PA_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
// System.out.print("还进入这个doDispath()方法了!");
|
||||
if(Page_PA_DataAccessor.INIT_ALLOCATED_INFO.equals(message) || Page_PA_DataAccessor.INIT_WD_ALLOCATED_INFO.equals(message)){
|
||||
Object[][] data = new Object[this.curPADataAccessor().all_PTAD().size()][];
|
||||
for (int i=0;i<this.curPADataAccessor().all_PTAD().size();i++){
|
||||
data[i] = toArray(this.curPADataAccessor().all_PTAD().get(i));
|
||||
}
|
||||
|
||||
|
||||
proxy1 = new MemoryProxy(data);
|
||||
store1.setDataProxy(proxy1);
|
||||
store1.reload();
|
||||
allocatedTable.reconfigure(store1, columnModel);
|
||||
}
|
||||
|
||||
}
|
||||
public Object[] toArray(PT_ALLOCATED allocated){
|
||||
return new Object[]{allocated.getTaskId() ,
|
||||
allocated.getLocationCode() ,
|
||||
allocated.getItemCode() ,
|
||||
allocated.getItemName() ,
|
||||
allocated.getPackageUnit() ,
|
||||
allocated.getPlanQuantity() ,
|
||||
allocated.getPlanQuantityMU() ,
|
||||
allocated.getManualQuantity() ,
|
||||
allocated.getLotInfor() ,
|
||||
dateFormater.format(allocated.getInventoryStorageDate()).toString() ,
|
||||
allocated.getInventorySOI() };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.core.TextAlign;
|
||||
import com.gwtext.client.data.ArrayReader;
|
||||
import com.gwtext.client.data.FieldDef;
|
||||
import com.gwtext.client.data.IntegerFieldDef;
|
||||
import com.gwtext.client.data.MemoryProxy;
|
||||
import com.gwtext.client.data.RecordDef;
|
||||
import com.gwtext.client.data.Store;
|
||||
import com.gwtext.client.data.StringFieldDef;
|
||||
import com.gwtext.client.widgets.Button;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.ToolbarButton;
|
||||
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
|
||||
import com.gwtext.client.widgets.form.NumberField;
|
||||
import com.gwtext.client.widgets.grid.ColumnConfig;
|
||||
import com.gwtext.client.widgets.grid.ColumnModel;
|
||||
import com.gwtext.client.widgets.grid.EditorGridPanel;
|
||||
import com.gwtext.client.widgets.grid.GridEditor;
|
||||
import com.gwtext.client.widgets.grid.GridPanel;
|
||||
import com.gwtext.client.widgets.grid.RowSelectionModel;
|
||||
import com.gwtext.client.widgets.grid.event.GridRowListener;
|
||||
import com.gwtext.client.widgets.layout.HorizontalLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayoutData;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.PT_AVAILABLE;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
|
||||
public class Sub_AvailableTable_Panel extends AbstractSupportPanel {
|
||||
|
||||
protected final static String DEFAULT_NAME = "pickTicketAvailable_Panel";
|
||||
transient EditorGridPanel availableTable;
|
||||
private RecordDef recordDef;
|
||||
private ColumnModel columnModel;
|
||||
private Store store;
|
||||
private MemoryProxy proxy;
|
||||
private ArrayReader reader;
|
||||
transient ToolbarButton manualAllocateButton;
|
||||
private String flag;
|
||||
private static final DateTimeFormat dateFormater = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
|
||||
|
||||
public Sub_AvailableTable_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.drawWidget();
|
||||
}
|
||||
|
||||
private void drawWidget() {
|
||||
flag = curPADataAccessor().getFlag();
|
||||
recordDef = new RecordDef(new FieldDef[] {
|
||||
new IntegerFieldDef("inventory.id"),
|
||||
new StringFieldDef("location.code"),
|
||||
new StringFieldDef("item.code"),
|
||||
new StringFieldDef("item.name"),
|
||||
new StringFieldDef("packageUnit.unit"),
|
||||
new IntegerFieldDef("packageUnit.convertFigure"),
|
||||
new IntegerFieldDef("inventory.quantity"),
|
||||
new IntegerFieldDef("inventory.availableQuantity"),
|
||||
new IntegerFieldDef("inventory.manualQuantity"),
|
||||
new StringFieldDef("itemKey.lot"),
|
||||
new StringFieldDef("lotInfor"),
|
||||
new StringFieldDef("inventory.storageDate"),
|
||||
new StringFieldDef("inventory.SOI")
|
||||
});
|
||||
|
||||
ColumnConfig iiColumn = new ColumnConfig(LocaleUtils.getText("inventory.id"), "inventory.id");
|
||||
iiColumn.setHidden(true);
|
||||
|
||||
|
||||
ColumnConfig lcColumn = new ColumnConfig(LocaleUtils.getText("location.code"), "location.code", 80);
|
||||
lcColumn.setAlign(TextAlign.CENTER);
|
||||
lcColumn.setSortable(true);
|
||||
|
||||
ColumnConfig icColumn = new ColumnConfig(LocaleUtils.getText("item.code"), "item.code", 100);
|
||||
icColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig inColumn = new ColumnConfig(LocaleUtils.getText("item.name"), "item.name", 200);
|
||||
inColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig puColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.unit"), "packageUnit.unit", 80);
|
||||
puColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig pcColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.convertFigure"), "packageUnit.convertFigure", 80);
|
||||
pcColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig iqColumn = new ColumnConfig(LocaleUtils.getText("inventory.quantity"), "inventory.quantity", 80);
|
||||
iqColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig iaColumn = new ColumnConfig(LocaleUtils.getText("inventory.availableQuantity"), "inventory.availableQuantity", 80);
|
||||
iaColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
NumberField numberField = new NumberField();
|
||||
numberField.setAllowBlank(false);
|
||||
numberField.setAllowNegative(false);
|
||||
|
||||
ColumnConfig imColumn = new ColumnConfig(LocaleUtils.getText("inventory.manualQuantity"), "inventory.manualQuantity", 80);
|
||||
imColumn.setAlign(TextAlign.CENTER);
|
||||
imColumn.setEditor(new GridEditor(numberField));
|
||||
|
||||
ColumnConfig ilColumn = new ColumnConfig(LocaleUtils.getText("itemKey.lot"), "itemKey.lot", 100);
|
||||
ilColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig lColumn = new ColumnConfig(LocaleUtils.getText("lotInfor"), "lotInfor", 150);
|
||||
lColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig isColumn = new ColumnConfig(LocaleUtils.getText("inventory.storageDate"), "inventory.storageDate", 150);
|
||||
isColumn.setAlign(TextAlign.CENTER);
|
||||
isColumn.setSortable(true);
|
||||
|
||||
|
||||
ColumnConfig iSColumn = new ColumnConfig(LocaleUtils.getText("inventory.SOI"),"inventory.SOI", 100);
|
||||
iSColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
|
||||
|
||||
columnModel = new ColumnModel(new ColumnConfig[]{
|
||||
iiColumn,lcColumn,icColumn,inColumn,puColumn,pcColumn,
|
||||
iqColumn,iaColumn,imColumn,ilColumn,lColumn,isColumn,iSColumn
|
||||
});
|
||||
|
||||
proxy = new MemoryProxy(new String[][]{});
|
||||
reader = new ArrayReader(recordDef);
|
||||
store = new Store(proxy, reader);
|
||||
store.load();
|
||||
availableTable = new EditorGridPanel();
|
||||
availableTable.setAutoScroll(true);
|
||||
availableTable.setStore(store);
|
||||
availableTable.setColumnModel(columnModel);
|
||||
|
||||
availableTable.setClicksToEdit(1);
|
||||
availableTable.setSelectionModel(new RowSelectionModel(false));
|
||||
|
||||
ButtonListenerAdapter listener = new ButtonListenerAdapter() {
|
||||
public void onClick(Button button, EventObject e) {
|
||||
//部分分配
|
||||
manualAllocate();
|
||||
}
|
||||
};
|
||||
|
||||
manualAllocateButton = new ToolbarButton("部分分配",listener);
|
||||
manualAllocateButton.setDisabled(true);
|
||||
|
||||
availableTable.addGridRowListener(new GridRowListener(){
|
||||
public void onRowClick(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
manualAllocateButton.setDisabled(false);
|
||||
}
|
||||
|
||||
public void onRowContextMenu(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onRowDblClick(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
});
|
||||
Panel panel = new Panel();
|
||||
panel.add(manualAllocateButton);
|
||||
this.setLayout(new RowLayout());
|
||||
this.add(availableTable,new RowLayoutData("88%"));
|
||||
this.add(panel,new RowLayoutData("12%"));
|
||||
}
|
||||
|
||||
//部分分配
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void manualAllocate() {
|
||||
final Map param = new HashMap();
|
||||
if(flag == "pickTicketPage"){
|
||||
//存放发货单明细ID,以便部分分配后刷新信息
|
||||
Long pickTicketDetailId = this.curPADataAccessor().getPtdId();
|
||||
param.put("pickTicketDetailId", pickTicketDetailId);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//存放波次明细ID,以便部分分配后刷新信息
|
||||
Long waveDocDetailId = this.curPADataAccessor().getWddId();
|
||||
param.put("waveDocDetailId", waveDocDetailId);
|
||||
}
|
||||
|
||||
final Map subParam = new HashMap();
|
||||
|
||||
for(int i=0; i<availableTable.getStore().getCount();i++){
|
||||
if(availableTable.getSelectionModel().isSelected(i)){
|
||||
Long inventoryId = Long.valueOf(availableTable.getStore().getAt(i).getAsString("inventory.id"));
|
||||
Double availableQuantity = Double.valueOf(availableTable.getStore().getAt(i).getAsString("inventory.availableQuantity"));
|
||||
Double manualQuantity = Double.valueOf(availableTable.getStore().getAt(i).getAsString("inventory.manualQuantity"));
|
||||
if(manualQuantity.doubleValue() > availableQuantity.doubleValue()){
|
||||
Window.alert(LocaleUtils.getText("availableQuantity.not.enough"));
|
||||
return;
|
||||
}
|
||||
subParam.put(inventoryId, manualQuantity);
|
||||
|
||||
}
|
||||
}
|
||||
param.put(IPage.TABLE_INPUT_VALUES, subParam);
|
||||
if(flag == "pickTicketPage"){
|
||||
//发货单部分分配
|
||||
this.curPADataAccessor().manualAllocate(param);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//波次部分分配
|
||||
this.curPADataAccessor().manualWaveDocAllocate(param);
|
||||
}
|
||||
}
|
||||
|
||||
public Page_PA_DataAccessor curPADataAccessor() {
|
||||
return (Page_PA_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
// System.out.print("还进入这个doDispath()方法了!");
|
||||
if(Page_PA_DataAccessor.INIT_AVAILABLE_INFO.equals(message) || Page_PA_DataAccessor.INIT_WD_AVAILABLE_INFO.equals(message)){
|
||||
Object[][] data = new Object[this.curPADataAccessor().all_PTAS().size()][];
|
||||
for (int i=0;i<this.curPADataAccessor().all_PTAS().size();i++){
|
||||
data[i] = toArray(this.curPADataAccessor().all_PTAS().get(i));
|
||||
}
|
||||
|
||||
|
||||
proxy = new MemoryProxy(data);
|
||||
store.setDataProxy(proxy);
|
||||
store.reload();
|
||||
availableTable.reconfigure(store, columnModel);
|
||||
}else if(Page_PA_DataAccessor.AUTO_ALLOCATE_INFO.equals(message) || Page_PA_DataAccessor.AUTO_WD_ALLOCATE_INFO.equals(message)
|
||||
|| Page_PA_DataAccessor.CANCELL_ALLOCATE_INFO.equals(message) || Page_PA_DataAccessor.CANCELL_WD_ALLOCATE_INFO.equals(message)
|
||||
|| Page_PA_DataAccessor.MANUAL_ALLOCATE_INFO.equals(message) || Page_PA_DataAccessor.MANUAL_WD_ALLOCATE_INFO.equals(message)){
|
||||
proxy = new MemoryProxy(new String[][]{});
|
||||
store.setDataProxy(proxy);
|
||||
store.reload();
|
||||
availableTable.reconfigure(store, columnModel);
|
||||
}
|
||||
}
|
||||
|
||||
public Object[] toArray(PT_AVAILABLE available){
|
||||
return new Object[]{available.getInventoryId() ,
|
||||
available.getLocationCode() ,
|
||||
available.getItemCode() ,
|
||||
available.getItemName() ,
|
||||
available.getPackageUnit() ,
|
||||
available.getPackageUnitConvertFigure() ,
|
||||
available.getInventoryQuantity() ,
|
||||
available.getInventoryAvailableQuantity() ,
|
||||
available.getInventoryManualQuantity() ,
|
||||
available.getItemKeyLot() ,
|
||||
available.getLotInfor() ,
|
||||
dateFormater.format(available.getInventoryStorageDate()).toString() ,
|
||||
available.getInventorySOI() };
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,393 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.ui.CheckBox;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.core.TextAlign;
|
||||
import com.gwtext.client.data.ArrayReader;
|
||||
import com.gwtext.client.data.FieldDef;
|
||||
import com.gwtext.client.data.IntegerFieldDef;
|
||||
import com.gwtext.client.data.MemoryProxy;
|
||||
import com.gwtext.client.data.RecordDef;
|
||||
import com.gwtext.client.data.Store;
|
||||
import com.gwtext.client.data.StringFieldDef;
|
||||
import com.gwtext.client.widgets.Button;
|
||||
import com.gwtext.client.widgets.ToolbarButton;
|
||||
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
|
||||
import com.gwtext.client.widgets.grid.ColumnConfig;
|
||||
import com.gwtext.client.widgets.grid.ColumnModel;
|
||||
import com.gwtext.client.widgets.grid.GridPanel;
|
||||
import com.gwtext.client.widgets.grid.RowSelectionModel;
|
||||
import com.gwtext.client.widgets.grid.event.GridRowListener;
|
||||
import com.gwtext.client.widgets.layout.RowLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayoutData;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
public class Sub_DetailsTable_Panel extends AbstractSupportPanel {
|
||||
|
||||
private final static String DEFAULT_NAME = "pickTicketDetails_Panel";
|
||||
transient GridPanel detailsTable;
|
||||
private RecordDef recordDef;
|
||||
private ColumnModel columnModel;
|
||||
private Store store;
|
||||
private MemoryProxy proxy;
|
||||
private ArrayReader reader;
|
||||
transient ToolbarButton autoAllocateButton;
|
||||
private ColumnConfig ptiColumn;
|
||||
private ColumnConfig iiColumn;
|
||||
private ColumnConfig pcColumn;
|
||||
private ColumnConfig pkuiColumn;
|
||||
private ColumnConfig icColumn;
|
||||
private ColumnConfig inColumn;
|
||||
private ColumnConfig puColumn;
|
||||
private ColumnConfig po1Column;
|
||||
private ColumnConfig po2Column;
|
||||
private ColumnConfig pp1Column;
|
||||
private ColumnConfig paColumn;
|
||||
private ColumnConfig pp2Column;
|
||||
private ColumnConfig psColumn;
|
||||
private ColumnConfig lColumn;
|
||||
private String flag;
|
||||
transient CheckBox checkBox;
|
||||
|
||||
public Sub_DetailsTable_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.drawWidget();
|
||||
}
|
||||
|
||||
private void initAvailableDatas(GridPanel grid, int rowIndex,boolean isFitAsLot) {
|
||||
Long itemId = Long.valueOf(grid.getStore().getAt(rowIndex).getAsString("item.id"));
|
||||
Integer convertFigure = grid.getStore().getAt(rowIndex).getAsInteger("packageUnit.convertFigure");
|
||||
String propC1 = grid.getStore().getAt(rowIndex).getAsString("propC1");
|
||||
String propC2 = grid.getStore().getAt(rowIndex).getAsString("propC2");
|
||||
String propC3 = grid.getStore().getAt(rowIndex).getAsString("propC3");
|
||||
String propC4 = grid.getStore().getAt(rowIndex).getAsString("propC4");
|
||||
String propC5 = grid.getStore().getAt(rowIndex).getAsString("propC5");
|
||||
String propC6 = grid.getStore().getAt(rowIndex).getAsString("propC6");
|
||||
String propC7 = grid.getStore().getAt(rowIndex).getAsString("propC7");
|
||||
String propC8 = grid.getStore().getAt(rowIndex).getAsString("propC8");
|
||||
String propC9 = grid.getStore().getAt(rowIndex).getAsString("propC9");
|
||||
String propN1 = grid.getStore().getAt(rowIndex).getAsString("propN1");
|
||||
String propN2 = grid.getStore().getAt(rowIndex).getAsString("propN2");
|
||||
String propN3 = grid.getStore().getAt(rowIndex).getAsString("propN3");
|
||||
String propD1 = grid.getStore().getAt(rowIndex).getAsString("propD1");
|
||||
String propD2 = grid.getStore().getAt(rowIndex).getAsString("propD2");
|
||||
String propD3 = grid.getStore().getAt(rowIndex).getAsString("propD3");
|
||||
String propL1 = grid.getStore().getAt(rowIndex).getAsString("propL1");
|
||||
String propL2 = grid.getStore().getAt(rowIndex).getAsString("propL2");
|
||||
String propL3 = grid.getStore().getAt(rowIndex).getAsString("propL3");
|
||||
|
||||
final Map<String,Object> param = new HashMap<String,Object>();
|
||||
param.put("itemId", itemId);
|
||||
param.put("convertFigure", convertFigure);
|
||||
if(isFitAsLot){
|
||||
param.put("propC1", propC1);
|
||||
param.put("propC2", propC2);
|
||||
param.put("propC3", propC3);
|
||||
param.put("propC4", propC4);
|
||||
param.put("propC5", propC5);
|
||||
param.put("propC6", propC6);
|
||||
param.put("propC7", propC7);
|
||||
param.put("propC8", propC8);
|
||||
param.put("propC9", propC9);
|
||||
param.put("propN1", propN1);
|
||||
param.put("propN2", propN2);
|
||||
param.put("propN3", propN3);
|
||||
param.put("propD1", propD1);
|
||||
param.put("propD2", propD2);
|
||||
param.put("propD3", propD3);
|
||||
param.put("propL1", propL1);
|
||||
param.put("propL2", propL2);
|
||||
param.put("propL3", propL3);
|
||||
}
|
||||
if(flag == "pickTicketPage"){
|
||||
//查询对应发货单明细的库存信息
|
||||
this.curPADataAccessor().initAvailableInfo(param);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//查询对应波次明细的库存信息
|
||||
this.curPADataAccessor().initWaveDocAvailableInfo(param);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void drawWidget(){
|
||||
|
||||
flag = curPADataAccessor().getFlag();
|
||||
recordDef = new RecordDef(new FieldDef[] {
|
||||
new IntegerFieldDef("pickTicketDetail.id"),
|
||||
new IntegerFieldDef("item.id"),
|
||||
new IntegerFieldDef("packageUnit.id"),
|
||||
new StringFieldDef("packageUnit.convertFigure"),
|
||||
new StringFieldDef("item.code"),
|
||||
new StringFieldDef("item.name"),
|
||||
new StringFieldDef("packageUnit.unit"),
|
||||
new IntegerFieldDef("pickTicketDetail.orderQuantity"),
|
||||
new IntegerFieldDef("pickTicketDetail.orderQtyOfMasterUnit"),
|
||||
new IntegerFieldDef("pickTicketDetail.preAllocatedQuantity"),
|
||||
new IntegerFieldDef("pickTicketDetail.allocatedQuantity"),
|
||||
new IntegerFieldDef("pickTicketDetail.pickedQuantity"),
|
||||
new IntegerFieldDef("pickTicketDetail.shippedQuantity"),
|
||||
new StringFieldDef("lotInfor"),
|
||||
new StringFieldDef("propC1"),
|
||||
new StringFieldDef("propC2"),
|
||||
new StringFieldDef("propC3"),
|
||||
new StringFieldDef("propC4"),
|
||||
new StringFieldDef("propC5"),
|
||||
new StringFieldDef("propC6"),
|
||||
new StringFieldDef("propC7"),
|
||||
new StringFieldDef("propC8"),
|
||||
new StringFieldDef("propC9"),
|
||||
new StringFieldDef("propN1"),
|
||||
new StringFieldDef("propN2"),
|
||||
new StringFieldDef("propN3"),
|
||||
new StringFieldDef("propD1"),
|
||||
new StringFieldDef("propD2"),
|
||||
new StringFieldDef("propD3"),
|
||||
new StringFieldDef("propL1"),
|
||||
new StringFieldDef("propL2"),
|
||||
new StringFieldDef("propL3")
|
||||
});
|
||||
|
||||
ptiColumn = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.id"), "pickTicketDetail.id");
|
||||
ptiColumn.setHidden(true);
|
||||
|
||||
iiColumn = new ColumnConfig(LocaleUtils.getText("item.id"), "item.id");
|
||||
iiColumn.setHidden(true);
|
||||
|
||||
pcColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.convertFigure"), "packageUnit.convertFigure");
|
||||
pcColumn.setHidden(true);
|
||||
|
||||
pkuiColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.id"), "packageUnit.id");
|
||||
pkuiColumn.setHidden(true);
|
||||
|
||||
icColumn = new ColumnConfig(LocaleUtils.getText("item.code"), "item.code", 150, false);
|
||||
icColumn.setAlign(TextAlign.CENTER);
|
||||
icColumn.setSortable(true);
|
||||
|
||||
inColumn = new ColumnConfig(LocaleUtils.getText("item.name"), "item.name", 200, false);
|
||||
inColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
puColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.unit"), "packageUnit.unit", 80, false);
|
||||
puColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
po1Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.orderQuantity"), "pickTicketDetail.orderQuantity", 100, false);
|
||||
po1Column.setAlign(TextAlign.CENTER);
|
||||
|
||||
po2Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.orderQtyOfMasterUnit"), "pickTicketDetail.orderQtyOfMasterUnit", 100, false);
|
||||
po2Column.setAlign(TextAlign.CENTER);
|
||||
|
||||
pp1Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.preAllocatedQuantity"), "pickTicketDetail.preAllocatedQuantity", 100, false);
|
||||
pp1Column.setAlign(TextAlign.CENTER);
|
||||
if(flag == "waveDocPage"){
|
||||
pp1Column.setHidden(true);
|
||||
}
|
||||
|
||||
paColumn = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.allocatedQuantity"), "pickTicketDetail.allocatedQuantity", 100, false);
|
||||
paColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
pp2Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.pickedQuantity"), "pickTicketDetail.pickedQuantity", 100, false);
|
||||
pp2Column.setAlign(TextAlign.CENTER);
|
||||
|
||||
psColumn = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.shippedQuantity"), "pickTicketDetail.shippedQuantity", 100, false);
|
||||
psColumn.setAlign(TextAlign.CENTER);
|
||||
if(flag == "waveDocPage"){
|
||||
psColumn.setHidden(true);
|
||||
}
|
||||
|
||||
lColumn = new ColumnConfig(LocaleUtils.getText("lotInfor"), "lotInfor", 150, false);
|
||||
lColumn.setAlign(TextAlign.CENTER);
|
||||
|
||||
ColumnConfig propC1Column = new ColumnConfig("lotInfo.propC1","lotInfo.propC1");
|
||||
propC1Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC2Column = new ColumnConfig("lotInfo.propC2","lotInfo.propC2");
|
||||
propC2Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC3Column = new ColumnConfig("lotInfo.propC3","lotInfo.propC3");
|
||||
propC3Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC4Column = new ColumnConfig("lotInfo.propC4","lotInfo.propC4");
|
||||
propC4Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC5Column = new ColumnConfig("lotInfo.propC5","lotInfo.propC5");
|
||||
propC5Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC6Column = new ColumnConfig("lotInfo.propC6","lotInfo.propC6");
|
||||
propC6Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC7Column = new ColumnConfig("lotInfo.propC7","lotInfo.propC7");
|
||||
propC7Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC8Column = new ColumnConfig("lotInfo.propC8","lotInfo.propC8");
|
||||
propC8Column.setHidden(true);
|
||||
|
||||
ColumnConfig propC9Column = new ColumnConfig("lotInfo.propC9","lotInfo.propC9");
|
||||
propC9Column.setHidden(true);
|
||||
|
||||
ColumnConfig propN1Column = new ColumnConfig("lotInfo.propN1","lotInfo.propN1");
|
||||
propN1Column.setHidden(true);
|
||||
|
||||
ColumnConfig propN2Column = new ColumnConfig("lotInfo.propN2","lotInfo.propN2");
|
||||
propN2Column.setHidden(true);
|
||||
|
||||
ColumnConfig propN3Column = new ColumnConfig("lotInfo.propN3","lotInfo.propN3");
|
||||
propN3Column.setHidden(true);
|
||||
|
||||
ColumnConfig propD1Column = new ColumnConfig("lotInfo.propD1","lotInfo.propD1");
|
||||
propD1Column.setHidden(true);
|
||||
|
||||
ColumnConfig propD2Column = new ColumnConfig("lotInfo.propD2","lotInfo.propD2");
|
||||
propD2Column.setHidden(true);
|
||||
|
||||
ColumnConfig propD3Column = new ColumnConfig("lotInfo.propD3","lotInfo.propD3");
|
||||
propD3Column.setHidden(true);
|
||||
|
||||
ColumnConfig propL1Column = new ColumnConfig("lotInfo.propL1","lotInfo.propL1");
|
||||
propL1Column.setHidden(true);
|
||||
|
||||
ColumnConfig propL2Column = new ColumnConfig("lotInfo.propL2","lotInfo.propL2");
|
||||
propL2Column.setHidden(true);
|
||||
|
||||
ColumnConfig propL3Column = new ColumnConfig("lotInfo.propL3","lotInfo.propL3");
|
||||
propL3Column.setHidden(true);
|
||||
|
||||
columnModel = new ColumnModel(new ColumnConfig[]{
|
||||
ptiColumn,iiColumn,pcColumn,pkuiColumn,icColumn,inColumn,puColumn,po1Column,
|
||||
po2Column,pp1Column,paColumn,pp2Column,psColumn,lColumn,propC1Column,propC2Column,
|
||||
propC3Column,propC4Column,propC5Column,propC6Column,propC7Column,propC8Column,
|
||||
propC9Column,propN1Column,propN2Column,propN3Column,propD1Column,propD2Column,
|
||||
propD3Column,propL1Column,propL2Column,propL3Column
|
||||
});
|
||||
|
||||
|
||||
proxy = new MemoryProxy(new String[][]{});
|
||||
reader = new ArrayReader(recordDef);
|
||||
store = new Store(proxy, reader);
|
||||
store.load();
|
||||
detailsTable = new GridPanel();
|
||||
|
||||
detailsTable.setAutoScroll(true);
|
||||
detailsTable.setStore(store);
|
||||
detailsTable.setColumnModel(columnModel);
|
||||
|
||||
detailsTable.setSelectionModel(new RowSelectionModel(false));
|
||||
|
||||
ButtonListenerAdapter listener = new ButtonListenerAdapter() {
|
||||
public void onClick(Button button, EventObject e) {
|
||||
//整单分配
|
||||
autoAllocate();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
autoAllocateButton = new ToolbarButton("整单分配",listener);
|
||||
autoAllocateButton.setDisabled(true);
|
||||
|
||||
checkBox = new CheckBox("强制货品批次匹配");
|
||||
checkBox.setChecked(true);
|
||||
detailsTable.addGridRowListener(new GridRowListener(){
|
||||
public void onRowClick(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
autoAllocateButton.setDisabled(false);
|
||||
if(checkBox.isChecked()){
|
||||
initAvailableDatas(grid,rowIndex,true);
|
||||
}else{
|
||||
initAvailableDatas(grid,rowIndex,false);
|
||||
}
|
||||
if(flag == "pickTicketPage"){
|
||||
//设置当前选中的发货单ID
|
||||
final Long ptdId = Long.valueOf(grid.getStore().getAt(rowIndex).getAsString("pickTicketDetail.id"));
|
||||
curPADataAccessor().setPtdId(ptdId);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//设置当前选中的波次ID
|
||||
final Long wddId = Long.valueOf(grid.getStore().getAt(rowIndex).getAsString("pickTicketDetail.id"));
|
||||
curPADataAccessor().setWddId(wddId);
|
||||
}
|
||||
}
|
||||
|
||||
public void onRowContextMenu(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void onRowDblClick(GridPanel grid, int rowIndex,
|
||||
EventObject e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
});
|
||||
HorizontalPanel panel2 = new HorizontalPanel();
|
||||
panel2.add(autoAllocateButton);
|
||||
panel2.add(checkBox);
|
||||
panel2.setCellWidth(autoAllocateButton, "120px");
|
||||
|
||||
this.setLayout(new RowLayout());
|
||||
this.add(detailsTable,new RowLayoutData("88%"));
|
||||
this.add(panel2,new RowLayoutData("12%"));
|
||||
// this.addButton(autoAllocateButton);
|
||||
|
||||
|
||||
}
|
||||
//整单分配
|
||||
@SuppressWarnings("unchecked")
|
||||
private void autoAllocate() {
|
||||
final Map param = new HashMap();
|
||||
if(flag == "pickTicketPage"){
|
||||
//存放发货单ID,以便整单分配后刷新信息
|
||||
Long pickTicketId = this.curPADataAccessor().currentPickTicket().getId();
|
||||
param.put("pickTicketId", pickTicketId);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//存放波次ID,以便整单分配后刷新信息
|
||||
Long waveDocId = this.curPADataAccessor().currentPickTicket().getId();
|
||||
param.put("waveDocId", waveDocId);
|
||||
}
|
||||
final List<Long> result = new ArrayList<Long>();
|
||||
for(int i=0; i<detailsTable.getStore().getCount();i++){
|
||||
if(detailsTable.getSelectionModel().isSelected(i)){
|
||||
result.add(Long.valueOf(detailsTable.getStore().getAt(i).getAsString("pickTicketDetail.id")));
|
||||
}
|
||||
}
|
||||
param.put("parentIds", result);
|
||||
if(flag == "pickTicketPage"){
|
||||
//发货单整单分配
|
||||
this.curPADataAccessor().atuoAllocate(param);
|
||||
}else if(flag == "waveDocPage"){
|
||||
//波次整单分配
|
||||
this.curPADataAccessor().atuoWaveDocAllocate(param);
|
||||
}
|
||||
}
|
||||
|
||||
public Page_PA_DataAccessor curPADataAccessor() {
|
||||
return (Page_PA_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
// System.out.print("进入doDispath()方法了!");
|
||||
|
||||
if(Page_PA_DataAccessor.INIT_DETAILS_INFO.equals(message) || Page_PA_DataAccessor.INIT_WD_DETAILS_INFO.equals(message)){
|
||||
Object[][] data = new Object[this.curPADataAccessor().all_PDS().size()][];
|
||||
for (int i=0;i<this.curPADataAccessor().all_PDS().size();i++){
|
||||
data[i] = this.curPADataAccessor().all_PDS().get(i).toArray();
|
||||
}
|
||||
|
||||
|
||||
proxy = new MemoryProxy(data);
|
||||
store.setDataProxy(proxy);
|
||||
store.reload();
|
||||
detailsTable.reconfigure(store, columnModel);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.DeferredCommand;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.gwtext.client.core.Margins;
|
||||
import com.gwtext.client.core.RegionPosition;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.layout.BorderLayout;
|
||||
import com.gwtext.client.widgets.layout.BorderLayoutData;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayoutData;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Sub_IV_Panel extends AbstractSupportPanel {
|
||||
|
||||
public static final int DEFAULT_WIDTH = Window.getClientWidth() - 50 ;
|
||||
public static final int DEFAULT_HEIGHT = Window.getClientHeight() - 170;
|
||||
private Panel centerPanelWrappper;
|
||||
private Panel introPanel;
|
||||
|
||||
public Sub_IV_Panel(IMessagePage page) {
|
||||
super(page, "iv_main_panel");
|
||||
this.initialize();
|
||||
}
|
||||
|
||||
protected void initialize(){
|
||||
centerPanelWrappper = new Panel();
|
||||
centerPanelWrappper.setSize(DEFAULT_WIDTH , DEFAULT_HEIGHT);
|
||||
centerPanelWrappper.setLayout(new FitLayout());
|
||||
centerPanelWrappper.setBorder(true);
|
||||
centerPanelWrappper.setBodyBorder(true);
|
||||
|
||||
introPanel = new Panel();
|
||||
introPanel.setLayout(new RowLayout());
|
||||
introPanel.setAutoDestroy(true);
|
||||
introPanel.setAutoScroll(true);
|
||||
centerPanelWrappper.add(introPanel);
|
||||
|
||||
Panel northPanel = getNorthPanel();
|
||||
northPanel.setPaddings(5);
|
||||
northPanel.setLayout(new FitLayout());
|
||||
northPanel.setAutoDestroy(true);
|
||||
|
||||
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
|
||||
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
|
||||
BorderLayoutData northLayoutData = new BorderLayoutData(RegionPosition.NORTH);
|
||||
// northLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
// northLayoutData.setCMargins(new Margins(1, 1, 1, 1));
|
||||
// northLayoutData.setMinSize(20);
|
||||
// northLayoutData.setMaxSize(100);
|
||||
// northLayoutData.setSplit(true);
|
||||
|
||||
this.setBodyBorder(true);
|
||||
this.setBorder(true);
|
||||
this.setLayout(new BorderLayout());
|
||||
this.setAutoDestroy(true);
|
||||
this.setSize(Window.getClientWidth() - 50 , Window.getClientHeight() - 130);
|
||||
this.add(northPanel,northLayoutData);
|
||||
this.add(centerPanelWrappper, centerLayoutData);
|
||||
DeferredCommand.addCommand(new Command(){
|
||||
public void execute() {
|
||||
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_W_IMAGE_PANEL);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected Panel getNorthPanel(){
|
||||
return new Sub_Navigate_Panel(this);
|
||||
}
|
||||
|
||||
public void addCenterPanel(Panel panel) {
|
||||
introPanel.clear();
|
||||
introPanel.add(panel , new RowLayoutData("100%"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.core.RegionPosition;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.ToolTip;
|
||||
import com.gwtext.client.widgets.grid.EditorGridPanel;
|
||||
import com.gwtext.client.widgets.grid.GridPanel;
|
||||
import com.gwtext.client.widgets.grid.event.GridCellListenerAdapter;
|
||||
import com.gwtext.client.widgets.layout.BorderLayout;
|
||||
import com.gwtext.client.widgets.layout.BorderLayoutData;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.gwtext.client.widgets.layout.HorizontalLayout;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV;
|
||||
import com.dev.swms.client.ui.util.Sub_L_Image_Panel_Util;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Sub_L_Image_Panel extends Sub_Abstract_Panel {
|
||||
|
||||
private EditorGridPanel leftPanel;
|
||||
private EditorGridPanel rightTopPanel;
|
||||
private EditorGridPanel rightBottomPanel;
|
||||
|
||||
public Sub_L_Image_Panel(IMessagePage page) {
|
||||
super(page, Sub_L_Image_Panel_Util.DEFAULT_NAME);
|
||||
this.initialize();
|
||||
|
||||
this.setSize(Sub_IV_Panel.DEFAULT_WIDTH , Sub_IV_Panel.DEFAULT_HEIGHT);
|
||||
this.setBorder(false);
|
||||
this.setBodyBorder(false);
|
||||
this.setLayout(new BorderLayout());
|
||||
|
||||
Panel centerPanelWrappper = new Panel();
|
||||
centerPanelWrappper.setWidth(Sub_IV_Panel.DEFAULT_WIDTH);
|
||||
centerPanelWrappper.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT*2/3);
|
||||
centerPanelWrappper.setLayout(new FitLayout());
|
||||
centerPanelWrappper.setBorder(false);
|
||||
centerPanelWrappper.setBodyBorder(false);
|
||||
centerPanelWrappper.setPaddings(1);
|
||||
|
||||
leftPanel.setAutoDestroy(true);
|
||||
Panel introPanel = new Panel();
|
||||
introPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH);
|
||||
introPanel.setLayout(new HorizontalLayout(0));
|
||||
introPanel.setAutoDestroy(true);
|
||||
introPanel.setBodyBorder(false);
|
||||
introPanel.setBorder(false);
|
||||
centerPanelWrappper.add(introPanel);
|
||||
|
||||
introPanel.add(this.leftPanel , new BorderLayoutData(RegionPosition.WEST));
|
||||
introPanel.add(this.rightTopPanel , new BorderLayoutData(RegionPosition.CENTER));
|
||||
|
||||
BorderLayoutData northLayoutData = new BorderLayoutData(RegionPosition.NORTH);
|
||||
northLayoutData.setMinSize(10);
|
||||
northLayoutData.setMaxSize(Sub_IV_Panel.DEFAULT_HEIGHT);
|
||||
northLayoutData.setSplit(false);
|
||||
|
||||
this.add(centerPanelWrappper,northLayoutData);
|
||||
this.add(this.rightBottomPanel, new BorderLayoutData(RegionPosition.CENTER));
|
||||
this.initLocationDatas();
|
||||
}
|
||||
|
||||
protected void initLocationDatas() {
|
||||
this.curIVDataAccessor().initLocationIvDatas();
|
||||
}
|
||||
|
||||
public Page_IV_DataAccessor curIVDataAccessor() {
|
||||
return (Page_IV_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
protected void initialize() {
|
||||
this.initLeftPanel();
|
||||
this.initRightTopPanel();
|
||||
this.initRightBottomPanel();
|
||||
}
|
||||
|
||||
protected void initLeftPanel(){
|
||||
leftPanel = new EditorGridPanel();
|
||||
leftPanel.setBodyBorder(true);
|
||||
leftPanel.setBorder(true);
|
||||
leftPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH/2);
|
||||
leftPanel.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT*2/3);
|
||||
leftPanel.setLayout(new FitLayout());
|
||||
leftPanel.setColumnModel(Sub_L_Image_Panel_Util.getALColumnModel());
|
||||
leftPanel.setStore(Sub_L_Image_Panel_Util.getALStore(new Object[][]{}));
|
||||
leftPanel.addGridCellListener(new GridCellListenerAdapter(){
|
||||
public void onCellClick(GridPanel grid, int rowIndex, int colindex, EventObject e) {
|
||||
initRightTopPanelDatas(rowIndex,colindex);
|
||||
}
|
||||
});
|
||||
leftPanel.setEnableHdMenu(false);
|
||||
}
|
||||
|
||||
protected void initRightTopPanel(){
|
||||
rightTopPanel = new EditorGridPanel();
|
||||
rightTopPanel.setBodyBorder(true);
|
||||
rightTopPanel.setBorder(true);
|
||||
rightTopPanel.setLayout(new FitLayout());
|
||||
rightTopPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH/2);
|
||||
rightTopPanel.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT*2/3);
|
||||
rightTopPanel.setAutoScroll(true);
|
||||
rightTopPanel.setColumnModel(Sub_L_Image_Panel_Util.getRCColumnModel());
|
||||
rightTopPanel.setStore(Sub_L_Image_Panel_Util.getRCStore(new Object[][]{}));
|
||||
rightTopPanel.addGridCellListener(new GridCellListenerAdapter(){
|
||||
public void onCellClick(GridPanel grid, int rowIndex, int colindex, EventObject e) {
|
||||
initRightBottomPanelDatas(rowIndex , colindex);
|
||||
}
|
||||
});
|
||||
rightTopPanel.setEnableHdMenu(false);
|
||||
}
|
||||
|
||||
protected void initRightBottomPanel(){
|
||||
rightBottomPanel = new EditorGridPanel();
|
||||
rightBottomPanel.setBodyBorder(true);
|
||||
rightBottomPanel.setBorder(true);
|
||||
rightBottomPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH);
|
||||
rightBottomPanel.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT/3);
|
||||
rightBottomPanel.setLayout(new FitLayout());
|
||||
rightBottomPanel.setAutoScroll(true);
|
||||
rightBottomPanel.stripeRows(true);
|
||||
rightBottomPanel.setColumnModel(Sub_L_Image_Panel_Util.getInvColumnModel());
|
||||
rightBottomPanel.setStore(Sub_L_Image_Panel_Util.getInvStore(new Object[][]{}));
|
||||
}
|
||||
|
||||
protected void initRightTopPanelDatas(int row,int col){
|
||||
if(col == 0) return;
|
||||
boolean isNaN = curIVDataAccessor().all_Location_IV().get(row).get(col - 1).getLoc_rate() < 0;
|
||||
if(isNaN) return;
|
||||
Map<String,Object> params = new HashMap<String,Object>();
|
||||
params.put(CT_IV.IV_LINE , row + 1);
|
||||
params.put(CT_IV.IV_AISLE , col);
|
||||
params.put(CT_IV.IV_ZONE_ID , this.curDataAccessor().getCur_JB_Zone_IV().getLoc_id());
|
||||
this.curIVDataAccessor().initLocationIvRCDatas(params);
|
||||
}
|
||||
|
||||
protected void initRightBottomPanelDatas(int row,int col) {
|
||||
if(col == 0) return;
|
||||
JB_Location_RC_IV liv = curIVDataAccessor().all_Location_RC_IV().get(row).get(col - 1);
|
||||
if(liv.getId() == null || liv.getRate() <=0) return;
|
||||
Map<String,Object> params = new HashMap<String,Object>();
|
||||
params.put(CT_IV.IV_LOCATION_ID , liv.getId() );
|
||||
this.curIVDataAccessor().initInventoryDatas(params);
|
||||
}
|
||||
|
||||
protected void applyToToolTip() {
|
||||
for(int i = 0 ; i < CT_IV.DEFAULT_ROW ; i ++) {
|
||||
for(int j = 1 ; j <= CT_IV.DEFAULT_COL ; j ++) {
|
||||
JB_Location_RC_IV lriv = this.curIVDataAccessor().all_Location_RC_IV().get(i).get(j - 1);
|
||||
if(lriv.getId() == null || lriv.getRate() < 0) continue;
|
||||
new ToolTip(Sub_L_Image_Panel_Util.generateToolTip(lriv)).applyTo(this.rightTopPanel.getView().getCell(i,j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void applyToToolTip2(){
|
||||
for(int i = 0 ; i < CT_IV.DEFAULT_LINE ; i ++) {
|
||||
for(int j = 1 ; j <= CT_IV.DEFAULT_AISLE ; j ++) {
|
||||
JB_Location_IV lriv = this.curIVDataAccessor().all_Location_IV().get(i).get(j - 1);
|
||||
if(lriv.getLoc_rate() < 0) continue;
|
||||
new ToolTip(Sub_L_Image_Panel_Util.generateToolTip(lriv)).applyTo(this.leftPanel.getView().getCell(i,j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
if(Page_IV_DataAccessor.MSG_INIT_LOCATION_DATAS.equals(message)){
|
||||
leftPanel.reconfigure(Sub_L_Image_Panel_Util.getALStore(
|
||||
Sub_L_Image_Panel_Util.convertToAL2Array(this.curIVDataAccessor().all_Location_IV())) ,
|
||||
Sub_L_Image_Panel_Util.getALColumnModel());applyToToolTip2();
|
||||
|
||||
}else if(Page_IV_DataAccessor.MSG_INIT_LOCATION_RC_DATAS.equals(message)) {
|
||||
rightTopPanel.reconfigure(Sub_L_Image_Panel_Util.getRCStore(
|
||||
Sub_L_Image_Panel_Util.convertToRC2Array(this.curIVDataAccessor().all_Location_RC_IV())) ,
|
||||
Sub_L_Image_Panel_Util.getRCColumnModel());applyToToolTip();
|
||||
|
||||
}else if(Page_IV_DataAccessor.MSG_INIT_INVENTORY_DATAS.equals(message)) {
|
||||
rightBottomPanel.reconfigure(Sub_L_Image_Panel_Util.getInvStore(
|
||||
Sub_L_Image_Panel_Util.convertToInv2Array(this.curIVDataAccessor().all_Location_Inv())),
|
||||
Sub_L_Image_Panel_Util.getInvColumnModel());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.gwtext.client.widgets.layout.HorizontalLayout;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Sub_Navigate_Panel extends AbstractSupportPanel{
|
||||
|
||||
protected final static String DEFAULT_NAME = "navigate_panel";
|
||||
|
||||
/** 仓库链接 */
|
||||
protected HTML w_HyperLink = new HTML("供应链网络");
|
||||
/** 库区链接 */
|
||||
protected HTML z_HyperLink = new HTML("");
|
||||
/** 库位链接 */
|
||||
protected HTML l_HyperLink = new HTML("");
|
||||
|
||||
protected HTML firstImg = new HTML("");
|
||||
protected HTML secondImg = new HTML("");
|
||||
|
||||
protected Panel subPanel;
|
||||
|
||||
protected Sub_Abstract_Panel currentPanel;
|
||||
|
||||
public Sub_Navigate_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.initListener();
|
||||
this.drawWidget();
|
||||
}
|
||||
|
||||
protected void drawWidget(){
|
||||
w_HyperLink.setStyleName("iv_navigate");
|
||||
z_HyperLink.setStyleName("iv_navigate");
|
||||
l_HyperLink.setStyleName("iv_navigate");
|
||||
|
||||
subPanel = new Panel();
|
||||
subPanel.setLayout(new HorizontalLayout(5));
|
||||
subPanel.add(w_HyperLink);
|
||||
subPanel.add(firstImg);
|
||||
subPanel.add(z_HyperLink);
|
||||
subPanel.add(secondImg);
|
||||
subPanel.add(l_HyperLink);
|
||||
subPanel.setWidth("100%");
|
||||
|
||||
this.setBodyBorder(true);
|
||||
this.setBorder(true);
|
||||
this.setLayout(new FitLayout());
|
||||
this.setHeight("30px");
|
||||
this.setWidth("100%");
|
||||
this.add(subPanel);
|
||||
}
|
||||
|
||||
protected void removeHistoryPanel(){
|
||||
if(this.currentPanel == null) return;
|
||||
this.currentPanel.hideCharts();
|
||||
page.remove(this.currentPanel);
|
||||
|
||||
}
|
||||
|
||||
protected void addCenterPanel(Sub_Abstract_Panel newPanel){
|
||||
this.currentPanel = newPanel;
|
||||
curIvPanel().addCenterPanel(newPanel);
|
||||
}
|
||||
|
||||
protected void initListener(){
|
||||
w_HyperLink.addClickListener(new ClickListener(){
|
||||
public void onClick(Widget sender) {
|
||||
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_W_IMAGE_PANEL);
|
||||
}
|
||||
});
|
||||
|
||||
z_HyperLink.addClickListener(new ClickListener(){
|
||||
public void onClick(Widget sender) {
|
||||
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_Z_IMAGE_PANEL);
|
||||
}
|
||||
});
|
||||
|
||||
l_HyperLink.addClickListener(new ClickListener(){
|
||||
public void onClick(Widget sender) {
|
||||
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Sub_IV_Panel curIvPanel(){
|
||||
return (Sub_IV_Panel)this.page;
|
||||
}
|
||||
|
||||
protected void refreshNavigatePanel(){
|
||||
if(((Page_IV_DataAccessor)page.getData()).current_JB_IV() != null){
|
||||
firstImg.setHTML(CT_IV.DEFAULT_ARROW_IMG);
|
||||
z_HyperLink.setHTML(((Page_IV_DataAccessor)page.getData()).current_JB_IV().getIv_wh_name());
|
||||
}
|
||||
if(((Page_IV_DataAccessor)page.getData()).getCur_JB_Zone_IV() != null){
|
||||
secondImg.setHTML(CT_IV.DEFAULT_ARROW_IMG);
|
||||
l_HyperLink.setHTML(((Page_IV_DataAccessor)page.getData()).getCur_JB_Zone_IV().getLoc_name());
|
||||
}
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
if(Page_IV_DataAccessor.MSG_REFRESH_NAVIGATE_PANEL.equals(message)) {
|
||||
this.refreshNavigatePanel();
|
||||
}else if(Page_IV_DataAccessor.MSG_OPEN_W_IMAGE_PANEL.equals(message)) {
|
||||
this.removeHistoryPanel();
|
||||
this.addCenterPanel(new Sub_W_Image_Panel(page));
|
||||
DOM.setStyleAttribute(this.w_HyperLink.getElement() , "border" , "1px solid blue");
|
||||
DOM.setStyleAttribute(this.z_HyperLink.getElement() , "border" , "none");
|
||||
DOM.setStyleAttribute(this.l_HyperLink.getElement() , "border" , "none");
|
||||
}else if(Page_IV_DataAccessor.MSG_OPEN_Z_IMAGE_PANEL.equals(message)) {
|
||||
this.removeHistoryPanel();
|
||||
this.addCenterPanel(new Sub_Z_Image_Panel(page));
|
||||
this.refreshNavigatePanel();
|
||||
DOM.setStyleAttribute(this.w_HyperLink.getElement() , "border" , "none");
|
||||
DOM.setStyleAttribute(this.z_HyperLink.getElement() , "border" , "1px solid blue");
|
||||
DOM.setStyleAttribute(this.l_HyperLink.getElement() , "border" , "none");
|
||||
}else if(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL.equals(message)) {
|
||||
this.removeHistoryPanel();
|
||||
this.addCenterPanel(new Sub_L_Image_Panel(page));
|
||||
this.refreshNavigatePanel();
|
||||
DOM.setStyleAttribute(this.w_HyperLink.getElement() , "border" , "none");
|
||||
DOM.setStyleAttribute(this.z_HyperLink.getElement() , "border" , "none");
|
||||
DOM.setStyleAttribute(this.l_HyperLink.getElement() , "border" , "1px solid blue");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.DeferredCommand;
|
||||
import com.gwtext.client.core.Margins;
|
||||
import com.gwtext.client.core.RegionPosition;
|
||||
import com.gwtext.client.widgets.Panel;
|
||||
import com.gwtext.client.widgets.TabPanel;
|
||||
import com.gwtext.client.widgets.layout.BorderLayout;
|
||||
import com.gwtext.client.widgets.layout.BorderLayoutData;
|
||||
import com.gwtext.client.widgets.layout.RowLayout;
|
||||
import com.gwtext.client.widgets.layout.RowLayoutData;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
public class Sub_PA_Panel extends AbstractSupportPanel {
|
||||
|
||||
|
||||
private TabPanel centerPanel;
|
||||
transient Long pickTicketId;
|
||||
|
||||
transient Panel allocatingPanel;
|
||||
transient Panel allocatedPanel;
|
||||
|
||||
|
||||
public Sub_PA_Panel(IMessagePage page) {
|
||||
super(page, "pa_main_panel");
|
||||
this.initialize();
|
||||
}
|
||||
|
||||
protected void initialize(){
|
||||
centerPanel = new TabPanel();
|
||||
|
||||
allocatingPanel = new Panel();
|
||||
allocatingPanel.setTitle(LocaleUtils.getText("allocating"));
|
||||
allocatingPanel.setAutoWidth(true);
|
||||
|
||||
allocatingPanel.setLayout(new RowLayout());
|
||||
Panel detailPanel = getDetailsTable();
|
||||
allocatingPanel.add(detailPanel,new RowLayoutData("50%"));
|
||||
Panel availablePanel = getAvailableTable();
|
||||
allocatingPanel.add(availablePanel,new RowLayoutData("50%"));
|
||||
centerPanel.add(allocatingPanel);
|
||||
|
||||
allocatedPanel = new Panel();
|
||||
allocatedPanel.setTitle(LocaleUtils.getText("cancelAllocate"));
|
||||
allocatedPanel.setAutoWidth(true);
|
||||
|
||||
allocatedPanel.setLayout(new RowLayout());
|
||||
Panel allocated1Panel = getAllocatedTable();
|
||||
allocatedPanel.add(allocated1Panel,new RowLayoutData("100%"));
|
||||
centerPanel.add(allocatedPanel);
|
||||
|
||||
|
||||
centerPanel.activate(0);
|
||||
this.setSize("950px", "500px");
|
||||
|
||||
Panel northPanel = getNorthPanel();
|
||||
|
||||
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
|
||||
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
|
||||
|
||||
BorderLayoutData northLayoutData = new BorderLayoutData(RegionPosition.NORTH);
|
||||
|
||||
this.setBodyBorder(false);
|
||||
this.setBorder(false);
|
||||
this.setLayout(new BorderLayout());
|
||||
this.setAutoDestroy(true);
|
||||
|
||||
this.add(northPanel,northLayoutData);
|
||||
this.add(centerPanel, centerLayoutData);
|
||||
DeferredCommand.addCommand(new Command(){
|
||||
public void execute() {
|
||||
getData().sendMessage(Page_PA_DataAccessor.INIT_PICK_TICKETS_INFO);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Panel getAllocatedTable() {
|
||||
return new Sub_AllocatedTable_Panel(this);
|
||||
//return null;
|
||||
}
|
||||
|
||||
protected Panel getDetailsTable() {
|
||||
|
||||
return new Sub_DetailsTable_Panel(this);
|
||||
//return null;
|
||||
}
|
||||
|
||||
protected Panel getAvailableTable() {
|
||||
return new Sub_AvailableTable_Panel(this);
|
||||
//return null;
|
||||
}
|
||||
|
||||
|
||||
protected Panel getNorthPanel(){
|
||||
return new Sub_PickTicketInfo_Panel(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.gwtext.client.widgets.form.Label;
|
||||
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
public class Sub_PickTicketInfo_Panel extends AbstractSupportPanel {
|
||||
|
||||
protected final static String DEFAULT_NAME = "pickTicketInfo_Panel";
|
||||
|
||||
transient HorizontalPanel subPanel;
|
||||
transient TextBox pickTicketCodeTextBox;
|
||||
transient TextBox ordersQuantityTextBox;
|
||||
transient TextBox preAllocateQuantityTextBox;
|
||||
transient TextBox allocateQuantityTextBox;
|
||||
transient TextBox pickItemQuantityTextBox;
|
||||
|
||||
transient Label pickTicketCodeLabel;
|
||||
transient Label ordersQuantityLabel;
|
||||
transient Label preAllocateQuantityLabel;
|
||||
transient Label allocateQuantityLabel;
|
||||
transient Label pickItemQuantityLabel;
|
||||
private String flag;
|
||||
|
||||
|
||||
|
||||
public Sub_PickTicketInfo_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.drawWidget();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void drawWidget(){
|
||||
|
||||
|
||||
flag = curPADataAccessor().getFlag();
|
||||
subPanel = new HorizontalPanel();
|
||||
subPanel.setWidth("100%");
|
||||
|
||||
pickTicketCodeLabel = new Label(LocaleUtils.getText("waveDoc.code"));
|
||||
// pickTicketCodeLabel.setWidth("80px");
|
||||
pickTicketCodeTextBox = new TextBox();
|
||||
// pickTicketCodeTextBox.setWidth("80px");
|
||||
pickTicketCodeTextBox.setEnabled(false);
|
||||
|
||||
ordersQuantityLabel = new Label(LocaleUtils.getText("pickTicket.orderQuantity"));
|
||||
// ordersQuantityLabel.setWidth("80px");
|
||||
ordersQuantityTextBox = new TextBox();
|
||||
// ordersQuantityTextBox.setWidth("80px");
|
||||
ordersQuantityTextBox.setEnabled(false);
|
||||
|
||||
preAllocateQuantityLabel = new Label(LocaleUtils.getText("pickTicket.preAllocatedQuantity"));
|
||||
// preAllocateQuantityLabel.setWidth("80px");
|
||||
preAllocateQuantityTextBox = new TextBox();
|
||||
// preAllocateQuantityTextBox.setWidth("80px");
|
||||
preAllocateQuantityTextBox.setEnabled(false);
|
||||
|
||||
|
||||
allocateQuantityLabel = new Label(LocaleUtils.getText("pickTicket.allocatedQuantity"));
|
||||
// allocateQuantityLabel.setWidth("80px");
|
||||
allocateQuantityTextBox = new TextBox();
|
||||
// allocateQuantityTextBox.setWidth("80px");
|
||||
allocateQuantityTextBox.setEnabled(false);
|
||||
|
||||
pickItemQuantityLabel = new Label(LocaleUtils.getText("pickTicket.pickedQuantity"));
|
||||
// pickItemQuantityLabel.setWidth("80px");
|
||||
pickItemQuantityTextBox = new TextBox();
|
||||
// pickItemQuantityTextBox.setWidth("80px");
|
||||
pickItemQuantityTextBox.setEnabled(false);
|
||||
|
||||
|
||||
|
||||
if(flag != "waveDocPage"){
|
||||
pickTicketCodeLabel.setText(LocaleUtils.getText("pickTicket.code"));
|
||||
// preAllocateQuantityLabel.setVisible(false);
|
||||
// preAllocateQuantityTextBox.setVisible(false);
|
||||
pickTicketCodeLabel.setWidth("80px");
|
||||
pickTicketCodeTextBox.setWidth("160px");
|
||||
ordersQuantityLabel.setWidth("80px");
|
||||
ordersQuantityTextBox.setWidth("90px");
|
||||
preAllocateQuantityLabel.setWidth("100px");
|
||||
preAllocateQuantityTextBox.setWidth("90px");
|
||||
allocateQuantityLabel.setWidth("80px");
|
||||
allocateQuantityTextBox.setWidth("80px");
|
||||
pickItemQuantityLabel.setWidth("80px");
|
||||
pickItemQuantityTextBox.setWidth("80px");
|
||||
|
||||
|
||||
subPanel.add(pickTicketCodeLabel);
|
||||
subPanel.add(pickTicketCodeTextBox);
|
||||
subPanel.add(ordersQuantityLabel);
|
||||
subPanel.add(ordersQuantityTextBox);
|
||||
subPanel.add(preAllocateQuantityLabel);
|
||||
subPanel.add(preAllocateQuantityTextBox);
|
||||
subPanel.add(allocateQuantityLabel);
|
||||
subPanel.add(allocateQuantityTextBox);
|
||||
subPanel.add(pickItemQuantityLabel);
|
||||
subPanel.add(pickItemQuantityTextBox);
|
||||
|
||||
}else{
|
||||
|
||||
subPanel.add(pickTicketCodeLabel);
|
||||
subPanel.add(pickTicketCodeTextBox);
|
||||
subPanel.add(ordersQuantityLabel);
|
||||
subPanel.add(ordersQuantityTextBox);
|
||||
// subPanel.add(preAllocateQuantityLabel);
|
||||
// subPanel.add(preAllocateQuantityTextBox);
|
||||
subPanel.add(allocateQuantityLabel);
|
||||
subPanel.add(allocateQuantityTextBox);
|
||||
subPanel.add(pickItemQuantityLabel);
|
||||
subPanel.add(pickItemQuantityTextBox);
|
||||
}
|
||||
this.setSize("950px", "25px");
|
||||
this.setBodyBorder(false);
|
||||
this.add(subPanel);
|
||||
}
|
||||
|
||||
public Page_PA_DataAccessor curPADataAccessor() {
|
||||
return (Page_PA_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
if(Page_PA_DataAccessor.INIT_PICK_TICKETS_INFO.equals(message) || Page_PA_DataAccessor.INIT_WAVE_DOC_INFO.equals(message)){
|
||||
|
||||
pickTicketCodeTextBox.setText(String.valueOf(this.curPADataAccessor().currentPickTicket().getCode()));
|
||||
ordersQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getOrderQuantity()));
|
||||
preAllocateQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getPreAllocatedQuantity()));
|
||||
allocateQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getAllocatedQuantity()));
|
||||
pickItemQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getPickedQuantity()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.dev.swms.client.ui.companent.DraggableUiColumnChartWrapper;
|
||||
import com.dev.swms.client.ui.companent.UiColumnChart;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_IV;
|
||||
import com.dev.energy.client.ApplicationWindow;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Sub_W_Image_Panel extends Sub_Abstract_Panel {
|
||||
|
||||
/** 背景主面板的宽度和高度 */
|
||||
protected static final String DEFAULT_WIDTH = "100%";
|
||||
protected static final String DEFAULT_HEIGHT = "100%";
|
||||
|
||||
public static final String DEFAULT_NAME = "sub_image_panel";
|
||||
protected static final String DEFAULT_WAREHOUSE_BGIMAGE = "w_bg_image_url";
|
||||
|
||||
protected List<UiColumnChart> uccs;
|
||||
|
||||
public Sub_W_Image_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.init_Sub_Image_Panel();
|
||||
|
||||
}
|
||||
|
||||
protected void init_Sub_Image_Panel() {
|
||||
this.setSize(Sub_IV_Panel.DEFAULT_WIDTH , Sub_IV_Panel.DEFAULT_HEIGHT);
|
||||
this.setLayout(new FitLayout());
|
||||
this.setBodyStyle(CT_IV.DEFAULT_BODYSTYLE);
|
||||
VerticalPanel panel = new VerticalPanel();
|
||||
panel.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
|
||||
Object back = ApplicationWindow.context.getGlobalParams().get(DEFAULT_WAREHOUSE_BGIMAGE);
|
||||
panel.add(new Image(back == null?"" : back.toString()));
|
||||
this.add(panel);
|
||||
this.curIVDataAccessor().initIVDatas();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
if(Page_IV_DataAccessor.MSG_INIT_IV_DATA.equals(message)) {
|
||||
this.init_WH_IV_ColumnChart();
|
||||
}
|
||||
}
|
||||
|
||||
public Page_IV_DataAccessor curIVDataAccessor() {
|
||||
return (Page_IV_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
/** 绘制仓库布局中的满库率(用柱图显示) */
|
||||
protected void init_WH_IV_ColumnChart() {
|
||||
if (this.curIVDataAccessor() != null) {
|
||||
for(final JB_IV iv : this.curIVDataAccessor().all_IV()) {
|
||||
UiColumnChart wd = new DraggableUiColumnChartWrapper(iv,this);
|
||||
//this.regeditSubWidgetAndShow(new UiColumnChart(iv,this));
|
||||
//add
|
||||
this.regeditSubWidgetAndShow(wd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void regeditSubWidgetAndShow(UiColumnChart ucc) {
|
||||
if(uccs == null) {
|
||||
uccs = new ArrayList<UiColumnChart>();
|
||||
}
|
||||
uccs.add(ucc);
|
||||
ucc.show();
|
||||
|
||||
}
|
||||
|
||||
public void hideCharts() {
|
||||
if(uccs == null) return;
|
||||
for(UiColumnChart ucc : uccs) {
|
||||
ucc.hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.gwtext.client.widgets.layout.FitLayout;
|
||||
import com.dev.swms.client.ui.companent.DraggableUiPieChartWrapper;
|
||||
import com.dev.swms.client.ui.companent.UiPieChart;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
|
||||
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Sub_Z_Image_Panel extends Sub_Abstract_Panel {
|
||||
|
||||
protected static final int DEFAULT_WIDTH = Sub_IV_Panel.DEFAULT_WIDTH;
|
||||
protected static final int DEFAULT_HEIGHT = Sub_IV_Panel.DEFAULT_HEIGHT;
|
||||
protected static final String DEFAULT_NAME = "zoneImagePanel";
|
||||
|
||||
protected List<UiPieChart> pieCharts;
|
||||
|
||||
public Sub_Z_Image_Panel(IMessagePage page) {
|
||||
super(page, DEFAULT_NAME);
|
||||
this.init_Sub_Image_Panel();
|
||||
}
|
||||
|
||||
protected void init_Sub_Image_Panel() {
|
||||
this.setSize(DEFAULT_WIDTH , DEFAULT_HEIGHT);
|
||||
this.setBodyBorder(false);
|
||||
this.setBorder(false);
|
||||
this.setBodyStyle(CT_IV.DEFAULT_BODYSTYLE);
|
||||
VerticalPanel panel = new VerticalPanel();
|
||||
panel.setSize("100%","100%");
|
||||
panel.add(new Image(curIVDataAccessor().current_JB_IV().getImage_url()));
|
||||
this.add(panel);
|
||||
this.setLayout(new FitLayout());
|
||||
this.curDataAccessor().initZoneIvDatas();
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
super.doDispath(message);
|
||||
if(Page_IV_DataAccessor.MSG_INIT_ZONE_DATAS.equals(message)){
|
||||
this.initPieChart();
|
||||
}
|
||||
}
|
||||
|
||||
protected void initPieChart() {
|
||||
if(this.curDataAccessor() !=null){
|
||||
for(JB_Zone_IV ziv : this.curDataAccessor().all_Zone_IV()){
|
||||
|
||||
UiPieChart uip = new DraggableUiPieChartWrapper(ziv,this);
|
||||
//this.register(new UiPieChart(ziv , this));
|
||||
this.register(uip);
|
||||
//add
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Page_IV_DataAccessor curIVDataAccessor() {
|
||||
return (Page_IV_DataAccessor)super.getData();
|
||||
}
|
||||
|
||||
protected void register(UiPieChart chart) {
|
||||
if(pieCharts == null) {
|
||||
pieCharts = new ArrayList<UiPieChart>();
|
||||
}
|
||||
chart.show();
|
||||
pieCharts.add(chart);
|
||||
}
|
||||
|
||||
public void hideCharts() {
|
||||
if(pieCharts == null) return;
|
||||
for(UiPieChart pc : pieCharts) {
|
||||
pc.hide(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.rpc.ServiceDefTarget;
|
||||
import com.google.gwt.user.client.ui.ListBox;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.dev.swms.client.SWMS;
|
||||
import com.dev.swms.client.ui.page.service.CustomService;
|
||||
import com.dev.swms.client.ui.page.service.CustomServiceAsync;
|
||||
import com.dev.energy.client.ApplicationWindow;
|
||||
import com.dev.energy.client.context.ConfigContext;
|
||||
import com.dev.energy.client.rpc.AjaxServiceUtil;
|
||||
import com.dev.energy.client.rpc.AsyncCallBackAdapter;
|
||||
import com.dev.energy.client.rpc.CommitServiceAsync;
|
||||
import com.dev.energy.client.template.BaseCustomPopupTemplate;
|
||||
import com.dev.energy.client.ui.ClickListener;
|
||||
import com.dev.energy.client.ui.HiddenUI;
|
||||
import com.dev.energy.client.ui.ListUI;
|
||||
import com.dev.energy.client.ui.commonWidgets.BeautyButton;
|
||||
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
|
||||
import com.dev.energy.client.ui.table.FormTable;
|
||||
import com.dev.energy.client.ui.table.RowData;
|
||||
import com.dev.energy.client.utils.Constants;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
public class SwithWareHousePage extends BaseCustomPopupTemplate implements IsSerializable{
|
||||
transient FormTable formTable;
|
||||
|
||||
transient HiddenUI userIdUI;
|
||||
transient ListUI wareHousesUI;
|
||||
private List wareHouses;
|
||||
|
||||
transient SwitchButton switchButton;
|
||||
|
||||
public void init() {
|
||||
draw();
|
||||
}
|
||||
|
||||
public void draw() {
|
||||
AbstractSupportPanel content = new AbstractSupportPanel (this,""){};
|
||||
content.add(getPagePanel());
|
||||
userIdUI.setValue((Long)params.get("userId"));
|
||||
composites.add(content);
|
||||
reloadFormData();
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return LocaleUtils.getText("switchWareHousePage");
|
||||
}
|
||||
|
||||
/** 从后台获取页面所有数据,参考参数entity的ID **/
|
||||
protected void reloadFormData(){
|
||||
final Map wareHouseParams = new HashMap();
|
||||
wareHouseParams.put("user.id",userIdUI.getValue());
|
||||
AsyncCallBackAdapter callBack = new AsyncCallBackAdapter(){
|
||||
|
||||
protected void exec() {
|
||||
CommitServiceAsync serviceAsync = AjaxServiceUtil.initialAsyncService(ConfigContext.DEFAULT);
|
||||
serviceAsync.executeCustom("warehouseManager","getWareHousesForenergy",wareHouseParams,this);
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
Map resultParam = (Map)result;
|
||||
|
||||
//设置控件值
|
||||
resultParam.remove(Constants.energy_MESSAGE_KEY);
|
||||
initAllControlKit(resultParam);
|
||||
}
|
||||
};
|
||||
callBack.exec("");
|
||||
}
|
||||
|
||||
/** 对取回的数据进行处理:将取回的数据写入到页面中,此功能用于修改装运单的时候初始化页面 **/
|
||||
protected void initAllControlKit(Map map){
|
||||
wareHouses = new ArrayList();
|
||||
if(map.get("wareHouses.list")!=null){
|
||||
wareHouses.addAll((Collection) map.get("wareHouses.list"));
|
||||
}
|
||||
((ListBox)wareHousesUI.getInputWidget()).clear();;
|
||||
for(int i=0; i<wareHouses.size(); i++){
|
||||
Long key = (Long) ((RowData) wareHouses.get(i)).getColumnValue(0);
|
||||
String value = (String) ((RowData) wareHouses.get(i)).getColumnValue(1);
|
||||
((ListBox) wareHousesUI.getInputWidget()).addItem(value,key.toString());
|
||||
}
|
||||
// wareHousesUI.initData(wareHouses.toArray());
|
||||
}
|
||||
|
||||
protected Widget getPagePanel(){
|
||||
VerticalPanel pagePanel = new VerticalPanel();
|
||||
formTable = new FormTable();
|
||||
initInputUIsInForm();
|
||||
pagePanel.add(formTable.getForm());
|
||||
pagePanel.add(new SwitchButton());
|
||||
return pagePanel;
|
||||
}
|
||||
|
||||
/** 初始化控件 **/
|
||||
protected void initInputUIsInForm() {
|
||||
initUserId();
|
||||
initWareHouses();
|
||||
}
|
||||
|
||||
private void initWareHouses(){
|
||||
String hql = "";
|
||||
/*"select w from UserGroupWarehouse uw "
|
||||
+"left join uw.warehouse w"
|
||||
+"left join uw.userGroup ug"
|
||||
+"where ug.id in (select g.id from Group g,User user where g in elements(user.groups) and user.id = ${user.id} ) and w.disabled=false"*/;
|
||||
this.wareHousesUI = this.makeListUI("wareHouse.List");
|
||||
this.wareHousesUI.setRow(1);
|
||||
this.wareHousesUI.setForceOverride(true);
|
||||
this.wareHousesUI.setForceSpace(false);
|
||||
this.wareHousesUI.setRequired(true);
|
||||
this.wareHousesUI.setHql(hql);
|
||||
this.wareHousesUI.setSpan(1);
|
||||
this.wareHousesUI.setWidth("300px");
|
||||
this.wareHousesUI.afterPropertySet();
|
||||
// this.wareHousesUI.initData(new RowData[]{});
|
||||
this.wareHousesUI.addToTable(this.formTable);
|
||||
}
|
||||
|
||||
private void initUserId(){
|
||||
this.userIdUI = this.makeHiddenUI("user.id",false);
|
||||
this.userIdUI.addToTable(formTable);
|
||||
}
|
||||
|
||||
/** 创建ListBox控件 **/
|
||||
private ListUI makeListUI(String id){
|
||||
ListUI listUI = new ListUI();
|
||||
listUI.setId(id);
|
||||
listUI.setTitle(LocaleUtils.getText(id));
|
||||
return listUI;
|
||||
}
|
||||
|
||||
/** 创建hidden控件 **/
|
||||
public HiddenUI makeHiddenUI(String id,boolean reserve){
|
||||
HiddenUI ui = new HiddenUI(id,reserve);
|
||||
return ui;
|
||||
}
|
||||
|
||||
protected class SwitchButton extends BeautyButton implements ClickListener {
|
||||
SwitchButton() {
|
||||
super(LocaleUtils.getText("switchWareHouse"));
|
||||
this.setEnabled(true);
|
||||
switchButton = this;
|
||||
this.addClickListener(this);
|
||||
}
|
||||
|
||||
public void onClick(Object obj) {
|
||||
// Map map = getCommitData();
|
||||
// Object wareHouseId = map.get("wareHouseId");
|
||||
int index = ((ListBox)wareHousesUI.getInputWidget()).getSelectedIndex();
|
||||
RowData rowData = (RowData) wareHouses.get(index);
|
||||
final Object wareHouseId = rowData.getColumnValue(0);
|
||||
|
||||
|
||||
CustomServiceAsync asyncService = (CustomServiceAsync) GWT.create(CustomService.class);
|
||||
ServiceDefTarget endpoint = (ServiceDefTarget) asyncService;
|
||||
String server = GWT.getModuleBaseURL()+ "*.changeWarehouse";
|
||||
endpoint.setServiceEntryPoint(server);
|
||||
|
||||
asyncService.swichWarehouse((Long)wareHouseId , new AsyncCallback<Map>(){
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
}
|
||||
|
||||
public void onSuccess(Map result) {
|
||||
ApplicationWindow.aw.context.setGlobalParams((Map<String, Object>) result.get("globals"));
|
||||
ApplicationWindow.tabPanelClear();
|
||||
SWMS.changeWarehouse.setText("仓库:"+result.get("warehouseName"));
|
||||
hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// HTTPRequest.asyncGet(GWT.getModuleBaseURL()+"*.changeWarehouse?warehouseId="+wareHouseId,new ResponseTextHandler(){
|
||||
// public void onCompletion(String responseText) {
|
||||
// if(responseText.startsWith("success")){
|
||||
// ApplicationWindow.getMyTabPanel().clear();
|
||||
// SWMS.changeWarehouse.setText("仓库:"+responseText.substring(responseText.indexOf("_")+1));
|
||||
// hide();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void release() {
|
||||
|
||||
}
|
||||
|
||||
public List<String> getLocaleMessageKeys() {
|
||||
List<String> keys = new ArrayList<String>();
|
||||
keys.add("switchWareHousePage");
|
||||
keys.add("switchWareHouse");
|
||||
keys.add("wareHouse.List");
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.dev.swms.client.ui.page;
|
||||
|
||||
import com.gwtext.client.dd.DragData;
|
||||
import com.gwtext.client.dd.DragDrop;
|
||||
import com.gwtext.client.widgets.tree.DropNodeCallback;
|
||||
import com.gwtext.client.widgets.tree.TreeNode;
|
||||
import com.gwtext.client.widgets.tree.TreePanel;
|
||||
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description 西边布局面板中的树容器,根为'仓库'根节点不显示
|
||||
*
|
||||
*/
|
||||
|
||||
public class WestTreePanel extends TreePanel {
|
||||
|
||||
protected TreeNode root;
|
||||
|
||||
private String title;
|
||||
|
||||
public WestTreePanel(String title) {
|
||||
this.title = title;
|
||||
init();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
setTitle(title);
|
||||
setWidth(170);
|
||||
setCollapsible(true);
|
||||
setAnimate(true);
|
||||
|
||||
setAutoScroll(true);
|
||||
setContainerScroll(true);
|
||||
setRootVisible(false);
|
||||
setBorder(false);
|
||||
|
||||
setEnableDD(true);
|
||||
setHlDrop(true);
|
||||
setEnableDrop(true);
|
||||
|
||||
this.addListener(new TreePanelListenerAdapter() {
|
||||
public boolean doBeforeNodeDrop(TreePanel treePanel,
|
||||
TreeNode target, DragData dragData, String point,
|
||||
DragDrop source, TreeNode dropNode,
|
||||
DropNodeCallback dropNodeCallback) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
root = new TreeNode("仓库");
|
||||
root.expand();
|
||||
setRootNode(root);
|
||||
}
|
||||
|
||||
public TreeNode getRoot() {
|
||||
return root;
|
||||
}
|
||||
|
||||
public void setRoot(TreeNode root) {
|
||||
this.root = root;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.dev.swms.client.ui.page.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.rpc.RemoteService;
|
||||
|
||||
public interface CustomService extends RemoteService {
|
||||
public Map<String,Object> swichWarehouse(Long warehouseId) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.dev.swms.client.ui.page.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
public interface CustomServiceAsync {
|
||||
void swichWarehouse(Long warehouseId , AsyncCallback<Map> callBack);
|
||||
}
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
package com.dev.swms.client.ui.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.i18n.client.NumberFormat;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.gwtext.client.core.Ext;
|
||||
import com.gwtext.client.core.TextAlign;
|
||||
import com.gwtext.client.data.Record;
|
||||
import com.gwtext.client.data.SimpleStore;
|
||||
import com.gwtext.client.data.Store;
|
||||
import com.gwtext.client.widgets.grid.CellMetadata;
|
||||
import com.gwtext.client.widgets.grid.ColumnConfig;
|
||||
import com.gwtext.client.widgets.grid.ColumnModel;
|
||||
import com.gwtext.client.widgets.grid.Renderer;
|
||||
import com.dev.swms.client.ui.constant.CT_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_IV_List;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_Inventory;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV_List;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date$Version:V1.1
|
||||
*/
|
||||
public class Sub_L_Image_Panel_Util {
|
||||
|
||||
public static final int DEFAULT_WIDTH = Window.getClientWidth() - 100 ;
|
||||
public static final int DEFAULT_HEIGHT = Window.getClientHeight() - 100;
|
||||
public static final String DEFAULT_NAME = "l_image_panel";
|
||||
public static final int DEFAULT_PROGRESS_WIDTH = 60;
|
||||
public static final int DEFAULT_INVENTORY_COLUMN_WIDTH = 90;
|
||||
public static final int DEFAULT_INVENTORY_ROW_HEIGHT = 20;
|
||||
public static ColumnModel AL_MODEL , RC_MODEL , INV_MODEL;
|
||||
public static String[] RC_COLUMN_DEFINES , AL_COLUMN_DEFINES ;
|
||||
|
||||
private static void initALColumnDefine(){
|
||||
AL_COLUMN_DEFINES = new String[CT_IV.DEFAULT_AISLE + 1];
|
||||
AL_COLUMN_DEFINES[0] = "line";
|
||||
for(int i = 1 ; i <= CT_IV.DEFAULT_AISLE ; i++) {
|
||||
AL_COLUMN_DEFINES[i] = "aisle_" + i;
|
||||
}
|
||||
}
|
||||
|
||||
private static void initRCColumnDefine(){
|
||||
RC_COLUMN_DEFINES = new String[CT_IV.DEFAULT_COL + 1];
|
||||
RC_COLUMN_DEFINES[0] = "row";
|
||||
for(int i = 1 ; i <= CT_IV.DEFAULT_COL ; i++) {
|
||||
RC_COLUMN_DEFINES[i] = "col_" + i;
|
||||
}
|
||||
}
|
||||
|
||||
private static void initRCColumnConfig(){
|
||||
if(RC_COLUMN_DEFINES == null) initRCColumnDefine();
|
||||
ColumnConfig[] rc_configs = new ColumnConfig[CT_IV.DEFAULT_COL + 1] ;
|
||||
rc_configs[0] = new ColumnConfig("层\\列" , RC_COLUMN_DEFINES[0],40);
|
||||
rc_configs[0].setResizable(false);
|
||||
for(int i = 1 ; i <= CT_IV.DEFAULT_COL ; i++) {
|
||||
rc_configs[i] = new ColumnConfig(LocaleUtils.getText(RC_COLUMN_DEFINES[i]) , RC_COLUMN_DEFINES[i] , DEFAULT_PROGRESS_WIDTH);
|
||||
rc_configs[i].setRenderer(new Renderer(){
|
||||
public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, Store store) {
|
||||
return generateProgressHTML(value,cellMetadata);
|
||||
}
|
||||
});
|
||||
rc_configs[i].setAlign(TextAlign.LEFT);
|
||||
rc_configs[i].setResizable(false);
|
||||
}
|
||||
RC_MODEL = new ColumnModel(rc_configs);
|
||||
}
|
||||
|
||||
private static void initALColumnConfig(){
|
||||
if(AL_COLUMN_DEFINES == null) initALColumnDefine();
|
||||
ColumnConfig[] al_configs= new ColumnConfig[CT_IV.DEFAULT_AISLE + 1] ;
|
||||
al_configs[0] = new ColumnConfig("排\\道" , AL_COLUMN_DEFINES[0],40);
|
||||
al_configs[0].setResizable(false);
|
||||
for(int i = 1 ; i <= CT_IV.DEFAULT_AISLE ; i++) {
|
||||
al_configs[i] = new ColumnConfig(LocaleUtils.getText(AL_COLUMN_DEFINES[i]) , AL_COLUMN_DEFINES[i] , DEFAULT_PROGRESS_WIDTH);
|
||||
al_configs[i].setRenderer(new Renderer(){
|
||||
public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, Store store) {
|
||||
return generateProgressHTML(value,cellMetadata);
|
||||
}
|
||||
});
|
||||
al_configs[i].setAlign(TextAlign.LEFT);
|
||||
al_configs[i].setResizable(false);
|
||||
}
|
||||
AL_MODEL = new ColumnModel(al_configs);
|
||||
}
|
||||
|
||||
private static void initInvColumnConfig(){
|
||||
String[] properties = JB_Location_Inventory.propertyToArray();
|
||||
ColumnConfig[] configs= new ColumnConfig[properties.length] ;
|
||||
for(int i = 0 ; i < properties.length ; i++) {
|
||||
configs[i] = new ColumnConfig(JB_Location_Inventory.localizedToArray()[i] , properties[i] , DEFAULT_INVENTORY_COLUMN_WIDTH);
|
||||
configs[i].setRenderer(new Renderer(){
|
||||
public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, Store store) {
|
||||
cellMetadata.setHtmlAttribute("style='height:18px;border-left:1px solid #d0d0d0;'");
|
||||
return value.toString();
|
||||
}
|
||||
});
|
||||
}
|
||||
INV_MODEL = new ColumnModel(configs);
|
||||
}
|
||||
|
||||
public static ColumnModel getInvColumnModel(){
|
||||
if(INV_MODEL == null){
|
||||
initInvColumnConfig();
|
||||
}
|
||||
return INV_MODEL;
|
||||
}
|
||||
|
||||
private static String generateProgressHTML(Object value , CellMetadata cellMetadata) {
|
||||
int realWidth = Ext.isIE()?DEFAULT_PROGRESS_WIDTH : DEFAULT_PROGRESS_WIDTH - 10;
|
||||
int realHeght = Ext.isIE()?DEFAULT_INVENTORY_ROW_HEIGHT : DEFAULT_INVENTORY_ROW_HEIGHT - 2;
|
||||
if(value == null || "".equals(value)){
|
||||
return "";
|
||||
}
|
||||
Double realValue = Double.valueOf(value.toString());
|
||||
//不存在库位,背景为灰色
|
||||
if(realValue < 0) {
|
||||
cellMetadata.setHtmlAttribute("style='height:" + realHeght + "px;background:#d0d0d0;BORDER-LEFT: #d0d0d0 1px solid;'");
|
||||
return "";
|
||||
}
|
||||
//存在库位,但是容积率为0,背景为白色
|
||||
if(realValue == 0) {
|
||||
cellMetadata.setHtmlAttribute("style='BORDER-LEFT: #d0d0d0 1px solid;" + " height:" + realHeght + "px;width:" + realWidth + "px'");
|
||||
return "";
|
||||
}
|
||||
realHeght = Ext.isIE()? realHeght - 1 : (realHeght - 2);
|
||||
realValue = realValue >= 1? realWidth : realWidth*realValue;
|
||||
cellMetadata.setHtmlAttribute(
|
||||
"style='BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #d0ecff 1px solid; " +
|
||||
"BORDER-LEFT: #d0ecff 1px solid; COLOR: #ffff00; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #0099ff;" +
|
||||
"height:" + realHeght + "px;width:" +
|
||||
NumberFormat.getFormat(CT_IV.DEFAULT_INTEGER_FORMAT).format(realValue) + "px'");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
public static ColumnModel getRCColumnModel(){
|
||||
if(RC_MODEL == null) {
|
||||
initRCColumnConfig();
|
||||
}
|
||||
return RC_MODEL;
|
||||
}
|
||||
|
||||
public static ColumnModel getALColumnModel(){
|
||||
if(AL_MODEL == null) {
|
||||
initALColumnConfig();
|
||||
}
|
||||
return AL_MODEL;
|
||||
}
|
||||
|
||||
public static Store getALStore(Object[][] objss){
|
||||
SimpleStore store = new SimpleStore(AL_COLUMN_DEFINES,objss);
|
||||
store.load();
|
||||
return store;
|
||||
}
|
||||
|
||||
public static Store getRCStore(Object[][] objss) {
|
||||
SimpleStore store = new SimpleStore(RC_COLUMN_DEFINES,objss);
|
||||
store.load();
|
||||
return store;
|
||||
}
|
||||
|
||||
public static Store getInvStore(Object[][] objss) {
|
||||
SimpleStore store = new SimpleStore(JB_Location_Inventory.propertyToArray(),objss);
|
||||
store.load();
|
||||
return store;
|
||||
}
|
||||
|
||||
public static Object[][] convertToAL2Array(List<JB_Location_IV_List> livs) {
|
||||
Object[][] objss = new Object[CT_IV.DEFAULT_LINE][];
|
||||
for(int line = 0; line < CT_IV.DEFAULT_LINE ; line++) {
|
||||
objss[line] = livs.get(line).toArray();
|
||||
}
|
||||
return objss;
|
||||
}
|
||||
|
||||
public static Object[][] convertToRC2Array(List<JB_Location_RC_IV_List> lrivs) {
|
||||
Object[][] objss = new Object[CT_IV.DEFAULT_ROW][];
|
||||
for(int row = 0; row < CT_IV.DEFAULT_ROW ; row++) {
|
||||
objss[row] = lrivs.get(row).toArray();
|
||||
}
|
||||
return objss;
|
||||
}
|
||||
|
||||
public static Object[][] convertToInv2Array(List<JB_Location_Inventory> lis) {
|
||||
Object[][] objss = new Object[lis.size()][];
|
||||
for(int row = 0; row < lis.size() ; row++) {
|
||||
objss[row] = lis.get(row).toArray();
|
||||
}
|
||||
return objss;
|
||||
}
|
||||
|
||||
public static String generateToolTip(JB_Location_IV iv) {
|
||||
String disValue = "<table width='100%'>" +
|
||||
"<tr><td style='text-aglin:left;'>库存容积:" + NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(iv.getLoc_rate()) + "</td></tr>" +
|
||||
"<tr><td style='text-aglin:left;'>库位道:" + iv.getLoc_aisle() + "</td></tr>" +
|
||||
"<tr><td style='text-aglin:left;'>库位排:" + iv.getLoc_line() + "</td></tr></table>";
|
||||
return disValue;
|
||||
}
|
||||
|
||||
public static String generateToolTip(JB_Location_RC_IV lriv) {
|
||||
String[] realValues = lriv.toTipArray();
|
||||
String disValue = "<table width='100%'>" +
|
||||
"<tr><td style='text-aglin:left;'>库存容积:" + NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(lriv.getRate()) + "</td></tr>" +
|
||||
"<tr><td style='text-aglin:left;'>库位编码:" + realValues[0] + "</td></tr>" +
|
||||
"<tr><td style='text-aglin:left;'>长x宽x高:" + realValues[1] + "x" + realValues[2] + "x" + realValues[3] + "</td></tr>" +
|
||||
"<tr><td style='text-aglin:left;'>件数x重量x体积x托数:" + realValues[4] + "x" + realValues[5] + "x" + realValues[6] + "x" + realValues[7] + "</td></tr>" +
|
||||
"<tr><td style='text-aglin:left;'>额定库满度:" + realValues[8]+"</td></tr></table>";
|
||||
return disValue;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.dev.swms.client.ui.util;
|
||||
|
||||
import com.gwtext.client.util.Format;
|
||||
import com.dev.swms.client.ui.javabean.JB_IV;
|
||||
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:e2wms $Date$Version:V1.1
|
||||
*/
|
||||
public class Ui_Pie_Chart_Util {
|
||||
|
||||
public static String generateChartToolTip(JB_IV iv) {
|
||||
return Format.format("<TABLE WIDTH='100%' STYLE='border:1px dotted #a3bae9'>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='RIGHT' WIDTH='30%' STYLE='border:1px dotted #a3bae9'>仓库名称:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{0}</font></TD>" +
|
||||
"</TR>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='RIGHT' STYLE='border:1px dotted #a3bae9'>X坐标:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{1}</font></TD>" +
|
||||
"</TR>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='RIGHT' STYLE='border:1px dotted #a3bae9'>Y坐标:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{2}</font></TD>" +
|
||||
"</TR></TABLE>" , iv.toStrArray());
|
||||
}
|
||||
|
||||
public static String generatePieToolTip(JB_Zone_IV ziv) {
|
||||
return Format.format("<TABLE WIDTH='100%' STYLE='border:1px dotted #a3bae9'>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='LEFT' WIDTH='30%' STYLE='border:1px dotted #a3bae9'>库区编码:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{0}</font></TD>" +
|
||||
"</TR>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9'>库区名称:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{1}</font></TD>" +
|
||||
"</TR>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9'>X坐标:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{2}</font></TD>" +
|
||||
"</TR>" +
|
||||
"<TR>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9'>Y坐标:</TD>" +
|
||||
"<TD ALGIN='LEFT' STYLE='border:1px dotted #a3bae9;white-space:nowrap;'><font color='blue' style='font-weight:bold;'>{3}</font></TD>" +
|
||||
"</TR></TABLE>" , ziv.toStrArray());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.dev.swms.client.ui.validate;
|
||||
|
||||
import com.dev.energy.client.validate.AbstractValidator;
|
||||
|
||||
public class AbstractCombinParser extends AbstractValidator{
|
||||
|
||||
private String regex;
|
||||
|
||||
public String getRegex() {
|
||||
return regex;
|
||||
}
|
||||
|
||||
public void setRegex(String regex) {
|
||||
this.regex = regex;
|
||||
}
|
||||
|
||||
public String validate(com.dev.energy.client.ui.InputUI inputUI) {
|
||||
if(inputUI.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String value = inputUI.getValue().toString();
|
||||
boolean b = validateWithRegex(value , getRegex());
|
||||
if (b) {
|
||||
return null;
|
||||
}
|
||||
return this.getHintMessage(inputUI);
|
||||
}
|
||||
|
||||
public native boolean validateWithRegex(String str , String strRegex) /*-{
|
||||
var regex = "^\\s*[("+strRegex+"(\\s*,"+strRegex+")*)|(\\s*\\("+strRegex+",\\s*"+strRegex+"\\))]*$";
|
||||
var result = str.match(regex);
|
||||
if(result){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}-*/;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.dev.swms.client.ui.validate;
|
||||
|
||||
import com.dev.energy.client.validate.AbstractValidator;
|
||||
|
||||
public class DataNumberCombinParser extends AbstractValidator{
|
||||
|
||||
public String validate(com.dev.energy.client.ui.InputUI inputUI) {
|
||||
if (inputUI.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String value = inputUI.getValue().toString();
|
||||
boolean b = withRegex(value);
|
||||
if (b) {
|
||||
return null;
|
||||
}
|
||||
return this.getHintMessage(inputUI);
|
||||
}
|
||||
|
||||
private String getRegexByParen(String value) {
|
||||
String regex = "";
|
||||
|
||||
if(value.indexOf("(") == -1) {
|
||||
regex = "(\\d+.?\\d+)(((\\,)(\\d+.?\\d+))?)*";//只有单值的正则表达式
|
||||
} else {
|
||||
regex = "((\\()(\\d+.?\\d+)?\\,(\\d+.?\\d+)?(\\)))((\\,)((\\()(\\d+.?\\d+)?\\,(\\d+.?\\d+)?(\\))))*";
|
||||
}
|
||||
|
||||
return regex;
|
||||
}
|
||||
|
||||
public boolean withRegex(String str) {
|
||||
return str.matches(getRegexByParen(str));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.dev.swms.client.ui.validate;
|
||||
|
||||
import com.dev.energy.client.validate.AbstractValidator;
|
||||
|
||||
public class DateCombinParser extends AbstractValidator{
|
||||
|
||||
public String validate(com.dev.energy.client.ui.InputUI inputUI) {
|
||||
if(inputUI.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String value = inputUI.getValue().toString();
|
||||
boolean b = dateRegex(value);
|
||||
if (b) {
|
||||
return null;
|
||||
}
|
||||
return this.getHintMessage(inputUI);
|
||||
}
|
||||
|
||||
private native boolean dateRegex(String str) /*-{
|
||||
var regex = "";
|
||||
|
||||
if(str.indexOf("(") == -1) {
|
||||
regex = /^(\d{4}-\d{1,2}-\d{1,2})(((\,)(\d{4}-\d{1,2}-\d{1,2}))?)*$/;
|
||||
} else {
|
||||
regex = /^((\()(\d{4}-\d{1,2}-\d{1,2})?\,(\d{4}-\d{1,2}-\d{1,2})?(\)))((\,)((\()(\d{4}-\d{1,2}-\d{1,2})?\,(\d{4}-\d{1,2}-\d{1,2})?(\))))*$/;
|
||||
}
|
||||
return regex.test(str);
|
||||
}-*/;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dev.swms.client.ui.validate;
|
||||
|
||||
import com.dev.energy.client.validate.AbstractValidator;
|
||||
|
||||
public class StringCombinParser extends AbstractValidator{
|
||||
|
||||
public String validate(com.dev.energy.client.ui.InputUI inputUI) {
|
||||
if (inputUI.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String value = inputUI.getValue().toString();
|
||||
boolean b = withRegex(value);
|
||||
if (b) {
|
||||
return null;
|
||||
}
|
||||
return this.getHintMessage(inputUI);
|
||||
}
|
||||
|
||||
public boolean withRegex(String str) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,438 @@
|
|||
isbody, p, td, th{
|
||||
font-family: Tahoma, Arial;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
color: black;
|
||||
margin: 0px 0px 0px 0px;
|
||||
overflow-x:hidden;
|
||||
overflow-y:hidden
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
a {
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
.gwt-BorderedPanel {
|
||||
}
|
||||
|
||||
.gwt-Button {
|
||||
border-color: black;
|
||||
border-width:1px;
|
||||
border-style: solid;
|
||||
background-color: #FAFAFA;
|
||||
height: 19px;
|
||||
}
|
||||
|
||||
.gwt-Canvas {
|
||||
}
|
||||
|
||||
.gwt-CheckBox {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.gwt-DialogBox {
|
||||
sborder: 1px solid #AAAAAA;
|
||||
border: 1px;
|
||||
background-color: #AAAAAA;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.gwt-DialogBox .Caption {
|
||||
background-color: #C3D9FF;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.energy-Dialog-Caption {
|
||||
background-color: #C3D9FF;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.gwt-FileUpload {
|
||||
}
|
||||
|
||||
.gwt-Frame {
|
||||
}
|
||||
|
||||
.gwt-HorizontalSplitter .Bar {
|
||||
width: 8px;
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
.gwt-VerticalSplitter .Bar {
|
||||
height: 8px;
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
.gwt-HTML {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.gwt-Hyperlink {
|
||||
}
|
||||
|
||||
.gwt-Image {
|
||||
}
|
||||
|
||||
.gwt-Label {
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.gwt-ListBox {
|
||||
}
|
||||
|
||||
.gwt-MenuBar {
|
||||
background-color: #C3D9FF;
|
||||
border: 1px solid #87B3FF;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.gwt-MenuBar .gwt-MenuItem {
|
||||
padding: 1px 4px 1px 4px;
|
||||
font-size: smaller;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.gwt-MenuBar .gwt-MenuItem-selected {
|
||||
background-color: #E8EEF7;
|
||||
}
|
||||
|
||||
.gwt-PasswordTextBox {
|
||||
}
|
||||
|
||||
.gwt-RadioButton {
|
||||
}
|
||||
|
||||
.gwt-TabPanel {
|
||||
}
|
||||
|
||||
.gwt-TabPanelBottom {
|
||||
border-left: 1px solid #87B3FF;
|
||||
}
|
||||
|
||||
.gwt-TabBar {
|
||||
background-color: #C3D9FF;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.gwt-TabBar .gwt-TabBarFirst {
|
||||
height: 100%;
|
||||
border-bottom: 1px solid #87B3FF;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.gwt-TabBar .gwt-TabBarRest {
|
||||
border-bottom: 1px solid #87B3FF;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.gwt-TabBar .gwt-TabBarItem {
|
||||
border-top: 1px solid #C3D9FF;
|
||||
border-bottom: 1px solid #87B3FF;
|
||||
padding: 2px;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.gwt-TabBar .gwt-TabBarItem-selected {
|
||||
font-weight: bold;
|
||||
background-color: #E8EEF7;
|
||||
border-top: 1px solid #87B3FF;
|
||||
border-left: 1px solid #87B3FF;
|
||||
border-right: 1px solid #87B3FF;
|
||||
border-bottom: 1px solid #E8EEF7;
|
||||
padding: 2px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.gwt-TextArea {
|
||||
}
|
||||
|
||||
.gwt-TextBox {
|
||||
}
|
||||
|
||||
.gwt-Tree {
|
||||
}
|
||||
|
||||
.gwt-Tree .gwt-TreeItem {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.gwt-Tree .gwt-TreeItem-selected {
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
.gwt-StackPanel {
|
||||
}
|
||||
|
||||
.gwt-StackPanel .gwt-StackPanelItem {
|
||||
background-color: #C3D9FF;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.gwt-StackPanel .gwt-StackPanelItem-selected {
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
.ks-Sink {
|
||||
border: 8px solid #C3D9FF;
|
||||
background-color: #E8EEF7;
|
||||
width: 100%;
|
||||
height: 24em;
|
||||
}
|
||||
|
||||
.ks-Info {
|
||||
background-color: #C3D9FF;
|
||||
padding: 10px 10px 2px 10px;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.ks-List {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.ks-List .ks-SinkItem {
|
||||
width: 100%;
|
||||
padding: 0.3em;
|
||||
padding-right: 16px;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.ks-List .ks-SinkItem-selected {
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
.ks-images-Image {
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.ks-images-Button {
|
||||
margin: 8px;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.ks-layouts {
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.ks-layouts-Label {
|
||||
background-color: #C3D9FF;
|
||||
font-weight: bold;
|
||||
margin-top: 1em;
|
||||
padding: 2px 0px 2px 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ks-layouts-Scroller {
|
||||
height: 128px;
|
||||
border: 2px solid #C3D9FF;
|
||||
padding: 8px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.ks-popups-Popup {
|
||||
background-color: white;
|
||||
border: 1px solid #87B3FF;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.infoProse {
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.energy-RequiredLabelUI{
|
||||
color:red;
|
||||
}
|
||||
.energy-inputUnderLine{
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: white white black;
|
||||
}
|
||||
.energy-inputButton{
|
||||
border-color: black;
|
||||
border-width:1px;
|
||||
border-style: solid;
|
||||
background-color: #FAFAFA;
|
||||
height: 19px;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.energy-table-gray{
|
||||
color: #222222;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.energy-table-white{
|
||||
color: #222222;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
.energy-table-rowHeader{
|
||||
font-size:9pt;
|
||||
background-color: #D6E9F1;
|
||||
padding-top: 10px;
|
||||
padding-left: 10px
|
||||
}
|
||||
.table-row-selected{
|
||||
color: #222222;
|
||||
background-color: #0080FF;
|
||||
|
||||
}
|
||||
|
||||
.table-row-calculate{
|
||||
color: #222222;
|
||||
background-color: yellow;
|
||||
|
||||
}
|
||||
|
||||
TABLE.sortableTable TD {
|
||||
border-bottom:solid #93BEE2 1px;
|
||||
BORDER-RIGHT:1px solid #93BEE2;
|
||||
border-left:0px solid #93BEE2;
|
||||
border-top:0px solid #93BEE2;
|
||||
}
|
||||
|
||||
/*
|
||||
TABLE.sortableTable {width: 1300px;border: 1px solid #93BEE2; border-collapse: collapse;}
|
||||
*/
|
||||
|
||||
TABLE.sortableTable {
|
||||
border: 1px solid #93BEE2;
|
||||
}
|
||||
|
||||
.energy-loading-label{
|
||||
color: blue
|
||||
}
|
||||
|
||||
.energy-error-message-label{
|
||||
color: red
|
||||
}
|
||||
.energy-message-label{
|
||||
color: blue
|
||||
}
|
||||
|
||||
.rp { background-color:#AAAAAA; }
|
||||
|
||||
IFRAME {
|
||||
filter:alpha(opacity=0)
|
||||
}
|
||||
|
||||
.energy-alpha {
|
||||
background:green;
|
||||
filter:alpha(opacity=50);
|
||||
}
|
||||
|
||||
.energy-imagealpha {
|
||||
-moz-opacity:0.5;
|
||||
filter:alpha(opacity=50);
|
||||
}
|
||||
|
||||
.energy-roundedPanel {
|
||||
position:absolute;background-color: white;
|
||||
}
|
||||
|
||||
.rbroundbox { background: url(images/nt.gif) repeat; }
|
||||
.rbtop div { background: url(images/tl.gif) no-repeat top left; }
|
||||
.rbtop { background: url(images/tr.gif) no-repeat top right; }
|
||||
.rbbot div { background: url(images/bl.gif) no-repeat bottom left; }
|
||||
.rbbot { background: url(images/br.gif) no-repeat bottom right; }
|
||||
|
||||
/* height and width stuff, width not really nessisary. */
|
||||
.rbtop div, .rbtop, .rbbot div, .rbbot {
|
||||
width: 100%;
|
||||
height: 7px;
|
||||
font-size: 1px;
|
||||
}
|
||||
.rbcontent { margin: 0 7px; }
|
||||
.rbroundbox { width: 50%; margin: 1em auto; }
|
||||
|
||||
.moz-border-radiu
|
||||
{
|
||||
-moz-border-radius-topleft: 20px;
|
||||
-moz-border-radius-topright: 20px;
|
||||
-moz-border-radius-bottomleft: 20px;
|
||||
-moz-border-radius-bottomright: 20px;
|
||||
border: 4px solid #006600;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.energy-buttonbar {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 10px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.energy-thead {
|
||||
width: 100%;
|
||||
border: 1px solid #ccc;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.energy-thread_th {
|
||||
text-align: center;
|
||||
background-color: #DDDDDD;
|
||||
|
||||
border-bottom:solid #93BEE2 1px;
|
||||
BORDER-RIGHT:1px solid #93BEE2;
|
||||
border-left:1px solid #93BEE2;
|
||||
border-top:1px solid #93BEE2;
|
||||
}
|
||||
|
||||
table.wwFormTable {
|
||||
width: 95%;
|
||||
background-color: #CCCCCC;}
|
||||
table.wwFormTable tr.input {
|
||||
background-color:white; }
|
||||
table.wwFormTable td.input {
|
||||
background-color:white;
|
||||
padding: 1px; }
|
||||
table.wwFormTable td.bottom{
|
||||
text-align: right;
|
||||
background-image: url('../images/bottom_bg_40.gif'); }
|
||||
table.wwFormTable td.title{
|
||||
font-size:9pt;
|
||||
background-color: #D6E9F1;
|
||||
padding-top: 10px;
|
||||
padding-left: 10px}
|
||||
input.boxing {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
DIV.tableContainer {
|
||||
CLEAR: both;
|
||||
BORDER-RIGHT: #963 1px solid;
|
||||
BORDER-TOP: #963 1px solid;
|
||||
OVERFLOW: auto;
|
||||
BORDER-LEFT: #963 1px solid;
|
||||
BORDER-BOTTOM: #963 1px solid;
|
||||
HEIGHT: 105px;
|
||||
}
|
||||
DIV.tableContainer TABLE {
|
||||
FLOAT: left;
|
||||
}
|
||||
THEAD.fixedHeader TR {
|
||||
}
|
||||
THEAD.fixedHeader TH {
|
||||
BORDER-RIGHT: #b74 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #eb8 1px solid; PADDING-LEFT: 3px; FONT-WEIGHT: normal; BACKGROUND: #c96; PADDING-BOTTOM: 4px; BORDER-LEFT: #eb8 1px solid; PADDING-TOP: 4px; TEXT-ALIGN: center
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<META http-equiv=Content-Type content="text/html; charset=utf-8">
|
||||
<!--<link rel="stylesheet" href="SWMS.css">-->
|
||||
<title>E-LOG Enterprise WMS仓库管理系统</title>
|
||||
<script type="text/javascript" >
|
||||
function setStatus() {
|
||||
window.status = "WMS仓库管理系统";
|
||||
}
|
||||
document.oncontextmenu=function(){return false;}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script language='javascript' src='com.dev.swms.SWMS.nocache.js'></script>
|
||||
<iframe src="javascript:''" id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe>
|
||||
<IFRAME id="__wms_dl" name="__wms_dl" style="display:none;width:0;height:0;border:0"></IFRAME>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.dev.swms.server.action;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dev.swms.server.service.shipping.PickTicketManager;
|
||||
import com.dev.swms.server.service.shipping.WaveDocManager;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
import com.dev.energy.server.action.AbstractAction;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
*/
|
||||
public class PickingAllocateAction extends AbstractAction{
|
||||
protected final PickTicketManager pickTicketManager;
|
||||
protected final WaveDocManager waveDocManager;
|
||||
|
||||
public PickingAllocateAction(PickTicketManager pickTicketManager,WaveDocManager waveDocManager){
|
||||
this.pickTicketManager = pickTicketManager;
|
||||
this.waveDocManager = waveDocManager;
|
||||
|
||||
}
|
||||
/*
|
||||
public void allocateWithStrategy(Map clientParams){
|
||||
Long pickTicketId = (Long) clientParams.get("pickTicket.id");
|
||||
List pickTicketDetailIds = (List) clientParams.get("parentIds");
|
||||
if(logger.isDebugEnabled()) {
|
||||
logger.debug("pickticket " + pickTicketId + " will Allocate its details with paramters[" + clientParams +"]");
|
||||
}
|
||||
pickTicketManager.autoAllocate(pickTicketId, pickTicketDetailIds);
|
||||
}
|
||||
|
||||
public void manualAllocate(Map clientParams){
|
||||
Long pickTicketDetailId = (Long) clientParams.get("pickTicketDetail.id");
|
||||
pickTicketManager.manualAllocate(pickTicketDetailId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
|
||||
}
|
||||
|
||||
public void cancelManualAllocate(Map clientParams){
|
||||
Long pickTicketId = (Long) clientParams.get("pickTicket.id");
|
||||
pickTicketManager.unallocate(pickTicketId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
|
||||
}
|
||||
*/
|
||||
/* public void allocateWithStrategyWaveDoc(Map clientParams){
|
||||
Long waveDocId = (Long) clientParams.get("pickTicket.id");
|
||||
List waveDocDetailIds = (List) clientParams.get("parentIds");
|
||||
if(logger.isDebugEnabled()) {
|
||||
logger.debug("waveDoc " + waveDocId + " will Allocate its details with paramters[" + clientParams +"]");
|
||||
}
|
||||
waveDocManager.autoAllocate(waveDocId, waveDocDetailIds);
|
||||
}
|
||||
|
||||
public void manualAllocateWaveDoc(Map clientParams){
|
||||
Long waveDocDetailId = (Long) clientParams.get("pickTicketDetail.id");
|
||||
waveDocManager.manualAllocate(waveDocDetailId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
|
||||
}
|
||||
|
||||
public void cancelManualAllocateWaveDoc(Map clientParams){
|
||||
Long waveDocId = (Long) clientParams.get("waveDoc.id");
|
||||
waveDocManager.unallocate(waveDocId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.dev.swms.server.action;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.dev.energy.server.action.AbstractAction;
|
||||
import com.dev.energy.server.service.security.RoleManager;
|
||||
import com.dev.energy.server.web.security.UserHolder;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
*/
|
||||
public class RolePermissionAction extends AbstractAction{
|
||||
protected final RoleManager roleManager;
|
||||
|
||||
public RolePermissionAction(RoleManager manager) {
|
||||
roleManager = manager;
|
||||
}
|
||||
|
||||
public void invokePermission(Map clientParams){
|
||||
Long roleId = (Long) clientParams.get("role.id");
|
||||
clientParams.remove("role.id");
|
||||
String refModel = UserHolder.getReferenceModel();
|
||||
if(logger.isDebugEnabled()) {
|
||||
logger.debug("invoke permission to role " + roleId + " with params[" + clientParams + "]");
|
||||
}
|
||||
roleManager.invokePermission(roleId,refModel,clientParams);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.dev.swms.server.action;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dev.swms.server.web.filter.WarehouseHolder;
|
||||
import com.dev.energy.server.action.AbstractAction;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
*
|
||||
*/
|
||||
public class WarehouseHolderAction extends AbstractAction{
|
||||
|
||||
public Map getWarehouseId(Map clientParams){
|
||||
Map result = new HashMap();
|
||||
result.put("warehouseId", WarehouseHolder.getWarehouse().getId());
|
||||
if(logger.isDebugEnabled()) {
|
||||
logger.debug("WarehouseHolder returns warehouse " + WarehouseHolder.getWarehouse().getId());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class BillFeeColourFormatter implements Formatter{
|
||||
|
||||
public String format(String property, Object type, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm");
|
||||
int days=0;
|
||||
if(origenData.get(18).toString().length()>1){
|
||||
Date expireDate=null;
|
||||
try {
|
||||
expireDate = sdf.parse(origenData.get(18).toString());
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(expireDate!=null){
|
||||
/*天数差*/
|
||||
Date date = new Date();
|
||||
long from1 = date.getTime();
|
||||
long to1 = expireDate.getTime();
|
||||
days = (int) ((to1 - from1) / (1000 * 60 * 60 * 24))+1;
|
||||
if(days<=0){
|
||||
return "<div style='background-color:red' >" + days + "</div>";
|
||||
}else{
|
||||
return days+"";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return days+"";
|
||||
}
|
||||
return days+"";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
import com.dev.swms.server.model.base.LocationType;
|
||||
|
||||
public class ColourFormatter implements Formatter {
|
||||
public String format(String property, Object type, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
|
||||
if("TRANSIT".equals(type)){
|
||||
return "<div style='background-color:#CAFFFF' >" + "拣货" + "</div>";
|
||||
} else if("BAD".equals(type)){
|
||||
return "<div style='background-color:red' >" + "残次品" + "</div>";
|
||||
}else {
|
||||
if(type.equals(LocationType.STORAGE)){
|
||||
return "存货";
|
||||
}else if(type.equals(LocationType.RECEIVE)){
|
||||
return "收货区";
|
||||
}else if(type.equals(LocationType.SHIP)){
|
||||
return "出库备货区";
|
||||
}else if(type.equals(LocationType.COUNT)){
|
||||
return "盘点";
|
||||
}else if(type.equals(LocationType.PROCESS)){
|
||||
return "整改";
|
||||
}else if(type.equals(LocationType.QUALITY)){
|
||||
return "质检";
|
||||
}else if(type.equals(LocationType.TRANSIT)){
|
||||
return "拣货";
|
||||
}else if(type.equals(LocationType.RECEIVE)){
|
||||
return "收货";
|
||||
}else if(type.equals(LocationType.BAD)){
|
||||
return "残次品";
|
||||
}else if(type.equals(LocationType.READY)){
|
||||
return "备货";
|
||||
}else if(type.equals("")||type==null) {
|
||||
type="-";
|
||||
}
|
||||
return type.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class ContractCodeFormatter implements Formatter{
|
||||
public String format(String property, Object code, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
|
||||
String des=origenData.get(9).toString();
|
||||
if(!des.equals("-")){
|
||||
return "<div style='background-color:#66b3ff' >" + code + "</div>";
|
||||
}else{
|
||||
return code.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
import com.dev.swms.server.utils.DateUtils;
|
||||
|
||||
public class ContractDayFormatter implements Formatter{
|
||||
public String format(String property, Object storageDate, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
Integer day=0;
|
||||
if(storageDate instanceof Date) {
|
||||
day= DateUtils.getBetweenDays(new Date(),(Date) storageDate);
|
||||
}else{
|
||||
return "-";
|
||||
}
|
||||
if(day<30){
|
||||
return "<div style='background-color:red' >" + day + "</div>";
|
||||
}else{
|
||||
return day + "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*/
|
||||
public class CountInventoryLotFormatter implements Formatter {
|
||||
|
||||
private final Formatter formatter;
|
||||
|
||||
public CountInventoryLotFormatter(Formatter formatter) {
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
if("-".equals(cellValue)){
|
||||
return "-";
|
||||
}
|
||||
return formatter.format(property,cellValue,origenData,referenceModel,locale);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
import java.util.List;
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class CustomerOrderDayFormatter implements Formatter{
|
||||
public String format(String property, Object storageDate, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String day=origenData.get(5).toString();
|
||||
if(Double.parseDouble(day)<=0){
|
||||
return "<div style='background-color:red' >" + Double.parseDouble(day) + "</div>";
|
||||
}else{
|
||||
return Double.parseDouble(day) + "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class DownloadPictureFormatter implements Formatter{
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String result = "";
|
||||
String id = String.valueOf(origenData.get(0));
|
||||
result="<a href=\"http://47.117.118.155:81/jjwms/*.downImageServlet?id="+id+"&type="+cellValue+"\" target=\"_Blank\">"+"照片下载"+"</a>";
|
||||
// result="<a href=\"http://106.15.182.202:8081/jjww/*.DownImageServlet?id="+id+"&type="+cellValue+"\" target=\"_Blank\">"+"照片下载"+"</a>";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class DownloadSignFileFormatter implements Formatter{
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String result = "";
|
||||
String id = String.valueOf(origenData.get(0));
|
||||
String type ="D"; //String.valueOf(origenData.get(8));
|
||||
result="<a href=\"http://47.117.118.155:81/jjwms/*.downImageServlet?id="+id+"&type="+type+"\" target=\"_Blank\">"+"照片下载"+"</a>";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
import com.dev.energy.server.util.LocalizedMessage;
|
||||
|
||||
public class IncDecFormatter implements Formatter {
|
||||
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
if (String.valueOf(cellValue).equals("1")) {
|
||||
return LocalizedMessage.getLocalizedMessage("inventoryLog.inc",referenceModel,locale);
|
||||
} else {
|
||||
return LocalizedMessage.getLocalizedMessage("inventoryLog.dec",referenceModel,locale);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.swms.server.utils.DateUtils;
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class InventoryAgeFormatter implements Formatter {
|
||||
|
||||
public String format(String property, Object storageDate, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
if(storageDate instanceof Date) {
|
||||
return String.valueOf(DateUtils.getBetweenDays((Date) storageDate, new Date()));
|
||||
}else{
|
||||
try {
|
||||
return String.valueOf(DateUtils.getBetweenDays(new SimpleDateFormat("yyyy-MM-dd").parse(storageDate.toString()), new Date()));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
import com.dev.swms.server.model.base.LocationType;
|
||||
|
||||
public class ItemColourFormatter implements Formatter{
|
||||
|
||||
public String format(String property, Object type, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String des=origenData.get(10).toString();
|
||||
// System.out.println(des);
|
||||
if("true".equals(des)){
|
||||
return "<div style='background-color:red' >" + type.toString() + "</div>";
|
||||
}else if(type==null){
|
||||
return "-";
|
||||
}else
|
||||
{
|
||||
return type.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class LocationAgeFormatter implements Formatter {
|
||||
|
||||
public String format(String property, Object locationCode, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
if(locationCode.equals("FC")){
|
||||
return "<div style='background-color:red' >" + locationCode + "</div>";
|
||||
}
|
||||
return locationCode.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class LookOAPPictureFormatter implements Formatter{
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String type = "OAP";
|
||||
String result = "";
|
||||
String id = String.valueOf(origenData.get(0));
|
||||
result="<a href=\"http://47.117.118.155:81/jjwms/iqs?aorptid="+id+"&type="+type+"\" target=\"_Blank\">"+"订单-仓储照片查看"+"</a>";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
||||
|
||||
public class LookPictureFormatter extends DefaultBaseManager implements Formatter{
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String type = cellValue == null ? "" : cellValue.toString();
|
||||
String result = "";
|
||||
String id = String.valueOf(origenData.get(0));
|
||||
result="<a href=\"http://47.117.118.155:81/jjwms/iqs?aorptid="+id+"&type="+type+"\" target=\"_Blank\">"+"照片查看"+"</a>";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class LookSignFileFormatter implements Formatter{
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
//String type = cellValue == null ? "" : cellValue.toString();
|
||||
String result = "";
|
||||
String id = String.valueOf(origenData.get(0));
|
||||
String type ="D";// String.valueOf(origenData.get(8));
|
||||
result="<a href=\"http://47.117.118.155:81/jjwms/iqs?aorptid="+id+"&type="+type+"\" target=\"_Blank\">"+"照片查看"+"</a>";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*用于批次属性的格式化
|
||||
*/
|
||||
public class LotInforFormatter implements Formatter {
|
||||
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String[] fromTo = property.split(",");
|
||||
String format = "";
|
||||
Object lotValues[] = origenData.subList(Integer.valueOf(fromTo[0]).intValue(),Integer.valueOf(fromTo[1]).intValue()+1).toArray(new String[0]);
|
||||
for(int i = 0 ; i < lotValues.length ; i ++){
|
||||
if(lotValues[i] != null && !"".equals(lotValues[i]) && !"-".equals(lotValues[i]) && !"0".equals(lotValues[i])) {
|
||||
if("".equals(format)) {
|
||||
format += lotValues[i].toString();
|
||||
} else {
|
||||
format += "/" + lotValues[i].toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
if("".equals(format)){
|
||||
format = "-";
|
||||
}
|
||||
return format;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class NewLotInforFormatter implements Formatter {
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String[] fromTo = property.split(",");
|
||||
String format = "";
|
||||
Object lotValues[] = origenData.subList(Integer.valueOf(fromTo[0]).intValue(),Integer.valueOf(fromTo[1]).intValue()+1).toArray(new String[0]);
|
||||
for(int i = 0 ; i < lotValues.length ; i ++){
|
||||
if(lotValues[i] != null && !"".equals(lotValues[i]) && !"-".equals(lotValues[i]) && !"0".equals(lotValues[i])) {
|
||||
if("".equals(format)) {
|
||||
format += lotValues[i].toString();
|
||||
} else {
|
||||
format += "/" + lotValues[i].toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
if("".equals(format)){
|
||||
format = "-";
|
||||
}
|
||||
return format;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class PackageFormatter implements Formatter{
|
||||
|
||||
public String format(String arg0, Object arg1, List standards, String arg3, String arg4) {
|
||||
String standard="";
|
||||
standard = String.valueOf(standards.get(12))+"×"+String.valueOf(standards.get(13))+"×"+String.valueOf(standards.get(14));
|
||||
return standard;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:energy_rmc $Date$Version:V1.1
|
||||
*/
|
||||
public class ReportFileIsInvokeFormatter implements Formatter {
|
||||
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
String result = "未授权";
|
||||
if(cellValue != null && Long.valueOf(cellValue.toString()) > 0) {
|
||||
result = "已授权";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
import com.dev.energy.server.util.LocalizedMessage;
|
||||
|
||||
public class WWBooleanFormatter implements Formatter {
|
||||
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
|
||||
/**
|
||||
* 说明:
|
||||
* WWBooleanType表示国际化中的Key
|
||||
* cellValue表示实际的值
|
||||
*
|
||||
* 例如:国际化中有--WWBooleanType.true=是 WWBooleanType.false=否 WWBooleanType.-=
|
||||
* 那么在数据库中Boolean类型为空时,国际化的值为""
|
||||
*/
|
||||
if(property == null || property.equals("")) {
|
||||
property = "WWBooleanType";
|
||||
}
|
||||
if(cellValue == null) {
|
||||
cellValue = "-";
|
||||
}
|
||||
return LocalizedMessage.getLocalizedMessage(property + "." + cellValue , referenceModel, locale);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.dev.swms.server.context;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.access.BeanFactoryLocator;
|
||||
import org.springframework.beans.factory.access.BeanFactoryReference;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
public class ContextLoader {
|
||||
private static Log logger = LogFactory.getLog(ContextLoader.class);
|
||||
|
||||
public static final String DEFAULT_ADAPTER_CONTEXTCONFIGLOCATION = "adapterContextConfigLocation";
|
||||
public static final String DEFAULT_ADAPTER_LOCATORFACTORYSELECTOR = "adapterLocatorFactorySelector";
|
||||
public static final String DEFAULT_ADAPTER_PARENTCONTEXTKEY = "adapterContextKey";
|
||||
|
||||
private String[] adapterContextConfigLocation = new String[0];
|
||||
private String adapterLocatorFactorySelector = "classpath:swms-beanAdapterContext.xml";
|
||||
private String adapterParentContextKey = "com.dev.adapter";
|
||||
|
||||
protected ApplicationContext applicationContext;
|
||||
private BeanFactoryReference parentContextAdapter;
|
||||
|
||||
public void createApplicationContext() {
|
||||
applicationContext = new ClassPathXmlApplicationContext(adapterContextConfigLocation, loadParentContext());
|
||||
}
|
||||
|
||||
protected ApplicationContext loadParentContext()
|
||||
throws BeansException {
|
||||
ApplicationContext parentContext = null;
|
||||
|
||||
if (adapterLocatorFactorySelector != null) {
|
||||
BeanFactoryLocator locator = ContextSingletonBeanFactoryLocator.getInstance(adapterLocatorFactorySelector);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Getting parent context definition: using parent context key of '" +
|
||||
adapterParentContextKey + "' with BeanFactoryLocator");
|
||||
}
|
||||
|
||||
this.parentContextAdapter = locator.useBeanFactory(adapterParentContextKey);
|
||||
parentContext = (ApplicationContext) this.parentContextAdapter.getFactory();
|
||||
}
|
||||
|
||||
return parentContext;
|
||||
}
|
||||
|
||||
public void closeApplicationContext() {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Closing Spring root Kangaroo ApplicationContext");
|
||||
}
|
||||
|
||||
try {
|
||||
if (this.applicationContext instanceof ConfigurableApplicationContext) {
|
||||
((ConfigurableApplicationContext) this.applicationContext).close();
|
||||
}
|
||||
} finally {
|
||||
if (this.parentContextAdapter != null) {
|
||||
this.parentContextAdapter.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getAdapterParentContextKey() {
|
||||
return adapterParentContextKey;
|
||||
}
|
||||
|
||||
public void setAdapterParentContextKey(String adapterParentContextKey) {
|
||||
this.adapterParentContextKey = adapterParentContextKey;
|
||||
}
|
||||
|
||||
public String getAdapterLocatorFactorySelector() {
|
||||
return adapterLocatorFactorySelector;
|
||||
}
|
||||
|
||||
public void setAdapterLocatorFactorySelector(String adapterLocatorFactorySelector) {
|
||||
if(adapterLocatorFactorySelector == null){
|
||||
return;
|
||||
}
|
||||
this.adapterLocatorFactorySelector = adapterLocatorFactorySelector;
|
||||
}
|
||||
|
||||
public String[] getAdapterContextConfigLocation() {
|
||||
return adapterContextConfigLocation;
|
||||
}
|
||||
|
||||
public void setAdapterContextConfigLocation(
|
||||
String[] adapterContextConfigLocation) {
|
||||
if(adapterContextConfigLocation == null || adapterContextConfigLocation.length == 0){
|
||||
return;
|
||||
}
|
||||
this.adapterContextConfigLocation = adapterContextConfigLocation;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,771 @@
|
|||
package com.dev.swms.server.interfaces;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextClosedEvent;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
|
||||
import com.dev.energy.server.dao.CommonDao;
|
||||
import com.dev.swms.server.model.interfaceLog.InterfaceLog;
|
||||
import com.dev.swms.server.model.interfaceLog.InterfaceLogConstant;
|
||||
import com.dev.swms.server.model.interfaces.InterfaceWmsDownload;
|
||||
import com.dev.swms.server.service.interfaceLog.InterfaceItemManager;
|
||||
import com.dev.swms.server.utils.DateUtil;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* @version $Id: AdapterLauncher.java,v 1.2 2010/06/01 09:14:16 peng.lei Exp $
|
||||
*/
|
||||
|
||||
public class ItemJobLauncher implements ApplicationListener {
|
||||
protected final Log logger = LogFactory.getLog(this.getClass());
|
||||
|
||||
/** 执行间隔时间(ms) */
|
||||
protected int sleepInterval = 5000;
|
||||
/** 服务是否启动 */
|
||||
private boolean isApplicationAvailable = false;
|
||||
/** 是否允许运行,用于客户端对其进行控制 */
|
||||
private boolean allowed = true;
|
||||
/** 二进制回退算法重置的阈值(ms,默认是10分钟) */
|
||||
protected int thresholdForResetValue = 600000;
|
||||
/** 本次要发送的日志数 */
|
||||
private int numOfLogsToBeSent;
|
||||
/** 已发送过的日志,包括成功和失败的 */
|
||||
private int numOfLogsSent;
|
||||
protected CommonDao commonDao;
|
||||
protected InterfaceItemManager itemManager;
|
||||
|
||||
public ItemJobLauncher( CommonDao commonDao,InterfaceItemManager itemManager) {
|
||||
this.itemManager = itemManager;
|
||||
this.commonDao=commonDao;
|
||||
}
|
||||
|
||||
public boolean isAllowed() {
|
||||
return allowed;
|
||||
}
|
||||
|
||||
public void setAllowed(boolean allowed) {
|
||||
this.allowed = allowed;
|
||||
}
|
||||
|
||||
public int getSleepInterval() {
|
||||
return sleepInterval;
|
||||
}
|
||||
|
||||
public void setSleepInterval(int sleepInterval) {
|
||||
this.sleepInterval = sleepInterval;
|
||||
}
|
||||
|
||||
public int getThresholdForResetValue() {
|
||||
return thresholdForResetValue;
|
||||
}
|
||||
|
||||
public void setThresholdForResetValue(int thresholdForResetValue) {
|
||||
this.thresholdForResetValue = thresholdForResetValue;
|
||||
}
|
||||
|
||||
public int getNumOfLogsToBeSent() {
|
||||
return numOfLogsToBeSent;
|
||||
}
|
||||
|
||||
public void setNumOfLogsToBeSent(int numOfLogsToBeSent) {
|
||||
this.numOfLogsToBeSent = numOfLogsToBeSent;
|
||||
}
|
||||
|
||||
public int getNumOfLogsSent() {
|
||||
return numOfLogsSent;
|
||||
}
|
||||
|
||||
public void setNumOfLogsSent(int numOfLogsSent) {
|
||||
this.numOfLogsSent = numOfLogsSent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从数据库中获取InterfaceLog信息并根据其业务类型进行相应处理
|
||||
*/
|
||||
public void dealReceivedLogs() {
|
||||
logger.info("application[dispatchXMLToWebMethods] started....................");
|
||||
while(allowed) {
|
||||
List types = new ArrayList<String>();
|
||||
types.add(InterfaceLogConstant.QUERY_INVENTORY);
|
||||
types.add(InterfaceLogConstant.AVAILABLE_ORDER_PO);
|
||||
types.add(InterfaceLogConstant.AVAILABLE_ORDER_SO);
|
||||
List<InterfaceLog> logs = itemManager.getLogsByConditions(types, InterfaceLogConstant.RECEIVE);
|
||||
dealLog(logs);
|
||||
try {
|
||||
Thread.sleep(sleepInterval);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(!isApplicationAvailable) {
|
||||
logger.info("application[dealReceivedLogs] closed....................");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dealLog(List<InterfaceLog> logs) {
|
||||
logger.info("log size:" + logs.size());
|
||||
for(InterfaceLog log : logs) {
|
||||
//按照log业务类型进行具体业务处理,处理完毕后更新log状态为FINISH
|
||||
//----(如果需要转发消息,则转发时设置状态为PROCESS,发送成功后改为FINISH)
|
||||
if (InterfaceLogConstant.QUERY_INVENTORY.equals(log.getType())) {
|
||||
//库存审核反馈处理
|
||||
try {
|
||||
itemManager.inventoryResponse(log);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (InterfaceLogConstant.AVAILABLE_ORDER_PO.equals(log.getType())
|
||||
|| InterfaceLogConstant.AVAILABLE_ORDER_SO.equals(log.getType())) {
|
||||
//订单生效反馈处理
|
||||
try {
|
||||
itemManager.availableOrderResponse(log);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从数据库中获取InterfaceLog信息并根据其业务类型进行相应处理
|
||||
*/
|
||||
public void batchSendLogs() {
|
||||
logger.info("application[batchSendLogs] started....................");
|
||||
while (allowed) {
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
List types = new ArrayList<String>();
|
||||
types.add(InterfaceLogConstant.RECEIVE_REPORT);
|
||||
types.add(InterfaceLogConstant.PUTAWAY_REPORT);
|
||||
types.add(InterfaceLogConstant.PICKING_REPORT);
|
||||
types.add(InterfaceLogConstant.SHIPPING_REPORT);
|
||||
List<InterfaceLog> logs = itemManager.getLogsByConditions(types, InterfaceLogConstant.READY);
|
||||
for (InterfaceLog log : logs) {
|
||||
itemManager.send(log, InterfaceLogConstant.REQUEST);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(sleepInterval);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealReceivedLogs] closed....................");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从数据库中获取Item信息并根据其业务类型进行相应处理
|
||||
*/
|
||||
public void dealItem() {
|
||||
logger.info("application[batchSendLogs] started....................");
|
||||
// while (true) {
|
||||
String wsdl13 = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH13Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH13Element>");
|
||||
sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
sb.append("<java:Identifier2ndItem/>");
|
||||
sb.append("<java:CostCenter>10908</java:CostCenter>");
|
||||
sb.append("<java:YesOrNoEntry>N</java:YesOrNoEntry>");
|
||||
sb.append("</orac:ShowF57WEH13Element>");
|
||||
String managerName = "JP57WE13";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl13);
|
||||
httpPost.setHeader("SOAPAction", "http://oracle.e1.bssv.JP57WE13//ShowF57WEH13");
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
// System.out.println(new String(EntityUtils.toByteArray(entity), "UTF8"));
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealItem==================" + xml);
|
||||
// Thread.sleep(sleepInterval);
|
||||
// SAXReader reader = new SAXReader();
|
||||
// Document document = reader.read(new File("/Users/houjianlan/Documents/aa.xml"));
|
||||
// System.out.println(document.asXML());
|
||||
|
||||
itemManager.storeItem(xml);
|
||||
// } catch (InterruptedException e) {
|
||||
// e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealItem] closed....................");
|
||||
// break;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public void dealAddress() {
|
||||
logger.info("application[batchlAddress] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH14Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH14Element>");
|
||||
sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
sb.append("<java:AddressNumber/>");
|
||||
// sb.append("<java:dateUpdated>2017-11-08CST11:00:09</java:dateUpdated>");
|
||||
sb.append("<java:YesOrNoEntry>N</java:YesOrNoEntry>");
|
||||
sb.append(" <java:SessionID/>");
|
||||
sb.append("</orac:ShowF57WEH14Element>");
|
||||
String managerName = "JP57WE14";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH14";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealAddress========" + xml);
|
||||
// itemManager.storeAddress(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealAddress] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
public void dealUnit() {
|
||||
logger.info("application[batchlUnit] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH15Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH15Element>");
|
||||
sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
sb.append("<java:Identifier2ndItem/>");
|
||||
sb.append("<java:UnitOfMeasure/>");
|
||||
sb.append("<java:RelatedUnitOfMeasure/>");
|
||||
// sb.append("<java:dateUpdated>2017-11-08CST11:00:09</java:dateUpdated>");
|
||||
sb.append("<java:YesOrNoEntry>Y</java:YesOrNoEntry>");
|
||||
sb.append(" <java:SessionID/>");
|
||||
sb.append("</orac:ShowF57WEH15Element>");
|
||||
String managerName = "JP57WE15";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH15";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealUnit========" + xml);
|
||||
|
||||
// itemManager.storeUnit(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealUnit] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 临时销售单Out信息 */
|
||||
public void dealOut() {
|
||||
// dealPurchase();
|
||||
logger.info("application[batchlOut] started....................");
|
||||
// while (true) {https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH01Manager?WSDL
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH01Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH01Element>");
|
||||
sb.append("<java:CompanyKeyOrderNo/>");
|
||||
sb.append("<java:OrderType></java:OrderType>");
|
||||
sb.append("<java:DocumentOrderInvoiceE></java:DocumentOrderInvoiceE>");
|
||||
sb.append("<java:LineNumber/>");
|
||||
sb.append("<java:YesOrNoEntry>N</java:YesOrNoEntry>");
|
||||
sb.append("<java:MaxReturnedRows>350</java:MaxReturnedRows>");
|
||||
sb.append("<java:CostCenter>10908</java:CostCenter>");
|
||||
// sb.append("<java:dateUpdated>2017-11-08CST11:00:09</java:dateUpdated>");
|
||||
sb.append("</orac:ShowF57WEH01Element>");
|
||||
String managerName = "JP57WEH1";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH01";
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealOut========" + xml);
|
||||
itemManager.storeInterfaceLog("WP", "YouChain", "出库接收", xml, new Long("0"));
|
||||
itemManager.storeOut(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealOut] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* public void dealOutReturn() {
|
||||
* logger.info("application[batchlOutReturn] started...................."); //
|
||||
* while (true) { String wsdl =
|
||||
* "https://bssv.wowprime.com.cn:8016/PD910/BCShowF57WEH02Manager?WSDL";
|
||||
* StringBuffer sb = new StringBuffer("");
|
||||
* sb.append("<orac:howF57WEH02Element>");
|
||||
* sb.append("<java:CompanyKeyOrderNo/>"); sb.append("<java:OrderType/>");
|
||||
* sb.append("<java:DocumentOrderInvoiceE/>"); sb.append("<java:LineNumber/>");
|
||||
* sb.append("<java:YesOrNoEntry>Y</java:YesOrNoEntry>");
|
||||
* sb.append("<java:MaxReturnedRows/>"); sb.append("<java:CostCenter/>"); //
|
||||
* sb.append("<java:dateUpdated>2017-11-08CST11:00:09</java:dateUpdated>");
|
||||
* sb.append("</orac:howF57WEH02Element>"); String managerName="JP57WEH2";
|
||||
* String method="http://oracle.e1.bssv."+managerName+"//"+"howF57WEH02"; String
|
||||
* xmlContent = createXML(managerName,sb.toString()); //
|
||||
* 对库存审核task批量处理,调用http接口发送数据 try { HttpClient httpclient = new
|
||||
* DefaultHttpClient(); HttpPost httpPost = new HttpPost(wsdl);
|
||||
* httpPost.setHeader("SOAPAction",method); StringEntity stringEntity = new
|
||||
* StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
* stringEntity.setContentType("text/xml"); httpPost.setEntity(stringEntity);
|
||||
* HttpResponse response = httpclient.execute(httpPost);
|
||||
* System.out.println(response.getStatusLine().getStatusCode()); HttpEntity
|
||||
* entity = response.getEntity(); String xml=new
|
||||
* String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
* System.out.println("dealOutReturn========"+xml);
|
||||
* //itemManager.storeOutReturn(xml); }catch (Exception e) {
|
||||
* e.printStackTrace(); } if (!isApplicationAvailable) { logger
|
||||
* .info("application[dealOutReturn] closed...................."); } }
|
||||
*/
|
||||
|
||||
/** 临时销售退货单OutReturn信息 */
|
||||
public void dealOutReturn() {
|
||||
logger.info("application[batchlOutReturn] started....................");
|
||||
// while (true) {https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH02Manager?WSDL
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH02Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH02Element>");
|
||||
sb.append("<java:CompanyKeyOrderNo/>");
|
||||
sb.append("<java:OrderType/>");
|
||||
sb.append("<java:DocumentOrderInvoiceE/>");
|
||||
sb.append("<java:LineNumber/>");
|
||||
sb.append("<java:YesOrNoEntry>N</java:YesOrNoEntry>");
|
||||
sb.append("<java:MaxReturnedRows/>");
|
||||
sb.append("<java:CostCenter/>");
|
||||
// sb.append("<java:dateUpdated>2017-11-08CST11:00:09</java:dateUpdated>");
|
||||
sb.append("</orac:ShowF57WEH02Element>");
|
||||
String managerName = "JP57WEH2";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "howF57WEH02";
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealOutReturn========" + xml);
|
||||
// itemManager.storeOutReturn(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealOutReturn] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 临时采购单Purchase信息 */
|
||||
public void dealPurchase() {
|
||||
|
||||
logger.info("application[batchlPurchase] started....................");
|
||||
// while (true) {https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH07Manager?WSDL
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEH07Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH07Element>");
|
||||
sb.append("<java:CompanyKeyOrderNo/>");
|
||||
sb.append("<java:DocumentOrderInvoiceE></java:DocumentOrderInvoiceE>");
|
||||
sb.append("<java:OrderType>OT</java:OrderType>");
|
||||
// sb.append("<java:YesOrNoEntry>N</java:YesOrNoEntry>");
|
||||
// sb.append("<java:OrderSuffix/>");
|
||||
sb.append("<java:LineNumber/>");
|
||||
// sb.append("<java:NextStauts></java:NextStauts>");
|
||||
sb.append("<java:CostCenter>10908</java:CostCenter>");
|
||||
sb.append("<java:MaxReturnedRows>300</java:MaxReturnedRows>");
|
||||
// sb.append("<java:CostCenter></java:CostCenter>");
|
||||
sb.append("</orac:ShowF57WEH07Element>");
|
||||
String managerName = "JP57WEH7";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH07";
|
||||
// File f = new File("/Users/houjianlan/Documents/request_JP57WEH7.xml");
|
||||
try {
|
||||
// SAXReader reader = new SAXReader();
|
||||
// Document doc = reader.read(f);
|
||||
// String xmlContent =doc.asXML();
|
||||
String xmlContent =createXML(managerName, sb.toString());
|
||||
System.out.println("xml-------"+xmlContent);
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealPurchase========" + xml);
|
||||
itemManager.storeInterfaceLog("WP", "YouChain", "入库接收", xml, new Long("0"));
|
||||
itemManager.storePurchase(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealPurchase] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 临时采购单Return信息 */
|
||||
public void dealReturn() {
|
||||
logger.info("application[batchlReturn] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8016/PD910/BCShowF57WEH08Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH08Element>");
|
||||
sb.append("<java:CompanyKeyOrderNo/>");
|
||||
sb.append("<java:DocumentOrderInvoiceE/>");
|
||||
sb.append("<java:OrderType/>");
|
||||
sb.append("<java:OrderSuffix/>");
|
||||
sb.append("<java:LineNumber/>");
|
||||
sb.append("<java:NextStauts/>");
|
||||
sb.append("<java:CostCenter>10908</java:CostCenter>");
|
||||
sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
sb.append("</orac:ShowF57WEH08Element>");
|
||||
String managerName = "JP57WEH8";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH08";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealReturn========" + xml);
|
||||
|
||||
// itemManager.storeReturn(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealReturn] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 临时项目Project信息 */
|
||||
public void dealProject() {
|
||||
logger.info("application[batchlProject] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8016/PD910/BCShowF57WEH11Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH11Element>");
|
||||
sb.append("<java:Identifier2ndItem/>");
|
||||
sb.append("<java:YesOrNoEntry/>");
|
||||
sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
sb.append("</orac:ShowF57WEH11Element>");
|
||||
String managerName = "JP57WE11";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH11";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealProject========" + xml);
|
||||
|
||||
itemManager.storeProject(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealProject] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 临时仓库主数据Warehouse信息 */
|
||||
public void dealWarehouse() {
|
||||
logger.info("application[batchlWarehouse] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8016/PD910/BCShowF57WEH12Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ShowF57WEH12Element>");
|
||||
sb.append("<java:CostCenter>10908</java:CostCenter>");
|
||||
sb.append("<java:YesOrNoEntry>Y</java:YesOrNoEntry>");
|
||||
sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
sb.append("</orac:ShowF57WEH12Element>");
|
||||
String managerName = "JP57WE12";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEH12";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealWarehouse========" + xml);
|
||||
|
||||
// itemManager.storeWarehouse(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealWarehouse] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 定时处理王品对接Download下载信息 */
|
||||
public void dealDownload() {
|
||||
logger.info("application[batchlDownload] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEHB2Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
String date="2015/12/19"; //DateUtil.formatDateYMD01ToStr(new Date());//"2019/07/07";//
|
||||
sb.append("<orac:ShowF57WEHB2Element>");
|
||||
sb.append("<java:BarCodeString1></java:BarCodeString1>");//010901180709000193
|
||||
sb.append("<java:Identifier2ndItem></java:Identifier2ndItem>");
|
||||
sb.append("<java:DateTransactionJulian>"+date+"</java:DateTransactionJulian>");//2018/09/27
|
||||
sb.append("<java:SessionID></java:SessionID>");
|
||||
sb.append("<java:MaxReturnedRows>2000000</java:MaxReturnedRows>");
|
||||
sb.append("<java:TimeFrom>000000</java:TimeFrom>");
|
||||
sb.append("<java:TimeTo>235959</java:TimeTo>");
|
||||
sb.append("</orac:ShowF57WEHB2Element>");
|
||||
String managerName = "JP57WEB2";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEHB2";
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
//System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealDownload========");//+ xml);
|
||||
itemManager.storeInterfaceLog("WP", "YouChain", "接收条码", xml, new Long("0"));
|
||||
itemManager.storeDownload(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealDownload] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
/** 定时处理王品对接Download下载信息 */
|
||||
public void updateDownload(String code) {
|
||||
List<InterfaceWmsDownload> ds=itemManager.getListDown(code);
|
||||
for(InterfaceWmsDownload d:ds){
|
||||
logger.info("application[batchlDownload] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8088/PD910/BCShowF57WEHB2Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
String date="2015/12/19";
|
||||
String bar_code=d.getBarCodeString1();
|
||||
sb.append("<orac:ShowF57WEHB2Element>");
|
||||
sb.append("<java:BarCodeString1>"+bar_code+"</java:BarCodeString1>");
|
||||
sb.append("<java:Identifier2ndItem></java:Identifier2ndItem>");
|
||||
sb.append("<java:DateTransactionJulian>"+date+"</java:DateTransactionJulian>");//2018/09/27
|
||||
sb.append("<java:SessionID></java:SessionID>");
|
||||
sb.append("<java:MaxReturnedRows>2000000</java:MaxReturnedRows>");
|
||||
sb.append("<java:TimeFrom>000000</java:TimeFrom>");
|
||||
sb.append("<java:TimeTo>235959</java:TimeTo>");
|
||||
sb.append("</orac:ShowF57WEHB2Element>");
|
||||
String managerName = "JP57WEB2";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEHB2";
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
//System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealDownload========"+ xml);
|
||||
//itemManager.storeInterfaceLog("WP", "YouChain", "接收条码", xml, new Long("0"));
|
||||
itemManager.updateDownload(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealDownload] closed....................");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 定时处理王品对接Diary日记账信息 */
|
||||
public void dealDiary() {
|
||||
logger.info("application[batchlDiary] started....................");
|
||||
// while (true) {
|
||||
String wsdl = "https://bssv.wowprime.com.cn:8016/PD910/BCProcessF57WEHB3Manager?WSDL";
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<orac:ProcessF57WEHB3Element>");
|
||||
sb.append("<java:BarCodeString1/>");
|
||||
sb.append("<java:NdItemNumber/>");
|
||||
sb.append("<java:OrderCompanyOrderNumber/>");
|
||||
sb.append("<java:OrderType/>");
|
||||
sb.append("<java:DocumentOrderNoInvoiceetc/>");
|
||||
sb.append("<java:LineNumber/>");
|
||||
sb.append("<java:OrderSuffix/>");
|
||||
sb.append("<java:WMSOrderID/>");
|
||||
sb.append("<java:WMSOrderType/>");
|
||||
sb.append("<java:WMSLineNumber/>");
|
||||
sb.append("<java:JDEnterpriseOneEventPoint01/>");
|
||||
sb.append("<java:JDEnterpriseOneEventPoint02/>");
|
||||
sb.append("<java:JDEnterpriseOnePoint03/>");
|
||||
sb.append("<java:Description11/>");
|
||||
sb.append("<java:Description12/>");
|
||||
sb.append("<java:Description13/>");
|
||||
sb.append("<java:Description14/>");
|
||||
sb.append("<java:Description15/>");
|
||||
sb.append("<java:UserID/>");
|
||||
sb.append("<java:ProgramID/>");
|
||||
sb.append("<java:WorkStationID/>");
|
||||
/*
|
||||
* sb.append("<java:YesOrNoEntry>Y</java:YesOrNoEntry>");
|
||||
* sb.append("<java:MaxReturnedRows>20</java:MaxReturnedRows>");
|
||||
*/
|
||||
sb.append("</orac:ProcessF57WEHB3Element>");
|
||||
String managerName = "JP57WEB3";
|
||||
String method = "http://oracle.e1.bssv." + managerName + "//" + "ShowF57WEHB3";
|
||||
|
||||
String xmlContent = createXML(managerName, sb.toString());
|
||||
// 对库存审核task批量处理,调用http接口发送数据
|
||||
try {
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
HttpPost httpPost = new HttpPost(wsdl);
|
||||
httpPost.setHeader("SOAPAction", method);
|
||||
StringEntity stringEntity = new StringEntity(xmlContent, "text/xml", "UTF8");
|
||||
stringEntity.setContentType("text/xml");
|
||||
httpPost.setEntity(stringEntity);
|
||||
HttpResponse response = httpclient.execute(httpPost);
|
||||
System.out.println(response.getStatusLine().getStatusCode());
|
||||
HttpEntity entity = response.getEntity();
|
||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||
System.out.println("dealDiary========" + xml);
|
||||
|
||||
// itemManager.storeDiary(xml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!isApplicationAvailable) {
|
||||
logger.info("application[dealDiary] closed....................");
|
||||
}
|
||||
}
|
||||
|
||||
public void onApplicationEvent(ApplicationEvent event) {
|
||||
if (event instanceof ContextClosedEvent) {
|
||||
logger.info("Context closing......................");
|
||||
isApplicationAvailable = false;
|
||||
} else if (event instanceof ContextRefreshedEvent) {
|
||||
logger.info("Context starting......................");
|
||||
isApplicationAvailable = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static String createXML(String managerName, String body) {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
sb.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" ");
|
||||
sb.append("xmlns:orac=\"http://oracle.e1.bssv." + managerName + "/\" xmlns:java=\"java:oracle.e1.bssv."
|
||||
+ managerName + ".valueobject\"> ");
|
||||
sb.append("<soapenv:Header> ");
|
||||
sb.append("<wsse:Security soapenv:mustUnderstand=\"1\" ");
|
||||
sb.append("xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" ");
|
||||
sb.append("xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" ");
|
||||
sb.append("xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"> ");
|
||||
sb.append("<wsse:UsernameToken> ");
|
||||
sb.append("<wsse:Username>0001001</wsse:Username> ");
|
||||
sb.append(
|
||||
"<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">1q2w3e4r!</wsse:Password>");
|
||||
sb.append("</wsse:UsernameToken>");
|
||||
sb.append("</wsse:Security>");
|
||||
sb.append("</soapenv:Header>");
|
||||
|
||||
sb.append("<soapenv:Body>");
|
||||
sb.append(body);
|
||||
sb.append("</soapenv:Body>");
|
||||
sb.append("</soapenv:Envelope>");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void autoFunctionJob() {
|
||||
dealPurchase();
|
||||
itemManager.getWmsAsn();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.dev.swms.server.model.abstractEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.swms.server.model.base.BillType;
|
||||
import com.dev.swms.server.model.base.Structure;
|
||||
import com.dev.swms.server.model.base.Warehouse;
|
||||
import com.dev.swms.server.model.inventory.Inventory;
|
||||
import com.dev.energy.server.model.VersionalEntity;
|
||||
|
||||
public abstract class AbstractMoveDoc extends VersionalEntity {
|
||||
public abstract double getAllocatedQuantity();
|
||||
public abstract void setAllocatedQuantity(double allocatedQuantity);
|
||||
public abstract String getCode();
|
||||
public abstract void setCode(String code);
|
||||
public abstract double getOrderQuantity();
|
||||
public abstract void setOrderQuantity(double orderQuantity);
|
||||
public abstract double getPickedQuantity();
|
||||
public abstract void setPickedQuantity(double pickedQuantity);
|
||||
public abstract double getShippedQuantity();
|
||||
public abstract void setShippedQuantity(double shippedQuantity);
|
||||
public abstract List<AbstractMoveDocDetail> getAbstractMoveDocDetails();
|
||||
public abstract void allocate(AbstractMoveDocDetail moveDocDetail, Inventory inventory, double quantity);
|
||||
public abstract Warehouse getWarehouse();
|
||||
public abstract BillType getBillType();
|
||||
public abstract Structure getCompany();
|
||||
public abstract void setApplyDoc(String code);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.dev.swms.server.model.abstractEntity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import com.dev.swms.server.model.base.Item;
|
||||
import com.dev.swms.server.model.base.Location;
|
||||
import com.dev.swms.server.model.base.LotInfo;
|
||||
import com.dev.swms.server.model.base.NewLotInfo;
|
||||
import com.dev.swms.server.model.base.PackageUnit;
|
||||
import com.dev.swms.server.model.inventory.Inventory;
|
||||
import com.dev.swms.server.model.inventory.Task;
|
||||
import com.dev.energy.server.model.Entity;
|
||||
|
||||
public abstract class AbstractMoveDocDetail extends Entity {
|
||||
public abstract double getPreAllocatedQuantity();
|
||||
public abstract void setPreAllocatedQuantity(double preAllocatedQuantity);
|
||||
public abstract double getAllocatedQuantity();
|
||||
public abstract void setAllocatedQuantity(double allocatedQuantity);
|
||||
public abstract double getOrderQuantity();
|
||||
public abstract void setOrderQuantity(double orderQuantity);
|
||||
public abstract double getPickedQuantity();
|
||||
public abstract void setPickedQuantity(double pickedQuantity);
|
||||
public abstract double getShippedQuantity();
|
||||
public abstract void setShippedQuantity(double shippedQuantity);
|
||||
public abstract AbstractMoveDoc getAbstractMoveDoc();
|
||||
public abstract Item getItem();
|
||||
public abstract LotInfo getLotInfo();
|
||||
public abstract NewLotInfo getNewLotInfo();
|
||||
public abstract PackageUnit getPackageUnit();
|
||||
public abstract double getUnallocateQuantity();
|
||||
public abstract Task allocate(Inventory inventory, double quantity);
|
||||
public abstract Location getAllocateDstLoc();
|
||||
public abstract Set<Task> getTasks();
|
||||
public abstract void setApplyDoc(String code);
|
||||
public abstract void setApplyDocDetailId(Long id);
|
||||
public abstract Date getStorageDate();
|
||||
public abstract String getSOI();
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.dev.swms.server.model.abstractEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Types;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.usertype.UserType;
|
||||
import org.hibernate.util.EqualsHelper;
|
||||
|
||||
/**
|
||||
*@author dev
|
||||
*@version $Project:swms $Date: 2010/06/01 09:14:17 $Version:V1.1
|
||||
*/
|
||||
public class NullString implements UserType {
|
||||
|
||||
public int[] sqlTypes() {
|
||||
return new int[]{Types.VARCHAR};
|
||||
}
|
||||
|
||||
public Class returnedClass() {
|
||||
return String.class;
|
||||
}
|
||||
|
||||
public boolean equals(Object x, Object y) throws HibernateException {
|
||||
return EqualsHelper.equals(x, y);
|
||||
}
|
||||
|
||||
public int hashCode(Object x) throws HibernateException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
|
||||
throws HibernateException, SQLException {
|
||||
return rs.getObject(names[0]) == null ? "" : rs.getObject(names[0]);
|
||||
}
|
||||
|
||||
public void nullSafeSet(PreparedStatement st, Object value, int index)
|
||||
throws HibernateException, SQLException {
|
||||
st.setString(index , (String)value);
|
||||
}
|
||||
|
||||
public Object deepCopy(Object value) throws HibernateException {
|
||||
return value;
|
||||
}
|
||||
|
||||
public boolean isMutable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Serializable disassemble(Object value) throws HibernateException {
|
||||
return (Serializable) value;
|
||||
}
|
||||
|
||||
public Object assemble(Serializable cached, Object owner)
|
||||
throws HibernateException {
|
||||
return cached;
|
||||
}
|
||||
|
||||
public Object replace(Object original, Object target, Object owner)
|
||||
throws HibernateException {
|
||||
return original;
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue