فهرست منبع

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

ld_xuhx 8 سال پیش
والد
کامیت
c252b13907
18فایلهای تغییر یافته به همراه177 افزوده شده و 83 حذف شده
  1. 12 7
      gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtj.jsp
  2. 10 4
      gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjAdd.jsp
  3. 2 2
      gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjEdit.jsp
  4. 2 2
      gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjView.jsp
  5. 17 9
      gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjpro.jsp
  6. 2 2
      gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/dcttltj/dcttltjmain.js
  7. 3 3
      gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/gkttlfx/hwttlfzmain.js
  8. 2 2
      gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjdetail.js
  9. 3 4
      gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjmain.js
  10. 7 0
      gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyxkgl/gkjyxkbg/ctl/XkzbgCtl.java
  11. 54 31
      gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/ctl/HxhbtjCtl.java
  12. 23 14
      gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/ctl/HxhbtjProCtl.java
  13. 9 0
      gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/entity/HxhbtjEntity.java
  14. 3 3
      gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/service/impl/HxhbtjServiceImpl.java
  15. 18 0
      gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/vo/HxhbtjVo.java
  16. 2 0
      gkjsjy/trunk/src/com/xtframe/core/code/service/CodeService.java
  17. 3 0
      gkjsjy/trunk/src/com/xtframe/sec/code/dao/CodeDao.java
  18. 5 0
      gkjsjy/trunk/src/com/xtframe/sec/code/service/impl/CodeServiceImpl.java

+ 12 - 7
gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtj.jsp

@@ -12,8 +12,9 @@
 	<script type="text/javascript" src="${app }/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjmain.js"></script>
 	<script type="text/javascript">
 		$(document).ready(function () {
-			hxhbtj.main.init();
-			initgkSelect('szgksel','${szgkid }','','showgq','80%');
+			$('.dqztselectpicker').selectpicker({
+     			width:'80%'
+     		});
 			iFrameHeightIframe('${menuid}');//自适应高度
 		});
 	</script>
@@ -57,11 +58,15 @@
 					   </tr>
 					   <tr>
 					        <td class="right">
-			                	所在港口:&nbsp;
+			                	所在地区:&nbsp;
 			                </td>
 				            <td>
-				            	<span id="szgksel">
-								</span>
+				            	<select  class='dqztselectpicker' id="dq" name="dq">
+				            				<option ></option>
+										<c:forEach items="${dqlist}" var="list" varStatus="status">	
+											<option value="${list.id }" <c:if test="${dq == list.id }">selected</c:if>>${list.text }</option>	
+										</c:forEach>	            	
+				            	</select>
 				            </td>
 				            <td class="right">
 			                	日期:&nbsp;
@@ -92,7 +97,7 @@
 					    <thead>
 						    <tr>
 						    	<th width="5%">序号</th>
-						    		<th width="10%">港口</th>
+						    		<th width="10%">地区</th>
 				    			<th width="20%">本月完成量</th>
 				        		<th width="20%">本年累计量</th>
 								<th width="20%">同比增长数(%)</th>
@@ -103,7 +108,7 @@
 					    <c:forEach items="${list}" var="list" varStatus="status">
 						    <tr >
 						    	<td >${status.count }</td>
-						    	<td >${list.szgkzw }</td>
+						    	<td >${list.dqzw }</td>
 								<td >${list.bywcl }</td>
 						        <td >${list.bnljl }</td>
 								<td >${list.tbzzs }</td>

+ 10 - 4
gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjAdd.jsp

@@ -12,8 +12,9 @@
 	<script type="text/javascript" src="${app }/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjdetail.js"></script>
 	<script type="text/javascript">
 		$(document).ready(function () {
-			/* hxhbtj.main.init(); */
-			initgkSelect('szgksel','${szgkid }','','showgq','80%');
+			$('.dqztselectpicker').selectpicker({
+     			width:'80%'
+     		});
 			iFrameHeightIframe('${menuid}');//自适应高度
 		});
 	</script>
@@ -47,9 +48,14 @@
  					<input type="hidden" name="path" id="path" value="${path }"/>
 					<table class="apply" cellpadding="0" cellspacing="0">
 						<tr>
-							<th><span class="needwrite">*</span>所在港口:&nbsp;</th>
+							<th><span class="needwrite">*</span>所在地区:&nbsp;</th>
 							<td >
-								<span id="szgksel"></span>
+								<select  class='dqztselectpicker' id="dq" name="dq">
+				            				<option ></option>
+										<c:forEach items="${dqlist}" var="list" varStatus="status">	
+											<option value="${list.id }">${list.text }</option>	
+										</c:forEach>	            	
+				            	</select>
 							</td>
 							<th><span class="needwrite">*</span>日期:&nbsp;</th>
 							<td >

+ 2 - 2
gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjEdit.jsp

@@ -46,9 +46,9 @@
  					<input type="hidden" name="id" value="${record.id }">
 					<table class="apply" cellpadding="0" cellspacing="0">
 						<tr>
-							<th><span class="needwrite">*</span>所在港口:&nbsp;</th>
+							<th><span class="needwrite">*</span>所在地区:&nbsp;</th>
 							<td >
-								<span id="szgksel"></span>
+								<input type="hidden" id="dq" name="dq" value="${record.dq }"/> ${ record.dqzw }
 							</td>
 							<th><span class="needwrite">*</span>日期:&nbsp;</th>
 							<td >

+ 2 - 2
gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjView.jsp

@@ -45,8 +45,8 @@
 			<div class="apply_fill">
 				<table class="apply" cellpadding="0" cellspacing="0">
 					<tr>
-						<th class="right">所在港口:&nbsp;</td>
-						<td>${record.szgkzw }</td>
+						<th class="right">所在地区:&nbsp;</td>
+						<td>${record.dqzw }</td>
 						<th class="right">日期:&nbsp;</td>
 						<td>${record.rq }</td>
 					</tr>

+ 17 - 9
gkjsjy/trunk/WebContent/WEB-INF/pages/gkyxtjyfx/hxhbtj/hxhbtjpro.jsp

@@ -12,7 +12,9 @@
 	<script type="text/javascript" src="${app }/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjmain.js"></script>
 	<script type="text/javascript">
 		$(document).ready(function () {
-			initgkSelect('szgksel','${szgkid }','','','80%');
+			$('.dqztselectpicker').selectpicker({
+     			width:'80%'
+     		});
 			iFrameHeightIframe('${menuid}');//自适应高度
 			sum();
 		});
@@ -138,11 +140,15 @@
 					   </tr>
 					   <tr>
 					   		<td class="right">
-			                	所在港口:&nbsp;
+			                	所在地区:&nbsp;
 			                </td>
 			                 <td>
-				            	<span id="szgksel">
-								</span>
+				            	<select  class='dqztselectpicker' id="dq" name="dq">
+				            				<option ></option>
+										<c:forEach items="${clist}" var="list" varStatus="status">	
+											<option value="${list.id }" <c:if test="${dq == list.id }">selected</c:if>>${list.text }</option>	
+										</c:forEach>	            	
+				            	</select>
 				            </td>
 				            <td class="right">
 			                	日期:&nbsp;
@@ -154,23 +160,25 @@
 			                       	<a class="btn btn-default btn-sm" href="#" onclick="searchMain()">
 								   		<i class="glyphicon glyphicon-search"></i>查询
 							   		</a>
+							   		<c:if test="${dq == null}">
 							   			<a class="btn btn-default btn-sm" href="#" onclick="tjMain()">
 								   		<i class="glyphicon glyphicon-list-alt"></i>统计
 							   		</a>
 							   			<a class="btn btn-default btn-sm" href="#" onclick="saveMain()">
 								   		<i class="glyphicon glyphicon-floppy-disk"></i>保存
 							   		</a>
+							   		</c:if>
 	                        </td>
 	                    </tr>
                     </table>
           		</div>
 				<!-- 列表 -->
-				<c:if test="${szgkid == null}">
+				<c:if test="${dq == null}">
 			    <div  style="background-color:#f4f4f4;">
 				    <table class="main_table" cellpadding="0" cellspacing="0">
 					  
 						    <tr>
-				    			<th width="20%" rowspan="2">地区</th>
+				    			<th width="10%" rowspan="2">地区</th>
 				        		<th width="20%" colspan="2">远洋航线</th>
 								<th width="20%" colspan="2">近洋航线</th>
 								<th width="20%" colspan="2">外贸内支线</th>
@@ -214,14 +222,14 @@
 				    </table>
 				</div>
 				</c:if>
-				<c:if test="${szgkid != null}">
+				<c:if test="${dq != null}">
 				<!-- 列表 -->
 			    <div  style="background-color:#f4f4f4;">
 				    <table class="main_table" cellpadding="0" cellspacing="0">
 					    <thead>
 						    <tr>
 						    	<th width="5%">序号</th>
-						    	<th width="10%">港口</th>
+						    	<th width="10%">地区</th>
 				    			<th width="20%">本月完成量</th>
 				        		<th width="20%">本年累计量</th>
 								<th width="20%">同比增长数(%)</th>
@@ -232,7 +240,7 @@
 					    <c:forEach items="${list}" var="list" varStatus="status">
 						    <tr >
 						    	<td >${status.count }</td>
-						    	<td >${list.szgkzw }</td>
+						    	<td >${list.dqzw }</td>
 								<td >${list.bywcl }</td>
 						        <td >${list.bnljl }</td>
 								<td >${list.tbzzs }</td>

+ 2 - 2
gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/dcttltj/dcttltjmain.js

@@ -120,9 +120,9 @@ function initdctjtb(){
 	$("#dctjtb").find("tr").each(function(){
 		$(this).find("td").each(function(){
 			var a = $(this).text();
-			if(a==0.0){
+			/*if(a==0.0){
 				$(this).text("");
-			}
+			}*/
 		});
 	});
 	//给所有第二大类加左边距

+ 3 - 3
gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/gkttlfx/hwttlfzmain.js

@@ -11,9 +11,9 @@ hwttlfz.main.initdctjtb=function(){
 	$("#hwttlfz").find("tr").each(function(){
 		$(this).find("td").each(function(){
 			var a = $(this).text();
-			if(a==0.0){
-				$(this).text("");
-			}
+			/*if(a==0.0){
+				$(this).text("0.0");
+			}*/
 		});
 	});
 	//给所有第二大类加左边距

+ 2 - 2
gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjdetail.js

@@ -14,7 +14,7 @@ hxhbtj.detail.back=function(){
 
 hxhbtj.detail.save=function(){
 	// 必填非空验证
-	if(vae($('#szgkid'), "所在港口")==false){return false;}
+	if(vae($('#dq'), "所在地区")==false){return false;}
 	if(vae($('#rq'), "日期")==false){return false;}
 	
 	// 特殊字段类型验证
@@ -88,7 +88,7 @@ hxhbtj.detail.stat=function(){
 hxhbtj.detail.saveTbzt=function(data){
 	
 	// 必填非空验证
-	if(vae($('#szgkid'), "所在港口")==false){return false;}
+	if(vae($('#dq'), "所在地区")==false){return false;}
 	if(vae($('#rq'), "日期")==false){return false;}
 	
 	// 特殊字段类型验证

+ 3 - 4
gkjsjy/trunk/WebContent/static/biz/js/gkyxtjyfx/hxhbtj/hxhbtjmain.js

@@ -5,17 +5,16 @@
  
  hxhbtj.main.path=null;
  
- hxhbtj.main.init=function(){
-};
-
  hxhbtj.main.search=function(){
 	$("#hxhbtjform").submit();
 };
  
  hxhbtj.main.view=function(id){
-		location.href=$.app+"/hxhbtj/view?id="+id;
+	location.href=$.app+"/hxhbtj/view?id="+id;
  };
  
+ 
+ 
  hxhbtj.main.del=function(data){
 	$.confirm({
 	    title: '确认框',

+ 7 - 0
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyxkgl/gkjyxkbg/ctl/XkzbgCtl.java

@@ -247,6 +247,7 @@ public class XkzbgCtl extends BaseWebCtl {
 				}
 
 				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 				// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
 				if (!isJyr()) {
 					In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
@@ -352,6 +353,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 					list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
@@ -391,6 +393,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};
@@ -1075,6 +1078,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};
@@ -1112,6 +1116,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};
@@ -1334,6 +1339,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};
@@ -1372,6 +1378,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};

+ 54 - 31
gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/ctl/HxhbtjCtl.java

@@ -57,16 +57,16 @@ public class HxhbtjCtl extends BaseWebCtl {
 
 	// @SuppressWarnings("unused")
 	@RequestMapping(value = "/main")
-	@RequiresPermissions("hxhbtj:main")
-	public String main(SimplePageRequest page, Model model, final HttpServletRequest request, final String rq, final String szgkid, final String menuid) throws JsonProcessingException {
+	// @RequiresPermissions("hxhbtj:main")
+	public String main(SimplePageRequest page, Model model, final HttpServletRequest request, final String rq, final String dq, final String menuid) throws JsonProcessingException {
 		// 查询条件
 		Specification<HxhbtjEntity> spec = new Specification<HxhbtjEntity>() {
 			@Override
 			public Predicate toPredicate(Root<HxhbtjEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
 				List<Predicate> list = new ArrayList<Predicate>();
 				// 所在港口
-				if (StringUtils.isNotEmpty(szgkid)) {
-					list.add(cb.like(root.get("szgk").get("id").as(String.class), "%" + szgkid + "%"));
+				if (StringUtils.isNotEmpty(dq)) {
+					list.add(cb.like(root.get("dq").as(String.class), "%" + dq + "%"));
 				}
 				// 日期
 				if (rq != null) {
@@ -90,14 +90,27 @@ public class HxhbtjCtl extends BaseWebCtl {
 				vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
 				vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
 				vo.setRq(entity.getRq() != null ? entity.getRq().toString() : "");
+				if (!StringUtils.isEmpty(entity.getDq())) {
+					CodeEntity code = securityMgr.codeService().findOne(entity.getDq());
+					if (code != null) {
+						vo.setDqzw(code.getText());
+					}
+				}
 				vo.setRecordStatus(entity.getRecordStatus());
 				voList.add(vo);
 			}
 		}
 
+		String szd = GlobalData.CITY_CODE;
+		if (!StringUtils.isEmpty(szd)) {
+			List<CodeEntity> codelist = securityMgr.codeService().findByBz(szd);
+			model.addAttribute("dqlist", codelist);
+		}
+
 		model.addAttribute("list", voList);
 		model.addAttribute("menuid", menuid);
-		model.addAttribute("szgkid", szgkid);
+		model.addAttribute("dq", dq);
+		// model.addAttribute("szgkid", szgkid);
 		model.addAttribute("rq", rq);
 
 		// 翻页共通
@@ -125,7 +138,7 @@ public class HxhbtjCtl extends BaseWebCtl {
 		HxhbtjEntity entity = hxhbtjService.findOne(id);
 		HxhbtjVo vo = new HxhbtjVo();
 		BeanUtils.copyProperties(entity, vo);
-		vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
+		//vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
 		vo.setBywcl(entity.getBywcl() != null ? entity.getBywcl().toString() : "");
 		vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
 		vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
@@ -173,18 +186,24 @@ public class HxhbtjCtl extends BaseWebCtl {
 		} else {
 			vo.setLxdh(securityMgr.getCurrUser().getSsglbm() != null ? securityMgr.getCurrUser().getSsglbm().getLxdh() : "");
 		}
-
+		if (!StringUtils.isEmpty(entity.getDq())) {
+			CodeEntity code = securityMgr.codeService().findOne(entity.getDq());
+			if (code != null) {
+				vo.setDqzw(code.getText());
+			}
+		}
 		model.addAttribute("record", vo);
 		model.addAttribute("menuid", menuid);
 		return "gkyxtjyfx/hxhbtj/hxhbtjView";
 	}
 
 	@RequestMapping(value = "/add")
-	@RequiresPermissions("hxhbtj:add")
+	// @RequiresPermissions("hxhbtj:add")
 	public String add(Model model, String menuid, String path) {
-		if (!StringUtils.isEmpty(path)) {
-			path = path.replace(":", "&");
-			String jyrid = path.substring(path.lastIndexOf("=") + 1);
+		String szd = GlobalData.CITY_CODE;
+		if (!StringUtils.isEmpty(szd)) {
+			List<CodeEntity> codelist = securityMgr.codeService().findByBz(szd);
+			model.addAttribute("dqlist", codelist);
 		}
 		if (SecUtils.getCurrUser() != null) {
 			List<CodeEntity> list = securityMgr.codeService().findValidCodesByGroupCodeAndCity(Constants.GROUP_CODE_SZD, GlobalData.CITY_CODE);
@@ -200,16 +219,13 @@ public class HxhbtjCtl extends BaseWebCtl {
 	}
 
 	@RequestMapping(value = "/edit")
-	@RequiresPermissions("hxhbtj:edit")
-	public String edit(Model model, String id, String path) {
-		if (!StringUtils.isEmpty(path)) {
-			path = path.replace(":", "&");
-		}
-		model.addAttribute("path", path);
+	// @RequiresPermissions("hxhbtj:edit")
+	public String edit(Model model, String id) {
+
 		HxhbtjEntity entity = hxhbtjService.findOne(id);
 		HxhbtjVo vo = new HxhbtjVo();
 		BeanUtils.copyProperties(entity, vo);
-		vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
+		vo.setDq(entity.getDq() != null ? entity.getDq().toString() : "");
 		vo.setBywcl(entity.getBywcl() != null ? entity.getBywcl().toString() : "");
 		vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
 		vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
@@ -257,24 +273,30 @@ public class HxhbtjCtl extends BaseWebCtl {
 		} else {
 			vo.setLxdh(securityMgr.getCurrUser().getSsglbm() != null ? securityMgr.getCurrUser().getSsglbm().getLxdh() : "");
 		}
+		if (!StringUtils.isEmpty(entity.getDq())) {
+			CodeEntity code = securityMgr.codeService().findOne(entity.getDq());
+			if (code != null) {
+				vo.setDqzw(code.getText());
+			}
+		}
 		model.addAttribute("record", vo);
-		model.addAttribute("szgkid", entity.getSzgk().getId());
 		return "gkyxtjyfx/hxhbtj/hxhbtjEdit";
 	}
 
 	@RequestMapping(value = "/save")
 	// @RequiresPermissions("hxhbtj:add")
 	@ResponseBody
-	public WebJsonResult save(Model model, String path, String szgkid, String rq, HxhbtjEntity code) {
+	public WebJsonResult save(Model model, String path, String szgkid, String rq, HxhbtjEntity code, String dq) {
 		WebJsonResult wr = success();
-		if (StringUtils.isEmpty(szgkid)) {
+
+		if (StringUtils.isEmpty(rq)) {
 			wr.setSuccess(false);
-			wr.setMessage("请选择所在港口!");
+			wr.setMessage("请选择日期!");
 			return wr;
 		}
-		if (StringUtils.isEmpty(rq)) {
+		if (StringUtils.isEmpty(dq)) {
 			wr.setSuccess(false);
-			wr.setMessage("请选择日期!");
+			wr.setMessage("请选择所在地区!");
 			return wr;
 		}
 		// 日期、港口不能重复
@@ -293,7 +315,7 @@ public class HxhbtjCtl extends BaseWebCtl {
 			entity.setBnljl(code.getBnljl());
 			entity.setTbzzs(code.getTbzzs());
 			entity.setRq(code.getRq());
-
+			entity.setDq(dq);
 			// 月内外贸完成量
 			entity.setNmjzxttl(code.getNmjzxttl());
 			entity.setWmjzxttl(code.getWmjzxttl());
@@ -329,12 +351,13 @@ public class HxhbtjCtl extends BaseWebCtl {
 			entity.setNmxkphxs(code.getNmxkphxs());
 			entity.setNmtkhxs(code.getNmtkhxs());
 
-			GkEntity szgk = new GkEntity();
-			szgk.setId(szgkid);
-			entity.setSzgk(szgk);
+			/*
+			 * GkEntity szgk = new GkEntity(); szgk.setId(szgkid);
+			 * entity.setSzgk(szgk);
+			 */
 
 			entity = hxhbtjService.save(entity);
-			
+
 			if ("1".equals(path)) {
 				entity.setRecordStatus(code.getRecordStatus());
 			}
@@ -488,12 +511,12 @@ public class HxhbtjCtl extends BaseWebCtl {
 	// 同步省级数据
 	@RequestMapping(value = "/saveTbzt")
 	@ResponseBody
-	public WebJsonResult saveTbzt(Model model, String path, String spflag, String szgkid, String rq, HxhbtjEntity code) {
+	public WebJsonResult saveTbzt(Model model, String path, String spflag, String szgkid, String rq, HxhbtjEntity code, String dq) {
 		WebJsonResult wr = success();
 		try {
 			// HxhbtjEntity entity = hxhbtjService.findOne(id);
 			code.setRecordStatus(2);
-			wr = save(model, "1", szgkid, rq, code);
+			wr = save(model, "1", szgkid, rq, code, dq);
 		} catch (Exception e) {
 			wr.setSuccess(false);
 			wr.setMessage("提交失败");

+ 23 - 14
gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/ctl/HxhbtjProCtl.java

@@ -56,21 +56,23 @@ public class HxhbtjProCtl extends BaseWebCtl {
 	private QueryService query;
 
 	@RequestMapping(value = "/main")
-	public String main(SimplePageRequest page, Model model, String flag, final HttpServletRequest request, final String rq, final String szgkid, final String menuid) throws JsonProcessingException {
+	public String main(SimplePageRequest page, Model model, String flag, final HttpServletRequest request, final String rq, final String dq, final String menuid) throws JsonProcessingException {
 		String start = "";
 		if (StringUtils.isEmpty(rq)) {
 			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
 			start = sdf.format(new Date());
 		}
-		if (!StringUtils.isEmpty(szgkid)) {
+		List<CodeEntity> clist = securityMgr.codeService().findByPid("82");
+		model.addAttribute("clist", clist);
+		if (!StringUtils.isEmpty(dq)) {
 			// 查询条件
 			Specification<HxhbtjEntity> spec = new Specification<HxhbtjEntity>() {
 				@Override
 				public Predicate toPredicate(Root<HxhbtjEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
 					List<Predicate> list = new ArrayList<Predicate>();
 					// 所在港口
-					if (StringUtils.isNotEmpty(szgkid)) {
-						list.add(cb.like(root.get("szgk").get("id").as(String.class), "%" + szgkid + "%"));
+					if (StringUtils.isNotEmpty(dq)) {
+						list.add(cb.like(root.get("dq").as(String.class), "%" + dq + "%"));
 					}
 					// 日期
 					if (rq != null) {
@@ -97,6 +99,12 @@ public class HxhbtjProCtl extends BaseWebCtl {
 					vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
 					vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
 					vo.setRq(entity.getRq() != null ? entity.getRq().toString() : "");
+					if (!StringUtils.isEmpty(entity.getDq())) {
+						CodeEntity code = securityMgr.codeService().findOne(entity.getDq());
+						if (code != null) {
+							vo.setDqzw(code.getText());
+						}
+					}
 					vo.setRecordStatus(entity.getRecordStatus());
 					svoList.add(vo);
 				}
@@ -104,11 +112,12 @@ public class HxhbtjProCtl extends BaseWebCtl {
 
 			model.addAttribute("list", svoList);
 			model.addAttribute("menuid", menuid);
-			model.addAttribute("szgkid", szgkid);
+			model.addAttribute("dq", dq);
 			model.addAttribute("rq", rq);
 			// 翻页共通
 			putPageInfo(model, page, list);
 		} else {
+
 			List<HxhbtjVo> volist = new ArrayList<HxhbtjVo>();
 			if (StringUtils.isEmpty(flag)) {
 				List<HxhbtjproEntity> list = hxhbtjproService.findByRq(rq != null ? rq : start);
@@ -128,19 +137,19 @@ public class HxhbtjProCtl extends BaseWebCtl {
 						volist.add(vo);
 					}
 				} else {
-					List<CodeEntity> clist = securityMgr.codeService().findByPid("900");
+
 					if (clist != null && clist.size() > 0) {
 						for (CodeEntity code : clist) {
 							HxhbtjVo vo = new HxhbtjVo();
 							vo.setSzd(code.getText());
-							vo.setYyhxts("0");
-							vo.setYyhxhbs("0");
-							vo.setJyhxts("0");
-							vo.setJyhxhbs("0");
-							vo.setNzxts("0");
-							vo.setNzxhbs("0");
-							vo.setNmhxts("0");
-							vo.setNmhxhbs("0");
+							vo.setYyhxts("0.0");
+							vo.setYyhxhbs("0.0");
+							vo.setJyhxts("0.0");
+							vo.setJyhxhbs("0.0");
+							vo.setNzxts("0.0");
+							vo.setNzxhbs("0.0");
+							vo.setNmhxts("0.0");
+							vo.setNmhxhbs("0.0");
 							vo.setId(code.getId());
 							volist.add(vo);
 						}

+ 9 - 0
gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/entity/HxhbtjEntity.java

@@ -61,6 +61,7 @@ public class HxhbtjEntity extends BaseEntity<String> implements Cloneable {
 	private Double nmxkphxs; // 内贸新开辟航线数
 	private Double nmtkhxs; // 内贸停开航线数
 	private String rq; // 日期
+	private String dq;
 
 	@Id
 	@GenericGenerator(name = "systemUUID", strategy = "uuid")
@@ -323,4 +324,12 @@ public class HxhbtjEntity extends BaseEntity<String> implements Cloneable {
 		this.rq = rq;
 	}
 
+	public String getDq() {
+		return dq;
+	}
+
+	public void setDq(String dq) {
+		this.dq = dq;
+	}
+
 }

+ 3 - 3
gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/service/impl/HxhbtjServiceImpl.java

@@ -57,10 +57,10 @@ public class HxhbtjServiceImpl extends JyglBaseService<HxhbtjEntity, String> imp
 		sb.append("select d.text,nvl(a.a1, 0) yyhxts,nvl(a.a2, 0) yyhxhbs,nvl(a.a3, 0) jyhxts,nvl(a.a4, 0) jyhxhbs,");
 		sb.append("nvl(a.a5, 0) nzxts,nvl(a.a6, 0) nzxhbs,nvl(a.a7, 0) nmhxts,nvl(a.a8, 0) nmhxhbs,d.id");
 		sb.append(" from ");
-		sb.append(" (select t.szd szd,nvl(sum(t.yyhxts), 0) a1,nvl(sum(t.yyhxhbs), 0) a2,nvl(sum(t.jyhxts), 0) a3,nvl(sum(t.jyhxhbs), 0) a4,");
+		sb.append(" (select t.dq dq,nvl(sum(t.yyhxts), 0) a1,nvl(sum(t.yyhxhbs), 0) a2,nvl(sum(t.jyhxts), 0) a3,nvl(sum(t.jyhxhbs), 0) a4,");
 		sb.append(" nvl(sum(t.nzxts), 0) a5,nvl(sum(t.nzxhbs), 0) a6, nvl(sum(t.nmhxts), 0) a7,nvl(sum(t.nmhxhbs), 0) a8 ");
-        sb.append(" from GK_OPERATION_JSJY_HXHBTJ t where t.rq = :rq group by t.szd) a") ;
-        sb.append(" right join gk_operation_jsjy_code d  on a.szd = d.id where d.pid = 900 order by d.sortno asc");
+        sb.append(" from GK_OPERATION_JSJY_HXHBTJ t where t.rq = :rq group by t.dq) a") ;
+        sb.append(" right join gk_operation_jsjy_code d  on a.dq = d.id where d.pid = 82 order by d.sortno asc");
         params.put("rq", rq);
 		return (List<Object>) dao.nativeQuery(sb.toString(), params);
 	}

+ 18 - 0
gkjsjy/trunk/src/com/xt/jygl/gkyxtjyfx/hxhbtj/vo/HxhbtjVo.java

@@ -62,7 +62,25 @@ public class HxhbtjVo extends BaseVo {
 	private String szgk = null;
 	//日期
 	private String rq = null;
+	private String dq = null;
+	private String dqzw = null;
 	
+	public String getDqzw() {
+		return dqzw;
+	}
+
+	public void setDqzw(String dqzw) {
+		this.dqzw = dqzw;
+	}
+
+	public String getDq() {
+		return dq;
+	}
+
+	public void setDq(String dq) {
+		this.dq = dq;
+	}
+
 	private String id = null;
 	
 	private String yyhxts = null; //远洋航线条数

+ 2 - 0
gkjsjy/trunk/src/com/xtframe/core/code/service/CodeService.java

@@ -91,4 +91,6 @@ public interface CodeService {
 	 * @return
 	 */
 	public CodeEntity findOneByCodeText(String text);
+	
+	public List<CodeEntity> findByBz(String text);
 }

+ 3 - 0
gkjsjy/trunk/src/com/xtframe/sec/code/dao/CodeDao.java

@@ -49,5 +49,8 @@ public interface CodeDao extends SecRepository<CodeEntity, String> {
 
 	@Query("SELECT m FROM CodeEntity m  WHERE m.recordStatus<>9 and m.text=?1")
 	public List<CodeEntity> findOneByCodeText(String text);
+	
+	@Query("SELECT m FROM CodeEntity m  WHERE m.recordStatus<>9 and m.bz=?1")
+	public List<CodeEntity> findByBz(String bz);
 
 }

+ 5 - 0
gkjsjy/trunk/src/com/xtframe/sec/code/service/impl/CodeServiceImpl.java

@@ -91,4 +91,9 @@ public class CodeServiceImpl extends BaseSecurityService implements CodeService
 		return null;
 	}
 
+	@Override
+	public List<CodeEntity> findByBz(String text) {
+		return dao.findByBz(text);
+	}
+
 }