|
@@ -32,9 +32,14 @@ import com.xt.jygl.common.Utils;
|
|
import com.xt.jygl.ggfwxxgl.jdtx.service.TxService;
|
|
import com.xt.jygl.ggfwxxgl.jdtx.service.TxService;
|
|
import com.xt.jygl.ggfwxxgl.tzgg.ggxx.entity.GgxxtxEntity;
|
|
import com.xt.jygl.ggfwxxgl.tzgg.ggxx.entity.GgxxtxEntity;
|
|
import com.xt.jygl.ggfwxxgl.tzgg.ggxx.service.GgxxtxService;
|
|
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.gk.service.GkService;
|
|
import com.xt.jygl.gkjcxx.gq.service.GqService;
|
|
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.entity.XmxxglEntity;
|
|
import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxglService;
|
|
import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxglService;
|
|
import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxgljggzService;
|
|
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.gkjyxkyx.service.XkzyxService;
|
|
import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkzx.entity.XkzzxEntity;
|
|
import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkzx.entity.XkzzxEntity;
|
|
import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkzx.service.XkzzxService;
|
|
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.entity.TaskInfoEntity;
|
|
import com.xt.jygl.workflow.param.WorkItem;
|
|
import com.xt.jygl.workflow.param.WorkItem;
|
|
import com.xt.jygl.workflow.service.TaskInfoService;
|
|
import com.xt.jygl.workflow.service.TaskInfoService;
|
|
@@ -102,6 +110,25 @@ public class MainCtl extends BaseWebCtl {
|
|
private TxService txService;
|
|
private TxService txService;
|
|
@Autowired
|
|
@Autowired
|
|
private GgxxtxService ggxxtxService;
|
|
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")
|
|
@RequestMapping(value = "/main")
|
|
public String main(Model model) {
|
|
public String main(Model model) {
|
|
List<MenuEntity> rootMenus = securityMgr.menuService().findAuthedMenuByPid(Constants.BLANK_UUID);
|
|
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) {
|
|
if (Constants.NO_ID.equals(securityMgr.getCurrUser().getSfjyr().getId()) && securityMgr.getCurrUser().getSsglbm() != null) {
|
|
List<String> gqList = gqService.findGqListByUserId(securityMgr.getCurrUser().getId());
|
|
List<String> gqList = gqService.findGqListByUserId(securityMgr.getCurrUser().getId());
|
|
Utils.getSession().setAttribute("gqList", gqList);
|
|
Utils.getSession().setAttribute("gqList", gqList);
|
|
- if(gqList!=null && gqList.size()>0){
|
|
|
|
|
|
+ if (gqList != null && gqList.size() > 0) {
|
|
Utils.getSession().setAttribute("gkList", gkService.findByGqList(gqList));
|
|
Utils.getSession().setAttribute("gkList", gkService.findByGqList(gqList));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -154,12 +181,13 @@ public class MainCtl extends BaseWebCtl {
|
|
|
|
|
|
@RequestMapping(value = "/todo")
|
|
@RequestMapping(value = "/todo")
|
|
public String todo(Model model, String menuid, SimplePageRequest page, HttpServletRequest request, String type, Date begin, Date end) throws JsonProcessingException {
|
|
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>();
|
|
List<WorkItem> volist = new ArrayList<WorkItem>();
|
|
if ("jsjd".equals(type)) {
|
|
if ("jsjd".equals(type)) {
|
|
volist = getJsjdList();
|
|
volist = getJsjdList();
|
|
@@ -187,13 +215,58 @@ public class MainCtl extends BaseWebCtl {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public WebJsonResult getDbNum(Model model) throws JsonProcessingException {
|
|
public WebJsonResult getDbNum(Model model) throws JsonProcessingException {
|
|
WebJsonResult ws = success();
|
|
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();
|
|
Calendar ca = Calendar.getInstance();
|
|
ca.add(Calendar.MONTH, 1);
|
|
ca.add(Calendar.MONTH, 1);
|
|
ws.setAttr("warn", "");
|
|
ws.setAttr("warn", "");
|
|
@@ -201,43 +274,39 @@ public class MainCtl extends BaseWebCtl {
|
|
ws.setAttr("tzggwarn", "");
|
|
ws.setAttr("tzggwarn", "");
|
|
if (getSsjyr() != null) {
|
|
if (getSsjyr() != null) {
|
|
List<XkzxxEntity> list = xkzxxService.queryNeedWarn(ca.getTime(), getSsjyr().getId());
|
|
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("warn", "您有<span>" + list.size() + "</span>条许可证即将过期,请及时处理!");
|
|
ws.setAttr("jdtxwarn", "您有<span>" + jdtxjyr.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>条通知公告尚未阅读,请及时查看!");
|
|
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", "");
|
|
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", "");
|
|
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;
|
|
return ws;
|
|
|
|
|
|
}
|
|
}
|
|
@@ -421,7 +490,7 @@ public class MainCtl extends BaseWebCtl {
|
|
item.setProcessName("许可证申请");
|
|
item.setProcessName("许可证申请");
|
|
item.setProcessKey("xkzsq");
|
|
item.setProcessKey("xkzsq");
|
|
item.setDescription(entity.getJyrmc());
|
|
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())) {
|
|
if (!StringUtils.isEmpty(entity.getCreateUser())) {
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
item.setSenderName(user.getName());
|
|
item.setSenderName(user.getName());
|
|
@@ -494,7 +563,7 @@ public class MainCtl extends BaseWebCtl {
|
|
item.setProcessName("许可证变更");
|
|
item.setProcessName("许可证变更");
|
|
item.setProcessKey("xkzbg");
|
|
item.setProcessKey("xkzbg");
|
|
item.setDescription(entity.getJyrmc());
|
|
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())) {
|
|
if (!StringUtils.isEmpty(entity.getCreateUser())) {
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
item.setSenderName(user.getName());
|
|
item.setSenderName(user.getName());
|
|
@@ -557,7 +626,7 @@ public class MainCtl extends BaseWebCtl {
|
|
item.setProcessName("许可证延续");
|
|
item.setProcessName("许可证延续");
|
|
item.setProcessKey("xkzyx");
|
|
item.setProcessKey("xkzyx");
|
|
item.setDescription(entity.getJyrmc());
|
|
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())) {
|
|
if (!StringUtils.isEmpty(entity.getCreateUser())) {
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
item.setSenderName(user.getName());
|
|
item.setSenderName(user.getName());
|
|
@@ -623,7 +692,7 @@ public class MainCtl extends BaseWebCtl {
|
|
item.setProcessName("许可证注销");
|
|
item.setProcessName("许可证注销");
|
|
item.setProcessKey("xkzzx");
|
|
item.setProcessKey("xkzzx");
|
|
item.setDescription(entity.getJyrmc());
|
|
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())) {
|
|
if (!StringUtils.isEmpty(entity.getCreateUser())) {
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
UserEntity user = securityMgr.userService().findById(entity.getCreateUser());
|
|
item.setSenderName(user.getName());
|
|
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;
|
|
int sum = 0;
|
|
if (list != null && list.size() > 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++;
|
|
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;
|
|
int sum = 0;
|
|
if (list != null && list.size() > 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;
|
|
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;
|
|
int sum = 0;
|
|
if (list != null && list.size() > 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;
|
|
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;
|
|
int sum = 0;
|
|
if (list != null && list.size() > 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;
|
|
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;
|
|
int sum = 0;
|
|
if (list != null && list.size() > 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;
|
|
return sum;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|