初始化项目
commit
0ee22a924d
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="conf"/>
|
||||
<classpathentry kind="src" output="target/qftms" path="src/webapp"/>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" output="target/qftms" path="www/com.dev.stms.STMS"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/acegisecurity/jars/acegi-security-0.8.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/low-server-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/high-server-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/web/jars/web-client-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/gxt/jars/gwtext-2.0.5.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/jxl/jars/jxl-2.6.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-digester/jars/commons-digester-1.7.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/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/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/jaxen/jars/jaxen-1.1-beta-5.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/json/jars/ezmorph-1.0.3.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/json-lib-2.1-jdk15.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.3.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/pushmessage/jars/push-0.0.1-SNAPSHOT.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/json/jars/json-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/pinyin/jars/pinyin4j-2.5.0.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/wms/jars/sd-wms-1.1.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/sqlserver/jars/sqljdbc4-2.0.jar"/>
|
||||
<classpathentry kind="output" path="target/qftms/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
target/
|
||||
.idea/
|
||||
.settings/
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<projectDescription>
|
||||
<name>sdtms</name>
|
||||
<comment>tmsTMS</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,7 @@
|
|||
@echo off
|
||||
java -Xmx512M -cp "%~dp0\src\main\java;%~dp0\target\tms\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.stms.STMS
|
||||
if ERRORLEVEL 1 goto error
|
||||
if ERRORLEVEL 0 goto exit
|
||||
:error
|
||||
pause
|
||||
:exit
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
alter table TMS_SHIPMENT add (ORDER_DATE timestamp);
|
||||
|
||||
alter table TMS_ORDER_DETAIL add (ITEM_ID number(19)) ;
|
||||
|
||||
alter table TMS_ORDER_DETAIL
|
||||
add constraint FK39D7EE13EE360h29 foreign key (ITEM_ID)
|
||||
references wms_item (ID);
|
||||
|
||||
alter table TMS_SEPARATE add (SEPARATE_QTY FLOAT) ;
|
||||
/*分单表添加数量做标识*/
|
||||
alter table TMS_SEPARATE add (QUANTITY1 FLOAT) ;
|
||||
alter table TMS_SEPARATE add (QUANTITY2 FLOAT) ;
|
||||
alter table TMS_SEPARATE add (QUANTITY3 FLOAT) ;
|
||||
alter table TMS_SEPARATE add (QUANTITY4 FLOAT) ;
|
||||
alter table TMS_SEPARATE add (QUANTITY5 FLOAT) ;
|
||||
/*刷*/
|
||||
update TMS_SEPARATE s set s.separate_qty=0,s.quantity1=0,s.quantity2=0,s.quantity3=0,s.quantity4=0,s.quantity5=0
|
||||
where s.separate_qty is null
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package tms;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class test {
|
||||
|
||||
public static String getCity(String address) {
|
||||
// 先处理直辖市情况,直辖市的简称有"京"、"津"、"沪"、"渝"
|
||||
String[] municipalityAbbreviations = {"京", "津", "沪", "渝"};
|
||||
for (String abbreviation : municipalityAbbreviations) {
|
||||
if (address.startsWith(abbreviation)) {
|
||||
return cleanCityName(abbreviation + "市");
|
||||
}
|
||||
}
|
||||
|
||||
// 查找"省"字的位置
|
||||
int provinceIndex = address.indexOf("省");
|
||||
// 查找第一个"市"字的位置
|
||||
int cityIndex = address.indexOf("市");
|
||||
|
||||
if (provinceIndex != -1 && cityIndex != -1 && cityIndex > provinceIndex) {
|
||||
String city = address.substring(provinceIndex + 1, cityIndex + 1);
|
||||
// 去除可能存在的前导符号(比如减号等)
|
||||
city = cleanCityName(city);
|
||||
return city;
|
||||
} else if (cityIndex != -1) {
|
||||
// 如果没有"省"字,直接返回第一个"市"字及其前面的部分作为城市名称,并去除前导符号
|
||||
String city = address.substring(0, cityIndex + 1);
|
||||
city = cleanCityName(city);
|
||||
return city;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String cleanCityName(String cityName) {
|
||||
// 使用正则表达式去除所有非汉字和非字母的字符
|
||||
return cityName.replaceAll("[^\\u4e00-\\u9fa5a-zA-Z]", "");
|
||||
}
|
||||
|
||||
public static String getCityFromAddress(String address) {
|
||||
if (address == null || address.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 分割地址为多个部分
|
||||
String[] parts = address.split("-");
|
||||
|
||||
// 尝试从后往前查找城市名称
|
||||
for (int i = parts.length - 1; i >= 0; i--) {
|
||||
String part = parts[i].trim();
|
||||
if (part.matches("[\\p{L}]+市|[\\p{L}]+自治区|[\\p{L}]+省")) {
|
||||
return part;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有找到完整的城市名称,尝试提取省份和城市
|
||||
for (int i = parts.length - 2; i >= 0; i--) {
|
||||
String cityPart = parts[i].trim();
|
||||
String provincePart = parts[i + 1].trim();
|
||||
if (provincePart.matches("[\\p{L}]+省") && cityPart.matches("[\\p{L}]+市")) {
|
||||
return cityPart;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String[] addresses = {
|
||||
"南京市栖霞区龙潭镇建城路2号",
|
||||
"常州市新北区宝塔山路36号",
|
||||
"上海市宝山区蕴川路1867号",
|
||||
"湖南省湘潭市雨湖区九华经济开发区白石西路6号舍弗勒(湘潭)有限公司南门",
|
||||
"合肥市玉兰大道与香樟大道交口西南角合肥一期物流北门,22号厂房",
|
||||
"重庆市璧山区变速器一厂",
|
||||
"NY1_直送重庆九州共管库,重庆市两江新区王家街道重庆市渝北区两路寸滩保税港区空港功能区G区瑞月南路101号G02,重庆市,EMS_721098",
|
||||
"广东省-东莞市-松山湖华为南方生产基地 C区-C10 H80",
|
||||
"安徽省马鞍山市雨山区经济技术开发区龙山路199号马鞍山蓝黛传动机械有限公司"
|
||||
};
|
||||
|
||||
for (String address : addresses) {
|
||||
String city = getCityFromAddress(address);
|
||||
System.out.println("地址: " + address + " - 城市: " + city);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,23 @@
|
|||
alter table TMS_ROUTE_FEE add TRANSPORTATIONAGING8 float;
|
||||
update TMS_ROUTE_FEE set TRANSPORTATIONAGING8=0 where TRANSPORTATIONAGING8 is null;
|
||||
alter table TMS_TRANS_LOCATION add Brand VARCHAR2(50);
|
||||
|
||||
alter table BMS_CONTRACT_RATE add (ZONE_ID NUMBER(19));
|
||||
alter table BMS_CONTRACT_RATE
|
||||
add constraint FK351215568D25E36D foreign key (ZONE_ID)
|
||||
references TMS_ZONE (ID);
|
||||
|
||||
create or replace view lf_item_view as
|
||||
select oh.relatebill3,oh.id oh_id ,od.id id,it.l length,it.w width,it.h height,od.quantity,oh.group_index,
|
||||
nvl(t.s5,0) price1,nvl(t.s8,0) price2,
|
||||
nvl(t.s6,0) shf
|
||||
|
||||
from DJ_item_T it
|
||||
left join TMS_ORDER_DETAIL od on od.materiel_code=it.s2
|
||||
left join TMS_ORDER_HEAD oh on oh.id=od.order_id
|
||||
left join DJ_xf_PRICE t on t.s9=oh.from_city_countiy_id and t.s11=oh.to_city_countiy_id
|
||||
left join wms_package_unit pu on pu.item_id=od.item_id
|
||||
-- where it.s2='CB1Y952167'
|
||||
--where it.s2 in ('DP30014045','DP30024550','DP300342','DP30044550A')
|
||||
order by oh.id desc
|
||||
;
|
||||
|
|
@ -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.3 2009/02/24 06:28:24 yan.li 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,756 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project>
|
||||
<pomVersion>1</pomVersion>
|
||||
<id>jh-tms</id>
|
||||
<name>TMS</name>
|
||||
<currentVersion>1.1.1</currentVersion>
|
||||
<groupId>jh-tms</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>2008</inceptionYear>
|
||||
|
||||
<description><![CDATA[
|
||||
使用energy框架的E-LOG Enterprise TMS
|
||||
]]></description>
|
||||
<shortDescription>E-LOG Enterprise TMS</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>false</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>wms</groupId>
|
||||
<artifactId>sd-wms</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/web/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>web</groupId>
|
||||
<artifactId>low-server</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/web/jars/</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://repository.dev.net/web/jars/</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://repository.dev.net/web/jars/</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- gxt -->
|
||||
<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>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>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 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>false</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>false</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>http</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.2.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://java.sun.com/products/javabeans/jaf/</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-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>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2.1</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>
|
||||
<dependency>
|
||||
<groupId>json</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.1-jdk15</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/json</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>json</groupId>
|
||||
<artifactId>ezmorph</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/ezmorph-1.0.3</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<type>1.3.2</type>
|
||||
<url>http://jakarta.apache.org/commons-io-1.3.2</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pushmessage</groupId>
|
||||
<artifactId>push</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/push</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://jakarta.apache.org/json</url>
|
||||
<properties>
|
||||
<war.bundle>true</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<!-- dbcp -->
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.2.1</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>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>false</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>false</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>false</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
|
||||
<!-- unittest -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.junit.org/</url>
|
||||
<properties>
|
||||
<war.bundle>false</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>1.1</version>
|
||||
<type>jar</type>
|
||||
<url>http://www.easymock.org/</url>
|
||||
<properties>
|
||||
<war.bundle>false</war.bundle>
|
||||
</properties>
|
||||
</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>false</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>false</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>false</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>
|
||||
<properties>
|
||||
<war.bundle>false</war.bundle>
|
||||
</properties>
|
||||
</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>
|
||||
<properties>
|
||||
<war.bundle>false</war.bundle>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jetty</groupId>
|
||||
<artifactId>jasper-compiler</artifactId>
|
||||
<jar>jasper-compiler.jar</jar>
|
||||
<type>jar</type>
|
||||
<url>http://jetty.dev.dtdns.net/</url>
|
||||
<properties>
|
||||
<war.bundle>false</war.bundle>
|
||||
</properties>
|
||||
</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>
|
||||
<properties>
|
||||
<war.bundle>false</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>
|
||||
<!-- pinyin -->
|
||||
<dependency>
|
||||
<groupId>pinyin</groupId>
|
||||
<artifactId>pinyin</artifactId>
|
||||
<version>4j-2.5.0</version>
|
||||
<type>jar</type>
|
||||
<url>http://repository.dev.net/jaxen/jars/</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>
|
||||
</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,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="EclipseModuleManager">
|
||||
<varelement var="file://$MAVEN_REPO$/acegisecurity/jars/acegi-security-0.8.3.jar" value="MAVEN_REPO/acegisecurity/jars/acegi-security-0.8.3.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/web/jars/low-server-1.1.1.jar" value="MAVEN_REPO/web/jars/low-server-1.1.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/web/jars/high-server-1.1.1.jar" value="MAVEN_REPO/web/jars/high-server-1.1.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/web/jars/web-client-1.1.1.jar" value="MAVEN_REPO/web/jars/web-client-1.1.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/gxt/jars/gwtext-2.0.5.jar" value="MAVEN_REPO/gxt/jars/gwtext-2.0.5.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/ognl/jars/ognl-2.6.5.jar" value="MAVEN_REPO/ognl/jars/ognl-2.6.5.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-logging/jars/commons-logging-1.0.4.jar" value="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/log4j/jars/log4j-1.2.12.jar" value="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jxl/jars/jxl-2.6.jar" value="MAVEN_REPO/jxl/jars/jxl-2.6.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/hibernate/jars/hibernate-3.2.jar" value="MAVEN_REPO/hibernate/jars/hibernate-3.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/ehcache/jars/ehcache-1.2.jar" value="MAVEN_REPO/ehcache/jars/ehcache-1.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/cglib/jars/cglib-nodep-2.1.jar" value="MAVEN_REPO/cglib/jars/cglib-nodep-2.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/asm/jars/asm-2.2.jar" value="MAVEN_REPO/asm/jars/asm-2.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/antlr/jars/antlr-2.7.6rc1.jar" value="MAVEN_REPO/antlr/jars/antlr-2.7.6rc1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-collections/jars/commons-collections-3.1.jar" value="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/dom4j/jars/dom4j-1.6.1.jar" value="MAVEN_REPO/dom4j/jars/dom4j-1.6.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/odmg/jars/odmg-3.0.jar" value="MAVEN_REPO/odmg/jars/odmg-3.0.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/xalan/jars/xalan-2.4.0.jar" value="MAVEN_REPO/xalan/jars/xalan-2.4.0.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/springframework/jars/spring-2m.jar" value="MAVEN_REPO/springframework/jars/spring-2m.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/springframework/jars/spring-mock-2.0-rc3.jar" value="MAVEN_REPO/springframework/jars/spring-mock-2.0-rc3.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jta/jars/jta-1.0.1.jar" value="MAVEN_REPO/jta/jars/jta-1.0.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/javamail/jars/mail-1.3.2.jar" value="MAVEN_REPO/javamail/jars/mail-1.3.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jaf/jars/activation-1.0.2.jar" value="MAVEN_REPO/jaf/jars/activation-1.0.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/gwt/jars/gwt-user-1.5.3.jar" value="MAVEN_REPO/gwt/jars/gwt-user-1.5.3.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/gwt/jars/gwt-servlet-1.5.3.jar" value="MAVEN_REPO/gwt/jars/gwt-servlet-1.5.3.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-codec/jars/commons-codec-1.3.jar" value="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-httpclient/jars/commons-httpclient-3.1.jar" value="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-digester/jars/commons-digester-1.7.jar" value="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-dbcp/jars/commons-dbcp-1.2.1.jar" value="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-pool/jars/commons-pool-1.2.jar" value="MAVEN_REPO/commons-pool/jars/commons-pool-1.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-lang/jars/commons-lang-2.1.jar" value="MAVEN_REPO/commons-lang/jars/commons-lang-2.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-beanutils/jars/commons-beanutils-1.7.0.jar" value="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/quartz/jars/quartz-1.5.2.jar" value="MAVEN_REPO/quartz/jars/quartz-1.5.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/hsqldb/jars/hsqldb-1.8.0.1.jar" value="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/mysql/jars/mysql-connector-java-5.0.3-bin.jar" value="MAVEN_REPO/mysql/jars/mysql-connector-java-5.0.3-bin.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/ojdbc/jars/ojdbc14-10.2.0.1.0.jar" value="MAVEN_REPO/ojdbc/jars/ojdbc14-10.2.0.1.0.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/junit/jars/junit-3.8.1.jar" value="MAVEN_REPO/junit/jars/junit-3.8.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/easymock/jars/easymock-1.1.jar" value="MAVEN_REPO/easymock/jars/easymock-1.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/servletapi/jars/servlet-api-2.4-20040521.jar" value="MAVEN_REPO/servletapi/jars/servlet-api-2.4-20040521.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-cli/jars/commons-cli-1.0.jar" value="MAVEN_REPO/commons-cli/jars/commons-cli-1.0.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/mssql/jars/msbase-2000.jar" value="MAVEN_REPO/mssql/jars/msbase-2000.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/mssql/jars/mssqlserver-2000.jar" value="MAVEN_REPO/mssql/jars/mssqlserver-2000.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/mssql/jars/msutil-2000.jar" value="MAVEN_REPO/mssql/jars/msutil-2000.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jetty/jars/org.mortbay.jetty.jar" value="MAVEN_REPO/jetty/jars/org.mortbay.jetty.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jetty/jars/org.mortbay.jmx.jar" value="MAVEN_REPO/jetty/jars/org.mortbay.jmx.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jetty/jars/jasper-compiler.jar" value="MAVEN_REPO/jetty/jars/jasper-compiler.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jetty/jars/jasper-runtime.jar" value="MAVEN_REPO/jetty/jars/jasper-runtime.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jetty/jars/javax.servlet.jar" value="MAVEN_REPO/jetty/jars/javax.servlet.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/jaxen/jars/jaxen-1.1-beta-5.jar" value="MAVEN_REPO/jaxen/jars/jaxen-1.1-beta-5.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/http/jars/httpclient-4.2.1.jar" value="MAVEN_REPO/http/jars/httpclient-4.2.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/http/jars/httpcore-4.2.2.jar" value="MAVEN_REPO/http/jars/httpcore-4.2.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/json/jars/ezmorph-1.0.3.jar" value="MAVEN_REPO/json/jars/ezmorph-1.0.3.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/json/jars/json-lib-2.1-jdk15.jar" value="MAVEN_REPO/json/jars/json-lib-2.1-jdk15.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-fileupload/jars/commons-fileupload-1.2.1.jar" value="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.2.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/commons-io/jars/commons-io-1.3.2.jar" value="MAVEN_REPO/commons-io/jars/commons-io-1.3.2.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/pushmessage/jars/push-0.0.1-SNAPSHOT.jar" value="MAVEN_REPO/pushmessage/jars/push-0.0.1-SNAPSHOT.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/json/jars/json-1.1.1.jar" value="MAVEN_REPO/json/jars/json-1.1.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/pinyin/jars/pinyin4j-2.5.0.jar" value="MAVEN_REPO/pinyin/jars/pinyin4j-2.5.0.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/wms/jars/sd-wms-1.1.1.jar" value="MAVEN_REPO/wms/jars/sd-wms-1.1.1.jar" />
|
||||
<varelement var="file://$MAVEN_REPO$/sqlserver/jars/sqljdbc4-2.0.jar" value="MAVEN_REPO/sqlserver/jars/sqljdbc4-2.0.jar" />
|
||||
<src_description expected_position="0">
|
||||
<src_folder value="file://$MODULE_DIR$/conf" expected_position="0" />
|
||||
<src_folder value="file://$MODULE_DIR$/src/webapp" expected_position="1" />
|
||||
<src_folder value="file://$MODULE_DIR$/src/main/java" expected_position="2" />
|
||||
<src_folder value="file://$MODULE_DIR$/www/com.dev.stms.STMS" expected_position="3" />
|
||||
</src_description>
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/target/qftms/WEB-INF/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/conf" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/webapp" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/www/com.dev.stms.STMS" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$MODULE_DIR$/lib" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
|
||||
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
import com.dev.energy.client.utils.StringUtils;
|
||||
import org.mortbay.http.SocketListener;
|
||||
import org.mortbay.jetty.Server;
|
||||
|
||||
public class AjaxJettyLauncher {
|
||||
protected int port = 8080;
|
||||
protected String contextName = "qftms";
|
||||
protected String deployPath = null;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
AjaxJettyLauncher jl = new AjaxJettyLauncher();
|
||||
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 (StringUtils.isEmpty(deployPath)) {
|
||||
deployPath = "./target/" + contextName + "/";
|
||||
}
|
||||
return deployPath;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import com.google.gwt.json.client.JSONObject;
|
||||
|
||||
|
||||
public class PostTest {
|
||||
|
||||
public static void main1(String[] args) throws ClientProtocolException, IOException{
|
||||
String s="12345";
|
||||
String s1="12345098";
|
||||
System.out.println(s1.indexOf(s));
|
||||
}
|
||||
public static void main(String[] args) throws ClientProtocolException, IOException{
|
||||
// String url ="http://192.168.0.52:8081/jh-tms/appService/loginAppServlet";
|
||||
// String url ="http://192.168.0.52:8081/jh-tms/appService/shipmentAppServlet";
|
||||
// String url ="http://localhost:8088/kejtms/appService/shipmentAppServlet";
|
||||
// String url ="http://192.168.56.175:8088/kejtms/appService/getAppInfoServlet";
|
||||
// String url ="http://localhost:8089/jhtms/appService/collectionSiteServlet";
|
||||
// String url="http://share.jl.ztgame.com/1/1029/886f7c3ea70411e687cc5254006cb4bf";
|
||||
// String url ="http://180.168.39.174:8044/tms/appService/updatePwdAppServlet";
|
||||
//120.55.53.243:81/tms/appService/ 106.15.90.41:8088/app/appService/;localhost:8088/kejtms/appService/
|
||||
|
||||
String servlet="mobilePrintServlet";//loginAppServlet(登录),shipmentAppServlet(装车卸货回单),getAppInfoServlet(下单界面数据提取),storeAppInfoServlet(保存下单信息)
|
||||
//collectionSiteServlet(地点采集),mobilePrintServlet
|
||||
String url ="http://120.55.53.243:81/tms/appService/"//120.55.53.243:81/tms/;
|
||||
+ servlet;
|
||||
HttpClient httpclient = null;
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpclient = new DefaultHttpClient();
|
||||
try {
|
||||
// httpPost.addHeader("loginName", URLEncoder.encode("18721119968","UTF-8"));
|
||||
// httpPost.addHeader("passWord", URLEncoder.encode("123","UTF-8"));
|
||||
// httpPost.addHeader("phone", URLEncoder.encode("13361978155","UTF-8"));//13361978155
|
||||
// httpPost.addHeader("createName", URLEncoder.encode("admin","UTF-8"));
|
||||
// httpPost.addHeader("number", URLEncoder.encode("","UTF-8"));
|
||||
// httpPost.addHeader("vehicle_no", URLEncoder.encode("","UTF-8"));
|
||||
// httpPost.addHeader("method_type", URLEncoder.encode("signConfirm","UTF-8"));
|
||||
// httpPost.addHeader("order_id", URLEncoder.encode("18342","UTF-8"));
|
||||
// httpPost.addHeader("driver_name", URLEncoder.encode("18127","UTF-8"));
|
||||
// httpPost.addHeader("place", URLEncoder.encode("place","UTF-8"));
|
||||
// httpPost.addHeader("date", URLEncoder.encode("","UTF-8"));
|
||||
// httpPost.addHeader("page", URLEncoder.encode("1","UTF-8"));
|
||||
// httpPost.addHeader("oldPwd", URLEncoder.encode("123","UTF-8"));
|
||||
// httpPost.addHeader("newPwd", URLEncoder.encode("345","UTF-8"));
|
||||
// httpPost.addHeader("method_type", URLEncoder.encode("shipmentInfo","UTF-8"));
|
||||
// httpPost.addHeader("order_id", URLEncoder.encode("14316","UTF-8"));
|
||||
if(servlet.equals("loginAppServlet")){
|
||||
httpPost.addHeader("loginName", URLEncoder.encode("18766323255","UTF-8"));
|
||||
httpPost.addHeader("passWord", URLEncoder.encode("123","UTF-8"));
|
||||
}
|
||||
if(servlet.equals("getAppInfoServlet")){
|
||||
httpPost.addHeader("method_type", URLEncoder.encode("shipmentMethod","UTF-8"));
|
||||
httpPost.addHeader("pageStr", URLEncoder.encode("1","UTF-8"));
|
||||
}
|
||||
//http://192.168.56.175:8088/kejtms/appService/storeAppInfoServlet
|
||||
//cusId,cusNo,orderDate,qty,unitOne,weight,volume,unitQty,predictFee,itemName
|
||||
if(servlet.equals("storeAppInfoServlet")){
|
||||
httpPost.addHeader("cusId", URLEncoder.encode("1151","UTF-8"));//客户
|
||||
httpPost.addHeader("cusNo", URLEncoder.encode("客户订单号","UTF-8"));//客户订单号
|
||||
httpPost.addHeader("orderDate", URLEncoder.encode("2017-12-30","UTF-8"));//开单日期
|
||||
httpPost.addHeader("qty", URLEncoder.encode("100","UTF-8"));//数量
|
||||
httpPost.addHeader("unitOne", URLEncoder.encode("件","UTF-8"));//单位
|
||||
httpPost.addHeader("weight", URLEncoder.encode("9.87","UTF-8"));//重量
|
||||
httpPost.addHeader("volume", URLEncoder.encode("10.31","UTF-8"));//体积
|
||||
httpPost.addHeader("unitQty", URLEncoder.encode("包装数量","UTF-8"));//包装数量
|
||||
httpPost.addHeader("predictFee", URLEncoder.encode("1000","UTF-8"));//货值
|
||||
httpPost.addHeader("itemName", URLEncoder.encode("品名","UTF-8"));//品名
|
||||
//planFromDate,planFromTime,planArriveDate,planArriveTime,unit,superviseType,shipmentMethod,jfPay,fkPay,fkAmount
|
||||
httpPost.addHeader("planFromDate", URLEncoder.encode("2017-12-31","UTF-8"));//计划提货日期
|
||||
httpPost.addHeader("planFromTime", URLEncoder.encode("16:30","UTF-8"));//计划提货时间
|
||||
httpPost.addHeader("planArriveDate", URLEncoder.encode("2017-01-02","UTF-8"));//计划到达日期
|
||||
httpPost.addHeader("planArriveTime", URLEncoder.encode("18:00","UTF-8"));//计划到达时间
|
||||
httpPost.addHeader("unit", URLEncoder.encode("WEIGHT","UTF-8"));//计量单位
|
||||
httpPost.addHeader("superviseType", URLEncoder.encode("UNSUPERVISE","UTF-8"));//货物类型
|
||||
httpPost.addHeader("shipmentMethod", URLEncoder.encode("TRUCK","UTF-8"));//运输方式
|
||||
httpPost.addHeader("jfPay", URLEncoder.encode("送货上门","UTF-8"));//交付方式
|
||||
httpPost.addHeader("fkPay", URLEncoder.encode("月付","UTF-8"));//付款方式
|
||||
httpPost.addHeader("fkAmount", URLEncoder.encode("0","UTF-8"));//付款金额
|
||||
//fromId,fromName,fromLinkman,fromPhone,fromAddress,description1
|
||||
httpPost.addHeader("fromId", URLEncoder.encode("7439","UTF-8"));//提货区域
|
||||
httpPost.addHeader("fromName", URLEncoder.encode("提货单位","UTF-8"));
|
||||
httpPost.addHeader("fromLinkman", URLEncoder.encode("提货联系人","UTF-8"));
|
||||
httpPost.addHeader("fromPhone", URLEncoder.encode("提货电话","UTF-8"));
|
||||
httpPost.addHeader("fromAddress", URLEncoder.encode("提货地址","UTF-8"));
|
||||
httpPost.addHeader("description1", URLEncoder.encode("提货要求","UTF-8"));
|
||||
//toId,toName,toLinkman,toPhone,toAddress,description
|
||||
httpPost.addHeader("toId", URLEncoder.encode("9126","UTF-8"));//收货区域
|
||||
httpPost.addHeader("toName", URLEncoder.encode("收货单位","UTF-8"));
|
||||
httpPost.addHeader("toLinkman", URLEncoder.encode("收货联系人","UTF-8"));
|
||||
httpPost.addHeader("toPhone", URLEncoder.encode("收货电话","UTF-8"));
|
||||
httpPost.addHeader("toAddress", URLEncoder.encode("收货地址","UTF-8"));
|
||||
httpPost.addHeader("description", URLEncoder.encode("送货要求","UTF-8"));
|
||||
//beStorage,beReturn,isShortBarge,cusBill,guard 界面默认为0
|
||||
httpPost.addHeader("beStorage", URLEncoder.encode("superviseType","UTF-8"));//仓储
|
||||
httpPost.addHeader("beReturn", URLEncoder.encode("superviseType","UTF-8"));//来回
|
||||
httpPost.addHeader("isShortBarge", URLEncoder.encode("superviseType","UTF-8"));//回程货
|
||||
httpPost.addHeader("cusBill", URLEncoder.encode("superviseType","UTF-8"));//总调派车
|
||||
httpPost.addHeader("guard", URLEncoder.encode("superviseType","UTF-8"));//客户送货入库
|
||||
//phone,driver_name,userId,platFormId
|
||||
httpPost.addHeader("phone", URLEncoder.encode("登录账号","UTF-8"));//登录账号
|
||||
httpPost.addHeader("driver_name", URLEncoder.encode("名称","UTF-8"));//账号名称
|
||||
httpPost.addHeader("userId", URLEncoder.encode("1","UTF-8"));//账号ID
|
||||
httpPost.addHeader("platFormId", URLEncoder.encode("1","UTF-8"));//平台ID(默认传1)
|
||||
}
|
||||
if(servlet.equals("shipmentAppServlet")){
|
||||
//shipment(发车列表,运抵列表) ,shipmentInfo(Legs详情),shipSendConfirm(发运确认),arriveSign(签收列表),signConfirm(运抵确认)
|
||||
String method_type="orderInfo";
|
||||
httpPost.addHeader("method_type", URLEncoder.encode(method_type,"UTF-8"));
|
||||
httpPost.addHeader("page", URLEncoder.encode("1","UTF-8"));
|
||||
httpPost.addHeader("order_id", URLEncoder.encode("10501","UTF-8"));
|
||||
httpPost.addHeader("vId", URLEncoder.encode("2702","UTF-8"));
|
||||
httpPost.addHeader("signType", URLEncoder.encode("M1","UTF-8"));
|
||||
}
|
||||
if(servlet.equals("collectionSiteServlet")){
|
||||
httpPost.addHeader("place", URLEncoder.encode("北京东路001号","UTF-8"));
|
||||
httpPost.addHeader("createName", URLEncoder.encode("1","UTF-8"));
|
||||
}
|
||||
if(servlet.equals("mobilePrintServlet")){
|
||||
httpPost.addHeader("method_type", URLEncoder.encode("orderInfo","UTF-8"));
|
||||
//httpPost.addHeader("page", URLEncoder.encode("1","UTF-8"));
|
||||
httpPost.addHeader("order_id", URLEncoder.encode("10406","UTF-8"));
|
||||
}
|
||||
// httpPost.addHeader("phone", URLEncoder.encode("15286449925","UTF-8"));
|
||||
// httpPost.addHeader("platId", URLEncoder.encode("1","UTF-8"));
|
||||
// httpPost.addHeader("isAdmin", URLEncoder.encode("1","UTF-8"));
|
||||
// httpPost.addHeader("userId", URLEncoder.encode("1292","UTF-8"));
|
||||
HttpResponse re = httpclient.execute(httpPost);
|
||||
System.out.println(re.getStatusLine());
|
||||
if (re.getStatusLine().getStatusCode()==200){
|
||||
String strResult = EntityUtils.toString(re.getEntity());
|
||||
System.out.println(strResult);
|
||||
}
|
||||
// System.out.println(re.getStatusLine().getStatusCode());
|
||||
} catch (ClientProtocolException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?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.4 2009/02/24 06:47:29 yan.li Exp $ -->
|
||||
|
||||
<beans>
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC
|
||||
"-//SPRING//DTD BEAN//EN"
|
||||
"http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<beans>
|
||||
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
|
||||
<property name="triggers">
|
||||
<list>
|
||||
<!-- <ref bean="batchSendLogsTrigger" />
|
||||
<ref bean="batchInventoryQueryTrigger" />
|
||||
<ref bean="batchReceivedLogsTrigger" />-->
|
||||
<!-- <ref bean="pollingOrderServiceTrigger" />-->
|
||||
<!-- <ref bean="handleOrderTrigger" />-->
|
||||
<!-- <ref bean="handleShipmentOrderFeeTrigger" /> -->
|
||||
<!-- <ref bean="doAppJobTrigger" /> -->
|
||||
<!-- <ref bean="handleShipmentTrigger" />-->
|
||||
<!-- <ref bean="handleTransPlanTrigger" />-->
|
||||
</list>
|
||||
</property>
|
||||
<property name="quartzProperties">
|
||||
<props>
|
||||
<prop key="org.quartz.threadPool.threadCount">20</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- transPlan -->
|
||||
<bean id="handleTransPlanJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="interfaceLogHelper" />
|
||||
<property name="targetMethod" value="doHandleTransPlan" />
|
||||
</bean>
|
||||
<bean id="handleTransPlanTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="handleTransPlanJob" />
|
||||
<property name="startDelay" value="10000" />
|
||||
<property name="repeatInterval" value="1000" />
|
||||
<property name="repeatCount" value="0" />
|
||||
</bean>
|
||||
|
||||
<!-- availableOrder -->
|
||||
<bean id="handleOrderJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="interfaceLogHelper" />
|
||||
<property name="targetMethod" value="doHandleOrder" />
|
||||
</bean>
|
||||
<bean id="handleOrderTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="handleOrderJob" />
|
||||
<property name="startDelay" value="10000" />
|
||||
<property name="repeatInterval" value="1000" />
|
||||
<property name="repeatCount" value="0" />
|
||||
</bean>
|
||||
<!-- 每日晚上十点算已调度订单运输费用 -->
|
||||
<bean id="handleShipmentOrderFeeJob"
|
||||
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject">
|
||||
<ref bean="interfaceLogHelper"/>
|
||||
</property>
|
||||
<property name="targetMethod">
|
||||
<value>autoShipmentOrderFee</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="handleShipmentOrderFeeTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<ref local="handleShipmentOrderFeeJob"/>
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>0 0 23 * * ?</value>
|
||||
</property>
|
||||
</bean>
|
||||
<!-- activeShipment -->
|
||||
<bean id="handleShipmentJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="interfaceLogHelper" />
|
||||
<property name="targetMethod" value="doHandleShipment" />
|
||||
</bean>
|
||||
<bean id="handleShipmentTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="handleShipmentJob" />
|
||||
<property name="startDelay" value="10000" />
|
||||
<property name="repeatInterval" value="1000" />
|
||||
<property name="repeatCount" value="0" />
|
||||
</bean>
|
||||
|
||||
<!--send READY logs-->
|
||||
<bean id="batchSendLogsJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="adapterLauncher" />
|
||||
<property name="targetMethod" value="batchSendLogs" />
|
||||
</bean>
|
||||
<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>
|
||||
|
||||
<!-- send inventory comfirm messages -->
|
||||
<bean id="batchInventoryQueryJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="adapterLauncher" />
|
||||
<property name="targetMethod" value="batchInventoryQuery" />
|
||||
</bean>
|
||||
<bean id="batchInventoryQueryTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="batchInventoryQueryJob" />
|
||||
<property name="startDelay" value="10000" />
|
||||
<property name="repeatInterval" value="1000" />
|
||||
<property name="repeatCount" value="0" />
|
||||
</bean>
|
||||
|
||||
<!-- deal with the RECEIVE logs -->
|
||||
<bean id="batchReceivedLogsJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="adapterLauncher" />
|
||||
<property name="targetMethod" value="batchReceivedLogs" />
|
||||
</bean>
|
||||
<bean id="batchReceivedLogsTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="batchReceivedLogsJob" />
|
||||
<property name="startDelay" value="10000" />
|
||||
<property name="repeatInterval" value="1000" />
|
||||
<property name="repeatCount" value="0" />
|
||||
</bean>
|
||||
|
||||
<!-- reflush pollingOrder data-->
|
||||
<bean id="pollingOrderServiceTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
|
||||
<property name="jobDetail" ref="pollingOrderServiceJob" />
|
||||
<property name="startDelay" value="10000" />
|
||||
<property name="repeatInterval" value="60000" />
|
||||
<property name="repeatCount" value="0" />
|
||||
</bean>
|
||||
|
||||
<bean id="pollingOrderServiceJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject" ref="monitorNodeRefreshHelper" />
|
||||
<property name="targetMethod" value="doPollingOrders" />
|
||||
</bean>
|
||||
|
||||
<bean id="doAppJob"
|
||||
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
|
||||
<property name="targetObject">
|
||||
<ref bean="appManager"/>
|
||||
</property>
|
||||
<property name="targetMethod">
|
||||
<value>sqlserver</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="doAppJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<ref local="doAppJob"/>
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>0 0/1 * * * ?</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC
|
||||
"-//SPRING//DTD BEAN//EN"
|
||||
"http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<beans>
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<module>
|
||||
<inherits name='com.dev.energy.ApplicationWindow'/>
|
||||
<inherits name='com.dev.repc.ReportCenter'/>
|
||||
<entry-point class='com.dev.stms.client.STMS'/>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package com.dev.stms.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;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class STMS extends ApplicationWindow {
|
||||
public static ToolbarButton changePlatform;
|
||||
|
||||
public void initNativeMethod() {
|
||||
}
|
||||
|
||||
public void afterInitializingUI() {
|
||||
}
|
||||
|
||||
public void afterInitConfigContext() {
|
||||
}
|
||||
|
||||
public void topLinkContent(final Element td) {
|
||||
}
|
||||
|
||||
public void topLinkContent2(Element td) {
|
||||
DOM.setInnerHTML(td , " ");
|
||||
}
|
||||
|
||||
public static void changePopPage(final String pageId,final Map map) {
|
||||
context.getPageConfig(pageId,new CatchPageConfigAsync(){
|
||||
public void afterInvotion(PageConfig pageConfig) {
|
||||
IPopupPage iPage = pageConfig.createPage(map,null);
|
||||
if(iPage instanceof AbstractCustomPageTemplate){
|
||||
((AbstractCustomPageTemplate)iPage).show();
|
||||
((AbstractCustomPageTemplate)iPage).initData();
|
||||
}
|
||||
ApplicationWindow.getCurrentMessageLabel().setText("");
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 setOtherInfo(final String otherMessage) {
|
||||
changePlatform = new ToolbarButton(otherMessage){
|
||||
public void setText(String text) {
|
||||
super.setText("<font color='#0000FF'>" + text + "</font>");
|
||||
}
|
||||
};
|
||||
toolbar.addFill();
|
||||
toolbar.addSeparator();
|
||||
toolbar.addButton(changePlatform);
|
||||
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("userPasswordManager","getThisPlatForm",new HashMap(),this);
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
final Map map = (Map)result;
|
||||
changePlatform.addListener(new ButtonListenerAdapter(){
|
||||
public void onClick(Button button, EventObject e) {
|
||||
changePopPage("switchPlatFormPage",map);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
public void onFailure() {}
|
||||
};
|
||||
acba.exec("");
|
||||
|
||||
}
|
||||
|
||||
public void appendBottomCompanyName(Element td) {
|
||||
DOM.setInnerHTML(td , LocaleUtils.getText("logo.company.name"));
|
||||
}
|
||||
|
||||
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 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){
|
||||
if(pageConfig instanceof IMainPageConfig){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bottomLinkContent(Element td) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bottomLinkContent2(Element td) {
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package com.dev.stms.client.core;
|
||||
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.gwtext.client.core.UrlParam;
|
||||
import com.gwtext.client.data.DataProxy;
|
||||
import com.gwtext.client.util.JavaScriptObjectHelper;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
public abstract class GWTProxy extends DataProxy{
|
||||
|
||||
public GWTProxy(){
|
||||
jsObj = create();
|
||||
}
|
||||
|
||||
protected native JavaScriptObject create() /*-{
|
||||
var o=new $wnd.Ext.ux.data.GWTProxy();
|
||||
o.gwtmem=this;
|
||||
return o;
|
||||
}-*/;
|
||||
|
||||
private static native void init()/*-{
|
||||
$wnd.Ext.namespace("Ext.ux");
|
||||
$wnd.Ext.namespace("Ext.ux.data");
|
||||
$wnd.Ext.ux.data.GWTProxy = function(){
|
||||
$wnd.Ext.ux.data.GWTProxy.superclass.constructor.call(this);
|
||||
};
|
||||
|
||||
$wnd.Ext.extend($wnd.Ext.ux.data.GWTProxy, $wnd.Ext.data.DataProxy, {
|
||||
load : function(params, reader, callback, scope, arg){
|
||||
var o = {
|
||||
params : params || {},
|
||||
request: {
|
||||
callback : callback,
|
||||
scope : scope,
|
||||
arg : arg
|
||||
},
|
||||
reader: reader,
|
||||
callback : this.loadResponse,
|
||||
scope: this
|
||||
};
|
||||
this.gwtmem.@com.dev.stms.client.core.GWTProxy::load(IILjava/lang/String;Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)
|
||||
(params.start==undefined?-1:params.start, params.limit==undefined?-1:params.limit,params.sort==undefined?null:params.sort,params.dir==undefined?null:params.dir,o);
|
||||
},
|
||||
loadResponse : function(o, success, totalRecords, response){
|
||||
if(!success){
|
||||
this.fireEvent("loadexception", this, o, response);
|
||||
o.request.callback.call(o.request.scope, null, o.request.arg, false);
|
||||
return;
|
||||
}
|
||||
var result;
|
||||
try {
|
||||
result = o.reader.readRecords(response);
|
||||
result.totalRecords=totalRecords;
|
||||
}catch(e){
|
||||
this.fireEvent("loadexception", this, o, response, e);
|
||||
o.request.callback.call(o.request.scope, null, o.request.arg, false);
|
||||
return;
|
||||
}
|
||||
this.fireEvent("load", this, o, o.request.arg);
|
||||
o.request.callback.call(o.request.scope, result, o.request.arg, true);
|
||||
}
|
||||
});
|
||||
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Return the base params.
|
||||
*
|
||||
* @return the base params
|
||||
*/
|
||||
public UrlParam[] getBaseParams(JavaScriptObject store) {
|
||||
JavaScriptObject baseParamsNative = convertBaseParams(store);
|
||||
JavaScriptObject[] urlParamsJ = JavaScriptObjectHelper.toArray(baseParamsNative);
|
||||
UrlParam[] baseParams = new UrlParam[urlParamsJ.length];
|
||||
for (int i = 0; i < urlParamsJ.length; i++) {
|
||||
UrlParam urlParam = new UrlParam(urlParamsJ[i]);
|
||||
baseParams[i] = urlParam;
|
||||
}
|
||||
return baseParams;
|
||||
}
|
||||
|
||||
private native JavaScriptObject convertBaseParams(JavaScriptObject store) /*-{
|
||||
var params = new Array();
|
||||
var i = 0;
|
||||
var o = store.baseParams;
|
||||
for(var key in o){
|
||||
var ov = o[key];
|
||||
var param = @com.gwtext.client.core.UrlParam::instance(Ljava/lang/String;Ljava/lang/String;)(key, String(ov));
|
||||
params[i] = param.@com.gwtext.client.core.JsObject::getJsObj()();
|
||||
i++;
|
||||
}
|
||||
return params;
|
||||
}-*/;
|
||||
|
||||
public void load(int start, int limit, String sort, String dir, JavaScriptObject o){
|
||||
JavaScriptObject store = JavaScriptObjectHelper.getAttributeAsJavaScriptObject(JavaScriptObjectHelper.getAttributeAsJavaScriptObject(o, "request"), "scope");
|
||||
load(start, limit, sort, dir, o, getBaseParams(store));
|
||||
}
|
||||
|
||||
public abstract void load(int start, int limit, String sort, String dir, JavaScriptObject o, UrlParam[] baseParams);
|
||||
|
||||
protected void loadResponse(JavaScriptObject o, boolean success, int totalRecords, Object[][] data) {
|
||||
loadResponse(o, true, totalRecords, JavaScriptObjectHelper.convertToJavaScriptArray(data));
|
||||
}
|
||||
|
||||
protected native void loadResponse(JavaScriptObject o, boolean success, int totalRecords, JavaScriptObject response)/*-{
|
||||
var m = this.@com.gwtext.client.core.JsObject::getJsObj()();
|
||||
m.loadResponse(o, success, totalRecords, response);
|
||||
}-*/;
|
||||
|
||||
static{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.dev.stms.client.customUI;
|
||||
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
|
||||
public class CustomMultiRemoteUI extends CustomRemoteUI {
|
||||
|
||||
public CustomMultiRemoteUI(IPage ownerPage) {
|
||||
super(ownerPage);
|
||||
multiple = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.dev.stms.client.customUI;
|
||||
|
||||
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.ui.RemoteUI;
|
||||
import com.dev.energy.client.ui.page.IPage;
|
||||
|
||||
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();
|
||||
template.show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.dev.stms.client.customUI;
|
||||
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Element;
|
||||
import com.gwtext.client.core.EventCallback;
|
||||
import com.gwtext.client.core.EventManager;
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.core.ListenerConfig;
|
||||
import com.gwtext.client.util.JavaScriptObjectHelper;
|
||||
import com.gwtext.client.widgets.BoxComponent;
|
||||
import com.gwtext.client.widgets.menu.Menu;
|
||||
import com.dev.stms.client.event.ImageListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public class Image extends BoxComponent {
|
||||
private Element img = null;
|
||||
private ListenerConfig listenerConfig = new ListenerConfig();
|
||||
private Menu menu = null;
|
||||
private JavaScriptObject imageArray = null;
|
||||
|
||||
/**
|
||||
* Constructor to create the Image Widget.
|
||||
* @param id The id to use for this component
|
||||
* @param imgURL The URL for the image
|
||||
*/
|
||||
public Image(String id, String imgURL) {
|
||||
super();
|
||||
img = DOM.createImg();
|
||||
this.setEl(img);
|
||||
|
||||
DOM.setElementProperty(img, "src", imgURL);
|
||||
DOM.setElementProperty(img, "id", id);
|
||||
|
||||
imageArray = JavaScriptObjectHelper.createJavaScriptArray();
|
||||
addImage(id, imgURL);
|
||||
|
||||
listenerConfig.setPreventDefault(true);
|
||||
getOrCreateJsObj();
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty Constructor
|
||||
*/
|
||||
public Image(){
|
||||
super(DOM.createImg());
|
||||
img = this.getElement();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor that receives the Javascript Object
|
||||
* @param jsObj the Javascript object
|
||||
*/
|
||||
public Image(JavaScriptObject jsObj){
|
||||
super(jsObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that gets the X-type of this component
|
||||
*/
|
||||
public String getXType() {
|
||||
return "image";
|
||||
}
|
||||
|
||||
/**
|
||||
* The url of the image.
|
||||
*
|
||||
* @param src the source URL to get to the image
|
||||
*/
|
||||
public void setSrc(String src) {
|
||||
DOM.setElementProperty(img, "src", src);
|
||||
}
|
||||
|
||||
/**
|
||||
* The tooltip for the image.
|
||||
*
|
||||
* @param tooltip the tooltip
|
||||
*/
|
||||
public void setTooltip(String tooltip) {
|
||||
DOM.setElementProperty(img, "alt", tooltip);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the context menu when the right click is pressed on the image
|
||||
* @param menu the menu to show
|
||||
*/
|
||||
public void setContextMenu(Menu menu){
|
||||
this.menu = menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a listener.
|
||||
*
|
||||
* @param listener the listener
|
||||
*/
|
||||
public void addListener(ImageListener listener) {
|
||||
super.addListener(listener);
|
||||
final ImageListener fListener = listener;
|
||||
final Image me = this;
|
||||
|
||||
EventCallback onClick = new EventCallback(){
|
||||
public void execute(EventObject e) {
|
||||
fListener.onClick(me, e);
|
||||
}
|
||||
};
|
||||
|
||||
EventCallback onMouseOut = new EventCallback(){
|
||||
public void execute(EventObject e) {
|
||||
fListener.onMouseOut(me, e);
|
||||
}
|
||||
};
|
||||
|
||||
EventCallback onMouseOver = new EventCallback(){
|
||||
public void execute(EventObject e) {
|
||||
fListener.onMouseOver(me, e);
|
||||
}
|
||||
};
|
||||
|
||||
EventCallback onMouseDown = new EventCallback(){
|
||||
public void execute(EventObject e) {
|
||||
if(menu != null)
|
||||
menu.showAt(e.getXY());
|
||||
}
|
||||
};
|
||||
|
||||
EventManager.addListener(getElement(), "click", onClick, listenerConfig);
|
||||
EventManager.addListener(getElement(), "mouseout", onMouseOut, listenerConfig);
|
||||
EventManager.addListener(getElement(), "mouseover", onMouseOver, listenerConfig);
|
||||
EventManager.addListener(getElement(), "contextmenu", onMouseDown, listenerConfig);
|
||||
}
|
||||
|
||||
// TODO: make the add image loads the images separately so the can be used
|
||||
// later to change the image on different events or time based...
|
||||
public void addImage(String id, String src){
|
||||
JavaScriptObject element = JavaScriptObjectHelper.createObject();
|
||||
JavaScriptObjectHelper.setAttribute(element, "id", id);
|
||||
JavaScriptObjectHelper.setAttribute(element, "src", src);
|
||||
JavaScriptObjectHelper.setArrayValue(imageArray,
|
||||
JavaScriptObjectHelper.arrayLength(imageArray), element);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method resizes the image based on the max width provided.
|
||||
* The method will adjust the height keeping the ratio.
|
||||
* @param maxWidth the max width for the image
|
||||
*/
|
||||
public void setMaxWidthKeepRatio(int maxWidth){
|
||||
float w= Integer.parseInt(DOM.getElementProperty(img, "width"));
|
||||
float h= Integer.parseInt(DOM.getElementProperty(img, "height"));
|
||||
if (w > maxWidth) {
|
||||
float f=1f-((w - maxWidth) / w);
|
||||
DOM.setElementProperty(img, "width", Float.toString(w*f));
|
||||
DOM.setElementProperty(img, "height", Float.toString(h*f));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method resizes the image based on the max height provided.
|
||||
* The method will adjust the width keeping the ratio.
|
||||
* @param maxHeight the max height for the image
|
||||
*/
|
||||
public void setMaxHeightKeepRatio(int maxHeight){
|
||||
float w= Integer.parseInt(DOM.getElementProperty(img, "width"));
|
||||
float h= Integer.parseInt(DOM.getElementProperty(img, "height"));
|
||||
if (h > maxHeight) {
|
||||
float f=1f-((h - maxHeight) / h);
|
||||
DOM.setElementProperty(img, "width", Float.toString(w*f));
|
||||
DOM.setElementProperty(img, "height", Float.toString(h*f));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.dev.stms.client.event;
|
||||
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.widgets.event.BoxComponentListener;
|
||||
import com.dev.stms.client.customUI.Image;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public interface ImageListener extends BoxComponentListener {
|
||||
|
||||
void onClick(Image image, EventObject e);
|
||||
|
||||
void onMouseOut(Image image, EventObject e);
|
||||
|
||||
void onMouseOver(Image image, EventObject e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.dev.stms.client.event;
|
||||
|
||||
import com.gwtext.client.core.EventObject;
|
||||
import com.gwtext.client.widgets.event.BoxComponentListenerAdapter;
|
||||
import com.dev.stms.client.customUI.Image;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public class ImageListenerAdapter extends BoxComponentListenerAdapter implements
|
||||
ImageListener {
|
||||
|
||||
public void onClick(Image image, EventObject e) {
|
||||
|
||||
}
|
||||
|
||||
public void onMouseOut(Image image, EventObject e) {
|
||||
|
||||
}
|
||||
|
||||
public void onMouseOver(Image image, EventObject e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.dev.stms.client.event;
|
||||
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
*/
|
||||
|
||||
public interface MyMouseListener extends EventListener {
|
||||
|
||||
void onContextMenu(Widget sender, Event event);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.dev.stms.client.event;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
*/
|
||||
|
||||
public class MyMouseListenerCollection extends ArrayList<MyMouseListener> {
|
||||
|
||||
public void fireMouseWheelEvent(Widget sender, Event event) {
|
||||
for(MyMouseListener myMouseListener : this){
|
||||
myMouseListener.onContextMenu(sender, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
package com.dev.stms.client.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.ClickListener;
|
||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
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.gwtext.client.widgets.Panel;
|
||||
import com.dev.stms.client.STMS;
|
||||
import com.dev.stms.client.page.service.CustomService;
|
||||
import com.dev.stms.client.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.HiddenUI;
|
||||
import com.dev.energy.client.ui.ListUI;
|
||||
import com.dev.energy.client.ui.commonWidgets.BeautyButton;
|
||||
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;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class SwichPlatFormPage extends BaseCustomPopupTemplate implements
|
||||
IsSerializable {
|
||||
|
||||
transient FormTable formTable;
|
||||
|
||||
transient HiddenUI userIdUI;
|
||||
|
||||
transient ListUI platFormUI;
|
||||
|
||||
private List platForms;
|
||||
|
||||
transient SwitchButton switchButton;
|
||||
|
||||
public void draw(VerticalPanel content) {
|
||||
content.setWidth("370px");
|
||||
content.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
|
||||
content.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
|
||||
content.add(getPagePanel());
|
||||
userIdUI.setValue((Long) params.get("userId"));
|
||||
reloadFormData();
|
||||
}
|
||||
|
||||
/** 从后台获取页面所有数据,参考参数entity的ID * */
|
||||
protected void reloadFormData() {
|
||||
final Map platParams = new HashMap();
|
||||
platParams.put("user.id", userIdUI.getValue());
|
||||
AsyncCallBackAdapter callBack = new AsyncCallBackAdapter() {
|
||||
|
||||
protected void exec() {
|
||||
CommitServiceAsync serviceAsync = AjaxServiceUtil.initialAsyncService(ConfigContext.DEFAULT);
|
||||
serviceAsync.executeCustom("userPasswordManager", "getPlatsForClient", platParams, this);
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
Map resultParam = (Map) result;
|
||||
|
||||
// 设置控件值
|
||||
resultParam.remove(Constants.energy_MESSAGE_KEY);
|
||||
initAllControlKit(resultParam);
|
||||
}
|
||||
};
|
||||
callBack.exec("");
|
||||
}
|
||||
|
||||
/** 对取回的数据进行处理:将取回的数据写入到页面中,此功能用于修改装运单的时候初始化页面 * */
|
||||
protected void initAllControlKit(Map map) {
|
||||
platForms = new ArrayList();
|
||||
if (map.get("platForms.list") != null) {
|
||||
platForms.addAll((Collection) map.get("platForms.list"));
|
||||
}
|
||||
((ListBox) platFormUI.getInputWidget()).clear();
|
||||
;
|
||||
for (int i = 0; i < platForms.size(); i++) {
|
||||
Long key = (Long) ((RowData) platForms.get(i)).getColumnValue(0);
|
||||
String value = (String) ((RowData) platForms.get(i))
|
||||
.getColumnValue(1);
|
||||
((ListBox) platFormUI.getInputWidget()).addItem(value, key
|
||||
.toString());
|
||||
}
|
||||
// wareHousesUI.initData(wareHouses.toArray());
|
||||
}
|
||||
|
||||
protected Widget getPagePanel() {
|
||||
Panel pagePanel = new Panel();
|
||||
formTable = new FormTable();
|
||||
initInputUIsInForm();
|
||||
pagePanel.add(formTable.getForm());
|
||||
pagePanel.add(new SwitchButton());
|
||||
return pagePanel;
|
||||
}
|
||||
|
||||
/** 初始化控件 * */
|
||||
protected void initInputUIsInForm() {
|
||||
initUserId();
|
||||
initPlatforms();
|
||||
}
|
||||
|
||||
private void initPlatforms() {
|
||||
String hql = "";
|
||||
this.platFormUI = this.makeListUI("platForms.list");
|
||||
this.platFormUI.setRow(1);
|
||||
this.platFormUI.setForceOverride(true);
|
||||
this.platFormUI.setForceSpace(false);
|
||||
this.platFormUI.setRequired(true);
|
||||
this.platFormUI.setHql(hql);
|
||||
this.platFormUI.setSpan(1);
|
||||
this.platFormUI.setWidth("300px");
|
||||
this.platFormUI.afterPropertySet();
|
||||
this.platFormUI.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 com.dev.energy.client.ui.ClickListener {
|
||||
SwitchButton() {
|
||||
super(LocaleUtils.getText("switchPlatForm"));
|
||||
this.setEnabled(true);
|
||||
switchButton = this;
|
||||
this.addClickListener(this);
|
||||
}
|
||||
|
||||
public void onClick(Object sender) {
|
||||
int index = ((ListBox)platFormUI.getInputWidget()).getSelectedIndex();
|
||||
RowData rowData = (RowData) platForms.get(index);
|
||||
final Object platformId = rowData.getColumnValue(0);
|
||||
|
||||
CustomServiceAsync asyncService = (CustomServiceAsync) GWT.create(CustomService.class);
|
||||
ServiceDefTarget endpoint = (ServiceDefTarget) asyncService;
|
||||
String server = GWT.getModuleBaseURL()+ "*.changePlatForm";
|
||||
endpoint.setServiceEntryPoint(server);
|
||||
|
||||
asyncService.switchPlatfrom((Long)platformId , new AsyncCallback<Map>(){
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
ApplicationWindow.messageLabel.setText(caught.getMessage());
|
||||
}
|
||||
|
||||
public void onSuccess(Map result) {
|
||||
ApplicationWindow.aw.context.setGlobalParams((Map<String, Object>) result.get("globals"));
|
||||
ApplicationWindow.tabPanelClear();
|
||||
STMS.changePlatform.setText(LocaleUtils.getText("current.platForm")+result.get("platformName"));
|
||||
hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public List<String> getLocaleMessageKeys(){
|
||||
List<String> keys = new ArrayList<String>();
|
||||
keys.add("switchPlatForm");
|
||||
keys.add("platForms.list");
|
||||
keys.add("current.platForm");
|
||||
return keys;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,336 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author dev
|
||||
*@description
|
||||
*
|
||||
*/
|
||||
|
||||
public class CustomLegs implements IsSerializable {
|
||||
|
||||
public static final String DEFAULT_PLAN_NO="未配载";
|
||||
|
||||
private Long id;
|
||||
private String legNo; //分段编号
|
||||
/**
|
||||
* 用于订单拆解或合并,格式为ID-X[-X]
|
||||
*/
|
||||
private String ecNo; //分解组合编号
|
||||
/**
|
||||
* 仓库任务、配送任务等
|
||||
*/
|
||||
private String status; //任务状态
|
||||
private CustomOrganization customConsignor; //委托方
|
||||
private CustomOrganization customContractor; //承接方,承运商
|
||||
private CustomOrganization customSubContractor;//二级承运商
|
||||
private int sortIndex = 0;
|
||||
/**
|
||||
* 汽运、海运、空运等
|
||||
*/
|
||||
private String shipmentMethod; //运输方式
|
||||
/**
|
||||
* 一次运输、二次运输等
|
||||
*/
|
||||
private String fromLocationName; //出发地
|
||||
private String toLocationName; //目的地
|
||||
private double quantity = 0D; //货物件数
|
||||
private double weight = 0D; //货物重量
|
||||
private double volume = 0D; //货物体积
|
||||
private int distance = 0; //里程数
|
||||
/**
|
||||
* 整车、零担
|
||||
*/
|
||||
private String loading; //配载方式
|
||||
private String fromCode; //发货方代码
|
||||
private String fromName; //发货方名称
|
||||
private String toCode; //收货方代码
|
||||
private String toName; //收货方名称
|
||||
private String toAddress; //收货地址
|
||||
private String planLeaveTime; //计划出发时间
|
||||
private String planArriveTime; //计划到达时间
|
||||
private String dimension; //尺寸
|
||||
/**
|
||||
* 默认值为‘未配载’
|
||||
*/
|
||||
private String planNo= DEFAULT_PLAN_NO; //配载号
|
||||
private CustomShipment customShipment; //配载单
|
||||
|
||||
private String description; //备注
|
||||
|
||||
/**
|
||||
* 格式: S|X/Y S=X + Y ; X:为包箱数量 Y:包箱后基本单位数量
|
||||
*/
|
||||
private String packageDesc; //包装描述
|
||||
|
||||
private int unitQuantity = 0; //包箱数量
|
||||
|
||||
/** 分段订单包装 */
|
||||
private List customLegPackages = new ArrayList();
|
||||
|
||||
/**
|
||||
* true 市内; false 市外 ;
|
||||
*/
|
||||
private Boolean inTown = Boolean.FALSE; // 市内/市外
|
||||
|
||||
public boolean equals(final Object other) {
|
||||
if (!(other instanceof CustomLegs))
|
||||
return false;
|
||||
CustomLegs castOther = (CustomLegs) other;
|
||||
return castOther.getLegNo().equals(this.getLegNo()) &&
|
||||
castOther.getEcNo().equals(this.getEcNo()) &&
|
||||
castOther.getPlanNo().equals(this.getPlanNo());
|
||||
}
|
||||
|
||||
public CustomOrganization getCustomConsignor() {
|
||||
return customConsignor;
|
||||
}
|
||||
|
||||
public void setCustomConsignor(CustomOrganization customConsignor) {
|
||||
this.customConsignor = customConsignor;
|
||||
}
|
||||
|
||||
public CustomOrganization getCustomContractor() {
|
||||
return customContractor;
|
||||
}
|
||||
|
||||
public void setCustomContractor(CustomOrganization customContractor) {
|
||||
this.customContractor = customContractor;
|
||||
}
|
||||
|
||||
public CustomShipment getCustomShipment() {
|
||||
return customShipment;
|
||||
}
|
||||
|
||||
public void setCustomShipment(CustomShipment customShipment) {
|
||||
this.customShipment = customShipment;
|
||||
}
|
||||
|
||||
public CustomOrganization getCustomSubContractor() {
|
||||
return customSubContractor;
|
||||
}
|
||||
|
||||
public void setCustomSubContractor(CustomOrganization customSubContractor) {
|
||||
this.customSubContractor = customSubContractor;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDimension() {
|
||||
return dimension;
|
||||
}
|
||||
|
||||
public void setDimension(String dimension) {
|
||||
this.dimension = dimension;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getEcNo() {
|
||||
return ecNo;
|
||||
}
|
||||
|
||||
public void setEcNo(String ecNo) {
|
||||
this.ecNo = ecNo;
|
||||
}
|
||||
|
||||
public String getFromCode() {
|
||||
return fromCode;
|
||||
}
|
||||
|
||||
public void setFromCode(String fromCode) {
|
||||
this.fromCode = fromCode;
|
||||
}
|
||||
|
||||
public String getFromName() {
|
||||
return fromName;
|
||||
}
|
||||
|
||||
public void setFromName(String fromName) {
|
||||
this.fromName = fromName;
|
||||
}
|
||||
|
||||
public Boolean getInTown() {
|
||||
return inTown;
|
||||
}
|
||||
|
||||
public void setInTown(Boolean inTown) {
|
||||
this.inTown = inTown;
|
||||
}
|
||||
|
||||
public String getLegNo() {
|
||||
return legNo;
|
||||
}
|
||||
|
||||
public void setLegNo(String legNo) {
|
||||
this.legNo = legNo;
|
||||
}
|
||||
|
||||
public String getLoading() {
|
||||
return loading;
|
||||
}
|
||||
|
||||
public void setLoading(String loading) {
|
||||
this.loading = loading;
|
||||
}
|
||||
|
||||
public String getPackageDesc() {
|
||||
return packageDesc;
|
||||
}
|
||||
|
||||
public void setPackageDesc(String packageDesc) {
|
||||
this.packageDesc = packageDesc;
|
||||
}
|
||||
|
||||
public String getPlanArriveTime() {
|
||||
return planArriveTime;
|
||||
}
|
||||
|
||||
public void setPlanArriveTime(String planArriveTime) {
|
||||
this.planArriveTime = planArriveTime;
|
||||
}
|
||||
|
||||
public String getPlanLeaveTime() {
|
||||
return planLeaveTime;
|
||||
}
|
||||
|
||||
public void setPlanLeaveTime(String planLeaveTime) {
|
||||
this.planLeaveTime = planLeaveTime;
|
||||
}
|
||||
|
||||
public String getPlanNo() {
|
||||
return planNo;
|
||||
}
|
||||
|
||||
public void setPlanNo(String planNo) {
|
||||
this.planNo = planNo;
|
||||
}
|
||||
|
||||
public double getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(double quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getShipmentMethod() {
|
||||
return shipmentMethod;
|
||||
}
|
||||
|
||||
public void setShipmentMethod(String shipmentMethod) {
|
||||
this.shipmentMethod = shipmentMethod;
|
||||
}
|
||||
|
||||
public int getSortIndex() {
|
||||
return sortIndex;
|
||||
}
|
||||
|
||||
public void setSortIndex(int sortIndex) {
|
||||
this.sortIndex = sortIndex;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getToCode() {
|
||||
return toCode;
|
||||
}
|
||||
|
||||
public void setToCode(String toCode) {
|
||||
this.toCode = toCode;
|
||||
}
|
||||
|
||||
public String getToName() {
|
||||
return toName;
|
||||
}
|
||||
|
||||
public void setToName(String toName) {
|
||||
this.toName = toName;
|
||||
}
|
||||
|
||||
public int getUnitQuantity() {
|
||||
return unitQuantity;
|
||||
}
|
||||
|
||||
public void setUnitQuantity(int unitQuantity) {
|
||||
this.unitQuantity = unitQuantity;
|
||||
}
|
||||
|
||||
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 Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getToAddress() {
|
||||
return toAddress;
|
||||
}
|
||||
|
||||
public void setToAddress(String toAddress) {
|
||||
this.toAddress = toAddress;
|
||||
}
|
||||
public String getFromLocationName() {
|
||||
return fromLocationName;
|
||||
}
|
||||
|
||||
public void setFromLocationName(String fromLocationName) {
|
||||
this.fromLocationName = fromLocationName;
|
||||
}
|
||||
|
||||
public String getToLocationName() {
|
||||
return toLocationName;
|
||||
}
|
||||
|
||||
public void setToLocationName(String toLocationName) {
|
||||
this.toLocationName = toLocationName;
|
||||
}
|
||||
|
||||
public List getCustomLegPackages() {
|
||||
return customLegPackages;
|
||||
}
|
||||
|
||||
public void setCustomLegPackages(List customLegPackages) {
|
||||
this.customLegPackages = customLegPackages;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
public class CustomOrganization implements IsSerializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String code; //代码
|
||||
|
||||
private String name; //名称
|
||||
|
||||
private String shortName; //简称
|
||||
|
||||
private boolean disabled = false; //是否失效
|
||||
|
||||
private String description; //描述
|
||||
|
||||
private boolean bePlatForm = false;//是否平台
|
||||
|
||||
private boolean beCustomer = false;//是否客户
|
||||
|
||||
private boolean beCarrier = false;//是否承运商
|
||||
|
||||
public CustomOrganization(){}
|
||||
|
||||
public CustomOrganization(Long id,String code,String name,String shortName){
|
||||
this.id = id;
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public boolean equals(final Object other) {
|
||||
if (!(other instanceof CustomOrganization))
|
||||
return false;
|
||||
CustomOrganization castOther = (CustomOrganization) other;
|
||||
return castOther.getCode().equals(this.getCode()) && castOther.getId().equals(this.getId());
|
||||
}
|
||||
|
||||
public boolean isBeCarrier() {
|
||||
return beCarrier;
|
||||
}
|
||||
|
||||
public void setBeCarrier(boolean beCarrier) {
|
||||
this.beCarrier = beCarrier;
|
||||
}
|
||||
|
||||
public boolean isBeCustomer() {
|
||||
return beCustomer;
|
||||
}
|
||||
|
||||
public void setBeCustomer(boolean beCustomer) {
|
||||
this.beCustomer = beCustomer;
|
||||
}
|
||||
|
||||
public boolean isBePlatForm() {
|
||||
return bePlatForm;
|
||||
}
|
||||
|
||||
public void setBePlatForm(boolean bePlatForm) {
|
||||
this.bePlatForm = bePlatForm;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public boolean isDisabled() {
|
||||
return disabled;
|
||||
}
|
||||
|
||||
public void setDisabled(boolean disabled) {
|
||||
this.disabled = disabled;
|
||||
}
|
||||
|
||||
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 String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getDisplayName(){
|
||||
return StringUtils.isEmpty(shortName) ? name : shortName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public class CustomRoute implements IsSerializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
public CustomRoute(){}
|
||||
|
||||
public CustomRoute(Long id,String code,String name){
|
||||
this.id = id;
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,280 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.dev.stms.client.page.shipment.page.utils.DoubleUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
public class CustomShipment implements IsSerializable{
|
||||
|
||||
/** 待配载 */
|
||||
public final static String SHIPPING = "SHIPPING";
|
||||
/** 已配载 */
|
||||
public final static String SHIPPED = "SHIPPED";
|
||||
/** 指定承运商 */
|
||||
public final static String CARRIER = "CARRIER";
|
||||
/** 指定车辆 */
|
||||
public final static String VEHICLE = "VEHICLE";
|
||||
|
||||
/** 调度单ID */
|
||||
private Long id;
|
||||
/** 配载号 **/
|
||||
private String code;
|
||||
/** 当前的单据状态(待配载;已配载;指定承运商;指定车辆;已创建装车单) */
|
||||
private String status;
|
||||
/** 点数 */
|
||||
private int pointer = 0;
|
||||
/** 件数 */
|
||||
private double quantity = 0D;
|
||||
/** 重量 */
|
||||
private double weight = 0D;
|
||||
|
||||
private String businessType;
|
||||
/** 体积 */
|
||||
private double volumn = 0D;
|
||||
/** 运输耗用时间 **/
|
||||
private double transportTime = 0D;
|
||||
/** 已生成调度单ID(配载没有生成调度单为空,否则为实际的值) */
|
||||
private Long shipmentId;
|
||||
/** 指定承运商 */
|
||||
private CustomOrganization cusotmCarrier;
|
||||
/** 指定车辆 */
|
||||
private CustomVehicle customVehicle;
|
||||
|
||||
private String toLocation;
|
||||
/** 订单集合 */
|
||||
private List<CustomLegs> customLegs = new ArrayList<CustomLegs>();
|
||||
|
||||
private int legsSize = 0;
|
||||
|
||||
private List<CustomOrganization> filterCustomOrgs = new ArrayList<CustomOrganization>();
|
||||
|
||||
private List<CustomRoute> filterCustomRoutes = new ArrayList<CustomRoute>();
|
||||
|
||||
public boolean equals(final Object other) {
|
||||
if (!(other instanceof CustomShipment) || null == other)
|
||||
return false;
|
||||
CustomShipment castOther = (CustomShipment) other;
|
||||
return this.getCode().equals(castOther.getCode()) && this.getId().equals(castOther.getId());
|
||||
}
|
||||
|
||||
|
||||
public CustomOrganization getCusotmCarrier() {
|
||||
return cusotmCarrier;
|
||||
}
|
||||
|
||||
public void setCusotmCarrier(CustomOrganization cusotmCarrier) {
|
||||
this.cusotmCarrier = cusotmCarrier;
|
||||
}
|
||||
|
||||
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 List<CustomLegs> getCustomLegs() {
|
||||
return customLegs;
|
||||
}
|
||||
|
||||
public void setCustomLegs(List<CustomLegs> customLegs) {
|
||||
this.customLegs = customLegs;
|
||||
}
|
||||
|
||||
public int getPointer() {
|
||||
return pointer;
|
||||
}
|
||||
|
||||
public void setPointer(int pointer) {
|
||||
this.pointer = pointer;
|
||||
}
|
||||
|
||||
public double getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(double quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getShipmentId() {
|
||||
return shipmentId;
|
||||
}
|
||||
|
||||
public void setShipmentId(Long shipmentId) {
|
||||
this.shipmentId = shipmentId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public CustomVehicle getCustomVehicle() {
|
||||
return customVehicle;
|
||||
}
|
||||
|
||||
public void setCustomVehicle(CustomVehicle customVehicle) {
|
||||
this.customVehicle = customVehicle;
|
||||
}
|
||||
|
||||
public double getVolumn() {
|
||||
return volumn;
|
||||
}
|
||||
|
||||
public void setVolumn(double volumn) {
|
||||
this.volumn = volumn;
|
||||
}
|
||||
|
||||
public double getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(double weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public String getDisplayText(){
|
||||
String html = "<font color='blue' style='font-weight:bold'>【" + code +"】</font>:  " +
|
||||
"<font color='green' style='font-weight:bold'>" + legsSize + "</font> / " +
|
||||
"<font color='purple' style='font-weight:bold'>" + DoubleUtils.format1Fraction(getQuantity()+"") + "</font> / " +
|
||||
"<font color='#043460' style='font-weight:bold'>" + DoubleUtils.format3Fraction(getWeight()+"") + "</font> / " +
|
||||
"<font color='#600404' style='font-weight:bold'>" + DoubleUtils.format3Fraction(getVolumn()+"") + "</font>  ";
|
||||
if(status.equals(CARRIER)){
|
||||
html += ("<img src='images/e02.gif'>  " + (cusotmCarrier != null ? cusotmCarrier.getDisplayName() : ""));
|
||||
}else if(status.equals(VEHICLE)){
|
||||
html += ("<img src='images/e04.gif'>  " + (customVehicle != null ? customVehicle.getLicense() : ""));
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
public String getToLocation() {
|
||||
return toLocation;
|
||||
}
|
||||
|
||||
public void setToLocation(String toLocation) {
|
||||
this.toLocation = toLocation;
|
||||
}
|
||||
public int getLegsSize() {
|
||||
return legsSize;
|
||||
}
|
||||
|
||||
public void setLegsSize(int legsSize) {
|
||||
this.legsSize = legsSize;
|
||||
}
|
||||
|
||||
public void setLegsSize() {
|
||||
this.legsSize = customLegs.size();
|
||||
}
|
||||
|
||||
public List<CustomOrganization> getFilterCustomOrgs() {
|
||||
return filterCustomOrgs;
|
||||
}
|
||||
|
||||
public void setFilterCustomOrgs(List<CustomOrganization> filterCustomOrgs) {
|
||||
this.filterCustomOrgs = filterCustomOrgs;
|
||||
}
|
||||
|
||||
public List<CustomRoute> getFilterCustomRoutes() {
|
||||
return filterCustomRoutes;
|
||||
}
|
||||
|
||||
public void setFilterCustomRoutes(List<CustomRoute> filterCustomRoutes) {
|
||||
this.filterCustomRoutes = filterCustomRoutes;
|
||||
}
|
||||
|
||||
public void addCustomRoutes(List<CustomRoute> customRoutes){
|
||||
filterCustomRoutes.clear();
|
||||
filterCustomRoutes.addAll(customRoutes);
|
||||
}
|
||||
|
||||
public void addCustomOrgs(List<CustomOrganization> customOrgs){
|
||||
filterCustomOrgs.clear();
|
||||
filterCustomOrgs.addAll(customOrgs);
|
||||
}
|
||||
|
||||
public void addCustomLegs(CustomLegs legs){
|
||||
customLegs.add(legs);
|
||||
legs.setCustomShipment(this);
|
||||
}
|
||||
|
||||
public Object[][] getFilterCustomOrgsArrays(){
|
||||
Object[][] values = new Object[filterCustomOrgs.size()][];
|
||||
for(int i = 0; i < filterCustomOrgs.size(); i++){
|
||||
CustomOrganization customOrg = (CustomOrganization)filterCustomOrgs.get(i);
|
||||
Object[] value = new Object[3];
|
||||
value[0] = customOrg.getId();
|
||||
value[1] = customOrg.getCode();
|
||||
value[2] = customOrg.getShortName();
|
||||
values[i] = value;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
public Object[][] getFilterCustomRoutesArrays(){
|
||||
Object[][] values = new Object[filterCustomRoutes.size()][];
|
||||
for(int i = 0; i < filterCustomRoutes.size(); i++){
|
||||
CustomRoute customRoute = (CustomRoute)filterCustomRoutes.get(i);
|
||||
Object[] value = new Object[3];
|
||||
value[0] = customRoute.getId();
|
||||
value[1] = customRoute.getCode();
|
||||
value[2] = customRoute.getName();
|
||||
values[i] = value;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
public boolean isShipping(){
|
||||
return SHIPPING.equals(getStatus())
|
||||
&& CustomLegs.DEFAULT_PLAN_NO.equals(getCode());
|
||||
}
|
||||
|
||||
public CustomShipment clone(){
|
||||
CustomShipment ship = new CustomShipment();
|
||||
ship.id = this.id;
|
||||
ship.status = this.status;
|
||||
ship.businessType = this.businessType;
|
||||
return ship;
|
||||
}
|
||||
|
||||
|
||||
public double getTransportTime() {
|
||||
return transportTime;
|
||||
}
|
||||
|
||||
|
||||
public void setTransportTime(double transportTime) {
|
||||
this.transportTime = transportTime;
|
||||
}
|
||||
|
||||
|
||||
public String getBusinessType() {
|
||||
return businessType;
|
||||
}
|
||||
|
||||
|
||||
public void setBusinessType(String businessType) {
|
||||
this.businessType = businessType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class CustomTransLocation implements IsSerializable{
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private Long routeid;
|
||||
|
||||
private String address;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
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 String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Long getRouteid() {
|
||||
return routeid;
|
||||
}
|
||||
|
||||
public void setRouteid(Long routeid) {
|
||||
this.routeid = routeid;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
public class CustomVehicle implements IsSerializable {
|
||||
|
||||
private Long id;
|
||||
private String teamNo; // (所属车队);
|
||||
private String code; // (车辆编号);
|
||||
private String license; // (车牌号);
|
||||
private String engineNo; // (发动机号);
|
||||
private String underpanNo; // (车架号);
|
||||
private String barCode; // (条码号);
|
||||
private String gps; // (GPS设备号);
|
||||
private double baseFuel; // (百公里油耗);
|
||||
private String trailType; // (挂车类型);
|
||||
private double weight; // (额定载重);
|
||||
private double volume; // (体积);
|
||||
/**
|
||||
* VehicleStatus(可用、在途、维修、其他)
|
||||
*/
|
||||
private String status; // 车辆状态);
|
||||
private String masterDriverName;// (主司机);
|
||||
private String minorDriverName; // (副司机);
|
||||
/**
|
||||
* ContractType(自营、外包)
|
||||
*/
|
||||
private String contractType; // 承包类型);
|
||||
private String contractNo; // (承包合同号);
|
||||
private boolean disabled = false; // 是否失效
|
||||
private String description; // 描述
|
||||
private boolean isShipment = false; //任务状态(是否执行中) true:执行中 false;无任务
|
||||
|
||||
public boolean equals(final Object other) {
|
||||
if (!(other instanceof CustomVehicle))
|
||||
return false;
|
||||
CustomVehicle castOther = (CustomVehicle) other;
|
||||
return castOther.getCode().equals(this.getCode()) &&
|
||||
castOther.getLicense().equals(this.getLicense());
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
public double getBaseFuel() {
|
||||
return baseFuel;
|
||||
}
|
||||
public void setBaseFuel(double baseFuel) {
|
||||
this.baseFuel = baseFuel;
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
public String getContractNo() {
|
||||
return contractNo;
|
||||
}
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
public String getContractType() {
|
||||
return contractType;
|
||||
}
|
||||
public void setContractType(String contractType) {
|
||||
this.contractType = contractType;
|
||||
}
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
public boolean isDisabled() {
|
||||
return disabled;
|
||||
}
|
||||
public void setDisabled(boolean disabled) {
|
||||
this.disabled = disabled;
|
||||
}
|
||||
public String getEngineNo() {
|
||||
return engineNo;
|
||||
}
|
||||
public void setEngineNo(String engineNo) {
|
||||
this.engineNo = engineNo;
|
||||
}
|
||||
public String getGps() {
|
||||
return gps;
|
||||
}
|
||||
public void setGps(String gps) {
|
||||
this.gps = gps;
|
||||
}
|
||||
public boolean isShipment() {
|
||||
return isShipment;
|
||||
}
|
||||
public void setShipment(boolean isShipment) {
|
||||
this.isShipment = isShipment;
|
||||
}
|
||||
public String getLicense() {
|
||||
return license;
|
||||
}
|
||||
public void setLicense(String license) {
|
||||
this.license = license;
|
||||
}
|
||||
|
||||
public String getMasterDriverName() {
|
||||
return masterDriverName;
|
||||
}
|
||||
|
||||
public void setMasterDriverName(String masterDriverName) {
|
||||
this.masterDriverName = masterDriverName;
|
||||
}
|
||||
|
||||
public String getMinorDriverName() {
|
||||
return minorDriverName;
|
||||
}
|
||||
|
||||
public void setMinorDriverName(String minorDriverName) {
|
||||
this.minorDriverName = minorDriverName;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
public String getTeamNo() {
|
||||
return teamNo;
|
||||
}
|
||||
public void setTeamNo(String teamNo) {
|
||||
this.teamNo = teamNo;
|
||||
}
|
||||
public String getTrailType() {
|
||||
return trailType;
|
||||
}
|
||||
public void setTrailType(String trailType) {
|
||||
this.trailType = trailType;
|
||||
}
|
||||
public String getUnderpanNo() {
|
||||
return underpanNo;
|
||||
}
|
||||
public void setUnderpanNo(String underpanNo) {
|
||||
this.underpanNo = underpanNo;
|
||||
}
|
||||
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 Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.dev.stms.client.page.model;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public class Reference implements IsSerializable {
|
||||
|
||||
private String key;
|
||||
|
||||
private Long id;
|
||||
|
||||
private CustomShipment customShip;
|
||||
|
||||
public Reference(){}
|
||||
|
||||
public Reference(String key,CustomShipment customShip){
|
||||
this.key = key;
|
||||
this.customShip = customShip;
|
||||
}
|
||||
|
||||
public Reference(CustomShipment customShip){
|
||||
this.customShip = customShip;
|
||||
}
|
||||
|
||||
public Reference(String key){
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public Reference(Long id){
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public CustomShipment getCustomShip() {
|
||||
return customShip;
|
||||
}
|
||||
|
||||
public void setCustomShip(CustomShipment customShip) {
|
||||
this.customShip = customShip;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,791 @@
|
|||
package com.dev.stms.client.page.monitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.CheckBox;
|
||||
import com.google.gwt.user.client.ui.ClickListener;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.FocusListener;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.ListBox;
|
||||
import com.google.gwt.user.client.ui.MouseListener;
|
||||
import com.google.gwt.user.client.ui.Panel;
|
||||
import com.google.gwt.user.client.ui.PopupPanel;
|
||||
import com.google.gwt.user.client.ui.ScrollPanel;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.dev.stms.client.page.monitor.data.MonitorDataAccessor;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.TransmissibleOrderMonitor;
|
||||
import com.dev.stms.client.page.monitor.ui.MonitorLine;
|
||||
import com.dev.stms.client.page.monitor.ui.MonitorTips;
|
||||
import com.dev.stms.client.page.monitor.ui.MyFocusePanel;
|
||||
import com.dev.energy.client.ApplicationWindow;
|
||||
import com.dev.energy.client.data.DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.template.BaseCustomMaintainTemplate;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class MaintainOrderMonitorPage extends BaseCustomMaintainTemplate
|
||||
implements IsSerializable{
|
||||
|
||||
public static final String LOAD_DATA = "LOAD_DATA";
|
||||
|
||||
public static final String DATA_CHANGE = "DATA_CHANGE";
|
||||
|
||||
/** 用于显示Order的监控信息列表 , 包括统计信息、查询面版和提示信息的右侧面版*/
|
||||
private transient VerticalPanel orderListPanel , subsidiaryPanel;
|
||||
|
||||
private transient PopupPanel showTips;
|
||||
|
||||
private transient MonitorTips tipsPanel;
|
||||
|
||||
/** 统计信息所在的表格 */
|
||||
transient FlexTable statisticsPanel ;
|
||||
|
||||
/** 只显示异常订单 */
|
||||
transient CheckBox displayAbnormalOnly;
|
||||
|
||||
/** 监控客户 , 订单编号*/
|
||||
transient TextBox customer , orderCode;
|
||||
/** 订单类型 */
|
||||
transient ListBox orderType;
|
||||
|
||||
/** 添加 , 重置*/
|
||||
transient Button add , reset;
|
||||
|
||||
private List monitorLines ;
|
||||
|
||||
transient MyFocusePanel sourceEventPanel;
|
||||
|
||||
transient NavigateBar nav;
|
||||
|
||||
transient MonitorPanel content;
|
||||
|
||||
public String getTitle() {
|
||||
return LocaleUtils.getText("maintainOrderMonitorPage");
|
||||
}
|
||||
|
||||
public void init(){
|
||||
initData();
|
||||
initMonitorPanel();
|
||||
drawWidget();
|
||||
}
|
||||
|
||||
private void drawWidget() {
|
||||
int height = Window.getClientHeight() - 140;
|
||||
int realCount = height / 40;
|
||||
// if(realCount < MonitorConstant.DEFAULT_DISPLAY_COUNT) {
|
||||
// realCount = MonitorConstant.DEFAULT_DISPLAY_COUNT;
|
||||
// }
|
||||
getData().setRealCount(realCount);
|
||||
content.setStyleName("mmp_container");
|
||||
content.setWidth((Window.getClientWidth() - 210) +"px");
|
||||
content.setHeight(height + "px");
|
||||
content.add(getHPanel());
|
||||
//从全局配置信息中获取
|
||||
Object interval = ApplicationWindow.context.getGlobalParams().get("refreshInterval");
|
||||
if (interval == null) {
|
||||
Window.alert("lack of globalparam[refreshInterval], add it to db and restart the server!");
|
||||
return;
|
||||
}
|
||||
Integer gp = Integer.valueOf(interval.toString());
|
||||
if(gp == null || gp.intValue() < 5000) {
|
||||
gp = new Integer(MonitorConstant.DEFAULT_TIME_INTERVAL);
|
||||
}
|
||||
getData().setRefreshInterval(gp.intValue());
|
||||
getData().filterParamsChange();
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整跳转导航条
|
||||
*/
|
||||
public void adjustNavigateBar(Map datas) {
|
||||
statisticsPanel.setText(1, 1, datas.get("stat_all_count").toString());
|
||||
statisticsPanel.setText(1, 2, datas.get("stat_all_quantity").toString());
|
||||
statisticsPanel.setText(1, 3, datas.get("stat_all_volumn").toString());
|
||||
statisticsPanel.setText(1, 4, datas.get("stat_all_weight").toString());
|
||||
statisticsPanel.setText(2, 1, datas.get("stat_normal_count").toString());
|
||||
statisticsPanel.setText(2, 2, datas.get("stat_normal_quantity").toString());
|
||||
statisticsPanel.setText(2, 3, datas.get("stat_normal_volumn").toString());
|
||||
statisticsPanel.setText(2, 4, datas.get("stat_normal_weight").toString());
|
||||
statisticsPanel.setText(3, 1, datas.get("stat_abnormal_count").toString());
|
||||
statisticsPanel.setText(3, 2, datas.get("stat_abnormal_quantity").toString());
|
||||
statisticsPanel.setText(3, 3, datas.get("stat_abnormal_volumn").toString());
|
||||
statisticsPanel.setText(3, 4, datas.get("stat_abnormal_weight").toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据返回之后的处理
|
||||
* @param list 返回的装有TransmissibleOrderMonitor的结果集
|
||||
*/
|
||||
public void dataChange(List list) {
|
||||
nav.adjustNaviBar();
|
||||
orderTypeChange();
|
||||
int loop = 0;//用于循环的变量
|
||||
for(; loop < list.size(); loop ++) {
|
||||
TransmissibleOrderMonitor dataSource = (TransmissibleOrderMonitor)list.get(loop);
|
||||
((MonitorLine)this.monitorLines.get(loop)).setDataSource(dataSource);
|
||||
}
|
||||
//剩下的行要隐藏
|
||||
for(; loop < monitorLines.size(); loop ++) {
|
||||
((MonitorLine)this.monitorLines.get(loop)).setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得左右分隔水平面版
|
||||
* @return
|
||||
*/
|
||||
private HorizontalPanel getHPanel() {
|
||||
showTips = new PopupPanel(true);
|
||||
tipsPanel = new MonitorTips();
|
||||
showTips.setWidget(tipsPanel);
|
||||
HorizontalPanel hp = new HorizontalPanel();
|
||||
hp.setWidth("100%");
|
||||
hp.setHeight("100%");
|
||||
Panel vp = getOrderListPanel();
|
||||
hp.add(vp);
|
||||
hp.setCellHorizontalAlignment(vp, HasHorizontalAlignment.ALIGN_LEFT);
|
||||
hp.setSpacing(2);
|
||||
vp = getSubsidiaryPanel();
|
||||
hp.add(vp);
|
||||
hp.setCellWidth(vp, "260px");//右边
|
||||
hp.setCellHorizontalAlignment(vp, HasHorizontalAlignment.ALIGN_RIGHT);
|
||||
return hp;
|
||||
}
|
||||
/** 获得用于显示Order的监控信息列表的左侧面版
|
||||
* @return
|
||||
*/
|
||||
private Panel getOrderListPanel() {
|
||||
sourceEventPanel = new MyFocusePanel(this);
|
||||
orderListPanel = new VerticalPanel();
|
||||
|
||||
orderListPanel.setStyleName("mmp_orderlistpanel");
|
||||
sourceEventPanel.add(orderListPanel);
|
||||
orderListPanel.add(getOrderListHead());
|
||||
ScrollPanel sp = new ScrollPanel();
|
||||
VerticalPanel vp = new VerticalPanel();
|
||||
vp.setWidth("100%");
|
||||
vp.setHeight("100%");
|
||||
sp.setWidget(vp);
|
||||
sp.setStyleName("mmp_orderlistscrollpanel");
|
||||
sp.setWidth("100%");
|
||||
sp.setHeight((Window.getClientHeight() - 140) + "px");
|
||||
DOM.setStyleAttribute(sp.getElement(), "overflowY", "scroll");
|
||||
if(monitorLines == null || monitorLines.size() < 1) {
|
||||
monitorLines = new ArrayList();
|
||||
for( int i = 0; i < getData().getRealCount(); i ++) {
|
||||
vp.add(getMonitorLine(i%2 == 0));
|
||||
}
|
||||
} else {
|
||||
for(int i = monitorLines.size() ; i < getData().getRealCount(); i++) {
|
||||
vp.add(getMonitorLine(i%2 == 0));
|
||||
}
|
||||
for(int i = 0; i < monitorLines.size(); i++) {
|
||||
MonitorLine ml = (MonitorLine)monitorLines.get(i);
|
||||
ml.setVisible(false);
|
||||
vp.add(ml);
|
||||
}
|
||||
}
|
||||
orderListPanel.add(sp);
|
||||
return sourceEventPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加监控列表头
|
||||
* @return
|
||||
*/
|
||||
public Panel getOrderListHead() {
|
||||
HorizontalPanel head = new HorizontalPanel();
|
||||
head.setStyleName("mmp_orderlist_head");
|
||||
head.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
|
||||
head.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
head.setWidth("100%");
|
||||
HTML text = new HTML(LocaleUtils.getText("order.code"));
|
||||
head.add(text);
|
||||
head.setCellWidth(text, "10%");
|
||||
|
||||
text = new HTML(LocaleUtils.getText("orderType"));
|
||||
head.add(text);
|
||||
head.setCellWidth(text, "8%");
|
||||
|
||||
text = new HTML(LocaleUtils.getText("customer.name"));
|
||||
head.add(text);
|
||||
head.setCellWidth(text, "10%");
|
||||
|
||||
text = new HTML(LocaleUtils.getText("order.status"));
|
||||
head.add(text);
|
||||
head.setCellWidth(text, "6%");
|
||||
|
||||
text = new HTML(LocaleUtils.getText("orderposition"));
|
||||
head.add(text);
|
||||
head.setCellWidth(text, "6%");
|
||||
|
||||
text = new HTML(LocaleUtils.getText("orderlist.procedure"));
|
||||
head.add(text);
|
||||
head.setCellWidth(text, "10%");
|
||||
|
||||
Widget w = getOrderListFoot();
|
||||
head.add(w);
|
||||
head.setCellHorizontalAlignment(w, HasHorizontalAlignment.ALIGN_RIGHT);
|
||||
text = new HTML(" ");
|
||||
text.setStyleName("headFilling");
|
||||
|
||||
head.add(text);
|
||||
return head;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加监控列表脚(翻页功能)
|
||||
* @return
|
||||
*/
|
||||
public Panel getOrderListFoot() {
|
||||
HorizontalPanel hp = new HorizontalPanel();
|
||||
hp.setWidth("100%");
|
||||
hp.setStyleName("mmp_orderlistfoot");
|
||||
nav = new NavigateBar();
|
||||
hp.add(nav);
|
||||
hp.setCellHorizontalAlignment(nav, HasHorizontalAlignment.ALIGN_RIGHT);
|
||||
hp.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
return hp;
|
||||
}
|
||||
/**
|
||||
* 新建一个监控控件,并将之放到List中
|
||||
* @param odd 是否是偶数列
|
||||
* @return
|
||||
*/
|
||||
private MonitorLine getMonitorLine(boolean odd) {
|
||||
MonitorLine ml = new MonitorLine(this, odd);
|
||||
monitorLines.add(ml);
|
||||
return ml;
|
||||
}
|
||||
/** 获得包括统计信息、查询面版和提示信息的右侧面版
|
||||
* @return
|
||||
*/
|
||||
private VerticalPanel getSubsidiaryPanel() {
|
||||
subsidiaryPanel = new VerticalPanel();
|
||||
subsidiaryPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
|
||||
HTML html = new HTML(LocaleUtils.getText("filter.condition.add"));
|
||||
html.setStyleName("mmp_querypanel_title");
|
||||
subsidiaryPanel.add(html);
|
||||
Widget w = getQueryPanel();
|
||||
subsidiaryPanel.add(w);
|
||||
subsidiaryPanel.setCellHeight(w, "36%");
|
||||
html = new HTML(LocaleUtils.getText("order.stat.info"));
|
||||
html.setStyleName("mmp_statpanel_title");
|
||||
subsidiaryPanel.add(html);
|
||||
w = getStatisticsPanel();
|
||||
subsidiaryPanel.add(w);
|
||||
subsidiaryPanel.setCellHeight(w, "22%");
|
||||
html = new HTML(LocaleUtils.getText("icon.explaining"));
|
||||
html.setStyleName("mmp_noticepanel_title");
|
||||
subsidiaryPanel.add(html);
|
||||
w = getNoticePanel();
|
||||
subsidiaryPanel.add(w);
|
||||
subsidiaryPanel.setCellHeight(w, "42%");
|
||||
subsidiaryPanel.setStyleName("mmp_subsidiarypanel");
|
||||
return subsidiaryPanel;
|
||||
}
|
||||
/** 查询面版
|
||||
* @return
|
||||
*/
|
||||
private Panel getQueryPanel() {
|
||||
FlexTable ft = new FlexTable();
|
||||
ft.setHeight("95%");
|
||||
ft.setStyleName("mmp_querypanel");
|
||||
ft.setCellPadding(0);
|
||||
ft.setCellPadding(0);
|
||||
|
||||
ft.setText(0, 0, LocaleUtils.getText("monitor.condition.customer"));
|
||||
customer = new TextBox();
|
||||
customer.setStyleName("mmp_queryPanel_text");
|
||||
ft.setWidget(0, 1, customer);
|
||||
customer.addFocusListener(new FocusListener(){
|
||||
|
||||
public void onLostFocus(Widget sender) {
|
||||
customer.setStyleName("mmp_queryPanel_text");
|
||||
}
|
||||
|
||||
public void onFocus(Widget sender) {
|
||||
customer.setStyleName("mmp_queryPanel_text_on");
|
||||
}
|
||||
});
|
||||
|
||||
ft.setText(1, 0, LocaleUtils.getText("monitor.condition.ordercode"));
|
||||
orderCode = new TextBox();
|
||||
ft.setWidget(1, 1, orderCode);
|
||||
orderCode.setStyleName("mmp_queryPanel_text");
|
||||
orderCode.addFocusListener(new FocusListener(){
|
||||
|
||||
public void onLostFocus(Widget sender) {
|
||||
orderCode.setStyleName("mmp_queryPanel_text");
|
||||
}
|
||||
|
||||
public void onFocus(Widget sender) {
|
||||
orderCode.setStyleName("mmp_queryPanel_text_on");
|
||||
}
|
||||
});
|
||||
|
||||
ft.setText(2, 0, LocaleUtils.getText("monitor.condition.ordertype"));
|
||||
orderType = new ListBox();
|
||||
orderType.setStyleName("mmp_listorderType");
|
||||
ft.setWidget(2, 1, orderType);
|
||||
|
||||
ft.setText(3, 0, LocaleUtils.getText("display.abnormal.only"));
|
||||
displayAbnormalOnly = new DisplayAbnormalOnlyCheckBox();
|
||||
ft.setWidget(3, 1, displayAbnormalOnly);
|
||||
ft.getCellFormatter().setAlignment(3, 1, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
|
||||
add = new AddButton(LocaleUtils.getText("condition.add"));
|
||||
ft.setWidget(4, 0, add);
|
||||
|
||||
reset = new ResetButton(LocaleUtils.getText("condition.reset"));
|
||||
ft.setWidget(4, 1, reset);
|
||||
return ft;
|
||||
}
|
||||
|
||||
private void orderTypeChange() {
|
||||
List types = getData().getOrderTypes();
|
||||
if(types.isEmpty())
|
||||
return;
|
||||
orderType.addItem("");
|
||||
for(int i = 0; i < types.size(); i++) {
|
||||
String[] data = StringUtils.split(((String)types.get(i)) ,"$$");
|
||||
orderType.addItem(data[1], data[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** 统计信息面版
|
||||
* @return
|
||||
*/
|
||||
private Panel getStatisticsPanel() {
|
||||
statisticsPanel = new FlexTable();
|
||||
statisticsPanel.setStyleName("mmp_statpanel");
|
||||
statisticsPanel.setWidth("100%");
|
||||
statisticsPanel.setHeight("100%");
|
||||
statisticsPanel.setCellPadding(0);
|
||||
statisticsPanel.setCellPadding(0);
|
||||
statisticsPanel.setWidget(0, 0, new HTML(LocaleUtils.getText("order.statistic")));
|
||||
statisticsPanel.setText(0, 1, LocaleUtils.getText("order.num"));
|
||||
statisticsPanel.setText(0, 2, LocaleUtils.getText("order.pack.sum"));
|
||||
statisticsPanel.setText(0, 3, LocaleUtils.getText("order.volumn.sum"));
|
||||
statisticsPanel.setText(0, 4, LocaleUtils.getText("order.weight.sum"));
|
||||
statisticsPanel.setWidget(1, 0, new HTML(LocaleUtils.getText("order.all.num")));
|
||||
statisticsPanel.setWidget(2, 0, new HTML(LocaleUtils.getText("order.normal.num")));
|
||||
statisticsPanel.setWidget(3, 0, new HTML(LocaleUtils.getText("order.abnormal.num")));
|
||||
DOM.setElementProperty(DOM.getParent(DOM.getParent(statisticsPanel.getWidget(0,0).getElement())), "className","order_stat_head");
|
||||
DOM.setElementProperty(DOM.getParent(DOM.getParent(statisticsPanel.getWidget(1,0).getElement())), "className","order_stat_all");
|
||||
DOM.setElementProperty(DOM.getParent(DOM.getParent(statisticsPanel.getWidget(2,0).getElement())), "className","order_stat_normal");
|
||||
DOM.setElementProperty(DOM.getParent(DOM.getParent(statisticsPanel.getWidget(3,0).getElement())), "className","order_stat_abnormal");
|
||||
|
||||
return statisticsPanel;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提示信息(图片说明)面版
|
||||
* @return
|
||||
*/
|
||||
private Widget getNoticePanel() {
|
||||
// String html = "<TABLE style=\"line-height:26px;\" height=100% width=100% cellspacing=0 cellpadding=0>";
|
||||
// html += "<TR><TD><img src=\"images/monitor/pic001.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.ORDER_PROCESSING") +
|
||||
// "</TD><TD><img src=\"images/monitor/pic009.gif\" />" +
|
||||
// "</TD><TD>" +LocaleUtils.getTextWithoutException("ExecutePlanTaskName.WAYFILL")+ "</TD></TR>";
|
||||
// html += "<TR><TD><img src=\"images/monitor/pic002.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.MK_RECEIVING")+
|
||||
// "</TD><TD><img src=\"images/monitor/pic006.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.ARRIVED")+"</TD></TR>";
|
||||
// html += "<TR><TD><img src=\"images/monitor/pic003.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.GOODS_PREPARING")+
|
||||
// "</TD><TD><img src=\"images/monitor/pic007.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.RECEIVING")+"</TD></TR>";
|
||||
// html += "<TR><TD><img src=\"images/monitor/pic004.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.DISPATCHING")+
|
||||
// "</TD><TD><img src=\"images/monitor/pic008.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ExecutePlanTaskName.PUTAWAY")+"</TD></TR>";
|
||||
// html += "<TR><TD><img src=\"images/monitor/pic005.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ShipmentMethod.TRUCK")+"</TD><TD><img src=\"images/monitor/pic010.gif\" />" +
|
||||
// "</TD><TD>" +LocaleUtils.getTextWithoutException("ShipmentMethod.AIR")+ "</TD></TR>";
|
||||
// html += "<TR><TD><img src=\"images/monitor/pic011.gif\" /></TD><TD>" +
|
||||
// LocaleUtils.getTextWithoutException("ShipmentMethod.RAILWAY")+"</TD><TD><img src=\"images/monitor/pic012.gif\" />" +
|
||||
// "</TD><TD>" +LocaleUtils.getTextWithoutException("ShipmentMethod.SEA")+ "</TD></TR></TABLE>";
|
||||
String html = "<TABLE style=\"line-height:28px;text-align:center;border:0px #cfcfcf solid; background:#ffffff;\" height=100% width=100% cellspacing=0 cellpadding=0>";
|
||||
html += "<TR style=\"line-height:20px;background:#f3f3f3;font-weight:normal; color:#666666;\"><TD>" +
|
||||
LocaleUtils.getTextWithoutException("notice.single.node")+"</TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("notice.task")+"</TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("notice.status")+"</TD></TR>";
|
||||
html += "<TR><TD><img src=\"images/monitor/bg003.gif\" /></TD><TD><img src=\"images/monitor/state003.gif\" /></TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("OrderMonitorStatus.5NE")+"</TD></TR>";
|
||||
html += "<TR style=\"background:#f3f3f3;\"><TD><img src=\"images/monitor/bg001.gif\" /></TD>" +
|
||||
"<TD><img src=\"images/monitor/state004.gif\" /></TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("OrderMonitorStatus.8NE")+"</TD></TR>";
|
||||
html += "<TR><TD><img src=\"images/monitor/bg005.gif\" /></TD><TD><img src=\"images/monitor/state001.gif\" /></TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("OrderMonitorStatus.1AE")+"</TD></TR>";
|
||||
html += "<TR style=\"background:#f3f3f3;\"><TD><img src=\"images/monitor/bg004.gif\" /></TD><TD><img src=\"images/monitor/state002.gif\" /></TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("OrderMonitorStatus.3AA")+"</TD></TR>";
|
||||
html += "<TR><TD><img src=\"images/monitor/bg002.gif\" /></TD><TD><img src=\"images/monitor/state005.gif\" /></TD><TD>" +
|
||||
LocaleUtils.getTextWithoutException("OrderMonitorStatus.7AE")+"</TD></TR>";
|
||||
html += "</TABLE>";
|
||||
|
||||
return new HTML(html);
|
||||
}
|
||||
|
||||
public PopupPanel getShowTips() {
|
||||
return showTips;
|
||||
}
|
||||
|
||||
public void setShowTips(PopupPanel showTips) {
|
||||
this.showTips = showTips;
|
||||
}
|
||||
|
||||
public MonitorTips getTipsPanel() {
|
||||
return tipsPanel;
|
||||
}
|
||||
|
||||
public void setTipsPanel(MonitorTips tipsPanel) {
|
||||
this.tipsPanel = tipsPanel;
|
||||
}
|
||||
|
||||
class DisplayAbnormalOnlyCheckBox extends CheckBox implements ClickListener {
|
||||
|
||||
public DisplayAbnormalOnlyCheckBox() {
|
||||
super();
|
||||
this.addClickListener(this);
|
||||
}
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
getData().filterParamsChange(MonitorConstant.FILTER_SHOW_ABNORMAL_ONLY, new Boolean(this.isChecked()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* 重置按钮
|
||||
*/
|
||||
class ResetButton extends Button implements ClickListener {
|
||||
|
||||
public ResetButton(String html) {
|
||||
super(html);
|
||||
this.setStyleName("mmp_resetbutton");
|
||||
this.addClickListener(this);
|
||||
}
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
customer.setText("");
|
||||
orderCode.setText("");
|
||||
// orderType.setSelectedIndex(0);
|
||||
orderType.clear();
|
||||
getData().filterParamsChange();
|
||||
// nav.adjustNaviBar();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* 添加按钮
|
||||
*/
|
||||
class AddButton extends Button implements ClickListener {
|
||||
|
||||
public AddButton(String html) {
|
||||
super(html);
|
||||
this.setStyleName("mmp_addbutton");
|
||||
this.addClickListener(this);
|
||||
}
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
// 添加查询条件
|
||||
String customerCodes = customer.getText().trim();
|
||||
String orderCodes = orderCode.getText().trim();
|
||||
int index = orderType.getSelectedIndex();
|
||||
String orderTypes = "";
|
||||
if(index > 0) {
|
||||
orderTypes = orderType.getValue(index);
|
||||
}
|
||||
if(addButtonClick(customerCodes,orderCodes,orderTypes)) {
|
||||
getData().setCurrentPage(1);
|
||||
getData().filterParamsChange(MonitorConstant.FILTER_CURRENT_PAGE_NUM, new Long(getData().getCurrentPage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean addButtonClick(String customerCodes,String orderCodes,String orderTypes){
|
||||
boolean hasParamsToAdd = false;
|
||||
|
||||
if(!StringUtils.isEmpty(customerCodes)) {
|
||||
if(!((List)getData().getFilterParams().get(MonitorConstant.FILTER_CUSTOMER_CODE_INCLUDE)).contains(customerCodes)) {
|
||||
((List)getData().getFilterParams().get(MonitorConstant.FILTER_CUSTOMER_CODE_INCLUDE)).add(customerCodes);
|
||||
((List)getData().getFilterParams().get(MonitorConstant.FILTER_CUSTOMER_CODE_EXCLUDE)).remove(customerCodes);
|
||||
hasParamsToAdd = true;
|
||||
}
|
||||
}
|
||||
if(!StringUtils.isEmpty(orderCodes)) {
|
||||
if(!((List)getData().getFilterParams().get(MonitorConstant.FILTER_ORDER_CODE_INCLUDE)).contains(orderCodes)) {
|
||||
((List)getData().getFilterParams().get(MonitorConstant.FILTER_ORDER_CODE_INCLUDE)).add(orderCodes);
|
||||
((List)getData().getFilterParams().get(MonitorConstant.FILTER_ORDER_CODE_EXCLUDE)).remove(orderCodes);
|
||||
hasParamsToAdd = true;
|
||||
}
|
||||
}
|
||||
if(!StringUtils.isEmpty(orderTypes)) {
|
||||
if(!((List)getData().getFilterParams().get(MonitorConstant.FILTER_ORDER_TYPE_CODE)).contains(orderTypes)) {
|
||||
((List)getData().getFilterParams().get(MonitorConstant.FILTER_ORDER_TYPE_CODE)).add(orderTypes);
|
||||
hasParamsToAdd = true;
|
||||
}
|
||||
}
|
||||
return hasParamsToAdd;
|
||||
}
|
||||
|
||||
public MyFocusePanel getSourceEventPanel() {
|
||||
return sourceEventPanel;
|
||||
}
|
||||
|
||||
public void setSourceEventPanel(MyFocusePanel sourceEventPanel) {
|
||||
this.sourceEventPanel = sourceEventPanel;
|
||||
}
|
||||
|
||||
public void loadData(){
|
||||
getData().loadData();
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
loadData();
|
||||
}
|
||||
|
||||
public void customerizedInit(){
|
||||
getData().customerizedInit();
|
||||
}
|
||||
|
||||
public void cancelTimer() {
|
||||
getData().cancelTimer();
|
||||
}
|
||||
|
||||
public void userFinalize() {
|
||||
getData().cancelTimer();
|
||||
}
|
||||
|
||||
class NavigateBar extends HorizontalPanel {
|
||||
|
||||
/** 上一页 */
|
||||
private PageingImage prePage;
|
||||
/** 下一页 */
|
||||
private PageingImage nextPage;
|
||||
/** 跳转 */
|
||||
private PageingImage jump;
|
||||
/** 跳转输入框 */
|
||||
private TextBox num;
|
||||
/** 当前页提示 */
|
||||
private HTML notice;
|
||||
|
||||
public NavigateBar() {
|
||||
super();
|
||||
this.setStyleName("mmp_navgatebar");
|
||||
this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
|
||||
this.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
prePage = new PageingImage(LocaleUtils.getTextWithoutException("previousPage")) {
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
if(getData().getCurrentPage() < 2) {
|
||||
return;
|
||||
}
|
||||
getData().addCurrentPage(-1);
|
||||
getData().filterParamsChange(MonitorConstant.FILTER_CURRENT_PAGE_NUM, new Integer(getData().getCurrentPage()));
|
||||
adjustNaviBar();
|
||||
}
|
||||
|
||||
public void onMouseMove(Widget sender, int x, int y) {
|
||||
if(getData().getCurrentPage() < 2) {
|
||||
return;
|
||||
}
|
||||
this.setImageName("icon_prev_over.gif");
|
||||
}
|
||||
|
||||
public void onMouseLeave(Widget sender) {
|
||||
if(getData().getCurrentPage() < 2) {
|
||||
return;
|
||||
}
|
||||
this.setImageName("icon_prev.gif");
|
||||
}
|
||||
};
|
||||
prePage.setImageName("icon_prev_disable.gif");
|
||||
nextPage = new PageingImage(LocaleUtils.getTextWithoutException("nextPage")) {
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
if(getData().getCurrentPage() == getData().getTotalPage()) {
|
||||
return;
|
||||
}
|
||||
getData().addCurrentPage(1);
|
||||
getData().filterParamsChange(MonitorConstant.FILTER_CURRENT_PAGE_NUM, new Integer(getData().getCurrentPage()));
|
||||
// adjustNaviBar();
|
||||
}
|
||||
|
||||
public void onMouseMove(Widget sender, int x, int y) {
|
||||
if(getData().getCurrentPage() == getData().getTotalPage()) {
|
||||
return;
|
||||
}
|
||||
this.setImageName("icon_next_over.gif");
|
||||
}
|
||||
|
||||
public void onMouseLeave(Widget sender) {
|
||||
if(getData().getCurrentPage() == getData().getTotalPage()) {
|
||||
return;
|
||||
}
|
||||
this.setImageName("icon_next.gif");
|
||||
}
|
||||
};
|
||||
nextPage.setImageName("icon_next_disable.gif");
|
||||
jump = new PageingImage(LocaleUtils.getTextWithoutException("GO")) {
|
||||
|
||||
public void onClick(Widget sender) {
|
||||
int val = 0 ;
|
||||
try {
|
||||
val = Integer.valueOf(num.getText()).intValue();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
if( val < 1 || val > getData().getTotalPage()) {
|
||||
Window.alert(LocaleUtils.getTextWithoutException("jumpto.num.range")+getData().getTotalPage()+"!");
|
||||
num.setText("");
|
||||
return;
|
||||
}
|
||||
getData().setCurrentPage(val);
|
||||
getData().filterParamsChange(MonitorConstant.FILTER_CURRENT_PAGE_NUM, new Integer(getData().getCurrentPage()));
|
||||
// adjustNaviBar();
|
||||
}
|
||||
|
||||
public void onMouseMove(Widget sender, int x, int y) {
|
||||
this.setImageName("icon_go_over.gif");
|
||||
}
|
||||
|
||||
public void onMouseLeave(Widget sender) {
|
||||
this.setImageName("icon_go.gif");
|
||||
}
|
||||
};
|
||||
jump.setImageName("icon_go.gif");
|
||||
|
||||
num = new TextBox();
|
||||
notice = new HTML();
|
||||
notice.setText("1/1");
|
||||
this.add(prePage);
|
||||
this.add(notice);
|
||||
this.add(nextPage);
|
||||
this.add(new HTML(" "));
|
||||
this.add(new HTML(LocaleUtils.getTextWithoutException("jumpto")));
|
||||
this.add(num);
|
||||
num.setStyleName("input1");
|
||||
this.add(new HTML(LocaleUtils.getTextWithoutException("page")));
|
||||
this.add(jump);
|
||||
|
||||
}
|
||||
|
||||
// public void adjustNaviBar() {
|
||||
// this.notice.setText(getData().getCurrentPage() + "/" + getData().getTotalPage());
|
||||
// }
|
||||
|
||||
/**
|
||||
* 查询数据之后对导航按钮进行调整
|
||||
*/
|
||||
public void adjustNaviBar() {
|
||||
|
||||
notice.setText(getData().getCurrentPage() + "/" + getData().getTotalPage());
|
||||
if(getData().getTotalPage() <= 1){
|
||||
nextPage.setImageName("icon_next_disable.gif");
|
||||
prePage.setImageName("icon_prev_disable.gif");
|
||||
return;
|
||||
}
|
||||
if(getData().getCurrentPage() == getData().getTotalPage()){
|
||||
nextPage.setImageName("icon_next_disable.gif");
|
||||
prePage.setImageName("icon_prev.gif");
|
||||
return;
|
||||
}
|
||||
if(getData().getCurrentPage() == 1){
|
||||
nextPage.setImageName("icon_next.gif");
|
||||
prePage.setImageName("icon_prev_disable.gif");
|
||||
return;
|
||||
}
|
||||
nextPage.setImageName("icon_next.gif");
|
||||
prePage.setImageName("icon_prev.gif");
|
||||
}
|
||||
|
||||
abstract class PageingImage extends Image implements ClickListener, MouseListener {
|
||||
|
||||
public String prefix = "images/";
|
||||
|
||||
public PageingImage(String title) {
|
||||
super();
|
||||
this.addClickListener(this);
|
||||
this.addMouseListener(this);
|
||||
this.setStyleName("mmp_navi_img");
|
||||
this.setTitle(title);
|
||||
}
|
||||
|
||||
public void setImageName(String name) {
|
||||
this.setUrl(prefix+name);
|
||||
}
|
||||
|
||||
public void onMouseDown(Widget sender, int x, int y) {}
|
||||
|
||||
public void onMouseEnter(Widget sender) {}
|
||||
|
||||
public void onMouseUp(Widget sender, int x, int y) {}
|
||||
}
|
||||
}
|
||||
|
||||
public void onPageUnselected() {
|
||||
getData().cancelTimer();
|
||||
}
|
||||
|
||||
private void initMonitorPanel(){
|
||||
content = new MonitorPanel(this);
|
||||
}
|
||||
|
||||
public void initData(){
|
||||
data = new MonitorDataAccessor(this);
|
||||
}
|
||||
|
||||
public void doDispath(String message){
|
||||
if(message.equals(DATA_CHANGE)){
|
||||
adjustNavigateBar(getData().getMonitorData());
|
||||
dataChange(getData().getMonitorList());
|
||||
}
|
||||
}
|
||||
|
||||
public MonitorDataAccessor getData(){
|
||||
return (MonitorDataAccessor)super.getData();
|
||||
}
|
||||
|
||||
class MonitorPanel extends VerticalPanel implements IMessagePage{
|
||||
|
||||
public MonitorPanel(IMessagePage page){
|
||||
super();
|
||||
page.register(this);
|
||||
}
|
||||
public void doDispath(String message) {
|
||||
|
||||
}
|
||||
|
||||
public DataAccessor getData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void register(IMessagePage widget) {
|
||||
|
||||
}
|
||||
public boolean remove(IMessagePage widget) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.dev.stms.client.page.monitor;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
public interface MonitorConstant {
|
||||
|
||||
/** 一页显示的行数 */
|
||||
public static String FILTER_DISPLAY_ROW_COUNT = "FILTER_DISPLAY_ROW_COUNT";
|
||||
/** 当前页数 */
|
||||
public static String FILTER_CURRENT_PAGE_NUM = "FILTER_CURRENT_PAGE_NUM";
|
||||
/** 只显示异常订单 */
|
||||
public static String FILTER_SHOW_ABNORMAL_ONLY = "FILTER_SHOW_ABNORMAL_ONLY";
|
||||
/** 要显示的客户代码 */
|
||||
public static String FILTER_CUSTOMER_CODE_INCLUDE = "FILTER_CUSTOMER_CODE_INCLUDE";
|
||||
/** 不显示的客户代码 */
|
||||
public static String FILTER_CUSTOMER_CODE_EXCLUDE = "FILTER_CUSTOMER_CODE_EXCLUDE";
|
||||
/** 要显示的订单代码 */
|
||||
public static String FILTER_ORDER_CODE_INCLUDE = "FILTER_ORDER_CODE_INCLUDE";
|
||||
/** 不显示的订单代码 */
|
||||
public static String FILTER_ORDER_CODE_EXCLUDE = "FILTER_ORDER_CODE_EXCLUDE";
|
||||
/** 要显示的订单类型代码 */
|
||||
public static String FILTER_ORDER_TYPE_CODE = "FILTER_ORDER_TYPE_CODE";
|
||||
/** 查询全部或者按条件查询 */
|
||||
public static String FILTER_CONDITION_TYPE = "FILTER_CONDITION_TYPE";
|
||||
|
||||
public static String IS_QUERY_ORDER_TYPE = "IS_QUERY_ORDER_TYPE";
|
||||
|
||||
public static int DEFAULT_TIME_INTERVAL = 15000 , DEFAULT_DISPLAY_COUNT = 11;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,768 @@
|
|||
package com.dev.stms.client.page.monitor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.ScrollPanel;
|
||||
import com.google.gwt.user.client.ui.TabPanel;
|
||||
import com.google.gwt.user.client.ui.TextArea;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.dev.stms.client.page.model.CustomShipment;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.TransimissibleOrder;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.TransimissibleOrderDetail;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.TransmissibleOrderMonitorDetail;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.TransmissibleOrderMonitorLog;
|
||||
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.utils.LocaleUtils;
|
||||
import com.dev.energy.client.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 查看订单详情页面
|
||||
* @author dev
|
||||
* @version $Id: ShowOrderDetailPage.java,v 1.5 2009/02/24 06:47:32 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class ShowOrderDetailPage extends BaseCustomPopupTemplate
|
||||
implements IsSerializable{
|
||||
|
||||
/** 用于显示订单明细 */
|
||||
transient FlexTable orderDetailPanel;
|
||||
|
||||
/** 用于定位日志 */
|
||||
transient FlexTable orderMonitorPanel;
|
||||
|
||||
/** 用于定位日志 */
|
||||
transient FlexTable orderMonitorLogPanel;
|
||||
/** 用于配载信息 */
|
||||
transient FlexTable shipmentPanel;
|
||||
transient FlexTable orderPanel;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
transient TabPanel tp;
|
||||
|
||||
transient TextBox t01 ;
|
||||
transient TextBox t03 ;
|
||||
transient TextBox t05 ;
|
||||
transient TextBox t07 ;
|
||||
transient TextBox t09 ;
|
||||
transient TextBox t11 ;
|
||||
transient TextBox t13 ;
|
||||
transient TextBox t15 ;
|
||||
transient TextBox t17 ;
|
||||
transient TextBox t19 ;
|
||||
transient TextBox t21 ;
|
||||
transient TextBox t23 ;
|
||||
transient TextBox t25 ;
|
||||
transient TextBox t27 ;
|
||||
transient TextBox t31 ;
|
||||
transient TextBox t33 ;
|
||||
transient TextBox t35 ;
|
||||
transient TextBox t37 ;
|
||||
transient TextBox t39 ;
|
||||
transient TextBox t51 ;
|
||||
transient TextBox t53 ;
|
||||
transient TextBox t55 ;
|
||||
transient TextBox t57 ;
|
||||
transient TextBox t59 ;
|
||||
transient TextBox t61 ;
|
||||
transient TextBox t63 ;
|
||||
transient TextBox t65 ;
|
||||
transient TextBox t81 ;
|
||||
transient TextBox t83 ;
|
||||
transient TextBox t85 ;
|
||||
transient TextBox t87 ;
|
||||
transient TextBox t89 ;
|
||||
transient TextBox t91 ;
|
||||
transient TextBox t93 ;
|
||||
transient TextBox t95 ;
|
||||
transient TextArea ta ;
|
||||
|
||||
public String getTitle() {
|
||||
return LocaleUtils.getText("showOrderDetailPage");
|
||||
}
|
||||
|
||||
public void draw(VerticalPanel content) {
|
||||
t01 = new TextBox();
|
||||
t03 = new TextBox();
|
||||
t05 = new TextBox();
|
||||
t07 = new TextBox();
|
||||
t09 = new TextBox();
|
||||
t11 = new TextBox();
|
||||
t13 = new TextBox();
|
||||
t15 = new TextBox();
|
||||
t17 = new TextBox();
|
||||
t19 = new TextBox();
|
||||
t21 = new TextBox();
|
||||
t23 = new TextBox();
|
||||
t25 = new TextBox();
|
||||
t27 = new TextBox();
|
||||
t31 = new TextBox();
|
||||
t33 = new TextBox();
|
||||
t35 = new TextBox();
|
||||
t37 = new TextBox();
|
||||
t39 = new TextBox();
|
||||
t51 = new TextBox();
|
||||
t53 = new TextBox();
|
||||
t55 = new TextBox();
|
||||
t57 = new TextBox();
|
||||
t59 = new TextBox();
|
||||
t61 = new TextBox();
|
||||
t63 = new TextBox();
|
||||
t65 = new TextBox();
|
||||
t81 = new TextBox();
|
||||
t83 = new TextBox();
|
||||
t85 = new TextBox();
|
||||
t87 = new TextBox();
|
||||
t89 = new TextBox();
|
||||
t91 = new TextBox();
|
||||
t93 = new TextBox();
|
||||
t95 = new TextBox();
|
||||
ta = new TextArea();
|
||||
ta.setVisibleLines(2);
|
||||
ta.setWidth("100%");
|
||||
content.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
|
||||
content.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
|
||||
content.setStyleName("sodp_container");
|
||||
width = Window.getClientWidth() - 200;
|
||||
height = Window.getClientHeight() - 150;
|
||||
content.setWidth(width +"px");
|
||||
content.setHeight(height +"px");
|
||||
Widget w = getOrderInfoPanel();
|
||||
content.add(w);
|
||||
content.setCellHeight(w,"200px");
|
||||
w = getSubOrderInfoPanel();
|
||||
content.add(w);
|
||||
content.setCellHeight(w, "100%");
|
||||
}
|
||||
public void initData() {
|
||||
asynGetData();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示Order信息
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderInfoPanel(){
|
||||
orderPanel = new MyFlexTable();
|
||||
orderPanel.setWidth("100%");
|
||||
orderPanel.setStyleName("sodp_orderpanel");
|
||||
orderPanel.setText(0, 0, LocaleUtils.getTextWithoutException("order.code") + ":");
|
||||
orderPanel.setWidget(0, 1, t01);
|
||||
orderPanel.setText(0, 2, LocaleUtils.getTextWithoutException("order.orderDate") + ":");
|
||||
orderPanel.setWidget(0, 3, t03);
|
||||
orderPanel.setText(0, 4, LocaleUtils.getTextWithoutException("order.orderType") + ":");
|
||||
orderPanel.setWidget(0, 5, t05);
|
||||
orderPanel.setText(0, 6, LocaleUtils.getTextWithoutException("order.fromLocation") + ":");
|
||||
orderPanel.setWidget(0, 7, t07);
|
||||
orderPanel.setText(0, 8, LocaleUtils.getTextWithoutException("order.toLocation") + ":");
|
||||
orderPanel.setWidget(0, 9, t09);
|
||||
orderPanel.setText(1, 0, LocaleUtils.getTextWithoutException("order.priority") + ":");
|
||||
orderPanel.setWidget(1, 1, t11);
|
||||
// orderPanel.setText(1, 0, LocaleUtils.getTextWithoutException("order.carrier") + ":");
|
||||
// orderPanel.setHTML(1, 1, t1);
|
||||
orderPanel.setText(1, 2, LocaleUtils.getTextWithoutException("order.consignor") + ":");
|
||||
orderPanel.setWidget(1, 3, t13);
|
||||
orderPanel.setText(1, 4, LocaleUtils.getTextWithoutException("order.shipmentType") + ":");
|
||||
orderPanel.setWidget(1, 5, t15);
|
||||
orderPanel.setText(1, 6, LocaleUtils.getTextWithoutException("order.shipmentMethod") + ":");
|
||||
orderPanel.setWidget(1, 7, t17);
|
||||
orderPanel.setText(1, 8, LocaleUtils.getTextWithoutException("order.loading") + ":");
|
||||
orderPanel.setWidget(1, 9, t19);
|
||||
orderPanel.setText(2, 0, LocaleUtils.getTextWithoutException("order.planLeaveTime") + ":");
|
||||
orderPanel.setWidget(2, 1, t21);
|
||||
orderPanel.setText(2, 2, LocaleUtils.getTextWithoutException("order.leaveTime") + ":");
|
||||
orderPanel.setWidget(2, 3, t23);
|
||||
orderPanel.setText(2, 4, LocaleUtils.getTextWithoutException("order.planArriveTime") + ":");
|
||||
orderPanel.setWidget(2, 5, t25);
|
||||
orderPanel.setText(2, 6, LocaleUtils.getTextWithoutException("order.arriveTime") + ":");
|
||||
orderPanel.setWidget(2, 7, t27);
|
||||
orderPanel.setText(3, 0, LocaleUtils.getTextWithoutException("order.weight") + ":");
|
||||
orderPanel.setWidget(3, 1, t31);
|
||||
orderPanel.setText(3, 2, LocaleUtils.getTextWithoutException("order.volume") + ":");
|
||||
orderPanel.setWidget(3, 3, t33);
|
||||
orderPanel.setText(3, 4, LocaleUtils.getTextWithoutException("order.quantity") + ":");
|
||||
orderPanel.setWidget(3, 5, t35);
|
||||
orderPanel.setText(3, 6, LocaleUtils.getTextWithoutException("order.relateBill1") + ":");
|
||||
orderPanel.setWidget(3, 7, t37);
|
||||
orderPanel.setText(3, 8, LocaleUtils.getTextWithoutException("order.relateBill2") + ":");
|
||||
orderPanel.setWidget(3, 9, t39);
|
||||
|
||||
orderPanel.setHTML(4, 0, "<hr width='98%' size='1'>");
|
||||
orderPanel.getFlexCellFormatter().setColSpan(4, 0, 10);
|
||||
//发货方
|
||||
orderPanel.setText(5, 0, LocaleUtils.getTextWithoutException("order.fromCode") + ":");
|
||||
orderPanel.setWidget(5, 1, t51);
|
||||
orderPanel.setText(5, 2, LocaleUtils.getTextWithoutException("order.fromName") + ":");
|
||||
orderPanel.setWidget(5, 3, t53);
|
||||
orderPanel.setText(5, 4, LocaleUtils.getTextWithoutException("contact.linkman") + ":");
|
||||
orderPanel.setWidget(5, 5, t55);
|
||||
orderPanel.setText(5, 6, LocaleUtils.getTextWithoutException("contact.phone") + ":");
|
||||
orderPanel.setWidget(5, 7, t57);
|
||||
orderPanel.setText(5, 8, LocaleUtils.getTextWithoutException("contact.fax") + ":");
|
||||
orderPanel.setWidget(5, 9, t59);
|
||||
orderPanel.setText(6, 0, LocaleUtils.getTextWithoutException("contact.address") + ":");
|
||||
orderPanel.setWidget(6, 1, t61);
|
||||
orderPanel.getFlexCellFormatter().setColSpan(6, 1, 3);
|
||||
orderPanel.setText(6, 2, LocaleUtils.getTextWithoutException("contact.postcode") + ":");
|
||||
orderPanel.setWidget(6, 3, t63);
|
||||
orderPanel.setText(6, 4, LocaleUtils.getTextWithoutException("contact.email") + ":");
|
||||
orderPanel.setWidget(6, 5, t65);
|
||||
|
||||
orderPanel.setHTML(7, 0, "<hr width='98%' size='1'>");
|
||||
orderPanel.getFlexCellFormatter().setColSpan(7, 0, 10);
|
||||
//收货方
|
||||
orderPanel.setText(8, 0, LocaleUtils.getTextWithoutException("order.toCode") + ":");
|
||||
orderPanel.setWidget(8, 1, t81);
|
||||
orderPanel.setText(8, 2, LocaleUtils.getTextWithoutException("order.toName") + ":");
|
||||
orderPanel.setWidget(8, 3, t83);
|
||||
orderPanel.setText(8, 4, LocaleUtils.getTextWithoutException("contact.linkman") + ":");
|
||||
orderPanel.setWidget(8, 5, t85);
|
||||
orderPanel.setText(8, 6, LocaleUtils.getTextWithoutException("contact.phone") + ":");
|
||||
orderPanel.setWidget(8, 7, t87);
|
||||
orderPanel.setText(8, 8, LocaleUtils.getTextWithoutException("contact.fax") + ":");
|
||||
orderPanel.setWidget(8, 9, t89);
|
||||
orderPanel.setText(9, 0, LocaleUtils.getTextWithoutException("contact.address") + ":");
|
||||
orderPanel.setWidget(9, 1, t91);
|
||||
orderPanel.getFlexCellFormatter().setColSpan(9, 1, 3);
|
||||
orderPanel.setText(9, 2, LocaleUtils.getTextWithoutException("contact.postcode") + ":");
|
||||
orderPanel.setWidget(9, 3, t93);
|
||||
orderPanel.setText(9, 4, LocaleUtils.getTextWithoutException("contact.email") + ":");
|
||||
orderPanel.setWidget(9, 5, t95);
|
||||
orderPanel.setText(10, 0, LocaleUtils.getTextWithoutException("order.description") + ":");
|
||||
orderPanel.setWidget(10, 1, ta);
|
||||
orderPanel.getFlexCellFormatter().setColSpan(10, 1, 9);
|
||||
|
||||
for(int i = 0 ; i < orderPanel.getCellCount(0); i++) {
|
||||
if( i%2 == 0) {
|
||||
orderPanel.getColumnFormatter().setStyleName(i,"sodp_order_title");
|
||||
} else {
|
||||
orderPanel.getColumnFormatter().setStyleName(i,"sodp_order_content");
|
||||
}
|
||||
}
|
||||
|
||||
return orderPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示Order相关信息的容器
|
||||
* @return
|
||||
*/
|
||||
protected Widget getSubOrderInfoPanel(){
|
||||
tp = new TabPanel();
|
||||
tp.setWidth("98%");
|
||||
tp.setHeight("100%");
|
||||
tp.setStyleName("sodp_sub");
|
||||
tp.add(getOrderDetailInfoPanel(), LocaleUtils.getText("log.order.detail"));
|
||||
tp.add(getShipmentInfoPanel(), LocaleUtils.getText("log.shipment"));
|
||||
tp.add(getOrderMonitorInfoPanel(), LocaleUtils.getText("log.ordermonitor"));
|
||||
tp.add(getOrderMonitorLogInfoPanel(), LocaleUtils.getText("log.handle.log"));
|
||||
return tp;
|
||||
}
|
||||
|
||||
/**
|
||||
* orderDetail
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderDetailInfoPanel(){
|
||||
VerticalPanel vOrderDetailPanel = new VerticalPanel();
|
||||
vOrderDetailPanel.setWidth("100%");
|
||||
vOrderDetailPanel.setHeight("100%");
|
||||
vOrderDetailPanel.add(getOrderDetailTitle());
|
||||
Widget w = getScrollOrderDetailPanel();
|
||||
vOrderDetailPanel.add(w);
|
||||
vOrderDetailPanel.setCellHeight(w, "100%");
|
||||
return vOrderDetailPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得明细表格头
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderDetailTitle() {
|
||||
HorizontalPanel title = new HorizontalPanel();
|
||||
title.setStyleName("sodp_title");
|
||||
title.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
|
||||
title.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
title.setWidth("100%");
|
||||
HTML html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.lineNo"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "4%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("product.code"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "9%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("product.name"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "9%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.lot"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "9%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.serial"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "9%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.unit"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "8%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.quantity"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "8%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.volume"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "8%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.weight"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "8%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.pickedQuantity"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "7%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.putawayQuantity"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "7%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.receivedQuantity"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "7%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderDetail.shipedQuantity"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "7%");
|
||||
html = new HTML(" ");
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "30");
|
||||
DOM.setElementProperty(DOM.getParent(html.getElement()), "className", "noborder");
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细展示
|
||||
* @return
|
||||
*/
|
||||
protected Widget getScrollOrderDetailPanel() {
|
||||
ScrollPanel sp = new ScrollPanel();
|
||||
sp.setStyleName("sodp_orderdetailpanel");
|
||||
sp.setWidth("100%");
|
||||
sp.setHeight("260px");
|
||||
DOM.setStyleAttribute(sp.getElement(), "overflowY", "scroll");
|
||||
orderDetailPanel = new MyFlexTable();
|
||||
orderDetailPanel.setWidth("100%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 0, "4%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 1, "9%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 2, "9%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 3, "9%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 4, "9%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 5, "8%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 6, "8%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 7, "8%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 8, "8%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 9, "7%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 10, "7%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 11, "7%");
|
||||
orderDetailPanel.getCellFormatter().setWidth(0, 12, "7%");
|
||||
sp.setWidget(orderDetailPanel);
|
||||
return sp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配载明细
|
||||
* @return
|
||||
*/
|
||||
protected Widget getShipmentInfoPanel(){
|
||||
VerticalPanel orderDetailPanel = new VerticalPanel();
|
||||
orderDetailPanel.setWidth("100%");
|
||||
orderDetailPanel.setHeight("100%");
|
||||
orderDetailPanel.add(getShipmentTitle());
|
||||
Widget w = getScrollShipmentPanel();
|
||||
orderDetailPanel.add(w);
|
||||
orderDetailPanel .setCellHeight(w, "100%");
|
||||
return orderDetailPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得配载表格头
|
||||
* @return
|
||||
*/
|
||||
protected Widget getShipmentTitle() {
|
||||
HorizontalPanel title = new HorizontalPanel();
|
||||
title.setStyleName("sodp_title");
|
||||
title.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
|
||||
title.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
title.setWidth("100%");
|
||||
|
||||
HTML html = new HTML(LocaleUtils.getTextWithoutException("shipment.code"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("shipment.carrier"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("shipment.driver"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("shipment.toLocation"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("shipment.quantity"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "12%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("shipment.volume"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "14%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("shipment.weight"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "14%");
|
||||
html = new HTML(" ");
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "30");
|
||||
DOM.setElementProperty(DOM.getParent(html.getElement()), "className", "noborder");
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配载展示
|
||||
* @return
|
||||
*/
|
||||
protected Widget getScrollShipmentPanel() {
|
||||
ScrollPanel sp = new ScrollPanel();
|
||||
sp.setStyleName("sodp_shipmentpanel");
|
||||
sp.setWidth("100%");
|
||||
sp.setHeight("260px");
|
||||
DOM.setStyleAttribute(sp.getElement(), "overflowY", "scroll");
|
||||
shipmentPanel = new MyFlexTable();
|
||||
shipmentPanel.setWidth("100%");
|
||||
|
||||
shipmentPanel.getCellFormatter().setWidth(0, 0, "15%");
|
||||
shipmentPanel.getCellFormatter().setWidth(0, 1, "15%");
|
||||
shipmentPanel.getCellFormatter().setWidth(0, 2, "15%");
|
||||
shipmentPanel.getCellFormatter().setWidth(0, 3, "15%");
|
||||
shipmentPanel.getCellFormatter().setWidth(0, 4, "12%");
|
||||
shipmentPanel.getCellFormatter().setWidth(0, 5, "14%");
|
||||
// shipmentPanel.getCellFormatter().setWidth(0, 6, "14%");
|
||||
sp.setWidget(shipmentPanel);
|
||||
return sp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示Order相关信息的右边容器(PositionLog信息)
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderMonitorInfoPanel(){
|
||||
VerticalPanel orderDetailPanel = new VerticalPanel();
|
||||
orderDetailPanel.setWidth("100%");
|
||||
orderDetailPanel.setHeight("100%");
|
||||
orderDetailPanel.setStyleName("sodp_subrightpanel");
|
||||
orderDetailPanel.add(getOrderMonitorTitle());
|
||||
Widget w = getScrollOrderMonitorPanel();
|
||||
orderDetailPanel.add(w);
|
||||
orderDetailPanel.setCellHeight(w, "100%");
|
||||
return orderDetailPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得配载表格头
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderMonitorTitle() {
|
||||
HorizontalPanel title = new HorizontalPanel();
|
||||
title.setStyleName("sodp_title");
|
||||
title.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
|
||||
title.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
title.setWidth("100%");
|
||||
HTML html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.node"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "10%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.position"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "10%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.shipmentMethod"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "13%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.planTime"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.recordTime"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "13%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.recordPlace"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "13%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.delayTime"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "13%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitor.status"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "13%");
|
||||
html = new HTML(" ");
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "30");
|
||||
DOM.setElementProperty(DOM.getParent(html.getElement()), "className", "noborder");
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配载展示
|
||||
* @return
|
||||
*/
|
||||
protected Widget getScrollOrderMonitorPanel() {
|
||||
ScrollPanel sp = new ScrollPanel();
|
||||
sp.setStyleName("sodp_ordermonitorpanel");
|
||||
sp.setWidth("100%");
|
||||
sp.setHeight("260px");
|
||||
DOM.setStyleAttribute(sp.getElement(), "overflowY", "scroll");
|
||||
orderMonitorPanel = new MyFlexTable();
|
||||
orderMonitorPanel.setWidth("100%");
|
||||
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 0, "10%");
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 1, "10%");
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 2, "13%");
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 3, "15%");
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 4, "13%");
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 5, "13%");
|
||||
orderMonitorPanel.getCellFormatter().setWidth(0, 6, "13%");
|
||||
// orderMonitorPanel.getCellFormatter().setWidth(0, 7, "13%");
|
||||
// orderMonitorPanel.getCellFormatter().setWidth(0, 8, "30%");
|
||||
sp.setWidget(orderMonitorPanel);
|
||||
return sp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示Order相关信息的异常日志(OrderMonitorHandleLog信息)
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderMonitorLogInfoPanel(){
|
||||
VerticalPanel orderDetailPanel = new VerticalPanel();
|
||||
orderDetailPanel.setWidth("100%");
|
||||
orderDetailPanel.setHeight("100%");
|
||||
orderDetailPanel.setStyleName("sodp_subrightpanel");
|
||||
orderDetailPanel.add(getOrderMonitorLogTitle());
|
||||
Widget w = getScrollOrderMonitorLogPanel();
|
||||
orderDetailPanel.add(w);
|
||||
orderDetailPanel.setCellHeight(w, "100%");
|
||||
return orderDetailPanel;
|
||||
}
|
||||
/**
|
||||
* 获得异常日志表格头
|
||||
* @return
|
||||
*/
|
||||
protected Widget getOrderMonitorLogTitle() {
|
||||
HorizontalPanel title = new HorizontalPanel();
|
||||
title.setStyleName("sodp_title");
|
||||
title.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
|
||||
title.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
title.setWidth("100%");
|
||||
HTML html = new HTML(LocaleUtils.getTextWithoutException("log.orderMonitorPlace"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("log.orderMonitorNode"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitorHandleLog.recordTime"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitorHandleLog.min"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "15%");
|
||||
html = new HTML(LocaleUtils.getTextWithoutException("orderMonitorHandleLog.description"));
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "40%");
|
||||
html = new HTML(" ");
|
||||
title.add(html);
|
||||
title.setCellWidth(html, "30");
|
||||
DOM.setElementProperty(DOM.getParent(html.getElement()), "className", "noborder");
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异常日志展示
|
||||
* @return
|
||||
*/
|
||||
protected Widget getScrollOrderMonitorLogPanel() {
|
||||
ScrollPanel sp = new ScrollPanel();
|
||||
sp.setStyleName("sodp_ordermonitorpanel");
|
||||
sp.setWidth("100%");
|
||||
sp.setHeight("260px");
|
||||
DOM.setStyleAttribute(sp.getElement(), "overflowY", "scroll");
|
||||
orderMonitorLogPanel = new MyFlexTable();
|
||||
orderMonitorLogPanel.setWidth("100%");
|
||||
|
||||
orderMonitorLogPanel.getCellFormatter().setWidth(0, 0, "15%");
|
||||
orderMonitorLogPanel.getCellFormatter().setWidth(0, 1, "15%");
|
||||
orderMonitorLogPanel.getCellFormatter().setWidth(0, 2, "15%");
|
||||
orderMonitorLogPanel.getCellFormatter().setWidth(0, 3, "15%");
|
||||
orderMonitorLogPanel.getCellFormatter().setWidth(0, 4, "40%");
|
||||
sp.setWidget(orderMonitorLogPanel);
|
||||
return sp;
|
||||
}
|
||||
/** 从后台获取页面所有数据,用于修改装运单,参考参数entity的ID **/
|
||||
protected void asynGetData(){
|
||||
AsyncCallBackAdapter callBack = new AsyncCallBackAdapter(){
|
||||
|
||||
protected void exec() {
|
||||
CommitServiceAsync serviceAsync = AjaxServiceUtil.initialAsyncService(ConfigContext.DEFAULT);
|
||||
serviceAsync.executeCustom("orderMonitorManager","getOrderInfo", params,this);
|
||||
}
|
||||
|
||||
public void onSuccess() {
|
||||
Map resultParam = (Map)result;
|
||||
//设置控件值
|
||||
initAllControlKit(resultParam);
|
||||
tp.selectTab(0);
|
||||
}
|
||||
};
|
||||
callBack.exec("");
|
||||
}
|
||||
|
||||
protected void initAllControlKit(Map data) {
|
||||
TransimissibleOrder order = (TransimissibleOrder)data.get("orderInfo");
|
||||
setOrderInfo(order);
|
||||
setOrderDetailInfo(order);
|
||||
setShipmentInfo(order);
|
||||
setOrderMonitorInfo(order);
|
||||
setOrderMonitorLogInfo(order);
|
||||
|
||||
}
|
||||
|
||||
protected void setOrderInfo(TransimissibleOrder order) {
|
||||
t01.setText(order.getCode());
|
||||
t03.setText(order.getOrderDate());
|
||||
t05.setText(order.getOrderType());
|
||||
t07.setText(order.getFromLocation());
|
||||
t09.setText(order.getToLocation());
|
||||
// orderPanel.setHTML(1, 1, order.getCarrier());
|
||||
t11.setText(order.getPriority());
|
||||
t13.setText(order.getConsignor());
|
||||
t15.setText(order.getShipmentType());
|
||||
t17.setText(LocaleUtils.getTextWithoutException("ShipmentMethod."+ order.getShipmentMethod()));
|
||||
t19.setText(LocaleUtils.getTextWithoutException("LoadingType."+ order.getLoading()));
|
||||
t21.setText(order.getPlanLeaveTime());
|
||||
t23.setText(order.getLeaveTime());
|
||||
t25.setText(order.getPlanArriveTime());
|
||||
t27.setText(order.getArriveTime());
|
||||
t31.setText(order.getWeight());
|
||||
t33.setText(order.getVolume());
|
||||
t35.setText(order.getQuantity());
|
||||
t37.setText(order.getRelateBill1());
|
||||
t39.setText(order.getRelateBill2());
|
||||
//发货方
|
||||
t51.setText(order.getFromCode());
|
||||
t53.setText(order.getFromName());
|
||||
t55.setText(order.getFromLinkman());
|
||||
t57.setText(order.getFromPhone());
|
||||
t59.setText(order.getFromFax());
|
||||
t61.setText(order.getFromAddress());
|
||||
orderPanel.getFlexCellFormatter().setColSpan(6, 1, 3);
|
||||
t63.setText(order.getFromPostcode());
|
||||
t65.setText(order.getFromEmail());
|
||||
//收货方
|
||||
t81.setText(order.getToCode());
|
||||
t83.setText(order.getToName());
|
||||
t85.setText(order.getToLinkman());
|
||||
t87.setText(order.getToPhone());
|
||||
t89.setText(order.getToFax());
|
||||
t91.setText(order.getToAddress());
|
||||
orderPanel.getFlexCellFormatter().setColSpan(9, 1, 3);
|
||||
t93.setText(order.getToPostcode());
|
||||
t95.setText(order.getToEmail());
|
||||
ta.setText(order.getDescription());
|
||||
}
|
||||
protected void setOrderDetailInfo(TransimissibleOrder order) {
|
||||
|
||||
for (int i = 0; i < order.getDetails().size(); i ++) {
|
||||
TransimissibleOrderDetail detail = (TransimissibleOrderDetail)order.getDetails().get(i);
|
||||
if(i % 2 == 0) {
|
||||
orderDetailPanel.getRowFormatter().setStyleName(i, "odd");
|
||||
} else {
|
||||
orderDetailPanel.getRowFormatter().setStyleName(i, "even");
|
||||
}
|
||||
orderDetailPanel.setHTML(i, 0, detail.getLineNo());
|
||||
orderDetailPanel.setHTML(i, 1, detail.getProductCode());
|
||||
orderDetailPanel.setHTML(i, 2, detail.getProductName());
|
||||
orderDetailPanel.setHTML(i, 3, detail.getLot());
|
||||
orderDetailPanel.setHTML(i, 4, detail.getSerial());
|
||||
orderDetailPanel.setHTML(i, 5, LocaleUtils.getTextWithoutException("ProductPackageUnit." + detail.getUnit()));
|
||||
orderDetailPanel.setHTML(i, 6, detail.getQuantity());
|
||||
orderDetailPanel.setHTML(i, 7, detail.getVolume());
|
||||
orderDetailPanel.setHTML(i, 8, detail.getWeight());
|
||||
orderDetailPanel.setHTML(i, 9, detail.getPickedQuantity());
|
||||
orderDetailPanel.setHTML(i, 10, detail.getPutawayQuantity());
|
||||
orderDetailPanel.setHTML(i, 11, detail.getReceivedQuantity());
|
||||
orderDetailPanel.setHTML(i, 12, detail.getShipedQuantity());
|
||||
}
|
||||
}
|
||||
protected void setShipmentInfo(TransimissibleOrder order) {
|
||||
for (int i = 0; i < order.getShipments().size(); i ++) {
|
||||
if(i % 2 == 0) {
|
||||
shipmentPanel.getRowFormatter().setStyleName(i, "odd");
|
||||
} else {
|
||||
shipmentPanel.getRowFormatter().setStyleName(i, "even");
|
||||
}
|
||||
CustomShipment detail = (CustomShipment)order.getShipments().get(i);
|
||||
shipmentPanel.setHTML(i, 0, detail.getCode());
|
||||
shipmentPanel.setHTML(i, 1, detail.getCusotmCarrier().getName());
|
||||
shipmentPanel.setHTML(i, 2, detail.getCustomVehicle().getMasterDriverName());
|
||||
shipmentPanel.setHTML(i, 3, detail.getToLocation());
|
||||
shipmentPanel.setHTML(i, 4, String.valueOf(detail.getQuantity()));
|
||||
shipmentPanel.setHTML(i, 5, String.valueOf(detail.getVolumn()));
|
||||
shipmentPanel.setHTML(i, 6, String.valueOf(detail.getWeight()));
|
||||
}
|
||||
}
|
||||
protected void setOrderMonitorInfo(TransimissibleOrder order) {
|
||||
if(order.getMonitors() != null) {
|
||||
for (int i = 0; i < order.getMonitors().size(); i ++) {
|
||||
if(i % 2 == 0) {
|
||||
orderMonitorPanel.getRowFormatter().setStyleName(i, "odd");
|
||||
} else {
|
||||
orderMonitorPanel.getRowFormatter().setStyleName(i, "even");
|
||||
}
|
||||
Object obj = order.getMonitors().get(i);
|
||||
if(!(obj instanceof TransmissibleOrderMonitorDetail))
|
||||
continue;
|
||||
TransmissibleOrderMonitorDetail detail = (TransmissibleOrderMonitorDetail)obj;
|
||||
orderMonitorPanel.setHTML(i, 0, detail.getNodeName());
|
||||
orderMonitorPanel.setHTML(i, 1, detail.getTransLocationName());
|
||||
orderMonitorPanel.setHTML(i, 2, LocaleUtils.getTextWithoutException("ShipmentMethod." + detail.getShipmentMethod()));
|
||||
orderMonitorPanel.setHTML(i, 3, detail.getPlanTime());
|
||||
orderMonitorPanel.setHTML(i, 4, detail.getRecordTime());
|
||||
orderMonitorPanel.setHTML(i, 5, detail.getRecordPlace());
|
||||
orderMonitorPanel.setHTML(i, 6, detail.getDelayTime());
|
||||
orderMonitorPanel.setHTML(i, 7, LocaleUtils.getTextWithoutException("OrderMonitorStatus." + detail.getStatus()));
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void setOrderMonitorLogInfo(TransimissibleOrder order) {
|
||||
for (int i = 0; i < order.getLogs().size(); i ++) {
|
||||
if(i % 2 == 0) {
|
||||
orderMonitorLogPanel.getRowFormatter().setStyleName(i, "odd");
|
||||
} else {
|
||||
orderMonitorLogPanel.getRowFormatter().setStyleName(i, "even");
|
||||
}
|
||||
TransmissibleOrderMonitorLog detail = (TransmissibleOrderMonitorLog)order.getLogs().get(i);
|
||||
orderMonitorLogPanel.setHTML(i, 0, detail.getOrderMonitorPlace());
|
||||
orderMonitorLogPanel.setHTML(i, 1, detail.getOrderMonitorNodeName());
|
||||
orderMonitorLogPanel.setHTML(i, 2, detail.getRecordTime());
|
||||
orderMonitorLogPanel.setHTML(i, 3, detail.getMin());
|
||||
orderMonitorLogPanel.setHTML(i, 4, detail.getDescription());
|
||||
}
|
||||
}
|
||||
class MyFlexTable extends FlexTable {
|
||||
public MyFlexTable() {
|
||||
super();
|
||||
}
|
||||
public void setHTML(int row, int column, String html) {
|
||||
if(StringUtils.isEmpty(html)) {
|
||||
html = " ";
|
||||
}
|
||||
super.setHTML(row, column, html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,281 @@
|
|||
package com.dev.stms.client.page.monitor.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.user.client.Timer;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.dev.stms.client.page.monitor.MaintainOrderMonitorPage;
|
||||
import com.dev.stms.client.page.monitor.MonitorConstant;
|
||||
import com.dev.energy.client.data.DataAccessor;
|
||||
import com.dev.energy.client.message.IMessagePage;
|
||||
import com.dev.energy.client.utils.LocaleUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dev
|
||||
* @description
|
||||
*
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class MonitorDataAccessor extends DataAccessor {
|
||||
|
||||
private MonitorData data = new MonitorData();
|
||||
|
||||
public MonitorDataAccessor(IMessagePage page) {
|
||||
super(page);
|
||||
}
|
||||
|
||||
public void loadData(){
|
||||
loadData(null);
|
||||
scheduleRepeating();
|
||||
}
|
||||
|
||||
public void loadData(final Map map){
|
||||
final Map queryMap = new HashMap(getFilterParams());
|
||||
if(map != null) {
|
||||
queryMap.putAll(map);
|
||||
}
|
||||
remoteCall(MaintainOrderMonitorPage.LOAD_DATA, "orderMonitorManager", "getAllOrderMonitorsOrderly", queryMap);
|
||||
}
|
||||
|
||||
public void onFailure(String message, Map result) {
|
||||
Window.alert(LocaleUtils.getText("error"));
|
||||
}
|
||||
|
||||
public void onSuccess(String message, Map result) {
|
||||
if(message.equals(MaintainOrderMonitorPage.LOAD_DATA)){
|
||||
data.update(result);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onTimeOutFailure(String message) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public MonitorData getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(MonitorData data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Map getMonitorData(){
|
||||
return data.getMonitorData();
|
||||
}
|
||||
|
||||
public int getCurrentPage() {
|
||||
return data.getCurrentPage();
|
||||
}
|
||||
|
||||
public void addCurrentPage(int i){
|
||||
setCurrentPage(getCurrentPage() + i);
|
||||
}
|
||||
|
||||
public void setCurrentPage(int currentPage) {
|
||||
data.setCurrentPage(currentPage);
|
||||
}
|
||||
|
||||
public int getRealCount() {
|
||||
return data.getRealCount();
|
||||
}
|
||||
|
||||
public void setRealCount(int realCount) {
|
||||
data.setRealCount(realCount);
|
||||
}
|
||||
|
||||
public int getRefreshInterval() {
|
||||
return data.getRefreshInterval();
|
||||
}
|
||||
|
||||
public void setRefreshInterval(int refreshInterval) {
|
||||
data.setRefreshInterval(refreshInterval);
|
||||
}
|
||||
|
||||
public int getTotalPage() {
|
||||
return data.getTotalPage();
|
||||
}
|
||||
|
||||
public void setTotalPage(int totalPage) {
|
||||
data.setTotalPage(totalPage);
|
||||
}
|
||||
|
||||
public Timer getOnTimeRefresh() {
|
||||
return data.getOnTimeRefresh();
|
||||
}
|
||||
|
||||
public List getMonitorList() {
|
||||
if(data.getMonitorList() == null)
|
||||
return new ArrayList();
|
||||
return data.getMonitorList();
|
||||
}
|
||||
|
||||
public List getOrderTypes() {
|
||||
if(data.getOrderTypes() == null)
|
||||
return new ArrayList();
|
||||
return data.getOrderTypes();
|
||||
}
|
||||
|
||||
public void scheduleRepeating(){
|
||||
data.scheduleRepeating();
|
||||
}
|
||||
|
||||
public void cancelTimer() {
|
||||
data.cancelTimer();
|
||||
}
|
||||
|
||||
public void customerizedInit(){
|
||||
data.customerizedInit();
|
||||
}
|
||||
|
||||
public Map getFilterParams(){
|
||||
return data.getFilterParams();
|
||||
}
|
||||
|
||||
public void put(Object key,Object value){
|
||||
getFilterParams().put(key, value);
|
||||
}
|
||||
|
||||
public void remove(Object key){
|
||||
getFilterParams().remove(key);
|
||||
}
|
||||
|
||||
public void filterParamsChange(Object key,Object value){
|
||||
put(key,value);
|
||||
loadData();
|
||||
}
|
||||
|
||||
public void filterParamsChange(){
|
||||
put(MonitorConstant.FILTER_SHOW_ABNORMAL_ONLY, new Boolean(false));
|
||||
put(MonitorConstant.FILTER_CUSTOMER_CODE_INCLUDE, new ArrayList());
|
||||
put(MonitorConstant.FILTER_CUSTOMER_CODE_EXCLUDE, new ArrayList());
|
||||
put(MonitorConstant.FILTER_ORDER_CODE_INCLUDE, new ArrayList());
|
||||
put(MonitorConstant.FILTER_ORDER_CODE_EXCLUDE, new ArrayList());
|
||||
put(MonitorConstant.FILTER_ORDER_TYPE_CODE, new ArrayList());
|
||||
put(MonitorConstant.FILTER_CURRENT_PAGE_NUM, new Long(1));
|
||||
put(MonitorConstant.FILTER_DISPLAY_ROW_COUNT, new Long(getRealCount()));
|
||||
put(MonitorConstant.IS_QUERY_ORDER_TYPE, new Boolean(true));
|
||||
setCurrentPage(1);
|
||||
loadData();
|
||||
}
|
||||
|
||||
class MonitorData{
|
||||
private Map filterParams = new HashMap();
|
||||
private Map monitorData = new HashMap();
|
||||
private List monitorList = new ArrayList();
|
||||
private List orderTypes = new ArrayList();
|
||||
private int currentPage = 1;
|
||||
private int totalPage = 1;
|
||||
private int refreshInterval = 0;
|
||||
private int realCount;
|
||||
|
||||
/** 定时刷新 */
|
||||
private Timer onTimeRefresh;
|
||||
|
||||
public void update(Map data){
|
||||
this.monitorData = data;
|
||||
monitorList = (List)data.get("orderMonitors");
|
||||
orderTypes = (List)data.get("ordertypes");
|
||||
totalPage = ((Integer)data.get("orderMonitorsPageCount")).intValue();
|
||||
if(currentPage > totalPage) {
|
||||
currentPage = totalPage;
|
||||
}
|
||||
put(MonitorConstant.IS_QUERY_ORDER_TYPE, new Boolean(false));
|
||||
sendMessage(MaintainOrderMonitorPage.DATA_CHANGE);
|
||||
}
|
||||
|
||||
protected void customerizedInit() {
|
||||
|
||||
onTimeRefresh = new Timer() {
|
||||
|
||||
public void run() {
|
||||
loadData();
|
||||
}
|
||||
};
|
||||
onTimeRefresh.scheduleRepeating(refreshInterval);
|
||||
}
|
||||
|
||||
public void scheduleRepeating(){
|
||||
if(onTimeRefresh != null)
|
||||
onTimeRefresh.scheduleRepeating(refreshInterval);
|
||||
}
|
||||
|
||||
public void cancelTimer() {
|
||||
onTimeRefresh.cancel();
|
||||
}
|
||||
|
||||
public int getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(int currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public Map getMonitorData() {
|
||||
return monitorData;
|
||||
}
|
||||
|
||||
public void setMonitorData(Map monitorData) {
|
||||
this.monitorData = monitorData;
|
||||
}
|
||||
|
||||
public int getRealCount() {
|
||||
return realCount;
|
||||
}
|
||||
|
||||
public void setRealCount(int realCount) {
|
||||
this.realCount = realCount;
|
||||
}
|
||||
|
||||
public int getRefreshInterval() {
|
||||
return refreshInterval;
|
||||
}
|
||||
|
||||
public void setRefreshInterval(int refreshInterval) {
|
||||
this.refreshInterval = refreshInterval;
|
||||
}
|
||||
|
||||
public int getTotalPage() {
|
||||
return totalPage;
|
||||
}
|
||||
|
||||
public void setTotalPage(int totalPage) {
|
||||
this.totalPage = totalPage;
|
||||
}
|
||||
|
||||
public List getMonitorList() {
|
||||
return monitorList;
|
||||
}
|
||||
|
||||
public void setMonitorList(List monitorList) {
|
||||
this.monitorList = monitorList;
|
||||
}
|
||||
public List getOrderTypes() {
|
||||
return orderTypes;
|
||||
}
|
||||
public void setOrderTypes(List orderTypes) {
|
||||
this.orderTypes = orderTypes;
|
||||
}
|
||||
public Map getFilterParams() {
|
||||
return filterParams;
|
||||
}
|
||||
public void setFilterParams(Map filterParams) {
|
||||
this.filterParams = filterParams;
|
||||
}
|
||||
|
||||
public Timer getOnTimeRefresh() {
|
||||
return onTimeRefresh;
|
||||
}
|
||||
|
||||
public void setOnTimeRefresh(Timer onTimeRefresh) {
|
||||
this.onTimeRefresh = onTimeRefresh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
public interface BusinessMode {
|
||||
/**
|
||||
* 普通收货
|
||||
*/
|
||||
public static final String RECEIVE = "RECEIVE";
|
||||
/**
|
||||
* 提货收货
|
||||
*/
|
||||
public static final String FETCHRECEIVE = "FETCHRECEIVE";
|
||||
/**
|
||||
* 提货发货
|
||||
*/
|
||||
public static final String FETCHSHIP = "FETCHSHIP";
|
||||
/**
|
||||
* 备货自送
|
||||
*/
|
||||
public static final String WAREHOUSESHIP = "WAREHOUSESHIP";
|
||||
/**
|
||||
* 备货它送
|
||||
*/
|
||||
public static final String CUSTOMERSHIP = "CUSTOMERSHIP";
|
||||
/**
|
||||
* 库间调拨
|
||||
*/
|
||||
public static final String WAREHOUSEMOVE = "WAREHOUSEMOVE";
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
public interface OrderMonitorNode {
|
||||
|
||||
|
||||
|
||||
/** 订单处理节点 */
|
||||
public static final String ORDER_PROCESSING = "ORDER_PROCESSING";
|
||||
|
||||
/** MK收单节点 */
|
||||
public static final String MK_RECEIVING = "MK_RECEIVING";
|
||||
|
||||
/** 备货节点 */
|
||||
public static final String GOODS_PREPARING = "GOODS_PREPARING";
|
||||
|
||||
/** 调度节点 */
|
||||
public static final String DISPATCHING = "DISPATCHING";
|
||||
|
||||
/** 发货节点 */
|
||||
public static final String SHIPPING = "SHIPPING";
|
||||
|
||||
/** 到达节点 */
|
||||
public static final String ARRIVED = "ARRIVED";
|
||||
|
||||
/** 收货节点 */
|
||||
public static final String RECEIVING = "RECEIVING";
|
||||
|
||||
/** 上架节点 */
|
||||
public static final String PUTAWAY = "PUTAWAY";
|
||||
/**
|
||||
* 在途填报
|
||||
*/
|
||||
public static final String WAYFILL = "WAYFILL";
|
||||
|
||||
/**
|
||||
* 运输
|
||||
*/
|
||||
public static final String TRANSPORT = "TRANSPORT";
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
|
||||
public interface OrderMonitorStatus {
|
||||
|
||||
/** 正常未执行 */
|
||||
public static final String NORMAL_UNEXECUTE = "6NU";
|
||||
/** 正常执行中 */
|
||||
public static final String NORMAL_EXECUTING = "5NE";
|
||||
/** 正常已执行 */
|
||||
public static final String NORMAL_EXECUTED = "8NE";
|
||||
/** 异常未执行 */
|
||||
public static final String ABNORMAL_UNEXECUTE = "2AU";
|
||||
/** 异常执行中 */
|
||||
public static final String ABNORMAL_EXECUTING = "1AE";
|
||||
/** 异常关闭 */
|
||||
public static final String ABNORMAL_EXECUTED = "7AE";
|
||||
/** 异常受理 */
|
||||
public static final String ABNORMAL_ACCEPTED = "3AA";
|
||||
/** 时效违规 */
|
||||
public static final String TIME_INFRACTION = "4TI";
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,451 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.stms.client.page.model.CustomShipment;
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* @version $Id: TransimissibleOrder.java,v 1.4 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransimissibleOrder extends TransmissibleObject {
|
||||
|
||||
private String code;
|
||||
|
||||
private String orderDate;
|
||||
|
||||
private String orderType;
|
||||
|
||||
private String fromLocation;
|
||||
|
||||
private String toLocation;
|
||||
|
||||
private String carrier;
|
||||
|
||||
private String consignor;
|
||||
|
||||
private String shipmentMethod;
|
||||
|
||||
private String shipmentType;
|
||||
|
||||
private String loading;
|
||||
|
||||
private String priority;
|
||||
|
||||
private String planLeaveTime;
|
||||
|
||||
private String leaveTime;
|
||||
|
||||
private String planArriveTime;
|
||||
|
||||
private String arriveTime;
|
||||
|
||||
private String weight;
|
||||
|
||||
private String volume;
|
||||
|
||||
private String quantity;
|
||||
|
||||
private String relateBill1;
|
||||
|
||||
private String relateBill2;
|
||||
|
||||
private String fromCode;
|
||||
|
||||
private String fromName;
|
||||
|
||||
private String fromLinkman;
|
||||
|
||||
private String fromPhone;
|
||||
|
||||
private String fromFax;
|
||||
|
||||
private String fromAddress;
|
||||
|
||||
private String fromPostcode;
|
||||
|
||||
private String fromEmail;
|
||||
|
||||
private String toCode;
|
||||
|
||||
private String toName;
|
||||
|
||||
private String toLinkman;
|
||||
|
||||
private String toPhone;
|
||||
|
||||
private String toFax;
|
||||
|
||||
private String toAddress;
|
||||
|
||||
private String toPostcode;
|
||||
|
||||
private String toEmail;
|
||||
|
||||
private String description;
|
||||
|
||||
private List shipments = new ArrayList();
|
||||
private List details = new ArrayList();
|
||||
private List monitors = new ArrayList();
|
||||
private List logs = new ArrayList();
|
||||
|
||||
public List getLogs() {
|
||||
return logs;
|
||||
}
|
||||
|
||||
public void setLogs(List logs) {
|
||||
this.logs = logs;
|
||||
}
|
||||
|
||||
public String getArriveTime() {
|
||||
return arriveTime;
|
||||
}
|
||||
|
||||
public void setArriveTime(String arriveTime) {
|
||||
this.arriveTime = arriveTime;
|
||||
}
|
||||
|
||||
public String getCarrier() {
|
||||
return carrier;
|
||||
}
|
||||
|
||||
public void setCarrier(String carrier) {
|
||||
this.carrier = carrier;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getConsignor() {
|
||||
return consignor;
|
||||
}
|
||||
|
||||
public void setConsignor(String consignor) {
|
||||
this.consignor = consignor;
|
||||
}
|
||||
|
||||
public String getFromAddress() {
|
||||
return fromAddress;
|
||||
}
|
||||
|
||||
public void setFromAddress(String fromAddress) {
|
||||
this.fromAddress = fromAddress;
|
||||
}
|
||||
|
||||
public String getFromCode() {
|
||||
return fromCode;
|
||||
}
|
||||
|
||||
public void setFromCode(String fromCode) {
|
||||
this.fromCode = fromCode;
|
||||
}
|
||||
|
||||
public String getFromEmail() {
|
||||
return fromEmail;
|
||||
}
|
||||
|
||||
public void setFromEmail(String fromEmail) {
|
||||
this.fromEmail = fromEmail;
|
||||
}
|
||||
|
||||
public String getFromFax() {
|
||||
return fromFax;
|
||||
}
|
||||
|
||||
public void setFromFax(String fromFax) {
|
||||
this.fromFax = fromFax;
|
||||
}
|
||||
|
||||
public String getFromLinkman() {
|
||||
return fromLinkman;
|
||||
}
|
||||
|
||||
public void setFromLinkman(String fromLinkman) {
|
||||
this.fromLinkman = fromLinkman;
|
||||
}
|
||||
|
||||
public String getFromLocation() {
|
||||
return fromLocation;
|
||||
}
|
||||
|
||||
public void setFromLocation(String fromLocation) {
|
||||
this.fromLocation = fromLocation;
|
||||
}
|
||||
|
||||
public String getToLocation() {
|
||||
return toLocation;
|
||||
}
|
||||
|
||||
public void setToLocation(String toLocation) {
|
||||
this.toLocation = toLocation;
|
||||
}
|
||||
|
||||
public String getFromName() {
|
||||
return fromName;
|
||||
}
|
||||
|
||||
public void setFromName(String fromName) {
|
||||
this.fromName = fromName;
|
||||
}
|
||||
|
||||
public String getFromPhone() {
|
||||
return fromPhone;
|
||||
}
|
||||
|
||||
public void setFromPhone(String fromPhone) {
|
||||
this.fromPhone = fromPhone;
|
||||
}
|
||||
|
||||
public String getFromPostcode() {
|
||||
return fromPostcode;
|
||||
}
|
||||
|
||||
public void setFromPostcode(String fromPostcode) {
|
||||
this.fromPostcode = fromPostcode;
|
||||
}
|
||||
|
||||
public String getLeaveTime() {
|
||||
return leaveTime;
|
||||
}
|
||||
|
||||
public void setLeaveTime(String leaveTime) {
|
||||
this.leaveTime = leaveTime;
|
||||
}
|
||||
|
||||
public String getLoading() {
|
||||
return loading;
|
||||
}
|
||||
|
||||
public void setLoading(String loading) {
|
||||
this.loading = loading;
|
||||
}
|
||||
|
||||
public String getOrderDate() {
|
||||
return orderDate;
|
||||
}
|
||||
|
||||
public void setOrderDate(String orderDate) {
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
public String getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(String orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public String getPlanArriveTime() {
|
||||
return planArriveTime;
|
||||
}
|
||||
|
||||
public void setPlanArriveTime(String planArriveTime) {
|
||||
this.planArriveTime = planArriveTime;
|
||||
}
|
||||
|
||||
public String getPlanLeaveTime() {
|
||||
return planLeaveTime;
|
||||
}
|
||||
|
||||
public void setPlanLeaveTime(String planLeaveTime) {
|
||||
this.planLeaveTime = planLeaveTime;
|
||||
}
|
||||
|
||||
public String getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(String priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getRelateBill1() {
|
||||
return relateBill1;
|
||||
}
|
||||
|
||||
public void setRelateBill1(String relateBill1) {
|
||||
this.relateBill1 = relateBill1;
|
||||
}
|
||||
|
||||
public String getRelateBill2() {
|
||||
return relateBill2;
|
||||
}
|
||||
|
||||
public void setRelateBill2(String relateBill2) {
|
||||
this.relateBill2 = relateBill2;
|
||||
}
|
||||
|
||||
public String getShipmentMethod() {
|
||||
return shipmentMethod;
|
||||
}
|
||||
|
||||
public void setShipmentMethod(String shipmentMethod) {
|
||||
this.shipmentMethod = shipmentMethod;
|
||||
}
|
||||
|
||||
public String getShipmentType() {
|
||||
return shipmentType;
|
||||
}
|
||||
|
||||
public void setShipmentType(String shipmentType) {
|
||||
this.shipmentType = shipmentType;
|
||||
}
|
||||
|
||||
public String getToAddress() {
|
||||
return toAddress;
|
||||
}
|
||||
|
||||
public void setToAddress(String toAddress) {
|
||||
this.toAddress = toAddress;
|
||||
}
|
||||
|
||||
public String getToCode() {
|
||||
return toCode;
|
||||
}
|
||||
|
||||
public void setToCode(String toCode) {
|
||||
this.toCode = toCode;
|
||||
}
|
||||
|
||||
public String getToEmail() {
|
||||
return toEmail;
|
||||
}
|
||||
|
||||
public void setToEmail(String toEmail) {
|
||||
this.toEmail = toEmail;
|
||||
}
|
||||
|
||||
public String getToFax() {
|
||||
return toFax;
|
||||
}
|
||||
|
||||
public void setToFax(String toFax) {
|
||||
this.toFax = toFax;
|
||||
}
|
||||
|
||||
public String getToLinkman() {
|
||||
return toLinkman;
|
||||
}
|
||||
|
||||
public void setToLinkman(String toLinkman) {
|
||||
this.toLinkman = toLinkman;
|
||||
}
|
||||
|
||||
public String getToName() {
|
||||
return toName;
|
||||
}
|
||||
|
||||
public void setToName(String toName) {
|
||||
this.toName = toName;
|
||||
}
|
||||
|
||||
public String getToPhone() {
|
||||
return toPhone;
|
||||
}
|
||||
|
||||
public void setToPhone(String toPhone) {
|
||||
this.toPhone = toPhone;
|
||||
}
|
||||
|
||||
public String getToPostcode() {
|
||||
return toPostcode;
|
||||
}
|
||||
|
||||
public void setToPostcode(String toPostcode) {
|
||||
this.toPostcode = toPostcode;
|
||||
}
|
||||
|
||||
public String getVolume() {
|
||||
return volume;
|
||||
}
|
||||
|
||||
public void setVolume(String volume) {
|
||||
this.volume = volume;
|
||||
}
|
||||
|
||||
public String getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(String weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public List getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public List getMonitors() {
|
||||
return monitors;
|
||||
}
|
||||
|
||||
public void setMonitors(List monitors) {
|
||||
this.monitors = monitors;
|
||||
}
|
||||
|
||||
public List getShipments() {
|
||||
return shipments;
|
||||
}
|
||||
|
||||
public void setShipments(List shipments) {
|
||||
this.shipments = shipments;
|
||||
}
|
||||
|
||||
public void addShipment(CustomShipment shipment) {
|
||||
if(shipments == null) {
|
||||
shipments = new ArrayList();
|
||||
}
|
||||
shipments.add(shipment);
|
||||
}
|
||||
|
||||
public void addMonitor(TransmissibleOrderMonitorDetail monitor) {
|
||||
if(monitors == null) {
|
||||
monitors = new ArrayList();
|
||||
}
|
||||
monitors.add(monitor);
|
||||
}
|
||||
|
||||
public void addDetail(TransimissibleOrderDetail detail) {
|
||||
if(details == null) {
|
||||
details = new ArrayList();
|
||||
}
|
||||
details.add(detail);
|
||||
}
|
||||
|
||||
|
||||
public void addLog(TransmissibleOrderMonitorLog log) {
|
||||
if(logs == null) {
|
||||
logs = new ArrayList();
|
||||
}
|
||||
logs.add(log);
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* @version $Id: TransimissibleOrderDetail.java,v 1.3 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransimissibleOrderDetail extends TransmissibleObject implements Comparable {
|
||||
|
||||
private String lineNo;
|
||||
|
||||
private String productCode;
|
||||
|
||||
private String productName;
|
||||
|
||||
private String lot; //批号
|
||||
private String serial; //序列号
|
||||
private String unit; //包装单位
|
||||
private String quantity; //订单数量
|
||||
private String weight; //重量
|
||||
private String volume; //体积
|
||||
private String receivedQuantity ; //收货数量
|
||||
private String putawayQuantity ; //上架数量
|
||||
private String pickedQuantity ; //拣货数量
|
||||
private String shipedQuantity ; //发货数量
|
||||
public String getLineNo() {
|
||||
return lineNo;
|
||||
}
|
||||
public void setLineNo(String lineNo) {
|
||||
this.lineNo = lineNo;
|
||||
}
|
||||
public String getLot() {
|
||||
return lot;
|
||||
}
|
||||
public void setLot(String lot) {
|
||||
this.lot = lot;
|
||||
}
|
||||
public String getProductCode() {
|
||||
return productCode;
|
||||
}
|
||||
public void setProductCode(String productCode) {
|
||||
this.productCode = productCode;
|
||||
}
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
public String getSerial() {
|
||||
return serial;
|
||||
}
|
||||
public void setSerial(String serial) {
|
||||
this.serial = serial;
|
||||
}
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
public String getVolume() {
|
||||
return volume;
|
||||
}
|
||||
public void setVolume(String volume) {
|
||||
this.volume = volume;
|
||||
}
|
||||
public String getWeight() {
|
||||
return weight;
|
||||
}
|
||||
public void setWeight(String weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
public String getPickedQuantity() {
|
||||
return pickedQuantity;
|
||||
}
|
||||
public void setPickedQuantity(String pickedQuantity) {
|
||||
this.pickedQuantity = pickedQuantity;
|
||||
}
|
||||
public String getPutawayQuantity() {
|
||||
return putawayQuantity;
|
||||
}
|
||||
public void setPutawayQuantity(String putawayQuantity) {
|
||||
this.putawayQuantity = putawayQuantity;
|
||||
}
|
||||
public String getReceivedQuantity() {
|
||||
return receivedQuantity;
|
||||
}
|
||||
public void setReceivedQuantity(String receivedQuantity) {
|
||||
this.receivedQuantity = receivedQuantity;
|
||||
}
|
||||
public String getShipedQuantity() {
|
||||
return shipedQuantity;
|
||||
}
|
||||
public void setShipedQuantity(String shipedQuantity) {
|
||||
this.shipedQuantity = shipedQuantity;
|
||||
}
|
||||
public int compareTo(Object o) {
|
||||
if(o == null || lineNo == null || ! (o instanceof TransimissibleOrderDetail)) {
|
||||
return 0;
|
||||
}
|
||||
TransimissibleOrderDetail other = (TransimissibleOrderDetail)o;
|
||||
return lineNo.compareTo(other.lineNo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
|
||||
/**
|
||||
* @author dev
|
||||
* @version $Id: TransimissibleShipment.java,v 1.3 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransimissibleShipment extends TransmissibleObject {
|
||||
|
||||
private String lineNo;
|
||||
|
||||
private String productCode;
|
||||
|
||||
private String productName;
|
||||
|
||||
private String lot; //批号
|
||||
private String serial; //序列号
|
||||
private String unit; //包装单位
|
||||
private double quantity; //订单数量
|
||||
private double weight; //重量
|
||||
private double volume; //体积
|
||||
public String getLineNo() {
|
||||
return lineNo;
|
||||
}
|
||||
public void setLineNo(String lineNo) {
|
||||
this.lineNo = lineNo;
|
||||
}
|
||||
public String getLot() {
|
||||
return lot;
|
||||
}
|
||||
public void setLot(String lot) {
|
||||
this.lot = lot;
|
||||
}
|
||||
public String getProductCode() {
|
||||
return productCode;
|
||||
}
|
||||
public void setProductCode(String productCode) {
|
||||
this.productCode = productCode;
|
||||
}
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
public double getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
public void setQuantity(double quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
public String getSerial() {
|
||||
return serial;
|
||||
}
|
||||
public void setSerial(String serial) {
|
||||
this.serial = serial;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
* 可从服务器端向客户端传输的对象
|
||||
* @author dev
|
||||
* @version $Id: TransmissibleObject.java,v 1.3 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransmissibleObject implements IsSerializable {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 可传输的Order监控点信息
|
||||
* @author dev
|
||||
* @version $Id: TransmissibleOrderMonitor.java,v 1.4 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransmissibleOrderMonitor extends TransmissibleObject implements Comparable {
|
||||
|
||||
/** 定单Id */
|
||||
private Long id;
|
||||
|
||||
/** 定单code */
|
||||
private String code;
|
||||
|
||||
/** 订单所属客户的编码 */
|
||||
private String companyCode;
|
||||
|
||||
/** 订单所属客户的名字 */
|
||||
private String companyName;
|
||||
|
||||
/** 订单类型
|
||||
* @link com.dev.stms.client.page.monitor.tranferobject.BusinessMode
|
||||
*/
|
||||
private String orderType;
|
||||
|
||||
|
||||
/** 出发地 */
|
||||
private String fromLocationName;
|
||||
|
||||
/** 到达地 */
|
||||
private String toLocationName;
|
||||
|
||||
/** 监控地点 @link TransmissibleOrderMonitorDetail*/
|
||||
private List details;
|
||||
|
||||
/** 状态 @link OrderMonitorStatus */
|
||||
private String status = OrderMonitorStatus.NORMAL_UNEXECUTE;
|
||||
|
||||
/** 是否市内 ,看fromLocation和toLocation是否同城*/
|
||||
private boolean isInsideCity = false;
|
||||
|
||||
/** 当前节点处在城市 */
|
||||
private String currentCity;
|
||||
|
||||
public TransmissibleOrderMonitor() {}
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List details) {
|
||||
addDetails(details);
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(String orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
public void addDetails(List details) {
|
||||
if(this.details == null) {
|
||||
this.details = new ArrayList();
|
||||
}
|
||||
this.details.addAll(details);
|
||||
}
|
||||
public void addDetail(Object detail) {
|
||||
|
||||
if(details == null) {
|
||||
details = new ArrayList();
|
||||
}
|
||||
this.details.add(detail);
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCompanyCode() {
|
||||
return companyCode;
|
||||
}
|
||||
|
||||
public void setCompanyCode(String companyCode) {
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
|
||||
public int compareTo(Object o) {
|
||||
TransmissibleOrderMonitor other = (TransmissibleOrderMonitor)o;
|
||||
return this.getStatus().compareTo(other.getStatus());
|
||||
}
|
||||
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
|
||||
public boolean isInsideCity() {
|
||||
return isInsideCity;
|
||||
}
|
||||
|
||||
|
||||
public void setInsideCity(boolean isInsideCity) {
|
||||
this.isInsideCity = isInsideCity;
|
||||
}
|
||||
|
||||
|
||||
public String getCurrentCity() {
|
||||
return currentCity;
|
||||
}
|
||||
|
||||
|
||||
public void setCurrentCity(String currentCity) {
|
||||
this.currentCity = currentCity;
|
||||
}
|
||||
|
||||
|
||||
public String getFromLocationName() {
|
||||
return fromLocationName;
|
||||
}
|
||||
|
||||
|
||||
public void setFromLocationName(String fromLocationName) {
|
||||
this.fromLocationName = fromLocationName;
|
||||
}
|
||||
|
||||
|
||||
public String getToLocationName() {
|
||||
return toLocationName;
|
||||
}
|
||||
|
||||
|
||||
public void setToLocationName(String toLocationName) {
|
||||
this.toLocationName = toLocationName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 可传输的Order监控点信息
|
||||
* @author dev
|
||||
* @version $Id: TransmissibleOrderMonitorDetail.java,v 1.4 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransmissibleOrderMonitorDetail extends TransmissibleObject {
|
||||
|
||||
|
||||
private Long Id;
|
||||
|
||||
/** 监控地点 */
|
||||
private String transLocationName;
|
||||
|
||||
private String position;
|
||||
|
||||
/** 监控节点
|
||||
* @link OrderMonitorNode
|
||||
*/
|
||||
private String node;
|
||||
|
||||
private String nodeName;
|
||||
|
||||
private boolean needTimeInfraction = false;
|
||||
|
||||
/** 运输方式 */
|
||||
private String shipmentMethod;
|
||||
|
||||
/** 序号 */
|
||||
private Integer sequence;
|
||||
|
||||
/** 订单最后预计到到时间 **/
|
||||
private String endPlanArriveTime;
|
||||
|
||||
/** 预计完成时间 */
|
||||
private String planTime;
|
||||
|
||||
private transient Date dPlanTime;
|
||||
private transient Date dRecordTime;
|
||||
private transient Date dDelayTime;
|
||||
|
||||
/** 采集时间 */
|
||||
private String recordTime;
|
||||
|
||||
/** 采集地点 */
|
||||
private String recordPlace;
|
||||
|
||||
/** 异常延时[时间] */
|
||||
private String delayTime;
|
||||
|
||||
/** 监控点状态
|
||||
* @link OrderMonitorStatus
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private String nodeExecuteStatus;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName) {
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getDelayTime() {
|
||||
return delayTime;
|
||||
}
|
||||
|
||||
public void setDelayTime(String delayTime) {
|
||||
this.delayTime = delayTime;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getNode() {
|
||||
return node;
|
||||
}
|
||||
|
||||
public void setNode(String node) {
|
||||
this.node = node;
|
||||
}
|
||||
|
||||
public String getPlanTime() {
|
||||
return planTime;
|
||||
}
|
||||
|
||||
public void setPlanTime(String planTime) {
|
||||
this.planTime = planTime;
|
||||
}
|
||||
|
||||
public String getRecordPlace() {
|
||||
return recordPlace;
|
||||
}
|
||||
|
||||
public void setRecordPlace(String recordPlace) {
|
||||
this.recordPlace = recordPlace;
|
||||
}
|
||||
|
||||
public String getRecordTime() {
|
||||
return recordTime;
|
||||
}
|
||||
|
||||
public void setRecordTime(String recordTime) {
|
||||
this.recordTime = recordTime;
|
||||
}
|
||||
|
||||
public String getShipmentMethod() {
|
||||
return shipmentMethod;
|
||||
}
|
||||
|
||||
public void setShipmentMethod(String shipmentMethod) {
|
||||
this.shipmentMethod = shipmentMethod;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTransLocationName() {
|
||||
return transLocationName;
|
||||
}
|
||||
|
||||
public void setTransLocationName(String transLocationName) {
|
||||
this.transLocationName = transLocationName;
|
||||
}
|
||||
|
||||
public Integer getSequence() {
|
||||
return sequence;
|
||||
}
|
||||
|
||||
public void setSequence(Integer sequence) {
|
||||
this.sequence = sequence;
|
||||
}
|
||||
|
||||
public String getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(String position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public Date getDDelayTime() {
|
||||
return dDelayTime;
|
||||
}
|
||||
|
||||
public void setDDelayTime(Date delayTime) {
|
||||
dDelayTime = delayTime;
|
||||
}
|
||||
|
||||
public Date getDPlanTime() {
|
||||
return dPlanTime;
|
||||
}
|
||||
|
||||
public void setDPlanTime(Date planTime) {
|
||||
dPlanTime = planTime;
|
||||
}
|
||||
|
||||
public Date getDRecordTime() {
|
||||
return dRecordTime;
|
||||
}
|
||||
|
||||
public void setDRecordTime(Date recordTime) {
|
||||
dRecordTime = recordTime;
|
||||
}
|
||||
|
||||
public boolean isNeedTimeInfraction() {
|
||||
return needTimeInfraction;
|
||||
}
|
||||
|
||||
public void setNeedTimeInfraction(boolean needTimeInfraction) {
|
||||
this.needTimeInfraction = needTimeInfraction;
|
||||
}
|
||||
|
||||
public String getNodeExecuteStatus() {
|
||||
return nodeExecuteStatus;
|
||||
}
|
||||
|
||||
public void setNodeExecuteStatus(String nodeExecuteStatus) {
|
||||
this.nodeExecuteStatus = nodeExecuteStatus;
|
||||
}
|
||||
|
||||
public String getEndPlanArriveTime() {
|
||||
return endPlanArriveTime;
|
||||
}
|
||||
|
||||
public void setEndPlanArriveTime(String endPlanArriveTime) {
|
||||
this.endPlanArriveTime = endPlanArriveTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
package com.dev.stms.client.page.monitor.tranferobject;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 可传输的Order监控点信息
|
||||
* @author dev
|
||||
* @version $Id: TransmissibleOrderMonitorLog.java,v 1.3 2009/02/24 06:47:29 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class TransmissibleOrderMonitorLog extends TransmissibleObject implements Comparable {
|
||||
|
||||
/** 日志Id */
|
||||
private Long id;
|
||||
|
||||
/** 日志监控点 */
|
||||
private String orderMonitorNode;
|
||||
|
||||
private String orderMonitorNodeName;
|
||||
|
||||
/** 日志监控点地点 */
|
||||
private String orderMonitorPlace;
|
||||
|
||||
/** 日志延时 */
|
||||
private String min;
|
||||
|
||||
/** 计划时间 */
|
||||
private String recordTime;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
|
||||
public TransmissibleOrderMonitorLog() {}
|
||||
|
||||
|
||||
public int compareTo(Object o) {
|
||||
return recordTime.compareTo(((TransmissibleOrderMonitorLog)o).getRecordTime());
|
||||
}
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public String getMin() {
|
||||
return min;
|
||||
}
|
||||
|
||||
|
||||
public void setMin(String min) {
|
||||
this.min = min;
|
||||
}
|
||||
|
||||
|
||||
public String getOrderMonitorNode() {
|
||||
return orderMonitorNode;
|
||||
}
|
||||
|
||||
|
||||
public void setOrderMonitorNode(String orderMonitor) {
|
||||
this.orderMonitorNode = orderMonitor;
|
||||
}
|
||||
|
||||
|
||||
public String getRecordTime() {
|
||||
return recordTime;
|
||||
}
|
||||
|
||||
|
||||
public void setRecordTime(String planTime) {
|
||||
this.recordTime = planTime;
|
||||
}
|
||||
|
||||
|
||||
public String getOrderMonitorPlace() {
|
||||
return orderMonitorPlace;
|
||||
}
|
||||
|
||||
|
||||
public void setOrderMonitorPlace(String orderMonitorPlace) {
|
||||
this.orderMonitorPlace = orderMonitorPlace;
|
||||
}
|
||||
|
||||
|
||||
public String getOrderMonitorNodeName() {
|
||||
return orderMonitorNodeName;
|
||||
}
|
||||
|
||||
|
||||
public void setOrderMonitorNodeName(String orderMonitorNodeName) {
|
||||
this.orderMonitorNodeName = orderMonitorNodeName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,285 @@
|
|||
package com.dev.stms.client.page.monitor.ui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
|
||||
import com.google.gwt.user.client.ui.HasVerticalAlignment;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.Panel;
|
||||
import com.dev.stms.client.page.monitor.MaintainOrderMonitorPage;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.OrderMonitorStatus;
|
||||
import com.dev.stms.client.page.monitor.tranferobject.TransmissibleOrderMonitor;
|
||||
import com.dev.energy.client.config.page.PageConfig;
|
||||
|
||||
/**
|
||||
* 用来方便得表示一个订单的监控信息
|
||||
* @author dev
|
||||
* @version $Id: MonitorLine.java,v 1.5 2009/06/24 09:43:45 yan.li Exp $
|
||||
*/
|
||||
|
||||
public class MonitorLine extends HorizontalPanel {
|
||||
|
||||
/** 输入监控节点数目 */
|
||||
public static int DEFAULT_MONITOR_NODE_COUNT = 8;
|
||||
|
||||
/** 要创建的监控节点个数 */
|
||||
private int monitorNodeCount = 0;
|
||||
|
||||
/** 对MaintainOrderMonitorPage页面的引用 */
|
||||
MaintainOrderMonitorPage pageRef = null;
|
||||
|
||||
/** 订单信息显示
|
||||
* 如:PO08050501
|
||||
* (拣货自运)
|
||||
*/
|
||||
private HTML orderInfo;
|
||||
|
||||
/** 订单类型 */
|
||||
private HTML orderType;
|
||||
|
||||
/** 客户名称 */
|
||||
private HTML customerName;
|
||||
|
||||
/** 订单状态 */
|
||||
private Image orderStatus;
|
||||
|
||||
/** 当前所在城市 */
|
||||
private HTML currentCity;
|
||||
|
||||
/** 用于存放所有的监控点 */
|
||||
private Panel nodeContainer ;
|
||||
|
||||
/** 存放所有的监控节点 */
|
||||
private List monitorNodeList;
|
||||
|
||||
/** order信息 */
|
||||
private TransmissibleOrderMonitor dataSource;
|
||||
|
||||
/**
|
||||
* @param page
|
||||
* @param odd 是否是偶数列
|
||||
*/
|
||||
public MonitorLine(MaintainOrderMonitorPage page, boolean odd) {
|
||||
this(page, DEFAULT_MONITOR_NODE_COUNT, odd);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nodeCount 监控点个数
|
||||
*/
|
||||
public MonitorLine(MaintainOrderMonitorPage page, int nodeCount, boolean odd) {
|
||||
super();
|
||||
sinkEvents(Event.MOUSEEVENTS);
|
||||
this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
|
||||
this.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
this.monitorNodeCount = nodeCount;
|
||||
this.monitorNodeList = new ArrayList();
|
||||
this.pageRef = page;
|
||||
this.orderInfo = new HTML();
|
||||
this.orderStatus = new Image();
|
||||
this.orderType = new HTML();
|
||||
this.currentCity = new HTML();
|
||||
this.customerName = new HTML();
|
||||
this.nodeContainer = new FlowPanel();
|
||||
// //初始时不可见
|
||||
// this.setVisible(true);
|
||||
if(odd) {
|
||||
this.setStyleName("ml_container_odd");
|
||||
} else {
|
||||
this.setStyleName("ml_container_even");
|
||||
}
|
||||
afterPropertiesSet();
|
||||
}
|
||||
|
||||
private MonitorNodeWithText makeMonitorNode() {
|
||||
MonitorNodeWithText node = new MonitorNodeWithText(this);
|
||||
monitorNodeList.add(node);
|
||||
return node;
|
||||
}
|
||||
|
||||
protected void afterPropertiesSet() {
|
||||
this.add(orderInfo);
|
||||
this.setCellWidth(orderInfo, "10%");
|
||||
this.add(orderType);
|
||||
this.setCellWidth(orderType, "8%");
|
||||
this.add(customerName);
|
||||
this.setCellWidth(customerName, "10%");
|
||||
this.add(orderStatus);
|
||||
this.setCellWidth(orderStatus, "6%");
|
||||
this.add(currentCity);
|
||||
this.setCellWidth(currentCity, "6%");
|
||||
this.add(nodeContainer);
|
||||
nodeContainer.setStyleName("nodecontainer");
|
||||
this.setCellHorizontalAlignment(nodeContainer, HasHorizontalAlignment.ALIGN_LEFT);
|
||||
for(int i = 0; i < monitorNodeCount; i++) {
|
||||
nodeContainer.add(makeMonitorNode());
|
||||
}
|
||||
//先全部不显示,待有数据的时候再显示
|
||||
this.setVisible(false);
|
||||
}
|
||||
|
||||
public List getMonitorNodeList() {
|
||||
return monitorNodeList;
|
||||
}
|
||||
|
||||
public TransmissibleOrderMonitor getDataSource() {
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
public Label getOrderInfo() {
|
||||
return orderInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置数据源来显示要监控的订单监控信息
|
||||
* @param orderData 要设置的数据源
|
||||
*/
|
||||
public void setDataSource(TransmissibleOrderMonitor orderData) {
|
||||
this.dataSource = orderData;
|
||||
afterDataSourceSet();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置完数据源后的显示处理工作
|
||||
*/
|
||||
public void afterDataSourceSet() {
|
||||
|
||||
this.setVisible(true);
|
||||
setLineContent();
|
||||
addMonitorNodes();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置除结点外的所有信息
|
||||
*/
|
||||
public void setLineContent() {
|
||||
orderInfo.setHTML(dataSource.getCode());
|
||||
// orderInfo.setTitle(dataSource.getCode());
|
||||
orderType.setHTML(dataSource.getOrderType());
|
||||
customerName.setHTML(dataSource.getCompanyName());
|
||||
orderStatus.setVisible(true);
|
||||
orderStatus.setUrl(generateImageUrl());
|
||||
currentCity.setHTML(dataSource.getCurrentCity());
|
||||
}
|
||||
|
||||
private String generateImageUrl() {
|
||||
String prefix = "images/monitor/state";
|
||||
String extention = ".gif";
|
||||
String type = "";
|
||||
if(OrderMonitorStatus.NORMAL_EXECUTED.equals(dataSource.getStatus())) {
|
||||
type = "004";
|
||||
} else if(OrderMonitorStatus.ABNORMAL_EXECUTING.equals(dataSource.getStatus())) {
|
||||
type = "001";
|
||||
}else if(OrderMonitorStatus.ABNORMAL_ACCEPTED.equals(dataSource.getStatus())) {
|
||||
type = "002";
|
||||
}else if(OrderMonitorStatus.NORMAL_EXECUTING.equals(dataSource.getStatus())) {
|
||||
type = "003";
|
||||
} else if(OrderMonitorStatus.NORMAL_UNEXECUTE.equals(dataSource.getStatus())) {
|
||||
type = "006";
|
||||
} else {
|
||||
type = "005";
|
||||
}
|
||||
return prefix + type + extention;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据DataSource添加要挂在该节点下的监控节点
|
||||
*/
|
||||
private void addMonitorNodes() {
|
||||
ensureNodeIsEnough();
|
||||
//先设置要数据的节点的格式
|
||||
int loop = 0;
|
||||
|
||||
for(; loop < dataSource.getDetails().size(); loop++) {
|
||||
MonitorNodeWithText mn = (MonitorNodeWithText)monitorNodeList.get(loop);
|
||||
mn.setDetail(dataSource.getDetails().get(loop));
|
||||
}
|
||||
//将剩下的节点隐藏
|
||||
for(; loop < monitorNodeList.size(); loop++) {
|
||||
((MonitorNodeWithText)monitorNodeList.get(loop)).setVisible(false);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 确认当前所画出来的结点已经名够用,否则要添加
|
||||
*/
|
||||
private void ensureNodeIsEnough() {
|
||||
int currentSize = monitorNodeList.size();
|
||||
for( int i = 0; i < dataSource.getDetails().size() - currentSize; i++) {
|
||||
nodeContainer.add(makeMonitorNode());
|
||||
}
|
||||
}
|
||||
|
||||
public MaintainOrderMonitorPage getPageRef() {
|
||||
return pageRef;
|
||||
}
|
||||
|
||||
public void setPageRef(MaintainOrderMonitorPage pageRef) {
|
||||
this.pageRef = pageRef;
|
||||
}
|
||||
|
||||
public MonitorLine getContainer() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public HTML getCurrentCity() {
|
||||
return currentCity;
|
||||
}
|
||||
|
||||
public void setCurrentCity(HTML currentCity) {
|
||||
this.currentCity = currentCity;
|
||||
}
|
||||
|
||||
public HTML getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(HTML customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public Image getOrderStatus() {
|
||||
return orderStatus;
|
||||
}
|
||||
|
||||
public void setOrderStatus(Image orderStatus) {
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public HTML getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(HTML orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public void setMonitorNodeList(List monitorNodeList) {
|
||||
this.monitorNodeList = monitorNodeList;
|
||||
}
|
||||
|
||||
public void setOrderInfo(HTML orderInfo) {
|
||||
this.orderInfo = orderInfo;
|
||||
}
|
||||
public Long getId() {
|
||||
return dataSource.getId();
|
||||
}
|
||||
|
||||
public void setVisible(boolean visible) {
|
||||
this.orderInfo.setVisible(visible);
|
||||
this.orderStatus.setVisible(visible);
|
||||
this.orderType.setVisible(visible);
|
||||
this.currentCity.setVisible(visible);
|
||||
this.customerName.setVisible(visible);
|
||||
this.nodeContainer.setVisible(visible);
|
||||
}
|
||||
|
||||
public PageConfig getPageConfig(){
|
||||
return pageRef.getPageConfig();
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue