Procházet zdrojové kódy

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

ld_xuhx před 8 roky
rodič
revize
689a4fc7f0

+ 2 - 2
gkjsjy/trunk/WebContent/WEB-INF/pages/cbselect.jsp

@@ -1,6 +1,6 @@
 <%@ page contentType="text/html;charset=UTF-8"%>
 
-<div class="theme-popover" id="cbselectdiv" style="width: 900px;height: 400px;overflow-y:auto;overflow-x:hidden;  ">
+<div class="theme-popover" id="cbselectdiv" >
 	     <div class="theme-poptit">
 	          <div class="popTitle">
 	          	<h4>选择</h4>
@@ -10,7 +10,7 @@
 	          </div>
 	     </div>
  
-	     <div>
+	     <div style="width: 900px;height: 300px;overflow-y:auto;overflow-x:hidden;  ">
 				<table class="search_table" cellpadding="0" cellspacing="0">
 					<tr>
 						<th width="10%"></th>

+ 4 - 1
gkjsjy/trunk/WebContent/WEB-INF/pages/gkjsgl/jgsq/jgsqdsadd.jsp

@@ -466,6 +466,9 @@
 </form>
 <div class="theme-popover-tc" id="theme-popover-tc" style="width: 900px;height: 400px;">
 <div class="theme-poptit-tc">
+				<div class="popTitle-tc">
+	          	<h4>选择项目信息</h4>
+	          </div>
 	          <div class="close-tc">
 	          		<a href="#" title="关闭" onclick="guanbitc()" >×</a>
 	          </div>
@@ -487,7 +490,7 @@
 						<td></td>
 						<td></td>
 						<td></td>
-						<td align="center"> <a class="btn btn-default btn-sm" href="#" onclick="jsjdbgds.detail.xmxxxz()">
+						<td align="center"> <a class="btn btn-default btn-sm" href="#" onclick="jgsqds.detail.xmxxxz()">
 							   <i class="glyphicon glyphicon-search"></i> 
 							            查询</a>
 						</td>	

+ 3 - 0
gkjsjy/trunk/WebContent/WEB-INF/pages/gkjsgl/jsjdbg/jsjdbgdsadd.jsp

@@ -273,6 +273,9 @@
 
 <div class="theme-popover-tc" id="theme-popover-tc" style="width: 900px;height: 400px;">
 <div class="theme-poptit-tc">
+		<div class="popTitle-tc">
+	          	<h4>选择项目信息</h4>
+	          </div>
 	          <div class="close-tc">
 	          		<a href="#" title="关闭" onclick="guanbitc()" >×</a>
 	          </div>

+ 1 - 1
gkjsjy/trunk/WebContent/WEB-INF/pages/gkjsgl/jsjdcbsj/jsjdcbsjdsadd.jsp

@@ -556,7 +556,7 @@
 						<td></td>
 						<td></td>
 						<td></td>
-						<td align="center"> <a class="btn btn-default btn-sm" href="#" onclick="jsjdbgds.detail.xmxxxz()">
+						<td align="center"> <a class="btn btn-default btn-sm" href="#" onclick="jsjdcbsjds.detail.xmxxxz()">
 							   <i class="glyphicon glyphicon-search"></i> 
 							            查询</a>
 						</td>	

+ 1 - 1
gkjsjy/trunk/WebContent/WEB-INF/pages/jyrselect.jsp

@@ -10,7 +10,7 @@
 	          </div>
 	     </div>
  
-	     <div>
+	     <div style="background-color:#f4f4f4;width: 900px;height: 300px;overflow-y:auto;overflow-x:hidden; ">
 				<table class="search_table" cellpadding="0" cellspacing="0">
 					<tr>
 						<th width="10%"></th>

+ 2 - 2
gkjsjy/trunk/WebContent/WEB-INF/pages/showHistory.jsp

@@ -5,7 +5,7 @@ function guanbihist(){
 	$('#selectdiv').slideUp(0);
 }
 </script>
-<div class="theme-popover" id="selectmaskdiv" style="width: 905px;height: 400px;overflow-y: auto;">
+<div class="theme-popover" id="selectmaskdiv" style="width: 905px;height: 400px">
 	     <div class="theme-poptit">
 	          <div class="popTitle">
 	          	<h4>流程历史</h4>
@@ -16,7 +16,7 @@ function guanbihist(){
 	     </div>
  
 			<!-- 列表 -->
-			<div  style="background-color:#f4f4f4;">
+			<div  style="background-color:#f4f4f4;overflow-y: auto;width: 905px;height: 300px">
 				<table class="main_table" cellpadding="0" cellspacing="0" style="width: 99.9%">
 					<tr>
 						<th width="5%">序号</th>	

+ 2 - 2
gkjsjy/trunk/WebContent/WEB-INF/pages/showRy.jsp

@@ -54,7 +54,7 @@ $(document).ready(function () {
 	$.fn.zTree.init($("#usertree"), setting);
 });
 </script>
-<div  class="theme-popover" id="selectrydiv" style="width: 350px;height: 400px;overflow-y: auto;">
+<div  class="theme-popover" id="selectrydiv" style="width: 350px;height: 400px;">
 	     <div class="theme-poptit">
 	          <div class="popTitle">
 	          	<h4>选择${currName }人员</h4>
@@ -65,7 +65,7 @@ $(document).ready(function () {
 	     </div>
  
 			<!-- 列表 -->
-			<div  style="background-color:#f4f4f4;">
+			<div  style="background-color:#f4f4f4;width: 350px;height: 340px;overflow-y: auto;">
 	     <ul id="usertree" class="ztree" style="width:100%; "></ul>
 	     </div>
 	     	<div align="center">

+ 2 - 2
gkjsjy/trunk/WebContent/WEB-INF/pages/showViewOption.jsp

@@ -25,7 +25,7 @@ function guanbiyj(){
 $(document).ready(function () {
 });
 </script>
-<div  class="theme-popover" id="selectyjdiv" style="width: 345px;height: 300px;overflow-y: auto;">
+<div  class="theme-popover" id="selectyjdiv" style="width: 345px;height: 300px;">
 	     <div class="theme-poptit">
 	          <div class="popTitle">
 	          	<h4>意见框</h4>
@@ -36,7 +36,7 @@ $(document).ready(function () {
 	     </div>
  
 			<!-- 列表 -->
-			<div  style="background-color:#f4f4f4;">
+			<div  style="background-color:#f4f4f4;width: 345px;height: 250px;overflow-y: auto;">
 	     <textarea id="ryyj" rows="8" cols="40">同意</textarea>
 	     </div>
 	     	<div align="center">

+ 9 - 2
gkjsjy/trunk/WebContent/static/biz/css/style.css

@@ -149,11 +149,11 @@ body{width:100%;height:100%;font-size:16px;position:relative;margin:0;padding:0;
 }
 
 .theme-poptit-tc {
-	border-bottom:1px solid #ddd;
 	width:100%;
 	height:40px;
+	margin-bottom:10px;
 	position: relative;
-	
+	background-color:#387dc9;-ms-border-radius:8px 8px 0 0;-moz-border-radius:8px 8px 0 0;-webkit-border-radius:8px 8px 0 0;-o-border-radius:8px 8px 0 0;
 }
 
 .popContent-tc {
@@ -161,6 +161,7 @@ body{width:100%;height:100%;font-size:16px;position:relative;margin:0;padding:0;
 }
 
 .popTitle-tc{
+	color:#fff;
 	float:left;
 	padding: 1px 0px 0px 10px;
 	width: 80%;
@@ -229,6 +230,12 @@ body{width:100%;height:100%;font-size:16px;position:relative;margin:0;padding:0;
 	text-shadow: none;
 }
 
+.close-tc a{
+	text-decoration: none;
+	color: #ffffff;
+	text-shadow: none;
+}
+
 /**上传按钮*/
 .file {
 	padding: 5px 10px;

+ 1 - 1
gkjsjy/trunk/WebContent/static/biz/js/main.js

@@ -12,7 +12,7 @@ main.init=function(){
 	main.initMenuCss();
 	main.initTab();
 	main.getDbNum();
-	//setInterval(main.getDbNum,10000);
+	setInterval(main.getDbNum,10000);
 };
 
 

+ 362 - 232
gkjsjy/trunk/src/com/xt/jygl/sys/ctl/MainCtl.java

@@ -32,9 +32,14 @@ import com.xt.jygl.common.Utils;
 import com.xt.jygl.ggfwxxgl.jdtx.service.TxService;
 import com.xt.jygl.ggfwxxgl.tzgg.ggxx.entity.GgxxtxEntity;
 import com.xt.jygl.ggfwxxgl.tzgg.ggxx.service.GgxxtxService;
-import com.xt.jygl.gkjcxx.gk.entity.GkEntity;
 import com.xt.jygl.gkjcxx.gk.service.GkService;
 import com.xt.jygl.gkjcxx.gq.service.GqService;
+import com.xt.jygl.gkjsgl.jgsq.service.JgsqService;
+import com.xt.jygl.gkjsgl.jgsq.service.JgsqdsService;
+import com.xt.jygl.gkjsgl.jsjdbg.service.JsjdbgService;
+import com.xt.jygl.gkjsgl.jsjdbg.service.JsjdbgdsService;
+import com.xt.jygl.gkjsgl.jsjdcbsj.service.JsjdcbsjService;
+import com.xt.jygl.gkjsgl.jsjdcbsj.service.JsjdcbsjdsService;
 import com.xt.jygl.gkjsgl.xmxxgl.entity.XmxxglEntity;
 import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxglService;
 import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxgljggzService;
@@ -51,6 +56,9 @@ import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkyx.entity.XkzyxEntity;
 import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkyx.service.XkzyxService;
 import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkzx.entity.XkzzxEntity;
 import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkzx.service.XkzzxService;
+import com.xt.jygl.gkjygl.gklhxkgl.gkjylhbg.service.LhbgService;
+import com.xt.jygl.gkjygl.gklhxkgl.gkjylhsq.service.LhsqService;
+import com.xt.jygl.gkjygl.gklhxkgl.gkjylhyx.service.LhyxService;
 import com.xt.jygl.workflow.entity.TaskInfoEntity;
 import com.xt.jygl.workflow.param.WorkItem;
 import com.xt.jygl.workflow.service.TaskInfoService;
@@ -102,6 +110,25 @@ public class MainCtl extends BaseWebCtl {
 	private TxService txService;
 	@Autowired
 	private GgxxtxService ggxxtxService;
+	@Autowired
+	private LhsqService lhsqService;
+	@Autowired
+	private LhbgService lhbgService;
+	@Autowired
+	private LhyxService lhyxService;
+	@Autowired
+	private JsjdcbsjdsService jsjdcbsjdsService;
+	@Autowired
+	private JsjdbgdsService jsjdbgdsService;
+	@Autowired
+	private JgsqdsService jgsqdsService;
+	@Autowired
+	private JsjdcbsjService jsjdcbsjService;
+	@Autowired
+	private JsjdbgService jsjdbgService;
+	@Autowired
+	private JgsqService jgsqService;
+
 	@RequestMapping(value = "/main")
 	public String main(Model model) {
 		List<MenuEntity> rootMenus = securityMgr.menuService().findAuthedMenuByPid(Constants.BLANK_UUID);
@@ -125,7 +152,7 @@ public class MainCtl extends BaseWebCtl {
 		if (Constants.NO_ID.equals(securityMgr.getCurrUser().getSfjyr().getId()) && securityMgr.getCurrUser().getSsglbm() != null) {
 			List<String> gqList = gqService.findGqListByUserId(securityMgr.getCurrUser().getId());
 			Utils.getSession().setAttribute("gqList", gqList);
-			if(gqList!=null && gqList.size()>0){
+			if (gqList != null && gqList.size() > 0) {
 				Utils.getSession().setAttribute("gkList", gkService.findByGqList(gqList));
 			}
 		}
@@ -154,12 +181,13 @@ public class MainCtl extends BaseWebCtl {
 
 	@RequestMapping(value = "/todo")
 	public String todo(Model model, String menuid, SimplePageRequest page, HttpServletRequest request, String type, Date begin, Date end) throws JsonProcessingException {
-		/*if (StringUtils.isEmpty(type)) {
-			type = "dcsb";
-		}*/
-		/*if (StringUtils.isNotEmpty(SearchCondition.type) && isGET(request)) {
-			type = SearchCondition.type;
-		}*/
+		/*
+		 * if (StringUtils.isEmpty(type)) { type = "dcsb"; }
+		 */
+		/*
+		 * if (StringUtils.isNotEmpty(SearchCondition.type) && isGET(request)) {
+		 * type = SearchCondition.type; }
+		 */
 		List<WorkItem> volist = new ArrayList<WorkItem>();
 		if ("jsjd".equals(type)) {
 			volist = getJsjdList();
@@ -187,13 +215,58 @@ public class MainCtl extends BaseWebCtl {
 	@ResponseBody
 	public WebJsonResult getDbNum(Model model) throws JsonProcessingException {
 		WebJsonResult ws = success();
-		/*int jsjd = getJsjdNum();*/
-		int dcsb = getDcsbNum();
-		int xkzsq = getXkzsqNum();
-		int xkzbg = getXkzbgNum();
-		int xkzyx = getXkzyxNum();
-		int xkzzx = getXkzzxNum();
-        
+		/* int jsjd = getJsjdNum(); */
+		String jyrid = "";
+		String gqids = "";
+		if (isJyr()) {
+			jyrid = getSsjyr().getId();
+			gqids = getSsjyr().getSzgq();
+		} else {
+			List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
+			if (gqlist != null && gqlist.size() > 0) {
+				for (int i = 0; i < gqlist.size(); i++) {
+					gqids = gqids + "'" + gqlist.get(i) + "'" + ",";
+				}
+				gqids = gqids.substring(0, gqids.length() - 1);
+			}
+		}
+		// 判断省市区别
+		if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
+			int dcsb = getDcsbNum(jyrid, gqids);
+			int xkzsq = getXkzsqNum(jyrid, gqids);
+			int xkzbg = getXkzbgNum(jyrid, gqids);
+			int xkzyx = getXkzyxNum(jyrid, gqids);
+			int xkzzx = getXkzzxNum(jyrid, gqids);
+
+			int jsjdcbsjds = getJsjdcbsjdsNum(jyrid, gqids);
+			int jsjdbgds = getJsjdbgdsNum(jyrid, gqids);
+			int jgsqds = getJgsqdsNum(jyrid, gqids);
+			ws.setAttr("dcsb", dcsb);
+			ws.setAttr("xkzsq", xkzsq);
+			ws.setAttr("xkzbg", xkzbg);
+			ws.setAttr("xkzyx", xkzyx);
+			ws.setAttr("xkzzx", xkzzx);
+			ws.setAttr("jsjdcbsjds", jsjdcbsjds);
+			ws.setAttr("jsjdbgds", jsjdbgds);
+			ws.setAttr("jgsqds", jgsqds);
+		} else {
+			int lhsq = getLhsqNum(jyrid, gqids);
+			int lhbg = getLhbgNum(jyrid, gqids);
+			int lhyx = getLhyxNum(jyrid, gqids);
+			int jsjdcbsj = getJsjdcbsjNum(jyrid, gqids);
+			int jsjdbg = getJsjdbgNum(jyrid, gqids);
+			int jgsq = getJgsqNum(jyrid, gqids);
+			ws.setAttr("lhsq", lhsq);
+			ws.setAttr("lhbg", lhbg);
+			ws.setAttr("lhyx", lhyx);
+			ws.setAttr("jsjdcbsj", jsjdcbsj);
+			ws.setAttr("jsjdbg", jsjdbg);
+			ws.setAttr("jgsq", jgsq);
+		}
+		
+
+		
+
 		Calendar ca = Calendar.getInstance();
 		ca.add(Calendar.MONTH, 1);
 		ws.setAttr("warn", "");
@@ -201,43 +274,39 @@ public class MainCtl extends BaseWebCtl {
 		ws.setAttr("tzggwarn", "");
 		if (getSsjyr() != null) {
 			List<XkzxxEntity> list = xkzxxService.queryNeedWarn(ca.getTime(), getSsjyr().getId());
-			List<Object> jdtxjyr=txService.findByJyrid(getSsjyr().getId());
+			List<Object> jdtxjyr = txService.findByJyrid(getSsjyr().getId());
 			ws.setAttr("warn", "您有<span>" + list.size() + "</span>条许可证即将过期,请及时处理!");
 			ws.setAttr("jdtxwarn", "您有<span>" + jdtxjyr.size() + "</span>条监督提醒即将过期,请及时处理!");
-			//通知公告
-			List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(getSsjyr().getId(),"1");
+			// 通知公告
+			List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(getSsjyr().getId(), "1");
 			ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请及时查看!");
-		}else if(SecUtils.getCurrUser().getSsglry()!=null){
-			//过滤掉自己所发布的监督提醒
-			List<Object> jdtxzj=txService.findByXzryidAndCu(SecUtils.getCurrUser().getSsglry().getId());
-			if(jdtxzj.size()>0){
-				if(jdtxzj.get(0).equals(SecUtils.getCurrUser().getSsglry().getId())){
+		} else if (SecUtils.getCurrUser().getSsglry() != null) {
+			// 过滤掉自己所发布的监督提醒
+			List<Object> jdtxzj = txService.findByXzryidAndCu(SecUtils.getCurrUser().getSsglry().getId());
+			if (jdtxzj.size() > 0) {
+				if (jdtxzj.get(0).equals(SecUtils.getCurrUser().getSsglry().getId())) {
 					ws.setAttr("jdtxwarn", "");
-				}else{
-					List<Object> jdtxxzry=txService.findByXzryid(SecUtils.getCurrUser().getSsglry().getId());
-					ws.setAttr("jdtxwarn", "您有<span>" + jdtxxzry.size() + "</span>条监督提醒即将过期,请及时处理!");	
+				} else {
+					List<Object> jdtxxzry = txService.findByXzryid(SecUtils.getCurrUser().getSsglry().getId());
+					ws.setAttr("jdtxwarn", "您有<span>" + jdtxxzry.size() + "</span>条监督提醒即将过期,请及时处理!");
 				}
 			}
-			//通知公告,过滤自己所发布的监督提醒
-			List<Object> tzggzj=ggxxtxService.findByJyridAndCu(SecUtils.getCurrUser().getSsglry().getId());
-			if(tzggzj.size()>0){
-				if(tzggzj.get(0).equals(SecUtils.getCurrUser().getName())){
+			// 通知公告,过滤自己所发布的监督提醒
+			List<Object> tzggzj = ggxxtxService.findByJyridAndCu(SecUtils.getCurrUser().getSsglry().getId());
+			if (tzggzj.size() > 0) {
+				if (tzggzj.get(0).equals(SecUtils.getCurrUser().getName())) {
 					ws.setAttr("jdtxwarn", "");
-				}else{
-					List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(SecUtils.getCurrUser().getSsglry().getId(),"0");
-					ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请及时查看!");	
+				} else {
+					List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(SecUtils.getCurrUser().getSsglry().getId(), "0");
+					ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请及时查看!");
 				}
-			}else{
-				List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(SecUtils.getCurrUser().getSsglry().getId(),"0");
-				ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请及时查看!");	
+			} else {
+				List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(SecUtils.getCurrUser().getSsglry().getId(), "0");
+				ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请及时查看!");
 			}
 		}
-	/*	ws.setAttr("jsjd", jsjd);*/
-		ws.setAttr("dcsb", dcsb);
-		ws.setAttr("xkzsq", xkzsq);
-		ws.setAttr("xkzbg", xkzbg);
-		ws.setAttr("xkzyx", xkzyx);
-		ws.setAttr("xkzzx", xkzzx);
+		/* ws.setAttr("jsjd", jsjd); */
+		
 		return ws;
 
 	}
@@ -421,7 +490,7 @@ public class MainCtl extends BaseWebCtl {
 								item.setProcessName("许可证申请");
 								item.setProcessKey("xkzsq");
 								item.setDescription(entity.getJyrmc());
-								item.setCreateTime(entity.getCreateDateTime()!=null?entity.getCreateDateTime().toString():"");
+								item.setCreateTime(entity.getCreateDateTime() != null ? entity.getCreateDateTime().toString() : "");
 								if (!StringUtils.isEmpty(entity.getCreateUser())) {
 									UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
 									item.setSenderName(user.getName());
@@ -494,7 +563,7 @@ public class MainCtl extends BaseWebCtl {
 								item.setProcessName("许可证变更");
 								item.setProcessKey("xkzbg");
 								item.setDescription(entity.getJyrmc());
-								item.setCreateTime(entity.getCreateDateTime()!=null?entity.getCreateDateTime().toString():"");
+								item.setCreateTime(entity.getCreateDateTime() != null ? entity.getCreateDateTime().toString() : "");
 								if (!StringUtils.isEmpty(entity.getCreateUser())) {
 									UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
 									item.setSenderName(user.getName());
@@ -557,7 +626,7 @@ public class MainCtl extends BaseWebCtl {
 								item.setProcessName("许可证延续");
 								item.setProcessKey("xkzyx");
 								item.setDescription(entity.getJyrmc());
-								item.setCreateTime(entity.getCreateDateTime()!=null?entity.getCreateDateTime().toString():"");
+								item.setCreateTime(entity.getCreateDateTime() != null ? entity.getCreateDateTime().toString() : "");
 								if (!StringUtils.isEmpty(entity.getCreateUser())) {
 									UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
 									item.setSenderName(user.getName());
@@ -623,7 +692,7 @@ public class MainCtl extends BaseWebCtl {
 									item.setProcessName("许可证注销");
 									item.setProcessKey("xkzzx");
 									item.setDescription(entity.getJyrmc());
-									item.setCreateTime(entity.getCreateDateTime()!=null?entity.getCreateDateTime().toString():"");
+									item.setCreateTime(entity.getCreateDateTime() != null ? entity.getCreateDateTime().toString() : "");
 									if (!StringUtils.isEmpty(entity.getCreateUser())) {
 										UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
 										item.setSenderName(user.getName());
@@ -693,36 +762,20 @@ public class MainCtl extends BaseWebCtl {
 	}
 
 	// 单船申报
-	public int getDcsbNum() throws JsonProcessingException {
-		// 查询条件
-		Specification<DcsbEntity> spec = new Specification<DcsbEntity>() {
-			@Override
-			public Predicate toPredicate(Root<DcsbEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-				List<Predicate> list = new ArrayList<Predicate>();
+	public int getDcsbNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = dcsbService.findByJyrid(jyrid);
+		} else {
+			list = dcsbService.findByGqids(gqids);
+		}
 
-				if (isJyr()) {
-					list.add(cb.like(root.get("ssjyr").get("id").as(String.class), "%" + getSsjyr().getId() + "%"));
-				} else {
-					In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
-					@SuppressWarnings("unchecked")
-					List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
-					if (gqlist != null && gqlist.size() > 0) {
-						for (int i = 0; i < gqlist.size(); i++) {
-							in.value(gqlist.get(i));
-						}
-						list.add(in);
-					}
-				}
-				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
-				return cb.and(list.toArray(new Predicate[] {}));
-			}
-		};
-		List<DcsbEntity> list = query.findAll(spec, DcsbEntity.class);
 		int sum = 0;
 		if (list != null && list.size() > 0) {
-			for (DcsbEntity entity : list) {
-				if (entity != null) {
-					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
+			for (Object id : list) {
+
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
 						sum++;
 					}
 				}
@@ -733,164 +786,226 @@ public class MainCtl extends BaseWebCtl {
 	}
 
 	// 许可证申请
-	public int getXkzsqNum() throws JsonProcessingException {
-		// 查询条件
-		Specification<XkzsqEntity> spec = new Specification<XkzsqEntity>() {
-			@Override
-			public Predicate toPredicate(Root<XkzsqEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-				List<Predicate> list = new ArrayList<Predicate>();
+	public int getXkzsqNum(String jyrid, String gqids) throws JsonProcessingException {
 
-				// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
-				if (isJyr()) {
-					list.add(cb.like(root.get("jyrid").as(String.class), "%" + getSsjyr().getId() + "%"));
-				} else {
-					In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
-					@SuppressWarnings("unchecked")
-					List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
-					if (gqlist != null && gqlist.size() > 0) {
-						for (int i = 0; i < gqlist.size(); i++) {
-							in.value(gqlist.get(i));
-						}
-						list.add(in);
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = xkzsqService.findByJyrids(jyrid);
+		} else {
+			list = xkzsqService.findByGqids(gqids);
+		}
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
+				if (id != null) {
+					if ((xkzsqService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || xkzsqService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
 
 				}
-				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+			}
+		}
+		return sum;
+	}
 
-				return cb.and(list.toArray(new Predicate[] {}));
+	// 许可证变更
+	public int getXkzbgNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = xkzbgService.findByJyrids(jyrid);
+		} else {
+			list = xkzbgService.findByGqids(gqids);
+		}
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
+				if ((xkzbgService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || xkzbgService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+					sum++;
+				}
 			}
-		};
-		List<XkzsqEntity> list = query.findAll(spec, XkzsqEntity.class);
+
+		}
+		return sum;
+	}
+
+	// 许可证延续
+	public int getXkzyxNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = xkzyxService.findByJyrids(jyrid);
+		} else {
+			list = xkzyxService.findByGqids(gqids);
+		}
 		int sum = 0;
 		if (list != null && list.size() > 0) {
-			for (XkzsqEntity entity : list) {
-				if (entity != null) {
-					if (entity.getRecordStatus() != 9) {
-						if ((xkzsqService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || xkzsqService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
-							List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId(), XkzsqEntity.PROCESS_DEFINITION_KEY);
-							if (lists != null & lists.size() > 0) {
-								TaskInfoEntity taskinfo = lists.get(0);
-								if ("申请".equals(taskinfo.getCurrName())) {
+			for (Object id : list) {
+				if ((xkzyxService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || xkzyxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+					sum++;
+				}
+			}
+		}
 
-								} else {
-									sum++;
+		return sum;
+	}
 
-								}
-							}
+	// 许可证注销
+	public int getXkzzxNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = xkzzxService.findByJyrids(jyrid);
+		} else {
+			list = xkzzxService.findByGqids(gqids);
+		}
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
 
-						}
+				if ((xkzzxService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || xkzzxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+
+					sum++;
 
-					}
 				}
 			}
 		}
 		return sum;
 	}
 
-	// 许可证变更
-	public int getXkzbgNum() throws JsonProcessingException {
-		// 查询条件
-		Specification<XkzbgEntity> spec = new Specification<XkzbgEntity>() {
-			@Override
-			public Predicate toPredicate(Root<XkzbgEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-				List<Predicate> list = new ArrayList<Predicate>();
+	// 理货申请
+	public int getLhsqNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = dcsbService.findByJyrid(jyrid);
+		} else {
+			list = dcsbService.findByGqids(gqids);
+		}
 
-				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
-				// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
-				if (!isJyr()) {
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
 
-					In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
-					@SuppressWarnings("unchecked")
-					List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
-					if (gqlist != null && gqlist.size() > 0) {
-						for (int i = 0; i < gqlist.size(); i++) {
-							in.value(gqlist.get(i));
-						}
-						list.add(in);
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
-
-				} else {
-					Subquery<GkjyrEntity> subquery = query.subquery(GkjyrEntity.class);
-					Root<GkjyrEntity> dpRoot = subquery.from(GkjyrEntity.class);
-					subquery.select(dpRoot);
-					List<Predicate> subQueryPredicates = new ArrayList<Predicate>();
-					subQueryPredicates.add(cb.equal(root.get("jyrid").as(String.class), dpRoot.get("id").as(String.class)));
-					subQueryPredicates.add(cb.equal(dpRoot.get("yjyrid").as(String.class), getSsjyr().getId()));
-					subquery.where(subQueryPredicates.toArray(new Predicate[] {}));
-					list.add(cb.exists(subquery));
 				}
+			}
+		}
 
-				return cb.and(list.toArray(new Predicate[] {}));
+		return sum;
+	}
+
+	// 理货变更
+	public int getLhbgNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = dcsbService.findByJyrid(jyrid);
+		} else {
+			list = dcsbService.findByGqids(gqids);
+		}
+
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
+
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
+					}
+				}
 			}
-		};
-		List<XkzbgEntity> list = query.findAll(spec, XkzbgEntity.class);
+		}
+
+		return sum;
+	}
+
+	// 理货延续
+	public int getLhyxNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = dcsbService.findByJyrid(jyrid);
+		} else {
+			list = dcsbService.findByGqids(gqids);
+		}
+
 		int sum = 0;
 		if (list != null && list.size() > 0) {
-			for (XkzbgEntity entity : list) {
-				if (entity != null) {
-					if (entity.getRecordStatus() != 9) {
-						if ((xkzbgService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || xkzbgService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
-							List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId(), XkzbgEntity.PROCESS_DEFINITION_KEY);
-							if (lists != null & lists.size() > 0) {
-								TaskInfoEntity taskinfo = lists.get(0);
-								if ("申请".equals(taskinfo.getCurrName())) {
-								} else {
-									sum++;
-								}
-							}
-						}
+			for (Object id : list) {
+
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
 				}
 			}
+		}
 
+		return sum;
+	}
+
+	// 建设进度初步设计地市
+	public int getJsjdcbsjdsNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = jsjdcbsjdsService.findByJyrids(jyrid);
+		} else {
+			list = jsjdcbsjdsService.findByGqids(gqids);
 		}
+
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
+
+				if (id != null) {
+					if ((jsjdcbsjdsService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || jsjdcbsjdsService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
+					}
+				}
+			}
+		}
+
 		return sum;
 	}
 
-	// 许可证延续
-	public int getXkzyxNum() throws JsonProcessingException {
-		// 查询条件
-		Specification<XkzyxEntity> spec = new Specification<XkzyxEntity>() {
-			@Override
-			public Predicate toPredicate(Root<XkzyxEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-				List<Predicate> list = new ArrayList<Predicate>();
+	// 建设进度初步设计变更地市
+	public int getJsjdbgdsNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = jsjdbgdsService.findByJyrids(jyrid);
+		} else {
+			list = jsjdbgdsService.findByGqids(gqids);
+		}
 
-				// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
-				if (isJyr()) {
-					list.add(cb.like(root.get("jyrid").as(String.class), "%" + getSsjyr().getId() + "%"));
-				} else {
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
 
-					In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
-					@SuppressWarnings("unchecked")
-					List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
-					if (gqlist != null && gqlist.size() > 0) {
-						for (int i = 0; i < gqlist.size(); i++) {
-							in.value(gqlist.get(i));
-						}
-						list.add(in);
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
 				}
-				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
-				return cb.and(list.toArray(new Predicate[] {}));
 			}
-		};
-		List<XkzyxEntity> list = query.findAll(spec, XkzyxEntity.class);
+		}
+
+		return sum;
+	}
+
+	// 竣工申请地市
+	public int getJgsqdsNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = jgsqdsService.findByJyrids(jyrid);
+		} else {
+			list = jgsqdsService.findByGqids(gqids);
+		}
+
 		int sum = 0;
 		if (list != null && list.size() > 0) {
-			for (XkzyxEntity entity : list) {
-				if (entity != null) {
-					if (entity.getRecordStatus() != 9) {
-						if ((xkzyxService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || xkzyxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
-							List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId(), XkzyxEntity.PROCESS_DEFINITION_KEY);
-							if (lists != null & lists.size() > 0) {
-								TaskInfoEntity taskinfo = lists.get(0);
-								if ("申请".equals(taskinfo.getCurrName())) {
-								} else {
-									sum++;
-								}
-							}
+			for (Object id : list) {
 
-						}
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
 				}
 			}
@@ -899,61 +1014,76 @@ public class MainCtl extends BaseWebCtl {
 		return sum;
 	}
 
-	// 许可证注销
-	public int getXkzzxNum() throws JsonProcessingException {
-		// 查询条件
-		Specification<XkzzxEntity> spec = new Specification<XkzzxEntity>() {
-			@Override
-			public Predicate toPredicate(Root<XkzzxEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-				List<Predicate> list = new ArrayList<Predicate>();
-				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
-				// 经营人只能查看自己企业下的数据,非经营人只能查看自己所在地的数据
-				if (!isJyr()) {
-					In<String> in = cb.in(root.get("szgq").get("id").as(String.class));
-					@SuppressWarnings("unchecked")
-					List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
-					if (gqlist != null && gqlist.size() > 0) {
-						for (int i = 0; i < gqlist.size(); i++) {
-							in.value(gqlist.get(i));
-						}
-						list.add(in);
+	// 建设进度初步设计
+	public int getJsjdcbsjNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = jsjdcbsjService.findByJyrids(jyrid);
+		} else {
+			list = jsjdcbsjService.findByGqids(gqids);
+		}
+
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
+
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
-				} else {
-					Subquery<GkjyrEntity> subquery = query.subquery(GkjyrEntity.class);
-					Root<GkjyrEntity> dpRoot = subquery.from(GkjyrEntity.class);
-					subquery.select(dpRoot);
-					List<Predicate> subQueryPredicates = new ArrayList<Predicate>();
-					subQueryPredicates.add(cb.equal(root.get("jyrid").as(String.class), dpRoot.get("id").as(String.class)));
-					subQueryPredicates.add(cb.equal(dpRoot.get("yjyrid").as(String.class), getSsjyr().getId()));
-					subquery.where(subQueryPredicates.toArray(new Predicate[] {}));
-					list.add(cb.exists(subquery));
 				}
-				return cb.and(list.toArray(new Predicate[] {}));
 			}
-		};
-		List<XkzzxEntity> list = query.findAll(spec, XkzzxEntity.class);
+		}
+
+		return sum;
+	}
+
+	// 建设进度变更
+	public int getJsjdbgNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = jsjdbgService.findByJyrids(jyrid);
+		} else {
+			list = jsjdbgService.findByGqids(gqids);
+		}
 
 		int sum = 0;
 		if (list != null && list.size() > 0) {
-			for (XkzzxEntity entity : list) {
-				if (entity != null) {
-					if (entity.getRecordStatus() != 9) {
-						if ((xkzzxService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || xkzzxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
-							List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId(), XkzzxEntity.PROCESS_DEFINITION_KEY);
-							if (lists != null & lists.size() > 0) {
-								TaskInfoEntity taskinfo = lists.get(0);
-								if ("申请".equals(taskinfo.getCurrName())) {
-								} else {
-									sum++;
+			for (Object id : list) {
 
-								}
-							}
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
+					}
+				}
+			}
+		}
 
-						}
+		return sum;
+	}
+
+	// 竣工申请
+	public int getJgsqNum(String jyrid, String gqids) throws JsonProcessingException {
+		List<Object> list = new ArrayList<Object>();
+		if (!StringUtils.isEmpty(jyrid)) {
+			list = jgsqService.findByJyrids(jyrid);
+		} else {
+			list = jgsqService.findByGqids(gqids);
+		}
+
+		int sum = 0;
+		if (list != null && list.size() > 0) {
+			for (Object id : list) {
+
+				if (id != null) {
+					if ((dcsbService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
+						sum++;
 					}
 				}
 			}
 		}
+
 		return sum;
 	}
+
 }