|
@@ -15,8 +15,8 @@ import javax.persistence.criteria.Root;
|
|
|
import javax.persistence.criteria.Subquery;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
-import net.sf.json.JSONArray;
|
|
|
-
|
|
|
+import org.activiti.engine.RuntimeService;
|
|
|
+import org.activiti.engine.task.Task;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -29,7 +29,6 @@ import com.xt.jygl.common.BaseWebCtl;
|
|
|
import com.xt.jygl.common.Constants;
|
|
|
import com.xt.jygl.common.GlobalData;
|
|
|
import com.xt.jygl.common.Utils;
|
|
|
-import com.xt.jygl.ggfwxxgl.jdtx.service.TxService;
|
|
|
import com.xt.jygl.ggfwxxgl.jdtxxx.entity.JdtxxxEntity;
|
|
|
import com.xt.jygl.ggfwxxgl.jdtxxx.service.JdtxxxService;
|
|
|
import com.xt.jygl.ggfwxxgl.tzgg.ggxx.entity.GgxxtxEntity;
|
|
@@ -50,8 +49,7 @@ import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxglService;
|
|
|
import com.xt.jygl.gkjsgl.xmxxgl.service.XmxxgljggzService;
|
|
|
import com.xt.jygl.gkjygl.cghzyxxgl.dcsb.entity.DcsbEntity;
|
|
|
import com.xt.jygl.gkjygl.cghzyxxgl.dcsb.service.DcsbService;
|
|
|
-import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.entity.GkjyrEntity;
|
|
|
-import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.service.GkjyrService;
|
|
|
+import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.vo.GkjyrVo;
|
|
|
import com.xt.jygl.gkjygl.gkjyr.xkzxx.entity.XkzxxEntity;
|
|
|
import com.xt.jygl.gkjygl.gkjyr.xkzxx.service.XkzxxService;
|
|
|
import com.xt.jygl.gkjygl.gkjyxkgl.gkjyxkbg.entity.XkzbgEntity;
|
|
@@ -71,7 +69,6 @@ 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;
|
|
|
-import com.xt.jygl.workflow.service.WorkflowMangerService;
|
|
|
import com.xtframe.core.base.ctl.WebJsonResult;
|
|
|
import com.xtframe.sec.common.BaseEntity;
|
|
|
import com.xtframe.sec.common.SimplePageRequest;
|
|
@@ -81,6 +78,8 @@ import com.xtframe.sec.user.entity.UserEntity;
|
|
|
import com.xtframe.sec.utils.SecUtils;
|
|
|
import com.xtframe.util.StringUtils;
|
|
|
|
|
|
+import net.sf.json.JSONArray;
|
|
|
+
|
|
|
/**
|
|
|
*
|
|
|
* @author liangzan
|
|
@@ -90,14 +89,11 @@ import com.xtframe.util.StringUtils;
|
|
|
public class MainCtl extends BaseWebCtl {
|
|
|
// @Autowired
|
|
|
// private SecurityMgr securityMgr;
|
|
|
-
|
|
|
@Autowired
|
|
|
- private WorkflowMangerService workflowMangerService;
|
|
|
+ protected RuntimeService runtimeService;
|
|
|
@Autowired
|
|
|
private GkService gkService;
|
|
|
@Autowired
|
|
|
- private GkjyrService gkjyrService;
|
|
|
- @Autowired
|
|
|
private GqService gqService;
|
|
|
@Autowired
|
|
|
private XkzxxService xkzxxService;
|
|
@@ -118,8 +114,6 @@ public class MainCtl extends BaseWebCtl {
|
|
|
@Autowired
|
|
|
private TaskInfoService taskInfoService;
|
|
|
@Autowired
|
|
|
- private TxService txService;
|
|
|
- @Autowired
|
|
|
private GgxxtxService ggxxtxService;
|
|
|
@Autowired
|
|
|
private LhsqService lhsqService;
|
|
@@ -271,6 +265,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
return ws;
|
|
|
}
|
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/getDbNum")
|
|
|
@ResponseBody
|
|
|
public WebJsonResult getDbNum(Model model) throws JsonProcessingException {
|
|
@@ -283,19 +278,29 @@ public class MainCtl extends BaseWebCtl {
|
|
|
} else {
|
|
|
gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
}
|
|
|
+ UserEntity userEntity = SecUtils.getCurrUser();
|
|
|
+ String id = userEntity.getId().toString();
|
|
|
// 判断省市区别
|
|
|
if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
- int dcsb = getDcsbNum(jyrid, gqlist);
|
|
|
-
|
|
|
- int xkzsq = getXkzsqNum(jyrid, gqlist);
|
|
|
- int xkzbg = getXkzbgNum(jyrid, gqlist);
|
|
|
- int xkzyx = getXkzyxNum(jyrid, gqlist);
|
|
|
- int xkzzx = getXkzzxNum(jyrid, gqlist);
|
|
|
-
|
|
|
- int jsjdcbsjds = getJsjdcbsjdsNum(jyrid, gqlist);
|
|
|
- int jsjdbgds = getJsjdbgdsNum(jyrid, gqlist);
|
|
|
- int jgsqds = getJgsqdsNum(jyrid, gqlist);
|
|
|
- int jdtx = getJdtxNum(jyrid, gqlist);
|
|
|
+ int dcsb = getDcsbNum(id,jyrid, gqlist);
|
|
|
+ int xkzsq = getXkzsqNum(id,jyrid, gqlist);
|
|
|
+ int xkzbg = getXkzbgNum(id,jyrid, gqlist);
|
|
|
+ int xkzyx = getXkzyxNum(id,jyrid, gqlist);
|
|
|
+ int xkzzx = getXkzzxNum(id,jyrid, gqlist);
|
|
|
+
|
|
|
+ int jsjdcbsjds = getJsjdcbsjdsNum(id,jyrid, gqlist);
|
|
|
+ int jsjdbgds = getJsjdbgdsNum(id,jyrid, gqlist);
|
|
|
+ int jgsqds = getJgsqdsNum(id,jyrid, gqlist);
|
|
|
+ int jdtx = getJdtxNum(id,jyrid, gqlist);
|
|
|
+
|
|
|
+// int dcsb = dcsb;
|
|
|
+// int xkzsq = xkzsq;
|
|
|
+// int xkzbg = xkzbg;
|
|
|
+// int xkzyx = xkzyx;
|
|
|
+// int jsjdcbsjds = jsjdcbsjds;
|
|
|
+// int jsjdbgds = jsjdbgds;
|
|
|
+// int jgsqds = jgsqds;
|
|
|
+// int jdtx = jdtx;
|
|
|
ws.setAttr("dcsb", dcsb);
|
|
|
ws.setAttr("xkzsq", xkzsq);
|
|
|
ws.setAttr("xkzbg", xkzbg);
|
|
@@ -307,12 +312,12 @@ public class MainCtl extends BaseWebCtl {
|
|
|
ws.setAttr("jdtx", jdtx);
|
|
|
ws.setAttr("ssflag", 1);
|
|
|
} else {
|
|
|
- int lhsq = getLhsqNum();
|
|
|
- int lhbg = getLhbgNum();
|
|
|
- int lhyx = getLhyxNum();
|
|
|
- int jsjdcbsj = getJsjdcbsjNum();
|
|
|
- int jsjdbg = getJsjdbgNum();
|
|
|
- int jgsq = getJgsqNum();
|
|
|
+ int lhsq = getLhsqNum(id);
|
|
|
+ int lhbg = getLhbgNum(id);
|
|
|
+ int lhyx = getLhyxNum(id);
|
|
|
+ int jsjdcbsj = getJsjdcbsjNum(id);
|
|
|
+ int jsjdbg = getJsjdbgNum(id);
|
|
|
+ int jgsq = getJgsqNum(id);
|
|
|
ws.setAttr("lhsq", lhsq);
|
|
|
ws.setAttr("lhbg", lhbg);
|
|
|
ws.setAttr("lhyx", lhyx);
|
|
@@ -329,33 +334,34 @@ public class MainCtl extends BaseWebCtl {
|
|
|
ws.setAttr("tzggwarn", "");
|
|
|
|
|
|
int messageNum = 0;
|
|
|
- if (getSsjyr() != null) {
|
|
|
- List<XkzxxEntity> list = xkzxxService.queryNeedWarn(ca.getTime(), getSsjyr().getId());
|
|
|
+ GkjyrVo gkjyrVo = getSsjyr();
|
|
|
+ if (gkjyrVo != null) {
|
|
|
+ List<XkzxxEntity> list = xkzxxService.queryNeedWarn(ca.getTime(), gkjyrVo.getId());
|
|
|
ws.setAttr("warn", "您有<span>" + list.size() + "</span>条许可证即将过期,请处理!");
|
|
|
// List<Object> jdtxjyr = txService.findByJyrid(getSsjyr().getId());
|
|
|
// ws.setAttr("jdtxwarn", "您有<span>" + jdtxjyr.size() +
|
|
|
// "</span>条监督提醒即将过期,请及时处理!");
|
|
|
// 通知公告
|
|
|
- List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(getSsjyr().getId(), "1");
|
|
|
+ List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(gkjyrVo.getId(), "1");
|
|
|
ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请查看!");
|
|
|
|
|
|
// 初步设计 省通过 flowstatus 为2 ,不通过 flowstatus 为1
|
|
|
- List<JsjdcbsjEntity> tlist = jsjdcbsjdsService.findByJyridAndFLowstatus(getSsjyr().getId(), "2");
|
|
|
- List<JsjdcbsjEntity> flist = jsjdcbsjdsService.findByJyridAndFLowstatus(getSsjyr().getId(), "1");
|
|
|
+ List<JsjdcbsjEntity> tlist = jsjdcbsjdsService.findByJyridAndFLowstatus(gkjyrVo.getId(), "2");
|
|
|
+ List<JsjdcbsjEntity> flist = jsjdcbsjdsService.findByJyridAndFLowstatus(gkjyrVo.getId(), "1");
|
|
|
ws.setAttr("jsjdcbsjwarn", "项目初步设计申请<span>" + tlist.size() + "</span>条已通过,<span>" + flist.size() + "</span>条未通过请查看!");
|
|
|
|
|
|
// 初步设计变更 省通过 flowstatus 为2 ,不通过 flowstatus 为1
|
|
|
- List<JsjdbgEntity> ttlist = jsjdbgdsService.findByJyridAndFLowstatus(getSsjyr().getId(), "2");
|
|
|
- List<JsjdbgEntity> fflist = jsjdbgdsService.findByJyridAndFLowstatus(getSsjyr().getId(), "1");
|
|
|
+ List<JsjdbgEntity> ttlist = jsjdbgdsService.findByJyridAndFLowstatus(gkjyrVo.getId(), "2");
|
|
|
+ List<JsjdbgEntity> fflist = jsjdbgdsService.findByJyridAndFLowstatus(gkjyrVo.getId(), "1");
|
|
|
ws.setAttr("jsjdbgwarn", "项目初步设计变更<span>" + tlist.size() + "</span>条已通过,<span>" + flist.size() + "</span>条未通过请查看!");
|
|
|
|
|
|
// 竣工 省通过 flowstatus 为2 ,不通过 flowstatus 为1
|
|
|
- List<JgsqEntity> jgtlist = jgsqdsService.findByJyridAndFLowstatus(getSsjyr().getId(), "2");
|
|
|
- List<JgsqEntity> jgflist = jgsqdsService.findByJyridAndFLowstatus(getSsjyr().getId(), "1");
|
|
|
+ List<JgsqEntity> jgtlist = jgsqdsService.findByJyridAndFLowstatus(gkjyrVo.getId(), "2");
|
|
|
+ List<JgsqEntity> jgflist = jgsqdsService.findByJyridAndFLowstatus(gkjyrVo.getId(), "1");
|
|
|
ws.setAttr("jgsqwarn", "项目竣工验收申请<span>" + tlist.size() + "</span>条已通过,<span>" + flist.size() + "</span>条未通过请查看!");
|
|
|
|
|
|
messageNum = list.size() + ggtx.size();
|
|
|
- } else if (SecUtils.getCurrUser().getSsglry() != null) {
|
|
|
+ } else if (userEntity.getSsglry() != null) {
|
|
|
// 过滤掉自己所发布的监督提醒
|
|
|
/*
|
|
|
* List<Object> jdtxzj =
|
|
@@ -370,17 +376,17 @@ public class MainCtl extends BaseWebCtl {
|
|
|
* "</span>条监督提醒即将过期,请及时处理!"); messageNum += jdtxxzry.size(); } }
|
|
|
*/
|
|
|
// 通知公告,过滤自己所发布的监督提醒
|
|
|
- List<Object> tzggzj = ggxxtxService.findByJyridAndCu(SecUtils.getCurrUser().getSsglry().getId());
|
|
|
+ List<Object> tzggzj = ggxxtxService.findByJyridAndCu(userEntity.getSsglry().getId());
|
|
|
if (tzggzj.size() > 0) {
|
|
|
- if (tzggzj.get(0).equals(SecUtils.getCurrUser().getName())) {
|
|
|
+ if (tzggzj.get(0).equals(userEntity.getName())) {
|
|
|
ws.setAttr("jdtxwarn", "");
|
|
|
} else {
|
|
|
- List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(SecUtils.getCurrUser().getSsglry().getId(), "0");
|
|
|
+ List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(userEntity.getSsglry().getId(), "0");
|
|
|
ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请查看!");
|
|
|
messageNum += ggtx.size();
|
|
|
}
|
|
|
} else {
|
|
|
- List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(SecUtils.getCurrUser().getSsglry().getId(), "0");
|
|
|
+ List<GgxxtxEntity> ggtx = ggxxtxService.findByJyridAndFlag(userEntity.getSsglry().getId(), "0");
|
|
|
ws.setAttr("tzggwarn", "您有<span>" + ggtx.size() + "</span>条通知公告尚未阅读,请查看!");
|
|
|
messageNum += ggtx.size();
|
|
|
}
|
|
@@ -475,6 +481,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = dcsbService.findByJyrid(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (!StringUtils.isEmpty(gqlist) && gqlist.size() > 0) {
|
|
|
list = dcsbService.findByGqids(gqlist);
|
|
@@ -633,6 +640,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = jsjdcbsjdsService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = jsjdcbsjdsService.findByGqids(gqlist);
|
|
@@ -717,6 +725,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = jsjdbgdsService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = jsjdbgdsService.findByGqids(gqlist);
|
|
@@ -801,6 +810,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = jgsqdsService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = jgsqdsService.findByGqids(gqlist);
|
|
@@ -925,6 +935,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = xkzsqService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = xkzsqService.findByGqids(gqlist);
|
|
@@ -976,6 +987,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = xkzbgService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = xkzbgService.findByGqids(gqlist);
|
|
@@ -1025,6 +1037,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = xkzyxService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = xkzyxService.findByGqids(gqlist);
|
|
@@ -1075,6 +1088,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
if (isJyr()) {
|
|
|
list = xkzzxService.findByJyrids(getSsjyr().getId());
|
|
|
} else {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
List<String> gqlist = (List<String>) Utils.getSession().getAttribute("gqList");
|
|
|
if (gqlist != null && gqlist.size() > 0) {
|
|
|
list = xkzzxService.findByGqids(gqlist);
|
|
@@ -1171,7 +1185,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 单船申报
|
|
|
- public int getDcsbNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getDcsbNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = dcsbService.findByJyrid(jyrid);
|
|
@@ -1182,14 +1196,21 @@ public class MainCtl extends BaseWebCtl {
|
|
|
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) {
|
|
|
+ long time = new Date().getTime();
|
|
|
+ System.out.println(time);
|
|
|
+ Task task = dcsbService.getTaskByUserAndBusKey(userId, id.toString());
|
|
|
+// Task task1 = dcsbService.getCandidateTaskByUserAndBusKey(userId, id.toString(),"dcsb");
|
|
|
+ long tempTime = new Date().getTime();
|
|
|
+ System.out.println(tempTime-time);
|
|
|
+ if (task !=null){
|
|
|
+// if ((dcsbService.getTaskByUserAndBusKey(userId, id.toString()) != null) || dcsbService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), DcsbEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
|
}
|
|
|
}
|
|
|
+ System.out.println(new Date().getTime()-tempTime);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1198,7 +1219,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 许可证申请
|
|
|
- public int getXkzsqNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getXkzsqNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
@@ -1210,7 +1231,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
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) {
|
|
|
+ if ((xkzsqService.getTaskByUserAndBusKey(userId, id.toString()) != null) || xkzsqService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), XkzsqEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1224,7 +1245,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 许可证变更
|
|
|
- public int getXkzbgNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getXkzbgNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = xkzbgService.findByJyrids(jyrid);
|
|
@@ -1234,7 +1255,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
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) {
|
|
|
+ if ((xkzbgService.getTaskByUserAndBusKey(userId, id.toString()) != null) || xkzbgService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), XkzbgEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
|
|
@@ -1248,7 +1269,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 许可证延续
|
|
|
- public int getXkzyxNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getXkzyxNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = xkzyxService.findByJyrids(jyrid);
|
|
@@ -1258,7 +1279,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
int sum = 0;
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (Object id : list) {
|
|
|
- if ((xkzyxService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || xkzyxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
|
|
|
+ if ((xkzyxService.getTaskByUserAndBusKey(userId, id.toString()) != null) || xkzyxService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), XkzyxEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1271,7 +1292,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 许可证注销
|
|
|
- public int getXkzzxNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getXkzzxNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = xkzzxService.findByJyrids(jyrid);
|
|
@@ -1279,13 +1300,49 @@ public class MainCtl extends BaseWebCtl {
|
|
|
list = xkzzxService.findByGqids(gqids);
|
|
|
}
|
|
|
int sum = 0;
|
|
|
+ /*List<Task> tasks = taskService.createTaskQuery().taskAssignee(userId).list();
|
|
|
+ if ( tasks !=null){
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Task> taskList = taskService.createTaskQuery().taskCandidateUser(userId.toString()).active().list();
|
|
|
+ for ( Task task : taskList){
|
|
|
+ ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult();
|
|
|
+ String businessKey = pi.getBusinessKey();
|
|
|
+ System.out.println(pi.getBusinessKey());
|
|
|
+ if ( StringUtils.isNotEmpty(businessKey)){
|
|
|
+ String[] temp = businessKey.split("-");
|
|
|
+ if (temp.length>1){
|
|
|
+ if (XkzzxEntity.PROCESS_DEFINITION_KEY.equals(temp[0])){
|
|
|
+ for (Object object : list){
|
|
|
+ if ( object.toString().equals(temp[1])){
|
|
|
+ List<TaskInfoEntity> taskInfolist = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(temp[1].toString(), XkzzxEntity.PROCESS_DEFINITION_KEY);
|
|
|
+ if (taskInfolist != null & taskInfolist.size() > 0) {
|
|
|
+ sum++;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else{
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }*/
|
|
|
+ //long count = taskService.createTaskQuery().taskCandidateUser(userId.toString()).active().processDefinitionKeyLike(XkzzxEntity.PROCESS_DEFINITION_KEY+"%").count();
|
|
|
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) {
|
|
|
+ if ((xkzzxService.getTaskByUserAndBusKey(userId, id.toString()) != null) || xkzzxService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), XkzzxEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
-
|
|
|
sum++;
|
|
|
}
|
|
|
}
|
|
@@ -1295,14 +1352,13 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 理货申请
|
|
|
- public int getLhsqNum() throws JsonProcessingException {
|
|
|
+ public int getLhsqNum(String id) throws JsonProcessingException {
|
|
|
List<LhsqEntity> list = lhsqService.findAll();
|
|
|
int sum = 0;
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (LhsqEntity entity : list) {
|
|
|
-
|
|
|
if (entity != null) {
|
|
|
- if ((lhsqService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || lhsqService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
|
|
|
+ if ((lhsqService.getTaskByUserAndBusKey(id, entity.getId().toString()) != null) || lhsqService.getCandidateTaskByUserAndBusKey(id, entity.getId().toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId().toString(), LhsqEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1316,15 +1372,14 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 理货变更
|
|
|
- public int getLhbgNum() throws JsonProcessingException {
|
|
|
+ public int getLhbgNum(String id) throws JsonProcessingException {
|
|
|
|
|
|
List<LhbgEntity> list = lhbgService.findAll();
|
|
|
int sum = 0;
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (LhbgEntity entity : list) {
|
|
|
-
|
|
|
if (entity != null) {
|
|
|
- if ((lhbgService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || lhbgService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
|
|
|
+ if ((lhbgService.getTaskByUserAndBusKey(id, entity.getId().toString()) != null) || lhbgService.getCandidateTaskByUserAndBusKey(id, entity.getId().toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId().toString(), LhbgEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1338,7 +1393,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 理货延续
|
|
|
- public int getLhyxNum() throws JsonProcessingException {
|
|
|
+ public int getLhyxNum(String id) throws JsonProcessingException {
|
|
|
List<LhyxEntity> list = lhyxService.findAll();
|
|
|
int sum = 0;
|
|
|
if (list != null && list.size() > 0) {
|
|
@@ -1358,7 +1413,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 建设进度初步设计地市
|
|
|
- public int getJsjdcbsjdsNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getJsjdcbsjdsNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = jsjdcbsjdsService.findByJyrids(jyrid);
|
|
@@ -1371,7 +1426,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
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) {
|
|
|
+ if ((jsjdcbsjdsService.getTaskByUserAndBusKey(userId, id.toString()) != null) || jsjdcbsjdsService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), JsjdcbsjEntity.PROCESS_DEFINITION_KEYDS);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1385,7 +1440,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 建设进度初步设计变更地市
|
|
|
- public int getJsjdbgdsNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getJsjdbgdsNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = jsjdbgdsService.findByJyrids(jyrid);
|
|
@@ -1398,7 +1453,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
for (Object id : list) {
|
|
|
|
|
|
if (id != null) {
|
|
|
- if ((jsjdbgdsService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || jsjdbgdsService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
|
|
|
+ if ((jsjdbgdsService.getTaskByUserAndBusKey(userId, id.toString()) != null) || jsjdbgdsService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), JsjdbgEntity.PROCESS_DEFINITION_KEYDS);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1412,7 +1467,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 竣工申请地市
|
|
|
- public int getJgsqdsNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getJgsqdsNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = jgsqdsService.findByJyrids(jyrid);
|
|
@@ -1425,7 +1480,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
for (Object id : list) {
|
|
|
|
|
|
if (id != null) {
|
|
|
- if ((jgsqdsService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || jgsqdsService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
|
|
|
+ if ((jgsqdsService.getTaskByUserAndBusKey(userId, id.toString()) != null) || jgsqdsService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), JgsqEntity.PROCESS_DEFINITION_KEYDS);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1439,7 +1494,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 建设进度初步设计
|
|
|
- public int getJsjdcbsjNum() throws JsonProcessingException {
|
|
|
+ public int getJsjdcbsjNum(String id) throws JsonProcessingException {
|
|
|
List<JsjdcbsjEntity> list = jsjdcbsjService.findAll();
|
|
|
|
|
|
int sum = 0;
|
|
@@ -1447,7 +1502,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
for (JsjdcbsjEntity entity : list) {
|
|
|
|
|
|
if (entity != null) {
|
|
|
- if ((jsjdcbsjService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || jsjdcbsjService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
|
|
|
+ if ((jsjdcbsjService.getTaskByUserAndBusKey(id, entity.getId().toString()) != null) || jsjdcbsjService.getCandidateTaskByUserAndBusKey(id, entity.getId().toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId().toString(), JsjdcbsjEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1461,7 +1516,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 建设进度变更
|
|
|
- public int getJsjdbgNum() throws JsonProcessingException {
|
|
|
+ public int getJsjdbgNum(String id) throws JsonProcessingException {
|
|
|
List<JsjdbgEntity> list = jsjdbgService.findAll();
|
|
|
|
|
|
int sum = 0;
|
|
@@ -1469,7 +1524,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
for (JsjdbgEntity entity : list) {
|
|
|
|
|
|
if (entity != null) {
|
|
|
- if ((jsjdbgService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || jsjdbgService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
|
|
|
+ if ((jsjdbgService.getTaskByUserAndBusKey(id, entity.getId().toString()) != null) || jsjdbgService.getCandidateTaskByUserAndBusKey(id, entity.getId().toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId().toString(), JsjdbgEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1483,14 +1538,14 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 竣工申请
|
|
|
- public int getJgsqNum() throws JsonProcessingException {
|
|
|
+ public int getJgsqNum(String id) throws JsonProcessingException {
|
|
|
List<JgsqEntity> list = jgsqService.findAll();
|
|
|
int sum = 0;
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (JgsqEntity entity : list) {
|
|
|
|
|
|
if (entity != null) {
|
|
|
- if ((jgsqService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) || jgsqService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), entity.getId().toString()) != null) {
|
|
|
+ if ((jgsqService.getTaskByUserAndBusKey(id, entity.getId().toString()) != null) || jgsqService.getCandidateTaskByUserAndBusKey(id, entity.getId().toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId().toString(), JgsqEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|
|
@@ -1504,7 +1559,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
// 监督提醒申请地市
|
|
|
- public int getJdtxNum(String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
+ public int getJdtxNum(String userId,String jyrid, List<String> gqids) throws JsonProcessingException {
|
|
|
List<Object> list = new ArrayList<Object>();
|
|
|
if (!StringUtils.isEmpty(jyrid)) {
|
|
|
list = jdtxxxService.findByJyrid(jyrid);
|
|
@@ -1517,7 +1572,7 @@ public class MainCtl extends BaseWebCtl {
|
|
|
for (Object id : list) {
|
|
|
|
|
|
if (id != null) {
|
|
|
- if ((jdtxxxService.getTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) || jdtxxxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id.toString()) != null) {
|
|
|
+ if ((jdtxxxService.getTaskByUserAndBusKey(userId, id.toString()) != null) || jdtxxxService.getCandidateTaskByUserAndBusKey(userId, id.toString()) != null) {
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id.toString(), JdtxxxEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
sum++;
|