Commit 37c6f426 authored by chenhao's avatar chenhao

添加对于工作流任务不存在,返回为Null时的判断,解决app端任务统计之后数据查看报错的问题

parent 0f454d9e
......@@ -7,6 +7,7 @@ import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.itextpdf.text.pdf.PdfStructTreeController.returnType;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl;
......@@ -79,6 +80,8 @@ import com.yeejoin.amos.patrol.dao.entity.PointClassify;
import com.yeejoin.amos.patrol.exception.YeeException;
import com.yeejoin.amos.patrol.feign.RemoteSecurityService;
import com.yeejoin.amos.patrol.mqtt.WebMqttComponent;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -107,6 +110,7 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.typroject.tyboot.core.foundation.context.RequestContext.getProduct;
@Service("latentDangerService")
......@@ -565,13 +569,17 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
AgencyUserModel user,
String loginOrgCode,
String deptId) {
JSONObject respBody;
List<LatentDangerListVo> voList = Lists.newArrayList();
JSONObject respBody;
Date startDate = new Date();
if (latentDangerListParam.getIsHandle()) {
respBody = remoteWorkFlowService.completedPageTask(user.getUserName(),latentDangerListParam.getBelongType());
} else {
respBody = remoteWorkFlowService.pageTask(user.getUserId(),latentDangerListParam.getBelongType());
}
if(ObjectUtils.isEmpty(respBody)) {
return null;
}
Date endDate = new Date();
logger.info("-------------------------工作流列表时间" + (endDate.getTime() - startDate.getTime()));
JSONArray taskJsonList = respBody.getJSONArray("data");
......@@ -604,7 +612,6 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// map.put("permissions", permissions);
// List<LatentDangerBo> list = latentDangerMapper.listByMap(map);
// Long count = 0L;
List<LatentDangerListVo> voList = Lists.newArrayList();
Date date = new Date();
if (!CollectionUtils.isEmpty(dangerList)) {
Set<String> userIds = Sets.newHashSet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment