Browse Source

git-svn-id: https://192.168.57.71/svn/jsgkj@1946 931142cf-59ea-a443-aa0e-51397b428577

xt_xuhao 8 năm trước cách đây
mục cha
commit
fc70de58c9
21 tập tin đã thay đổi với 1890 bổ sung67 xóa
  1. 5 4
      gkaq/yjpt-flex/trunk/locale/zh_CN/select.properties
  2. 2 2
      gkaq/yjpt-flex/trunk/locale/zh_CN/zysqbp.properties
  3. 5 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/common/component/ui/button/IconButton.mxml
  4. 18 1
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/check/DcModel.as
  5. 1 1
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/zyfzndjy/GkwxhwzyfzblhhzEditModel.as
  6. 4 2
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/zysqbp/ShbpModel.as
  7. 5 1
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/select/WhzyStatusSelect.as
  8. 1 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/Check/JdjcglLayout.mxml
  9. 6 2
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/ZysqbpEdit.mxml
  10. 9 10
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/ZysqbpLayout.mxml
  11. 350 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountBw.mxml
  12. 350 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountCg.mxml
  13. 350 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountCk.mxml
  14. 350 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountDc.mxml
  15. 350 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountGbq.mxml
  16. 55 43
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbHuizongInformate.mxml
  17. 25 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbTabMain.mxml
  18. 3 1
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/vo/check/DcVo.as
  19. 1 0
      gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/vo/zysqbp/ZysqbpGatherVo.as
  20. BIN
      gkaq/yjpt-flex/trunk/src/resource/exceltemplate/wzzyqkhzxx.xls
  21. BIN
      gkaq/yjpt-flex/trunk/src/resource/yjpt/list/batch_proc.png

+ 5 - 4
gkaq/yjpt-flex/trunk/locale/zh_CN/select.properties

@@ -939,14 +939,15 @@ wf.zf=\u4f5c\u5e9f
 wf.hx=\u5f85\u6838\u9500
 wf.qb=\u5168\u90e8
 
+whzy.recordStatus1=\u672a\u63d0\u4ea4
 whzy.recordStatus2=\u901a\u8fc7
-whzy.recordStatus8=\u4e0d\u901a\u8fc7
 whzy.recordStatus3=\u5f85\u5904\u7406
-whzy.recordStatus10=\u53d8\u66f4\u5b8c\u6210
-whzy.recordStatus7=\u53d8\u66f4\u5ba1\u6838\u4e2d
+whzy.recordStatus4=\u9000\u56de
 whzy.recordStatus5=\u53d6\u6d88\u5ba1\u6838\u4e2d
 whzy.recordStatus6=\u53d6\u6d88\u5b8c\u6210
-whzy.recordStatus1=\u672a\u63d0\u4ea4
+whzy.recordStatus7=\u53d8\u66f4\u5ba1\u6838\u4e2d
+whzy.recordStatus8=\u4e0d\u901a\u8fc7
+whzy.recordStatus10=\u53d8\u66f4\u5b8c\u6210
 
 recordStatus.complete=\u5df2\u5b8c\u6210
 recordStatus.valid=\u6709\u6548

+ 2 - 2
gkaq/yjpt-flex/trunk/locale/zh_CN/zysqbp.properties

@@ -67,6 +67,6 @@ zysqbp.fzns.invalidated=\u60a8\u9009\u62e9\u7684\u4f5c\u4e1a\u573a\u6240\u7684\u
 zysqbp.check.invalidated=\u60a8\u597d\uff0c\u6839\u636e\u300a\u6e2f\u53e3\u5371\u9669\u8d27\u7269\u5b89\u5168\u7ba1\u7406\u89c4\u5b9a\u300b\uff0c\u5371\u9669\u8d27\u7269\u6e2f\u53e3\u7ecf\u8425\u4eba\u5728\u5371\u9669\u8d27\u7269\u6e2f\u53e3\u88c5\u5378\u3001\u8fc7\u9a73\u4f5c\u4e1a\u5f00\u59cb24\u5c0f\u65f6\u524d\uff0c\u5e94\u5f53\u5411\u6240\u5728\u5730\u6e2f\u53e3\u884c\u653f\u7ba1\u7406\u90e8\u95e8\u62a5\u544a\u3002\u62a5\u544a\u4eba\u5728\u53d6\u5f97\u4f5c\u4e1a\u6279\u51c6\u540e72\u5c0f\u65f6\u5185\u672a\u5f00\u59cb\u4f5c\u4e1a\u7684\uff0c\u5e94\u5f53\u91cd\u65b0\u62a5\u544a\u3002\u73b0\u95f4\u9694\u8d85\u8fc772\u5c0f\u65f6\uff0c\u8bf7\u91cd\u65b0\u586b\u5199\uff01
 
 #\u5371\u8d27\u4f5c\u4e1a\u7edf\u8ba1
-zysqbp.count.startTime.empty=\u7edf\u8ba1\u7533\u8bf7\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u4e3a\u7a7a\uff01
-zysqbp.count.stopTime.empty=\u7edf\u8ba1\u7533\u8bf7\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u4e3a\u7a7a\uff01
+zysqbp.count.startTime.empty=\u7edf\u8ba1\u62a5\u544a\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u4e3a\u7a7a\uff01
+zysqbp.count.stopTime.empty=\u7edf\u8ba1\u62a5\u544a\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u4e3a\u7a7a\uff01
 

+ 5 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/common/component/ui/button/IconButton.mxml

@@ -112,6 +112,9 @@
 			[Embed(source="resource/yjpt/list/message.png")]
 			public var icon_message:Class;
 			
+			[Embed(source="resource/yjpt/list/batch_proc.png")]
+			public var icon_batchProc:Class;
+			
 			private var _type:String;
 			public function set type(val:String):void{
 				_type=val;
@@ -216,6 +219,8 @@
 						case "message":
 							icon.source = icon_message;
 							break;
+						case "batchProc":
+							icon.source = icon_batchProc;
 						default:
 							break;
 					}

+ 18 - 1
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/check/DcModel.as

@@ -551,6 +551,7 @@ package com.jtgh.yjpt.model.check
 				},Number(busId))
 			}
 		}
+		
 		public function toWarn(view:DisplayObject):void{
 			Utils.callRemote("dcController","warn",function(r:ResultEvent):void{
 				Alert.show("提醒已发送","提示");
@@ -1215,7 +1216,23 @@ package com.jtgh.yjpt.model.check
 		    Utils.popupWindow(resourceManager.getString("common","btn.add"),dcEdit,dcLayout,doQuery,800,600);
 			
 		}
+	 
 		
-	}
+		
+		/**
+		 * 将任务状态为“未提交”状态的数据批量提交
+		 */
+		public function batchProc(event:MouseEvent):void{ 
+			Utils.doOtherConfirm(callBachProcServerFunc,"是否将所有未提交状态的数据下发?","操作确认");
+		}
+		
+		public function callBachProcServerFunc():void{
+			Utils.callRemote("dcController","batchSubmitDc",function(r:ResultEvent):void{
+				var bc:BusinessContext=r.result as BusinessContext;
+				Alert.show(bc.result.toString(),"提示");
+				doQuery();
+			});
+		}
 	
+	}
 }

+ 1 - 1
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/zyfzndjy/GkwxhwzyfzblhhzEditModel.as

@@ -289,7 +289,7 @@ package com.jtgh.yjpt.model.zyfzndjy
 						var tempList1:Array = fzvo.byzd5.replace("\n","").split(";");
 						for each(var wh:String in tempList1){
 //							wh = wh.replace("\n","");
-							if(zywxhwpmStr.indexOf(" "+wh)==-1){
+							if(zywxhwpmStr.indexOf(" "+wh+";")==-1){
 								zywxhwpmStr+=" "+wh+";\n";
 								str2+=wh;
 							}else{

+ 4 - 2
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/model/zysqbp/ShbpModel.as

@@ -33,8 +33,9 @@ package com.jtgh.yjpt.model.zysqbp
 	import com.jtgh.yjpt.view.zysqbp.ZysqqxAudit;
 	import com.jtgh.yjpt.view.zysqbp.count.WhzysbContainerCount;
 	import com.jtgh.yjpt.view.zysqbp.count.WhzysbCount;
-	import com.jtgh.yjpt.view.zysqbp.count.WhzysbCount1;
+	import com.jtgh.yjpt.view.zysqbp.count.WhzysbCountBw;
 	import com.jtgh.yjpt.view.zysqbp.count.WhzysbHuizongInformate;
+	import com.jtgh.yjpt.view.zysqbp.count.WhzysbTabMain;
 	import com.jtgh.yjpt.vo.access.UserVo;
 	import com.jtgh.yjpt.vo.common.AccessoryVo;
 	import com.jtgh.yjpt.vo.common.CodeVo;
@@ -828,7 +829,8 @@ package com.jtgh.yjpt.model.zysqbp
 		}
 		//汇总功能
 		public function gather1(event:MouseEvent):void{
-			var view:WhzysbCount1=new WhzysbCount1() ;
+			//var view:WhzysbCount1=new WhzysbCount1() ;
+			var view:WhzysbTabMain = new WhzysbTabMain();
 			Utils.popupWindow(resourceManager.getString('common','btn.count'),view as DisplayObject,thisView as DisplayObject);
 		}
 		//===================================================

+ 5 - 1
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/select/WhzyStatusSelect.as

@@ -20,8 +20,12 @@ package com.jtgh.yjpt.select
 		protected static var dataXML:XML=
 			<WhzyStatusSelect>
 				<item id="2" localeName="whzy.recordStatus2" />
-				<item id="8" localeName="whzy.recordStatus8" />
 				<item id="3" localeName="whzy.recordStatus3" />
+				<item id="4" localeName="whzy.recordStatus4" />
+				<item id="5" localeName="whzy.recordStatus5" />
+				<item id="6" localeName="whzy.recordStatus6" />
+				<item id="7" localeName="whzy.recordStatus7" />
+				<item id="8" localeName="whzy.recordStatus8" />
 				<item id="10" localeName="whzy.recordStatus10" />
 			</WhzyStatusSelect>
 			;

+ 1 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/Check/JdjcglLayout.mxml

@@ -212,6 +212,7 @@
 			<button:IconButton id="wfHistory" type="wfHistory" visible="{!Global.user.jyr}" includeInLayout="{!Global.user.jyr}" click="dcModel.doWfHistory()" toolTip="{resourceManager.getString('common','btn.wfHistory')}"/>
 			<button:IconButton id="check" type="check" visible="{Global.BUTTON_STATUS}" includeInLayout="{Global.BUTTON_STATUS}"  toolTip="{resourceManager.getString('common','btn.check')}" click="zxjc(event)"/>
 			<button:IconButton id="copy" type="bgzy"  toolTip="{resourceManager.getString('common','btn.fz')}" click="dcModel.doCopy(event)" visible="{!sfJyrFlag}" includeInLayout="{!sfJyrFlag}"/>
+			<button:IconButton id="batchProc" type="batchProc" toolTip="下发所有未提交状态督查" click="dcModel.batchProc(event)" visible="{!sfJyrFlag}" includeInLayout="{!sfJyrFlag}"/>
 		</s:HGroup>
 		<s:VGroup id="searchGroup" width="100%"  visible="false" includeInLayout="false">
 		<s:HGroup width="100%" gap="0" horizontalAlign="left" verticalAlign="middle"  visible="{!sfJyrFlag}" includeInLayout="{!sfJyrFlag}">

+ 6 - 2
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/ZysqbpEdit.mxml

@@ -83,13 +83,17 @@
 					jg_valueCommitHandler(event);
 				}
 				
-				if(mode == Constants.mode_add){
+				/**
+				 * 新增和修改,报告人都应该是当前登录人员,应该以最后提交的人为准,最终提交的人才是报告人
+				 * edit by xh 20160208 
+				 */
+//				if(mode == Constants.mode_add){
 					zysqbp.bgr = Utils.getCurrentUser().name;
 					zysqbp.byzd2 = Utils.getCurrentUser().byzd3;
 					if(Utils.getCurrentUser().lxdh!=null&&Utils.getCurrentUser().lxdh!=""){
 						zysqbp.lxfs = Utils.getCurrentUser().lxdh;
 					}
-				}			
+//				}			
 				
 				if(mode==Constants.mode_edit){
 					jg_valueCommitHandler(event);

+ 9 - 10
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/ZysqbpLayout.mxml

@@ -274,11 +274,9 @@
 								   type="view"/>
 			</s:HGroup>
 		</s:Group>
-		<s:VGroup id="searchGroup" visible="false" width="100%" includeInLayout="false"
-				  paddingLeft="10">
+		<s:VGroup id="searchGroup" visible="false" width="100%" includeInLayout="false" paddingLeft="10">
 			<s:HGroup width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
-				<s:HGroup width="100%" height="40" gap="0" horizontalAlign="left"
-						  verticalAlign="middle">
+				<s:HGroup width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
 					<s:HGroup width="31%" horizontalAlign="left" verticalAlign="middle">
 						<cus:QLabel width="130" text="{resourceManager.getString('yjgl','yjwz.gk')}"/>
 						<cus:QComboBox id="query_gk" width="180" comboxClass="SzdSelect"
@@ -290,16 +288,17 @@
 									   hasBlank="true" parentId="{Global.szd}"/>
 					</s:HGroup>
 					<s:HGroup width="31%" horizontalAlign="left" verticalAlign="middle">
-						<cus:QLabel width="130"
-									text="{resourceManager.getString('yjgl','yjwz.gkdw')}"/>
-						<cus:QTextInput id="query_gkdw" width="180" visible="{Constants.DEPLOY_MODE_0==Global.deployMode}"  includeInLayout="{Constants.DEPLOY_MODE_0==Global.deployMode}" />
-						<cus:QComboBox id="query_gkdw2" comboxClass="JyrSelect"  parentId="{Global.szd}" hasBlank="true"  width="180" visible="{Constants.DEPLOY_MODE_1==Global.deployMode}"  includeInLayout="{Constants.DEPLOY_MODE_1==Global.deployMode}" />
+						<cus:QLabel width="130" text="{resourceManager.getString('yjgl','yjwz.gkdw')}"/>
+						<cus:QTextInput id="query_gkdw" width="180" 
+										visible="{Constants.DEPLOY_MODE_0==Global.deployMode}"  includeInLayout="{Constants.DEPLOY_MODE_0==Global.deployMode}" />
+						<cus:QComboBox id="query_gkdw2" comboxClass="JyrSelect"  parentId="{Global.szd}" hasBlank="true"  width="180" 
+									   visible="{Constants.DEPLOY_MODE_1==Global.deployMode}"  includeInLayout="{Constants.DEPLOY_MODE_1==Global.deployMode}" />
 					</s:HGroup>
 				</s:HGroup>
 			</s:HGroup>
 			<s:HGroup width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
 				<s:HGroup width="31%" horizontalAlign="left" verticalAlign="middle">
-					<cus:QLabel width="130" text="报时间起"/>
+					<cus:QLabel width="130" text="报时间起"/>
 					<ui:DateTime id="query_bgsj_1" width="180"/>
 				</s:HGroup>
 				<s:HGroup width="31%" horizontalAlign="left" verticalAlign="middle">
@@ -313,7 +312,7 @@
 			</s:HGroup>
 			<s:HGroup width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
 				<s:HGroup width="31%" horizontalAlign="left" verticalAlign="middle">
-					<cus:QLabel width="130" text="报时间止"/>
+					<cus:QLabel width="130" text="报时间止"/>
 					<ui:DateTime id="query_bgsj_2" width="180"/>
 				</s:HGroup>
 				<s:HGroup width="31%" horizontalAlign="left" verticalAlign="middle">

+ 350 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountBw.mxml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+		  creationComplete="creationCompleteHandler(event)"
+		  xmlns:button="com.jtgh.yjpt.common.component.ui.button.*" xmlns:cus="com.jtgh.yjpt.common.cus.*" xmlns:ui="com.jtgh.yjpt.common.component.ui.*">
+	<fx:Script>
+		<![CDATA[
+			import com.jtgh.yjpt.common.BusinessContext;
+			import com.jtgh.yjpt.common.Global;
+			import com.jtgh.yjpt.common.util.Constants;
+			import com.jtgh.yjpt.common.util.Utils;
+			import com.jtgh.yjpt.select.JcgSelect;
+			import com.jtgh.yjpt.select.MaoSelect;
+			import com.jtgh.yjpt.select.WhzyStatusSelect;
+			import com.jtgh.yjpt.vo.common.CodeVo;
+			import com.jtgh.yjpt.vo.gkgq.GqVo;
+			import com.jtgh.yjpt.vo.jyr.BwVo;
+			import com.jtgh.yjpt.vo.jyr.JyrVo;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.events.FlexEvent;
+			import mx.events.ListEvent;
+			import mx.rpc.events.ResultEvent;
+			
+			import spark.formatters.DateTimeFormatter;
+			
+			[Bindable]
+			private var total:Number;
+			[Bindable]
+			private var statusList:ArrayCollection;
+			[Bindable]
+			private var inoroutList:ArrayCollection;
+			[Bindable]
+			private var maoList:ArrayCollection;
+			[Bindable]
+			private var jyrWhpmList:ArrayCollection;
+			[Bindable]
+			private var whpmList:ArrayCollection;
+			[Bindable]
+			private var jyrBwList:ArrayCollection;
+			[Bindable]
+			private var gqJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhList:ArrayCollection;
+			
+			public function downLond(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				var szds:Number=0;
+				if(szd.selectedVO != null) {
+					szds = (szd.selectedVO as CodeVo).id;
+				}
+				var gq:Number=0;
+				if(szgq.selectedVO != null) {
+					gq = (szgq.selectedVO as GqVo).id;
+				}
+				var xzqhs:Number=0;
+				if(xzqh.selectedVO != null) {
+					xzqhs = (szd.selectedVO as CodeVo).id;
+				}
+				var jyrs:Number=0;
+				if(jyr.selectedVO != null) {
+					(jyr.selectedVO as JyrVo).id
+				}
+				var mtbws:Number=0;
+				if (mtbw.selectedVO != null) {
+					mtbws = (mtbw.selectedVO as BwVo).id;
+				}	
+
+				var url:String = Utils.getBaseUrl()+"getWxzylExcelFile.do";
+				var request:URLRequest = new URLRequest(url);
+				var params:URLVariables = new URLVariables();
+				params.szd = szds;
+				params.gq = gq;
+				params.xzqh = xzqhs;
+				params.jyr = jyrs;	
+				params.bw = mtbws;
+				params.whbh = whbh.text;
+				params.whzyStatus = whzyStatus.textValue;
+				params.inorout = inorout.textValue;
+				params.mao = mao.textValue;
+				params.startTime = startTime.dateTime==null?"":startTime.text;
+				params.stopTime =  stopTime.dateTime==null?"":stopTime.text;
+				params.zycs = Constants.GGDM_ID_ZYCS_MTBW;
+				request.data = params;
+				request.method = URLRequestMethod.POST;
+				var	file:FileReference= new FileReference();
+				file.addEventListener(Event.COMPLETE, downloadCompleteHandler);
+				file.addEventListener(Event.CANCEL, downloadCompleteHandler);
+				file.download(request,"泊位危险货物作业量查询统计.xls");
+				cursorManager.setBusyCursor();
+			}
+			
+			private function downloadCompleteHandler(event:Event):void {
+				cursorManager.removeBusyCursor();
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				szd.addEventListener(ListEvent.CHANGE,reloadSzd);
+				jyr.addEventListener(ListEvent.CHANGE,reloadJyr);
+			}
+			
+			private function styleFunc(data:Object, column:AdvancedDataGridColumn):Object
+			{
+				if(data["group"])
+					return {fontWeight:"bold"};
+				return null;
+			}
+			
+			public function reloadJyr(e:Event):void
+			{
+				if(jyr.selectedVO!=null)
+				{
+					var jyrVo:JyrVo = jyr.selectedVO as JyrVo;
+					mtbw.reload(jyrVo);
+					xzqh.selectedVO = jyrVo.xzqh;
+				}
+				else
+				{
+					mtbw.reload(null);
+				}
+			}
+			
+			public function reloadSzd(e:Event):void
+			{
+				szgq.reload(szd.selectedVO);
+				jyr.reload(szd.selectedVO);
+				mtbw.reload(null);
+				if(Global.deployMode==Constants.DEPLOY_MODE_0)
+				{
+					xzqh.reload(szd.selectedVO);
+				}
+			}
+			
+			private function count_clickHandler(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				Utils.callRemote("zysqbpController","countEvent2",resultCallBack,whzyStatus.textValue,inorout.textValue,mao.textValue,((szd.selectedVO) as CodeVo).id,
+					szgq.selectedVO==null?0:(szgq.selectedVO as GqVo).id,xzqh.selectedVO==null?0:(xzqh.selectedVO as CodeVo).id,
+					jyr.selectedVO==null?0:(jyr.selectedVO as JyrVo).id,mtbw.selectedVO==null?0:(mtbw.selectedVO as BwVo).id,
+					whbh.text,startTime.dateTime,stopTime.dateTime,Constants.GGDM_ID_ZYCS_MTBW);
+			}
+			
+			private function checkCount():Boolean
+			{
+				if(startTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.startTime.empty",null,"zysqbp");
+					return false;
+				}
+				if(stopTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.stopTime.empty",null,"zysqbp");
+					return false;
+				}
+				return true;
+			}
+			
+			private function resultCallBack(r:ResultEvent):void
+			{
+				var bc:BusinessContext = r.result as BusinessContext;
+				if(Utils.checkMsgError(bc.msgs))
+				{
+					Alert.show(Utils.getFirstErrorMsg(bc.msgs).localeLabel,resourceManager.getString("common","errorTitle"));
+					return;
+				}
+				total = bc.getAttribute("total") as Number;
+				xzqhList = bc.getAttribute("xzqhList") as ArrayCollection;
+				xzqhJyrList = bc.getAttribute("xzqhJyrList") as ArrayCollection;
+				gqJyrList = bc.getAttribute("gqJyrList") as ArrayCollection;
+				jyrBwList = bc.getAttribute("jyrBwList") as ArrayCollection;
+				whpmList = bc.getAttribute("whpmList") as ArrayCollection;
+				jyrWhpmList = bc.getAttribute("jyrWhpmList") as ArrayCollection;
+				statusList = bc.getAttribute("statusList") as ArrayCollection;
+				inoroutList = bc.getAttribute("inoroutList") as ArrayCollection;
+				maoList = bc.getAttribute("maoList") as ArrayCollection;
+				var df:DateTimeFormatter = new DateTimeFormatter();
+				df.setStyle("locale","zh-CN");
+				df.dateTimePattern="yyyy年MM月dd日";
+				countLabel.text=df.format(startTime.dateTime)+"至"+df.format(stopTime.dateTime)+(szd.selectedVO as CodeVo).localeName+"所在地"
+					+(szgq.selectedVO==null?"":(szgq.selectedVO as GqVo).gqmc)+(xzqh.selectedVO==null?"":(xzqh.selectedVO as CodeVo).name)
+					+(jyr.selectedVO==null?"":(jyr.selectedVO as JyrVo).gkjyr)+(mtbw.selectedVO==null?"":(mtbw.selectedVO as BwVo).bwmc)
+					+(whbh.text==""?"":(whbh.text+"危货品"))+"泊位危货作业申报"
+					+(whzyStatus.textValue==null?"":WhzyStatusSelect.getName(whzyStatus.textValue as String))
+					+(inorout.textValue==null?"":JcgSelect.getName(inorout.textValue as String))
+					+(mao.textValue==null?"":MaoSelect.getName(mao.textValue as String))
+					+"总数:"+total;
+			}
+			
+		]]>
+	</fx:Script>
+
+	<s:VGroup  width="100%"  verticalAlign="middle" paddingTop="5" > 
+		<s:HGroup  width="100%"   horizontalAlign="left" verticalAlign="middle">
+			<!--<button:IconButton id="statistics" type="statistics"  toolTip="{resourceManager.getString('common','btn.statistics')}"
+							   click="count_clickHandler(event)"/>-->
+			<s:Spacer width="10"/>
+			<button:IconButton id="print" type="print"  toolTip="{resourceManager.getString('common','btn.export')}" click="downLond(event)"/>
+		</s:HGroup>
+		<s:HGroup width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel textAlign="right" text="{resourceManager.getString('jlrxxgl','szd')}" width="120"/>
+				<cus:QComboBox id="szd" comboxClass="SzdSelect" parentId="{Global.szd.id}" selectedVO="{Global.szd}" width="160" />
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('yjgl','yjya.gq')}" textAlign="right" />
+				<cus:QComboBox id="szgq" comboxClass="GqBySzdSelect" parentId="{Global.szd}" hasBlank="true" width="160" />
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('jlrxxgl','xzqh')}" textAlign="right" />
+				<cus:QComboBox id="xzqh" comboxClass="XzqhSelect" parentId="{Global.deploySzd}" hasBlank="true" width="160" />
+			</s:HGroup>
+		</s:HGroup>   
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报单位" width="120"/>
+				<cus:QComboBox id="jyr" comboxClass="JyrSelect" hasBlank="true" parentId="{Global.szd}" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="泊位" width="120"/>
+				<cus:QComboBox id="mtbw" comboxClass="BwByJyrSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="危货品UN编号" width="120"/>
+				<cus:QTextInput id="whbh" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报审批状态" width="120"/>
+				<cus:QComboBox id="whzyStatus" comboxClass="WhzyStatusSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="进出港" width="120"/>
+				<cus:QComboBox id="inorout" comboxClass="JcgSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="内外贸" width="120"/>
+				<cus:QComboBox id="mao" comboxClass="MaoSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" notNull="true" text="报告时间" width="120"/>
+				<ui:DateTime id="startTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="起" width="20"/>
+				<ui:DateTime id="stopTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="止" width="20"/>
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel text="" width="130"/>	
+				<s:Image source="@Embed('resource/yjpt/list/btn_query.png')" buttonMode="true" click="count_clickHandler(event)"/>
+			</s:HGroup>
+		</s:HGroup>
+		
+		<s:VGroup width="100%" verticalAlign="middle">
+			<s:BorderContainer height="40" width="100%"  backgroundColor="#23A5B8" borderVisible="false">
+				<s:HGroup verticalAlign="middle"  width="100%" horizontalAlign="center" height="40">
+					<s:Label id="countLabel" width="100%" fontSize="16" fontWeight="bold" textAlign="left"/>
+				</s:HGroup>
+			</s:BorderContainer>
+			<mx:VBox  width="100%" height="500">
+				<mx:HBox width="100%" verticalAlign="middle">	
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhList!=null}" includeInLayout="{xzqhList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人行政区划" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhJyrList!=null}" includeInLayout="{xzqhJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="行政区划/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{gqJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{gqJyrList!=null}" includeInLayout="{gqJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="港区/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrBwList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrBwList!=null}" includeInLayout="{jyrBwList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/泊位" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{whpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{whpmList!=null}" includeInLayout="{whpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="危货品名" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrWhpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrWhpmList!=null}" includeInLayout="{jyrWhpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/危货品名" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{statusList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{statusList!=null}" includeInLayout="{statusList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="申报审批状态" styleFunction="{styleFunc}" dataField="statusName" sortable="false" showDataTips="true" dataTipField="statusName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{inoroutList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{inoroutList!=null}" includeInLayout="{inoroutList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="进港/出港" styleFunction="{styleFunc}" dataField="inoroutName" sortable="false" showDataTips="true" dataTipField="inoroutName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{maoList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{maoList!=null}" includeInLayout="{maoList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="内贸/外贸" styleFunction="{styleFunc}" dataField="maoName" sortable="false" showDataTips="true" dataTipField="maoName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+				</mx:HBox>
+			</mx:VBox>
+		</s:VGroup>
+
+	</s:VGroup>
+</s:VGroup>

+ 350 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountCg.mxml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+		  creationComplete="creationCompleteHandler(event)"
+		  xmlns:button="com.jtgh.yjpt.common.component.ui.button.*" xmlns:cus="com.jtgh.yjpt.common.cus.*" xmlns:ui="com.jtgh.yjpt.common.component.ui.*">
+	<fx:Script>
+		<![CDATA[
+			import com.jtgh.yjpt.common.BusinessContext;
+			import com.jtgh.yjpt.common.Global;
+			import com.jtgh.yjpt.common.util.Constants;
+			import com.jtgh.yjpt.common.util.Utils;
+			import com.jtgh.yjpt.select.JcgSelect;
+			import com.jtgh.yjpt.select.MaoSelect;
+			import com.jtgh.yjpt.select.WhzyStatusSelect;
+			import com.jtgh.yjpt.vo.common.CodeVo;
+			import com.jtgh.yjpt.vo.gkgq.GqVo;
+			import com.jtgh.yjpt.vo.jyr.BwVo;
+			import com.jtgh.yjpt.vo.jyr.JyrVo;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.events.FlexEvent;
+			import mx.events.ListEvent;
+			import mx.rpc.events.ResultEvent;
+			
+			import spark.formatters.DateTimeFormatter;
+			
+			[Bindable]
+			private var total:Number;
+			[Bindable]
+			private var statusList:ArrayCollection;
+			[Bindable]
+			private var inoroutList:ArrayCollection;
+			[Bindable]
+			private var maoList:ArrayCollection;
+			[Bindable]
+			private var jyrWhpmList:ArrayCollection;
+			[Bindable]
+			private var whpmList:ArrayCollection;
+			[Bindable]
+			private var jyrBwList:ArrayCollection;
+			[Bindable]
+			private var gqJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhList:ArrayCollection;
+			
+			public function downLond(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				var szds:Number=0;
+				if(szd.selectedVO != null) {
+					szds = (szd.selectedVO as CodeVo).id;
+				}
+				var gq:Number=0;
+				if(szgq.selectedVO != null) {
+					gq = (szgq.selectedVO as GqVo).id;
+				}
+				var xzqhs:Number=0;
+				if(xzqh.selectedVO != null) {
+					xzqhs = (szd.selectedVO as CodeVo).id;
+				}
+				var jyrs:Number=0;
+				if(jyr.selectedVO != null) {
+					(jyr.selectedVO as JyrVo).id
+				}
+				var mtbws:Number=0;
+				if (mtbw.selectedVO != null) {
+					mtbws = (mtbw.selectedVO as BwVo).id;
+				}	
+				
+				var url:String = Utils.getBaseUrl()+"getWxzylExcelFile.do";
+				var request:URLRequest = new URLRequest(url);
+				var params:URLVariables = new URLVariables();
+				params.szd = szds;
+				params.gq = gq;
+				params.xzqh = xzqhs;
+				params.jyr = jyrs;	
+				params.bw = mtbws;
+				params.whbh = whbh.text;
+				params.whzyStatus = whzyStatus.textValue;
+				params.inorout = inorout.textValue;
+				params.mao = mao.textValue;
+				params.startTime = startTime.dateTime==null?"":startTime.text;
+				params.stopTime =  stopTime.dateTime==null?"":stopTime.text;
+				params.zycs = Constants.GGDM_ID_ZYCS_CG;
+				request.data = params;
+				request.method = URLRequestMethod.POST;
+				var	file:FileReference= new FileReference();
+				file.addEventListener(Event.COMPLETE, downloadCompleteHandler);
+				file.addEventListener(Event.CANCEL, downloadCompleteHandler);
+				file.download(request,"储罐危险货物作业量查询统计.xls");
+				cursorManager.setBusyCursor();
+			}
+			
+			private function downloadCompleteHandler(event:Event):void {
+				cursorManager.removeBusyCursor();
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				szd.addEventListener(ListEvent.CHANGE,reloadSzd);
+				jyr.addEventListener(ListEvent.CHANGE,reloadJyr);
+			}
+			
+			private function styleFunc(data:Object, column:AdvancedDataGridColumn):Object
+			{
+				if(data["group"])
+					return {fontWeight:"bold"};
+				return null;
+			}
+			
+			public function reloadJyr(e:Event):void
+			{
+				if(jyr.selectedVO!=null)
+				{
+					var jyrVo:JyrVo = jyr.selectedVO as JyrVo;
+					mtbw.reload(jyrVo);
+					xzqh.selectedVO = jyrVo.xzqh;
+				}
+				else
+				{
+					mtbw.reload(null);
+				}
+			}
+			
+			public function reloadSzd(e:Event):void
+			{
+				szgq.reload(szd.selectedVO);
+				jyr.reload(szd.selectedVO);
+				mtbw.reload(null);
+				if(Global.deployMode==Constants.DEPLOY_MODE_0)
+				{
+					xzqh.reload(szd.selectedVO);
+				}
+			}
+			
+			private function count_clickHandler(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				Utils.callRemote("zysqbpController","countEvent2",resultCallBack,whzyStatus.textValue,inorout.textValue,mao.textValue,((szd.selectedVO) as CodeVo).id,
+					szgq.selectedVO==null?0:(szgq.selectedVO as GqVo).id,xzqh.selectedVO==null?0:(xzqh.selectedVO as CodeVo).id,
+					jyr.selectedVO==null?0:(jyr.selectedVO as JyrVo).id,mtbw.selectedVO==null?0:(mtbw.selectedVO as BwVo).id,
+					whbh.text,startTime.dateTime,stopTime.dateTime,Constants.GGDM_ID_ZYCS_CG);
+			}
+			
+			private function checkCount():Boolean
+			{
+				if(startTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.startTime.empty",null,"zysqbp");
+					return false;
+				}
+				if(stopTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.stopTime.empty",null,"zysqbp");
+					return false;
+				}
+				return true;
+			}
+			
+			private function resultCallBack(r:ResultEvent):void
+			{
+				var bc:BusinessContext = r.result as BusinessContext;
+				if(Utils.checkMsgError(bc.msgs))
+				{
+					Alert.show(Utils.getFirstErrorMsg(bc.msgs).localeLabel,resourceManager.getString("common","errorTitle"));
+					return;
+				}
+				total = bc.getAttribute("total") as Number;
+				xzqhList = bc.getAttribute("xzqhList") as ArrayCollection;
+				xzqhJyrList = bc.getAttribute("xzqhJyrList") as ArrayCollection;
+				gqJyrList = bc.getAttribute("gqJyrList") as ArrayCollection;
+				jyrBwList = bc.getAttribute("jyrBwList") as ArrayCollection;
+				whpmList = bc.getAttribute("whpmList") as ArrayCollection;
+				jyrWhpmList = bc.getAttribute("jyrWhpmList") as ArrayCollection;
+				statusList = bc.getAttribute("statusList") as ArrayCollection;
+				inoroutList = bc.getAttribute("inoroutList") as ArrayCollection;
+				maoList = bc.getAttribute("maoList") as ArrayCollection;
+				var df:DateTimeFormatter = new DateTimeFormatter();
+				df.setStyle("locale","zh-CN");
+				df.dateTimePattern="yyyy年MM月dd日";
+				countLabel.text=df.format(startTime.dateTime)+"至"+df.format(stopTime.dateTime)+(szd.selectedVO as CodeVo).localeName+"所在地"
+					+(szgq.selectedVO==null?"":(szgq.selectedVO as GqVo).gqmc)+(xzqh.selectedVO==null?"":(xzqh.selectedVO as CodeVo).name)
+					+(jyr.selectedVO==null?"":(jyr.selectedVO as JyrVo).gkjyr)+(mtbw.selectedVO==null?"":(mtbw.selectedVO as BwVo).bwmc)
+					+(whbh.text==""?"":(whbh.text+"危货品"))+" 储罐危货作业申报"
+					+(whzyStatus.textValue==null?"":WhzyStatusSelect.getName(whzyStatus.textValue as String))
+					+(inorout.textValue==null?"":JcgSelect.getName(inorout.textValue as String))
+					+(mao.textValue==null?"":MaoSelect.getName(mao.textValue as String))
+					+"总数:"+total;
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<s:VGroup  width="100%"  verticalAlign="middle" paddingTop="5" > 
+		<s:HGroup  width="100%"   horizontalAlign="left" verticalAlign="middle">
+			<!--<button:IconButton id="statistics" type="statistics"  toolTip="{resourceManager.getString('common','btn.statistics')}"
+							   click="count_clickHandler(event)"/>-->
+			<s:Spacer width="10"/>
+			<button:IconButton id="print" type="print"  toolTip="{resourceManager.getString('common','btn.export')}" click="downLond(event)"/>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel textAlign="right" text="{resourceManager.getString('jlrxxgl','szd')}" width="120"/>
+				<cus:QComboBox  id="szd"  comboxClass="SzdSelect" parentId="{Global.szd.id}" selectedVO="{Global.szd}" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('yjgl','yjya.gq')}" textAlign="right" />
+				<cus:QComboBox id="szgq" comboxClass="GqBySzdSelect" parentId="{Global.szd}" hasBlank="true" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('jlrxxgl','xzqh')}" textAlign="right" />
+				<cus:QComboBox id="xzqh" comboxClass="XzqhSelect" parentId="{Global.deploySzd}" hasBlank="true" width="160" />
+			</s:HGroup>
+		</s:HGroup>   
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报单位" width="120"/>
+				<cus:QComboBox id="jyr" comboxClass="JyrSelect" hasBlank="true" parentId="{Global.szd}" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="储罐" width="120"/>
+				<cus:QComboBox id="mtbw" comboxClass="CgSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="危货品UN编号" width="120"/>
+				<cus:QTextInput id="whbh" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报审批状态" width="120"/>
+				<cus:QComboBox id="whzyStatus" comboxClass="WhzyStatusSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="进出港" width="120"/>
+				<cus:QComboBox id="inorout" comboxClass="JcgSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="内外贸" width="120"/>
+				<cus:QComboBox id="mao" comboxClass="MaoSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" notNull="true" text="报告时间" width="120"/>
+				<ui:DateTime id="startTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="起" width="20"/>
+				<ui:DateTime id="stopTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="止" width="20"/>
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel text="" width="130"/>	
+				<s:Image source="@Embed('resource/yjpt/list/btn_query.png')" buttonMode="true" click="count_clickHandler(event)"/>
+			</s:HGroup>
+		</s:HGroup>
+		
+		<s:VGroup width="100%" verticalAlign="middle">
+			<s:BorderContainer height="40" width="100%"  backgroundColor="#23A5B8" borderVisible="false">
+				<s:HGroup verticalAlign="middle"  width="100%" horizontalAlign="center" height="40">
+					<s:Label id="countLabel" width="100%" fontSize="16" fontWeight="bold" textAlign="left"/>
+				</s:HGroup>
+			</s:BorderContainer>
+			<mx:VBox  width="100%" height="500">
+				<mx:HBox width="100%" verticalAlign="middle">	
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhList!=null}" includeInLayout="{xzqhList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人行政区划" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhJyrList!=null}" includeInLayout="{xzqhJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="行政区划/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{gqJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{gqJyrList!=null}" includeInLayout="{gqJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="港区/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrBwList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrBwList!=null}" includeInLayout="{jyrBwList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/储罐" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{whpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{whpmList!=null}" includeInLayout="{whpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="危货品名" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrWhpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrWhpmList!=null}" includeInLayout="{jyrWhpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/危货品名" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{statusList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{statusList!=null}" includeInLayout="{statusList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="申报审批状态" styleFunction="{styleFunc}" dataField="statusName" sortable="false" showDataTips="true" dataTipField="statusName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{inoroutList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{inoroutList!=null}" includeInLayout="{inoroutList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="进港/出港" styleFunction="{styleFunc}" dataField="inoroutName" sortable="false" showDataTips="true" dataTipField="inoroutName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{maoList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{maoList!=null}" includeInLayout="{maoList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="内贸/外贸" styleFunction="{styleFunc}" dataField="maoName" sortable="false" showDataTips="true" dataTipField="maoName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+				</mx:HBox>
+			</mx:VBox>
+		</s:VGroup>
+		
+	</s:VGroup>
+</s:VGroup>

+ 350 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountCk.mxml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+		  creationComplete="creationCompleteHandler(event)"
+		  xmlns:button="com.jtgh.yjpt.common.component.ui.button.*" xmlns:cus="com.jtgh.yjpt.common.cus.*" xmlns:ui="com.jtgh.yjpt.common.component.ui.*">
+	<fx:Script>
+		<![CDATA[
+			import com.jtgh.yjpt.common.BusinessContext;
+			import com.jtgh.yjpt.common.Global;
+			import com.jtgh.yjpt.common.util.Constants;
+			import com.jtgh.yjpt.common.util.Utils;
+			import com.jtgh.yjpt.select.JcgSelect;
+			import com.jtgh.yjpt.select.MaoSelect;
+			import com.jtgh.yjpt.select.WhzyStatusSelect;
+			import com.jtgh.yjpt.vo.common.CodeVo;
+			import com.jtgh.yjpt.vo.gkgq.GqVo;
+			import com.jtgh.yjpt.vo.jyr.BwVo;
+			import com.jtgh.yjpt.vo.jyr.JyrVo;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.events.FlexEvent;
+			import mx.events.ListEvent;
+			import mx.rpc.events.ResultEvent;
+			
+			import spark.formatters.DateTimeFormatter;
+			
+			[Bindable]
+			private var total:Number;
+			[Bindable]
+			private var statusList:ArrayCollection;
+			[Bindable]
+			private var inoroutList:ArrayCollection;
+			[Bindable]
+			private var maoList:ArrayCollection;
+			[Bindable]
+			private var jyrWhpmList:ArrayCollection;
+			[Bindable]
+			private var whpmList:ArrayCollection;
+			[Bindable]
+			private var jyrBwList:ArrayCollection;
+			[Bindable]
+			private var gqJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhList:ArrayCollection;
+			
+			public function downLond(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				var szds:Number=0;
+				if(szd.selectedVO != null) {
+					szds = (szd.selectedVO as CodeVo).id;
+				}
+				var gq:Number=0;
+				if(szgq.selectedVO != null) {
+					gq = (szgq.selectedVO as GqVo).id;
+				}
+				var xzqhs:Number=0;
+				if(xzqh.selectedVO != null) {
+					xzqhs = (szd.selectedVO as CodeVo).id;
+				}
+				var jyrs:Number=0;
+				if(jyr.selectedVO != null) {
+					(jyr.selectedVO as JyrVo).id
+				}
+				var mtbws:Number=0;
+				if (mtbw.selectedVO != null) {
+					mtbws = (mtbw.selectedVO as BwVo).id;
+				}	
+				
+				var url:String = Utils.getBaseUrl()+"getWxzylExcelFile.do";
+				var request:URLRequest = new URLRequest(url);
+				var params:URLVariables = new URLVariables();
+				params.szd = szds;
+				params.gq = gq;
+				params.xzqh = xzqhs;
+				params.jyr = jyrs;	
+				params.bw = mtbws;
+				params.whbh = whbh.text;
+				params.whzyStatus = whzyStatus.textValue;
+				params.inorout = inorout.textValue;
+				params.mao = mao.textValue;
+				params.startTime = startTime.dateTime==null?"":startTime.text;
+				params.stopTime =  stopTime.dateTime==null?"":stopTime.text;
+				params.zycs = Constants.GGDM_ID_ZYCS_CK;
+				request.data = params;
+				request.method = URLRequestMethod.POST;
+				var	file:FileReference= new FileReference();
+				file.addEventListener(Event.COMPLETE, downloadCompleteHandler);
+				file.addEventListener(Event.CANCEL, downloadCompleteHandler);
+				file.download(request,"仓库危险货物作业量查询统计.xls");
+				cursorManager.setBusyCursor();
+			}
+			
+			private function downloadCompleteHandler(event:Event):void {
+				cursorManager.removeBusyCursor();
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				szd.addEventListener(ListEvent.CHANGE,reloadSzd);
+				jyr.addEventListener(ListEvent.CHANGE,reloadJyr);
+			}
+			
+			private function styleFunc(data:Object, column:AdvancedDataGridColumn):Object
+			{
+				if(data["group"])
+					return {fontWeight:"bold"};
+				return null;
+			}
+			
+			public function reloadJyr(e:Event):void
+			{
+				if(jyr.selectedVO!=null)
+				{
+					var jyrVo:JyrVo = jyr.selectedVO as JyrVo;
+					mtbw.reload(jyrVo);
+					xzqh.selectedVO = jyrVo.xzqh;
+				}
+				else
+				{
+					mtbw.reload(null);
+				}
+			}
+			
+			public function reloadSzd(e:Event):void
+			{
+				szgq.reload(szd.selectedVO);
+				jyr.reload(szd.selectedVO);
+				mtbw.reload(null);
+				if(Global.deployMode==Constants.DEPLOY_MODE_0)
+				{
+					xzqh.reload(szd.selectedVO);
+				}
+			}
+			
+			private function count_clickHandler(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				Utils.callRemote("zysqbpController","countEvent2",resultCallBack,whzyStatus.textValue,inorout.textValue,mao.textValue,((szd.selectedVO) as CodeVo).id,
+					szgq.selectedVO==null?0:(szgq.selectedVO as GqVo).id,xzqh.selectedVO==null?0:(xzqh.selectedVO as CodeVo).id,
+					jyr.selectedVO==null?0:(jyr.selectedVO as JyrVo).id,mtbw.selectedVO==null?0:(mtbw.selectedVO as BwVo).id,
+					whbh.text,startTime.dateTime,stopTime.dateTime,Constants.GGDM_ID_ZYCS_CK);
+			}
+			
+			private function checkCount():Boolean
+			{
+				if(startTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.startTime.empty",null,"zysqbp");
+					return false;
+				}
+				if(stopTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.stopTime.empty",null,"zysqbp");
+					return false;
+				}
+				return true;
+			}
+			
+			private function resultCallBack(r:ResultEvent):void
+			{
+				var bc:BusinessContext = r.result as BusinessContext;
+				if(Utils.checkMsgError(bc.msgs))
+				{
+					Alert.show(Utils.getFirstErrorMsg(bc.msgs).localeLabel,resourceManager.getString("common","errorTitle"));
+					return;
+				}
+				total = bc.getAttribute("total") as Number;
+				xzqhList = bc.getAttribute("xzqhList") as ArrayCollection;
+				xzqhJyrList = bc.getAttribute("xzqhJyrList") as ArrayCollection;
+				gqJyrList = bc.getAttribute("gqJyrList") as ArrayCollection;
+				jyrBwList = bc.getAttribute("jyrBwList") as ArrayCollection;
+				whpmList = bc.getAttribute("whpmList") as ArrayCollection;
+				jyrWhpmList = bc.getAttribute("jyrWhpmList") as ArrayCollection;
+				statusList = bc.getAttribute("statusList") as ArrayCollection;
+				inoroutList = bc.getAttribute("inoroutList") as ArrayCollection;
+				maoList = bc.getAttribute("maoList") as ArrayCollection;
+				var df:DateTimeFormatter = new DateTimeFormatter();
+				df.setStyle("locale","zh-CN");
+				df.dateTimePattern="yyyy年MM月dd日";
+				countLabel.text=df.format(startTime.dateTime)+"至"+df.format(stopTime.dateTime)+(szd.selectedVO as CodeVo).localeName+"所在地"
+					+(szgq.selectedVO==null?"":(szgq.selectedVO as GqVo).gqmc)+(xzqh.selectedVO==null?"":(xzqh.selectedVO as CodeVo).name)
+					+(jyr.selectedVO==null?"":(jyr.selectedVO as JyrVo).gkjyr)+(mtbw.selectedVO==null?"":(mtbw.selectedVO as BwVo).bwmc)
+					+(whbh.text==""?"":(whbh.text+"危货品"))+"仓库危货作业申报"
+					+(whzyStatus.textValue==null?"":WhzyStatusSelect.getName(whzyStatus.textValue as String))
+					+(inorout.textValue==null?"":JcgSelect.getName(inorout.textValue as String))
+					+(mao.textValue==null?"":MaoSelect.getName(mao.textValue as String))
+					+"总数:"+total;
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<s:VGroup  width="100%"  verticalAlign="middle" paddingTop="5" > 
+		<s:HGroup  width="100%"   horizontalAlign="left" verticalAlign="middle">
+			<!--<button:IconButton id="statistics" type="statistics"  toolTip="{resourceManager.getString('common','btn.statistics')}"
+							   click="count_clickHandler(event)"/>-->
+			<s:Spacer width="10"/>
+			<button:IconButton id="print" type="print"  toolTip="{resourceManager.getString('common','btn.export')}" click="downLond(event)"/>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel textAlign="right" text="{resourceManager.getString('jlrxxgl','szd')}" width="120"/>
+				<cus:QComboBox  id="szd"  comboxClass="SzdSelect" parentId="{Global.szd.id}" selectedVO="{Global.szd}" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('yjgl','yjya.gq')}" textAlign="right" />
+				<cus:QComboBox id="szgq" comboxClass="GqBySzdSelect" parentId="{Global.szd}" hasBlank="true" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('jlrxxgl','xzqh')}" textAlign="right" />
+				<cus:QComboBox id="xzqh" comboxClass="XzqhSelect" parentId="{Global.deploySzd}" hasBlank="true" width="160" />
+			</s:HGroup>
+		</s:HGroup>   
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报单位" width="120"/>
+				<cus:QComboBox id="jyr" comboxClass="JyrSelect" hasBlank="true" parentId="{Global.szd}" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="仓库" width="120"/>
+				<cus:QComboBox id="mtbw" comboxClass="CkSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="危货品UN编号" width="120"/>
+				<cus:QTextInput id="whbh" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报审批状态" width="120"/>
+				<cus:QComboBox id="whzyStatus" comboxClass="WhzyStatusSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="进出港" width="120"/>
+				<cus:QComboBox id="inorout" comboxClass="JcgSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="内外贸" width="120"/>
+				<cus:QComboBox id="mao" comboxClass="MaoSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" notNull="true" text="报告时间" width="120"/>
+				<ui:DateTime id="startTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="起" width="20"/>
+				<ui:DateTime id="stopTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="止" width="20"/>
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel text="" width="130"/>	
+				<s:Image source="@Embed('resource/yjpt/list/btn_query.png')" buttonMode="true" click="count_clickHandler(event)"/>
+			</s:HGroup>
+		</s:HGroup>
+		
+		<s:VGroup width="100%" verticalAlign="middle">
+			<s:BorderContainer height="40" width="100%"  backgroundColor="#23A5B8" borderVisible="false">
+				<s:HGroup verticalAlign="middle"  width="100%" horizontalAlign="center" height="40">
+					<s:Label id="countLabel" width="100%" fontSize="16" fontWeight="bold" textAlign="left"/>
+				</s:HGroup>
+			</s:BorderContainer>
+			<mx:VBox  width="100%" height="500">
+				<mx:HBox width="100%" verticalAlign="middle">	
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhList!=null}" includeInLayout="{xzqhList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人行政区划" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhJyrList!=null}" includeInLayout="{xzqhJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="行政区划/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{gqJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{gqJyrList!=null}" includeInLayout="{gqJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="港区/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrBwList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrBwList!=null}" includeInLayout="{jyrBwList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/仓库" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{whpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{whpmList!=null}" includeInLayout="{whpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="危货品名" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrWhpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrWhpmList!=null}" includeInLayout="{jyrWhpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/危货品名" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{statusList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{statusList!=null}" includeInLayout="{statusList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="申报审批状态" styleFunction="{styleFunc}" dataField="statusName" sortable="false" showDataTips="true" dataTipField="statusName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{inoroutList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{inoroutList!=null}" includeInLayout="{inoroutList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="进港/出港" styleFunction="{styleFunc}" dataField="inoroutName" sortable="false" showDataTips="true" dataTipField="inoroutName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{maoList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{maoList!=null}" includeInLayout="{maoList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="内贸/外贸" styleFunction="{styleFunc}" dataField="maoName" sortable="false" showDataTips="true" dataTipField="maoName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+				</mx:HBox>
+			</mx:VBox>
+		</s:VGroup>
+		
+	</s:VGroup>
+</s:VGroup>

+ 350 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountDc.mxml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+		  creationComplete="creationCompleteHandler(event)"
+		  xmlns:button="com.jtgh.yjpt.common.component.ui.button.*" xmlns:cus="com.jtgh.yjpt.common.cus.*" xmlns:ui="com.jtgh.yjpt.common.component.ui.*">
+	<fx:Script>
+		<![CDATA[
+			import com.jtgh.yjpt.common.BusinessContext;
+			import com.jtgh.yjpt.common.Global;
+			import com.jtgh.yjpt.common.util.Constants;
+			import com.jtgh.yjpt.common.util.Utils;
+			import com.jtgh.yjpt.select.JcgSelect;
+			import com.jtgh.yjpt.select.MaoSelect;
+			import com.jtgh.yjpt.select.WhzyStatusSelect;
+			import com.jtgh.yjpt.vo.common.CodeVo;
+			import com.jtgh.yjpt.vo.gkgq.GqVo;
+			import com.jtgh.yjpt.vo.jyr.BwVo;
+			import com.jtgh.yjpt.vo.jyr.JyrVo;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.events.FlexEvent;
+			import mx.events.ListEvent;
+			import mx.rpc.events.ResultEvent;
+			
+			import spark.formatters.DateTimeFormatter;
+			
+			[Bindable]
+			private var total:Number;
+			[Bindable]
+			private var statusList:ArrayCollection;
+			[Bindable]
+			private var inoroutList:ArrayCollection;
+			[Bindable]
+			private var maoList:ArrayCollection;
+			[Bindable]
+			private var jyrWhpmList:ArrayCollection;
+			[Bindable]
+			private var whpmList:ArrayCollection;
+			[Bindable]
+			private var jyrBwList:ArrayCollection;
+			[Bindable]
+			private var gqJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhList:ArrayCollection;
+			
+			public function downLond(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				var szds:Number=0;
+				if(szd.selectedVO != null) {
+					szds = (szd.selectedVO as CodeVo).id;
+				}
+				var gq:Number=0;
+				if(szgq.selectedVO != null) {
+					gq = (szgq.selectedVO as GqVo).id;
+				}
+				var xzqhs:Number=0;
+				if(xzqh.selectedVO != null) {
+					xzqhs = (szd.selectedVO as CodeVo).id;
+				}
+				var jyrs:Number=0;
+				if(jyr.selectedVO != null) {
+					(jyr.selectedVO as JyrVo).id
+				}
+				var mtbws:Number=0;
+				if (mtbw.selectedVO != null) {
+					mtbws = (mtbw.selectedVO as BwVo).id;
+				}	
+				
+				var url:String = Utils.getBaseUrl()+"getWxzylExcelFile.do";
+				var request:URLRequest = new URLRequest(url);
+				var params:URLVariables = new URLVariables();
+				params.szd = szds;
+				params.gq = gq;
+				params.xzqh = xzqhs;
+				params.jyr = jyrs;	
+				params.bw = mtbws;
+				params.whbh = whbh.text;
+				params.whzyStatus = whzyStatus.textValue;
+				params.inorout = inorout.textValue;
+				params.mao = mao.textValue;
+				params.startTime = startTime.dateTime==null?"":startTime.text;
+				params.stopTime =  stopTime.dateTime==null?"":stopTime.text;
+				params.zycs = Constants.GGDM_ID_ZYCS_DC;
+				request.data = params;
+				request.method = URLRequestMethod.POST;
+				var	file:FileReference= new FileReference();
+				file.addEventListener(Event.COMPLETE, downloadCompleteHandler);
+				file.addEventListener(Event.CANCEL, downloadCompleteHandler);
+				file.download(request,"堆场危险货物作业量查询统计.xls");
+				cursorManager.setBusyCursor();
+			}
+			
+			private function downloadCompleteHandler(event:Event):void {
+				cursorManager.removeBusyCursor();
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				szd.addEventListener(ListEvent.CHANGE,reloadSzd);
+				jyr.addEventListener(ListEvent.CHANGE,reloadJyr);
+			}
+			
+			private function styleFunc(data:Object, column:AdvancedDataGridColumn):Object
+			{
+				if(data["group"])
+					return {fontWeight:"bold"};
+				return null;
+			}
+			
+			public function reloadJyr(e:Event):void
+			{
+				if(jyr.selectedVO!=null)
+				{
+					var jyrVo:JyrVo = jyr.selectedVO as JyrVo;
+					mtbw.reload(jyrVo);
+					xzqh.selectedVO = jyrVo.xzqh;
+				}
+				else
+				{
+					mtbw.reload(null);
+				}
+			}
+			
+			public function reloadSzd(e:Event):void
+			{
+				szgq.reload(szd.selectedVO);
+				jyr.reload(szd.selectedVO);
+				mtbw.reload(null);
+				if(Global.deployMode==Constants.DEPLOY_MODE_0)
+				{
+					xzqh.reload(szd.selectedVO);
+				}
+			}
+			
+			private function count_clickHandler(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				Utils.callRemote("zysqbpController","countEvent2",resultCallBack,whzyStatus.textValue,inorout.textValue,mao.textValue,((szd.selectedVO) as CodeVo).id,
+					szgq.selectedVO==null?0:(szgq.selectedVO as GqVo).id,xzqh.selectedVO==null?0:(xzqh.selectedVO as CodeVo).id,
+					jyr.selectedVO==null?0:(jyr.selectedVO as JyrVo).id,mtbw.selectedVO==null?0:(mtbw.selectedVO as BwVo).id,
+					whbh.text,startTime.dateTime,stopTime.dateTime,Constants.GGDM_ID_ZYCS_DC);
+			}
+			
+			private function checkCount():Boolean
+			{
+				if(startTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.startTime.empty",null,"zysqbp");
+					return false;
+				}
+				if(stopTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.stopTime.empty",null,"zysqbp");
+					return false;
+				}
+				return true;
+			}
+			
+			private function resultCallBack(r:ResultEvent):void
+			{
+				var bc:BusinessContext = r.result as BusinessContext;
+				if(Utils.checkMsgError(bc.msgs))
+				{
+					Alert.show(Utils.getFirstErrorMsg(bc.msgs).localeLabel,resourceManager.getString("common","errorTitle"));
+					return;
+				}
+				total = bc.getAttribute("total") as Number;
+				xzqhList = bc.getAttribute("xzqhList") as ArrayCollection;
+				xzqhJyrList = bc.getAttribute("xzqhJyrList") as ArrayCollection;
+				gqJyrList = bc.getAttribute("gqJyrList") as ArrayCollection;
+				jyrBwList = bc.getAttribute("jyrBwList") as ArrayCollection;
+				whpmList = bc.getAttribute("whpmList") as ArrayCollection;
+				jyrWhpmList = bc.getAttribute("jyrWhpmList") as ArrayCollection;
+				statusList = bc.getAttribute("statusList") as ArrayCollection;
+				inoroutList = bc.getAttribute("inoroutList") as ArrayCollection;
+				maoList = bc.getAttribute("maoList") as ArrayCollection;
+				var df:DateTimeFormatter = new DateTimeFormatter();
+				df.setStyle("locale","zh-CN");
+				df.dateTimePattern="yyyy年MM月dd日";
+				countLabel.text=df.format(startTime.dateTime)+"至"+df.format(stopTime.dateTime)+(szd.selectedVO as CodeVo).localeName+"所在地"
+					+(szgq.selectedVO==null?"":(szgq.selectedVO as GqVo).gqmc)+(xzqh.selectedVO==null?"":(xzqh.selectedVO as CodeVo).name)
+					+(jyr.selectedVO==null?"":(jyr.selectedVO as JyrVo).gkjyr)+(mtbw.selectedVO==null?"":(mtbw.selectedVO as BwVo).bwmc)
+					+(whbh.text==""?"":(whbh.text+"危货品"))+"堆场危货作业申报"
+					+(whzyStatus.textValue==null?"":WhzyStatusSelect.getName(whzyStatus.textValue as String))
+					+(inorout.textValue==null?"":JcgSelect.getName(inorout.textValue as String))
+					+(mao.textValue==null?"":MaoSelect.getName(mao.textValue as String))
+					+"总数:"+total;
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<s:VGroup  width="100%"  verticalAlign="middle" paddingTop="5" > 
+		<s:HGroup  width="100%"   horizontalAlign="left" verticalAlign="middle">
+			<!--<button:IconButton id="statistics" type="statistics"  toolTip="{resourceManager.getString('common','btn.statistics')}" 
+							   click="count_clickHandler(event)"/>-->
+			<s:Spacer width="10"/>
+			<button:IconButton id="print" type="print"  toolTip="{resourceManager.getString('common','btn.export')}" click="downLond(event)"/>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel textAlign="right" text="{resourceManager.getString('jlrxxgl','szd')}" width="120"/>
+				<cus:QComboBox  id="szd"  comboxClass="SzdSelect" parentId="{Global.szd.id}" selectedVO="{Global.szd}" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('yjgl','yjya.gq')}" textAlign="right" />
+				<cus:QComboBox id="szgq" comboxClass="GqBySzdSelect" parentId="{Global.szd}" hasBlank="true" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('jlrxxgl','xzqh')}" textAlign="right" />
+				<cus:QComboBox id="xzqh" comboxClass="XzqhSelect" parentId="{Global.deploySzd}" hasBlank="true" width="160" />
+			</s:HGroup>
+		</s:HGroup>   
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报单位" width="120"/>
+				<cus:QComboBox id="jyr" comboxClass="JyrSelect" hasBlank="true" parentId="{Global.szd}" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="堆场" width="120"/>
+				<cus:QComboBox id="mtbw" comboxClass="DcSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="危货品UN编号" width="120"/>
+				<cus:QTextInput id="whbh" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报审批状态" width="120"/>
+				<cus:QComboBox id="whzyStatus" comboxClass="WhzyStatusSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="进出港" width="120"/>
+				<cus:QComboBox id="inorout" comboxClass="JcgSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="内外贸" width="120"/>
+				<cus:QComboBox id="mao" comboxClass="MaoSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" notNull="true" text="报告时间" width="120"/>
+				<ui:DateTime id="startTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="起" width="20"/>
+				<ui:DateTime id="stopTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="止" width="20"/>
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel text="" width="130"/>	
+				<s:Image source="@Embed('resource/yjpt/list/btn_query.png')" buttonMode="true" click="count_clickHandler(event)"/>
+			</s:HGroup>
+		</s:HGroup>
+		
+		<s:VGroup width="100%" verticalAlign="middle">
+			<s:BorderContainer height="40" width="100%"  backgroundColor="#23A5B8" borderVisible="false">
+				<s:HGroup verticalAlign="middle"  width="100%" horizontalAlign="center" height="40">
+					<s:Label id="countLabel" width="100%" fontSize="16" fontWeight="bold" textAlign="left"/>
+				</s:HGroup>
+			</s:BorderContainer>
+			<mx:VBox  width="100%" height="500">
+				<mx:HBox width="100%" verticalAlign="middle">	
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhList!=null}" includeInLayout="{xzqhList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人行政区划" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhJyrList!=null}" includeInLayout="{xzqhJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="行政区划/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{gqJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{gqJyrList!=null}" includeInLayout="{gqJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="港区/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrBwList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrBwList!=null}" includeInLayout="{jyrBwList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/堆场" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{whpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{whpmList!=null}" includeInLayout="{whpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="危货品名" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrWhpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrWhpmList!=null}" includeInLayout="{jyrWhpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/危货品名" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{statusList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{statusList!=null}" includeInLayout="{statusList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="申报审批状态" styleFunction="{styleFunc}" dataField="statusName" sortable="false" showDataTips="true" dataTipField="statusName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{inoroutList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{inoroutList!=null}" includeInLayout="{inoroutList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="进港/出港" styleFunction="{styleFunc}" dataField="inoroutName" sortable="false" showDataTips="true" dataTipField="inoroutName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{maoList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{maoList!=null}" includeInLayout="{maoList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="内贸/外贸" styleFunction="{styleFunc}" dataField="maoName" sortable="false" showDataTips="true" dataTipField="maoName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+				</mx:HBox>
+			</mx:VBox>
+		</s:VGroup>
+		
+	</s:VGroup>
+</s:VGroup>

+ 350 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbCountGbq.mxml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+		  creationComplete="creationCompleteHandler(event)"
+		  xmlns:button="com.jtgh.yjpt.common.component.ui.button.*" xmlns:cus="com.jtgh.yjpt.common.cus.*" xmlns:ui="com.jtgh.yjpt.common.component.ui.*">
+	<fx:Script>
+		<![CDATA[
+			import com.jtgh.yjpt.common.BusinessContext;
+			import com.jtgh.yjpt.common.Global;
+			import com.jtgh.yjpt.common.util.Constants;
+			import com.jtgh.yjpt.common.util.Utils;
+			import com.jtgh.yjpt.select.JcgSelect;
+			import com.jtgh.yjpt.select.MaoSelect;
+			import com.jtgh.yjpt.select.WhzyStatusSelect;
+			import com.jtgh.yjpt.vo.common.CodeVo;
+			import com.jtgh.yjpt.vo.gkgq.GqVo;
+			import com.jtgh.yjpt.vo.jyr.BwVo;
+			import com.jtgh.yjpt.vo.jyr.JyrVo;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.events.FlexEvent;
+			import mx.events.ListEvent;
+			import mx.rpc.events.ResultEvent;
+			
+			import spark.formatters.DateTimeFormatter;
+			
+			[Bindable]
+			private var total:Number;
+			[Bindable]
+			private var statusList:ArrayCollection;
+			[Bindable]
+			private var inoroutList:ArrayCollection;
+			[Bindable]
+			private var maoList:ArrayCollection;
+			[Bindable]
+			private var jyrWhpmList:ArrayCollection;
+			[Bindable]
+			private var whpmList:ArrayCollection;
+			[Bindable]
+			private var jyrBwList:ArrayCollection;
+			[Bindable]
+			private var gqJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhJyrList:ArrayCollection;
+			[Bindable]
+			private var xzqhList:ArrayCollection;
+			
+			public function downLond(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				var szds:Number=0;
+				if(szd.selectedVO != null) {
+					szds = (szd.selectedVO as CodeVo).id;
+				}
+				var gq:Number=0;
+				if(szgq.selectedVO != null) {
+					gq = (szgq.selectedVO as GqVo).id;
+				}
+				var xzqhs:Number=0;
+				if(xzqh.selectedVO != null) {
+					xzqhs = (szd.selectedVO as CodeVo).id;
+				}
+				var jyrs:Number=0;
+				if(jyr.selectedVO != null) {
+					(jyr.selectedVO as JyrVo).id
+				}
+				var mtbws:Number=0;
+				if (mtbw.selectedVO != null) {
+					mtbws = (mtbw.selectedVO as BwVo).id;
+				}	
+				
+				var url:String = Utils.getBaseUrl()+"getWxzylExcelFile.do";
+				var request:URLRequest = new URLRequest(url);
+				var params:URLVariables = new URLVariables();
+				params.szd = szds;
+				params.gq = gq;
+				params.xzqh = xzqhs;
+				params.jyr = jyrs;	
+				params.bw = mtbws;
+				params.whbh = whbh.text;
+				params.whzyStatus = whzyStatus.textValue;
+				params.inorout = inorout.textValue;
+				params.mao = mao.textValue;
+				params.startTime = startTime.dateTime==null?"":startTime.text;
+				params.stopTime =  stopTime.dateTime==null?"":stopTime.text;
+				params.zycs = Constants.GGDM_ID_ZYCS_GBQ;
+				request.data = params;
+				request.method = URLRequestMethod.POST;
+				var	file:FileReference= new FileReference();
+				file.addEventListener(Event.COMPLETE, downloadCompleteHandler);
+				file.addEventListener(Event.CANCEL, downloadCompleteHandler);
+				file.download(request,"过驳区危险货物作业量查询统计.xls");
+				cursorManager.setBusyCursor();
+			}
+			
+			private function downloadCompleteHandler(event:Event):void {
+				cursorManager.removeBusyCursor();
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				szd.addEventListener(ListEvent.CHANGE,reloadSzd);
+				jyr.addEventListener(ListEvent.CHANGE,reloadJyr);
+			}
+			
+			private function styleFunc(data:Object, column:AdvancedDataGridColumn):Object
+			{
+				if(data["group"])
+					return {fontWeight:"bold"};
+				return null;
+			}
+			
+			public function reloadJyr(e:Event):void
+			{
+				if(jyr.selectedVO!=null)
+				{
+					var jyrVo:JyrVo = jyr.selectedVO as JyrVo;
+					mtbw.reload(jyrVo);
+					xzqh.selectedVO = jyrVo.xzqh;
+				}
+				else
+				{
+					mtbw.reload(null);
+				}
+			}
+			
+			public function reloadSzd(e:Event):void
+			{
+				szgq.reload(szd.selectedVO);
+				jyr.reload(szd.selectedVO);
+				mtbw.reload(null);
+				if(Global.deployMode==Constants.DEPLOY_MODE_0)
+				{
+					xzqh.reload(szd.selectedVO);
+				}
+			}
+			
+			private function count_clickHandler(event:MouseEvent):void{
+				if(!checkCount())
+					return;
+				Utils.callRemote("zysqbpController","countEvent2",resultCallBack,whzyStatus.textValue,inorout.textValue,mao.textValue,((szd.selectedVO) as CodeVo).id,
+					szgq.selectedVO==null?0:(szgq.selectedVO as GqVo).id,xzqh.selectedVO==null?0:(xzqh.selectedVO as CodeVo).id,
+					jyr.selectedVO==null?0:(jyr.selectedVO as JyrVo).id,mtbw.selectedVO==null?0:(mtbw.selectedVO as BwVo).id,
+					whbh.text,startTime.dateTime,stopTime.dateTime,Constants.GGDM_ID_ZYCS_GBQ);
+			}
+			
+			private function checkCount():Boolean
+			{
+				if(startTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.startTime.empty",null,"zysqbp");
+					return false;
+				}
+				if(stopTime.dateTime==null)
+				{
+					Utils.showInfoMessage("zysqbp.count.stopTime.empty",null,"zysqbp");
+					return false;
+				}
+				return true;
+			}
+			
+			private function resultCallBack(r:ResultEvent):void
+			{
+				var bc:BusinessContext = r.result as BusinessContext;
+				if(Utils.checkMsgError(bc.msgs))
+				{
+					Alert.show(Utils.getFirstErrorMsg(bc.msgs).localeLabel,resourceManager.getString("common","errorTitle"));
+					return;
+				}
+				total = bc.getAttribute("total") as Number;
+				xzqhList = bc.getAttribute("xzqhList") as ArrayCollection;
+				xzqhJyrList = bc.getAttribute("xzqhJyrList") as ArrayCollection;
+				gqJyrList = bc.getAttribute("gqJyrList") as ArrayCollection;
+				jyrBwList = bc.getAttribute("jyrBwList") as ArrayCollection;
+				whpmList = bc.getAttribute("whpmList") as ArrayCollection;
+				jyrWhpmList = bc.getAttribute("jyrWhpmList") as ArrayCollection;
+				statusList = bc.getAttribute("statusList") as ArrayCollection;
+				inoroutList = bc.getAttribute("inoroutList") as ArrayCollection;
+				maoList = bc.getAttribute("maoList") as ArrayCollection;
+				var df:DateTimeFormatter = new DateTimeFormatter();
+				df.setStyle("locale","zh-CN");
+				df.dateTimePattern="yyyy年MM月dd日";
+				countLabel.text=df.format(startTime.dateTime)+"至"+df.format(stopTime.dateTime)+(szd.selectedVO as CodeVo).localeName+"所在地"
+					+(szgq.selectedVO==null?"":(szgq.selectedVO as GqVo).gqmc)+(xzqh.selectedVO==null?"":(xzqh.selectedVO as CodeVo).name)
+					+(jyr.selectedVO==null?"":(jyr.selectedVO as JyrVo).gkjyr)+(mtbw.selectedVO==null?"":(mtbw.selectedVO as BwVo).bwmc)
+					+(whbh.text==""?"":(whbh.text+"危货品"))+"过驳区危货作业申报"
+					+(whzyStatus.textValue==null?"":WhzyStatusSelect.getName(whzyStatus.textValue as String))
+					+(inorout.textValue==null?"":JcgSelect.getName(inorout.textValue as String))
+					+(mao.textValue==null?"":MaoSelect.getName(mao.textValue as String))
+					+"总数:"+total;
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<s:VGroup  width="100%"  verticalAlign="middle" paddingTop="5" > 
+		<s:HGroup  width="100%"   horizontalAlign="left" verticalAlign="middle">
+			<!--<button:IconButton id="statistics" type="statistics"  toolTip="{resourceManager.getString('common','btn.statistics')}" 
+							   click="count_clickHandler(event)"/>-->
+			<s:Spacer width="10"/>
+			<button:IconButton id="print" type="print"  toolTip="{resourceManager.getString('common','btn.export')}" click="downLond(event)"/>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel textAlign="right" text="{resourceManager.getString('jlrxxgl','szd')}" width="120"/>
+				<cus:QComboBox  id="szd"  comboxClass="SzdSelect" parentId="{Global.szd.id}" selectedVO="{Global.szd}" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('yjgl','yjya.gq')}" textAlign="right" />
+				<cus:QComboBox id="szgq" comboxClass="GqBySzdSelect" parentId="{Global.szd}" hasBlank="true" width="160" />
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel width="120" text="{resourceManager.getString('jlrxxgl','xzqh')}" textAlign="right" />
+				<cus:QComboBox id="xzqh" comboxClass="XzqhSelect" parentId="{Global.deploySzd}" hasBlank="true" width="160" />
+			</s:HGroup>
+		</s:HGroup>   
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报单位" width="120"/>
+				<cus:QComboBox id="jyr" comboxClass="JyrSelect" hasBlank="true" parentId="{Global.szd}" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="危货品UN编号" width="120"/>
+				<cus:QTextInput id="whbh" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="申报审批状态" width="120"/>
+				<cus:QComboBox id="whzyStatus" comboxClass="WhzyStatusSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="进出港" width="120"/>
+				<cus:QComboBox id="inorout" comboxClass="JcgSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" text="内外贸" width="120"/>
+				<cus:QComboBox id="mao" comboxClass="MaoSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%" visible="false" includeInLayout="false">
+				<cus:QLabel textAlign="right" text="泊位" width="120"/>
+				<cus:QComboBox id="mtbw" comboxClass="BwByJyrSelect" hasBlank="true" width="160"/>
+			</s:HGroup>
+		</s:HGroup>
+		<s:HGroup  width="100%" height="40" gap="0" horizontalAlign="left" verticalAlign="middle">
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="25%">
+				<cus:QLabel textAlign="right" notNull="true" text="报告时间" width="120"/>
+				<ui:DateTime id="startTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="起" width="20"/>
+				<ui:DateTime id="stopTime" hasTime="false" width="160"/>
+				<cus:QLabel textAlign="right" text="止" width="20"/>
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+			</s:HGroup>
+			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel text="" width="130"/>	
+				<s:Image source="@Embed('resource/yjpt/list/btn_query.png')" buttonMode="true" click="count_clickHandler(event)"/>
+			</s:HGroup>
+		</s:HGroup>
+		
+		<s:VGroup width="100%" verticalAlign="middle">
+			<s:BorderContainer height="40" width="100%"  backgroundColor="#23A5B8" borderVisible="false">
+				<s:HGroup verticalAlign="middle"  width="100%" horizontalAlign="center" height="40">
+					<s:Label id="countLabel" width="100%" fontSize="16" fontWeight="bold" textAlign="left"/>
+				</s:HGroup>
+			</s:BorderContainer>
+			<mx:VBox  width="100%" height="500">
+				<mx:HBox width="100%" verticalAlign="middle">	
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhList!=null}" includeInLayout="{xzqhList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人行政区划" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{xzqhJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{xzqhJyrList!=null}" includeInLayout="{xzqhJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="行政区划/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{gqJyrList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{gqJyrList!=null}" includeInLayout="{gqJyrList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="港区/经营人" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrBwList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrBwList!=null}" includeInLayout="{jyrBwList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/过驳区" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{whpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{whpmList!=null}" includeInLayout="{whpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="危货品名" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{jyrWhpmList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{jyrWhpmList!=null}" includeInLayout="{jyrWhpmList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="经营人/危货品名" styleFunction="{styleFunc}" dataField="name" sortable="false" showDataTips="true" dataTipField="name"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{statusList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{statusList!=null}" includeInLayout="{statusList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="申报审批状态" styleFunction="{styleFunc}" dataField="statusName" sortable="false" showDataTips="true" dataTipField="statusName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{inoroutList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{inoroutList!=null}" includeInLayout="{inoroutList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="进港/出港" styleFunction="{styleFunc}" dataField="inoroutName" sortable="false" showDataTips="true" dataTipField="inoroutName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+					<mx:AdvancedDataGrid width="20%" height="500"  dataProvider="{maoList}"  borderVisible="true"
+										 showScrollTips="true" rowHeight="30"   sortExpertMode="true" borderStyle="inset"
+										 textAlign="center" visible="{maoList!=null}" includeInLayout="{maoList!=null}">
+						<mx:groupedColumns>
+							<mx:AdvancedDataGridColumn headerText="内贸/外贸" styleFunction="{styleFunc}" dataField="maoName" sortable="false" showDataTips="true" dataTipField="maoName"/>
+							<mx:AdvancedDataGridColumn headerText="作业次数" dataField="count" sortable="false" showDataTips="false"/>
+						</mx:groupedColumns>	
+					</mx:AdvancedDataGrid>
+				</mx:HBox>
+			</mx:VBox>
+		</s:VGroup>
+		
+	</s:VGroup>
+</s:VGroup>

+ 55 - 43
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbHuizongInformate.mxml

@@ -29,23 +29,26 @@
 			protected function statistics_clickHandler(event:MouseEvent):void
 			{
 				var szdName:Number=0;
+				var ndNum:Number=new Number(nd.text);
 				if(null!=szd.selectedVO&&"NaN"!=(szd.selectedVO as CodeVo).id.toString())
 					szdName=(szd.selectedVO as CodeVo).id;
 				Utils.callRemote("zysqbpController","gatherImformattion",function (r:ResultEvent):void{
 					var bc:BusinessContext=r.result as BusinessContext;
 					vo=bc.result as ZysqbpGatherVo;
-				},szdName)
+				},szdName,ndNum)
 			}
 
 			protected function print_clickHandler(event:MouseEvent):void
 			{
 				var szdName:Number=0;
+				var ndNum:Number=new Number(nd.text); 
 				if(null!=szd.selectedVO&&"NaN"!=(szd.selectedVO as CodeVo).id.toString())
 					szdName=(szd.selectedVO as CodeVo).id;
 				var url:String = Utils.getBaseUrl()+"getWxzyqkhzFile.do";
 				var request:URLRequest = new URLRequest(url);
 				var params:URLVariables = new URLVariables();
 				params.szd=szdName;
+				params.nd = ndNum;
 				request.data = params;
 				request.method = URLRequestMethod.POST;
 				var file :FileReference= new FileReference();
@@ -70,10 +73,13 @@
 			<s:HGroup  horizontalAlign="left" verticalAlign="middle" width="25%">
 				<cus:QLabel textAlign="right" text="{resourceManager.getString('jlrxxgl','szd')}" width="130"/>
 				<cus:QComboBox  id="szd" comboxClass="SzdSelect" parentId="{Global.szd.id}" selectedVO="{Global.szd}" width="180" />
-			</s:HGroup>
-			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
-			</s:HGroup>
+			</s:HGroup> 
+			<s:HGroup  horizontalAlign="left" verticalAlign="middle"  width="50%">
+				<cus:QLabel textAlign="right" text="年度" width="130"/>
+				<cus:QTextInput id="nd"   width="180"  type="int"/>
+			</s:HGroup> 
 			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
+				<cus:QLabel textAlign="left" text="(只对“规模以上年危货作业量相关统计”有效,默认当前年份)" width="420"/>
 			</s:HGroup>
 			<s:HGroup horizontalAlign="left" verticalAlign="middle" width="25%">
 				<cus:QLabel text="" width="130"/>	
@@ -87,33 +93,39 @@
 			<s:BorderContainer height="40" width="100%"  backgroundColor="#23A5B8" borderVisible="false">
 				<s:HGroup   verticalAlign="middle"  width="100%" horizontalAlign="center" height="40">
 					<s:Label text="危险货物作业情况汇总表" width="90%" fontSize="16" fontWeight="bold" textAlign="left"/>
-					<mx:Label text="截止时间:{Utils.getChinaTimeDate(new Date())}"  textAlign="right"/>
+					<mx:Label text="截止日期:{Utils.getChinaTimeDate(new Date())}"  textAlign="right"/>
 				</s:HGroup>
 			</s:BorderContainer> 	
 			<s:BorderContainer width="100%"   borderVisible="true" borderWeight="2">
 				<s:VGroup width="100%"  horizontalAlign="left"  verticalAlign="middle" paddingTop="10" >
 					<s:HGroup width="100%" horizontalAlign="left"  verticalAlign="middle"  height="25"  gap="0">
-						<cus:QLabel width="15%" height="26" text="港口危货作业企业数(个)"/>
+						<cus:QLabel width="15%" height="26" text="港口危险货物企业数(个)"/>
 						<!--<mx:VRule width="1"  strokeColor="black" height="25" />-->
 						<cus:QTextInput width="10%" text="{vo.gkwhqys}" />
-						<cus:QLabel text="已发经营证许可证(个)" width="15%"/>
+						<cus:QLabel text="填写经营许可证信息的企业数(个)" width="15%"/>
 						<cus:QTextInput width="10%" text="{vo.yfxkz}" />
-						<cus:QLabel text="占比" width="15%"/>
+						<cus:QLabel text="填写经营许可证信息的企业数占比" width="15%"/>
 						<cus:QTextInput width="10%" text="{vo.xkzzb}" />
 					</s:HGroup>
 					<mx:HRule height="1" strokeColor="black" width="100%"/>
 					<s:HGroup width="100%" horizontalAlign="left"  verticalAlign="middle" height="25" gap="0">
-						<cus:QLabel text="已发危货作业认可证(个)" width="15%"/>
+						<cus:QLabel text="已发危货作业附证数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.yfwhzyz}"/>
-						<cus:QLabel text="占    比" width="15%"/>
+						<cus:QLabel text="已发危货作业附证企业数(个)" width="15%"/>
+						<cus:QTextInput width="10%"  text="{vo.yfwhzyzqys}"/>
+						<cus:QLabel text="已发危货作业附证企业数占比" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.yfwhzb}"/>
 					</s:HGroup>
 					<mx:HRule height="1" strokeColor="black" width="100%"/>
 					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle">
-						<cus:QLabel text="企业总人数(人)" width="15%"/>
+						<cus:QLabel text="危货企业填报人数合计(人)" width="15%"/>
 						<cus:QTextInput width="10%" text="{vo.qyzrs}"  />
-						<cus:QLabel text="安全管理人数(人)" width="15%"/>
+						<cus:QLabel text="危货企业录入的管理人员总数(人)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.aqglrs}" />
+						<cus:QLabel text="开展安全评价的企业数(个)" width="15%"/>
+						<cus:QTextInput width="10%" text="{vo.kzaqpjqy}" />
+						<cus:QLabel text="开展安全评价的企业数占比" width="15%"/>
+						<cus:QTextInput width="10%"  text="{vo.kaappjqyzb}"/>
 						<!--		<cus:QLabel text="现场管理人员(人)" width="15%"/>
 								<cus:QTextInput width="10%"  text="125"/>
 								<cus:QLabel text="现场作业人数(人)" width="15%"/>
@@ -123,62 +135,62 @@
 					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle">
 						<cus:QLabel text="码头泊位总数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.mtbwzs}"/>
-						<cus:QLabel text="其中万吨级以上泊位(个)" width="15%"/>
+						<cus:QLabel text="其中万吨级以上泊位(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.wdysbw}"/>
-						<cus:QLabel text="其中5千至1万吨泊位(个)" width="15%"/>
+						<cus:QLabel text="其中5千至1万吨泊位(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.wqdwabw}"/>
-						<cus:QLabel text="其中5千吨级以下泊位(个)" width="15%"/>
+						<cus:QLabel text="其中5千吨级以下泊位(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.wqyxbw}"/>
 					</s:HGroup>
+					
+					<!-- 年吞吐量企业数统计 -->
 					<mx:HRule height="1" strokeColor="black" width="100%"/>
 					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle" >
-						<cus:QLabel text="规模以上年危货吞吐量企业数  大于100万吨(个)" width="15%"/>
+						<cus:QLabel text="规模以上年危货作业量相关统计" width="15%"/> 
+					</s:HGroup> 
+					<mx:HRule height="1" strokeColor="white" width="100%"/>
+					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle" >
+						<cus:QLabel text="泊位年作业量大于100万吨企业数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.nwhttlbwd}"/>
-						<cus:QLabel text="50—100万吨(个)" width="15%"/>
+						<cus:QLabel text="泊位年作业量50—100万吨企业数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.nwhttlwsd}"/>
-						<cus:QLabel text="10—50万吨(个)" width="15%"/>
+						<cus:QLabel text="泊位年作业量10—50万吨企业数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.nwhttlwqx}"/>
+						<cus:QLabel text="辖区内企业年泊位危险货物作业量(万吨)" width="15%"/>
+						<cus:QTextInput width="10%"  text="{vo.wxzyzttl}"/>
 					</s:HGroup>
+					
+					<mx:HRule height="1" strokeColor="black" width="100%"/>
+					<s:HGroup width="100%"  horizontalAlign="left" gap="0" verticalAlign="middle" height="40">
+						<cus:QLabel text="泊位作业位列前十位货种及作业量(吨)" width="15%"/>
+						<cus:QTextArea width="85%" text="{vo.qszyhz}"  height="40"/>
+					</s:HGroup>
+					
+					<!-- 储罐信息 -->
 					<mx:HRule height="1" strokeColor="black" width="100%"/>
 					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle">
-						<cus:QLabel text="储罐总数(个)" width="15%"/>
+						<cus:QLabel text="危货企业拥有储罐总数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.cgzs}"/>
-						<cus:QLabel text="储罐总容量(立方米)" width="15%"/>
+						<cus:QLabel text="危货企业拥有储罐总容量(立方米)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.cgrl}"/>
-						<cus:QLabel text="其中生产性储罐(个)" width="15%"/>
+						<cus:QLabel text="危货企业拥有生产性储罐个数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.qzscxcg}"/>
-						<cus:QLabel text="其中储存性储罐(个)" width="15%"/>
+						<cus:QLabel text="危货企业拥有存储性储罐个数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.qzccxcg}"/>
 					</s:HGroup>
 					<mx:HRule height="1" strokeColor="black" width="100%"/>
 					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle">
-						<cus:QLabel text="已发储罐危险货物作业认可证(个)" width="15%"/>
+						<cus:QLabel text="拥有有效危货作业附证的储罐个数(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.yfcgwhzs}"/>
-						<cus:QLabel text="占    比" width="15%"/>
+						<cus:QLabel text="拥有有效危货作业附证的储罐占比" width="15%"/>
 						<cus:QTextInput width="10%" text="{vo.cgwhzb}" />
-						<!--<cus:QLabel text="辖区内储罐年危险货物总储存量(吨)" width="15%"/>
-						<cus:QTextInput width="10%"  text="561.6"/>-->
-						<cus:QLabel text="辖区内企业年危险货物总吞吐量(万吨)" width="15%"/>
-						<cus:QTextInput width="10%"  text="{vo.wxzyzttl}"/>
-					</s:HGroup>
-					<mx:HRule height="1" strokeColor="black" width="100%"/>
-					<s:HGroup width="100%" horizontalAlign="left" gap="0" verticalAlign="middle">
-						<cus:QLabel text="开展安全评价企业数量(个)" width="15%"/>
-						<cus:QTextInput width="10%" text="{vo.kzaqpjqy}" />
-						<cus:QLabel text="占    比" width="15%"/>
-						<cus:QTextInput width="10%"  text="{vo.kaappjqyzb}"/>
 						<cus:QLabel text="重大危险源数量(个)" width="15%"/>
 						<cus:QTextInput width="10%"  text="{vo.zdwxys}"/>
 						<cus:QLabel text="重大危险源储存总容量(立方米)" width="15%"/>
 						<cus:QTextInput width="10%" text="{vo.zdwxycczrl}" />
-					</s:HGroup>
-					<mx:HRule height="1" strokeColor="black" width="100%"/>
-					<s:HGroup width="100%"  horizontalAlign="left" gap="0" verticalAlign="middle" height="40">
-						<cus:QLabel text="位列前十位作业货种及吞吐量(吨)" width="15%"/>
-						<cus:QTextArea width="85%" text="{vo.qszyhz}"  height="40"/>
-					</s:HGroup>
-
-
+						<!--<cus:QLabel text="辖区内储罐年危险货物总储存量(吨)" width="15%"/>
+						<cus:QTextInput width="10%"  text="561.6"/>-->
+					</s:HGroup> 
 				</s:VGroup>
 			</s:BorderContainer>
 

+ 25 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/view/zysqbp/count/WhzysbTabMain.mxml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
+		  xmlns:s="library://ns.adobe.com/flex/spark"
+		  xmlns:mx="library://ns.adobe.com/flex/mx"
+		  width="100%" height="100%" 
+		  xmlns:xxlr="com.jtgh.yjpt.view.zysqbp.count.*"   >
+  
+	<mx:TabNavigator id="tab" width="100%" height="100%" selectedIndex="0" minHeight="500">
+		<s:NavigatorContent label="泊位危货作业统计">
+			<xxlr:WhzysbCountBw id="bw" />
+		</s:NavigatorContent>
+		<s:NavigatorContent label="储罐危货作业统计">
+			<xxlr:WhzysbCountCg id="cg" />
+		</s:NavigatorContent>
+		<s:NavigatorContent label="堆场危货作业统计">
+			<xxlr:WhzysbCountDc id="dc" />
+		</s:NavigatorContent> 
+		<s:NavigatorContent label="仓库危货作业统计">
+			<xxlr:WhzysbCountCk id="ck" />
+		</s:NavigatorContent>
+		<s:NavigatorContent label="过驳区危货作业统计">
+			<xxlr:WhzysbCountGbq id="gbq" />
+		</s:NavigatorContent> 
+	</mx:TabNavigator>
+</s:VGroup>

+ 3 - 1
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/vo/check/DcVo.as

@@ -283,8 +283,10 @@ package com.jtgh.yjpt.vo.check
 			if(recordStatus==Constants.RECORD_STATE_SUBMIT && Global.deployMode==Constants.DEPLOY_MODE_0){
 				return "已下发";
 			}
+			//_currentTask!=null plus by xuhao 20160208 
+			//对于流程异常的情况,虽然record_status为提交状态,但实际流程没有发起
 			if(recordStatus==Constants.RECORD_STATE_SUBMIT && Global.deployMode==Constants.DEPLOY_MODE_1
-			    && _currentTask.currName==WorkflowStatusSelect.RECORD_STATE_WF_QYTJ){
+			    && _currentTask!=null && _currentTask.currName==WorkflowStatusSelect.RECORD_STATE_WF_QYTJ){
 				return "待企业整改";
 			}
 			if(recordStatus==Constants.RECORD_STATE_SUBMIT){

+ 1 - 0
gkaq/yjpt-flex/trunk/src/com/jtgh/yjpt/vo/zysqbp/ZysqbpGatherVo.as

@@ -11,6 +11,7 @@ package com.jtgh.yjpt.vo.zysqbp
 		public var yfxkz:String;
 		public var xkzzb:String;
 		public var yfwhzyz:String;
+		public var yfwhzyzqys;//plus by xuhao 2017-03-15 已发危货作业附证的企业数(一家企业可以有多个附证)
 		public var yfwhzb:String;
 		public var qyzrs:String;
 		public var aqglrs:String;

BIN
gkaq/yjpt-flex/trunk/src/resource/exceltemplate/wzzyqkhzxx.xls


BIN
gkaq/yjpt-flex/trunk/src/resource/yjpt/list/batch_proc.png