|
@@ -45,6 +45,8 @@ import com.lc.ibps.org.vo.IdKeyVo;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
|
+import org.codehaus.jackson.JsonNode;
|
|
|
|
|
+import org.codehaus.jackson.map.ObjectMapper;
|
|
|
import org.slf4j.event.Level;
|
|
import org.slf4j.event.Level;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -53,6 +55,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import static java.util.Comparator.comparing;
|
|
import static java.util.Comparator.comparing;
|
|
|
|
|
|
|
@@ -284,6 +287,7 @@ public class BpmReceivedProvider extends GenericProvider implements IBpmReceived
|
|
|
|
|
|
|
|
private List<BpmTaskPo> pendingInternal(APIRequest request) {
|
|
private List<BpmTaskPo> pendingInternal(APIRequest request) {
|
|
|
QueryFilter queryFilter = getQueryFilter(request);
|
|
QueryFilter queryFilter = getQueryFilter(request);
|
|
|
|
|
+
|
|
|
String userId = ContextUtil.getCurrentUserId();
|
|
String userId = ContextUtil.getCurrentUserId();
|
|
|
List<PartyEntity> pes = new ArrayList<PartyEntity>();
|
|
List<PartyEntity> pes = new ArrayList<PartyEntity>();
|
|
|
String[] except = {"under"};
|
|
String[] except = {"under"};
|
|
@@ -312,7 +316,44 @@ public class BpmReceivedProvider extends GenericProvider implements IBpmReceived
|
|
|
|
|
|
|
|
bpmTaskRepository.setForUpdate();
|
|
bpmTaskRepository.setForUpdate();
|
|
|
List<BpmTaskPo> list = bpmTaskRepository.queryByUser(userId, groups, queryFilter);// 待办 重新构造添加查询group
|
|
List<BpmTaskPo> list = bpmTaskRepository.queryByUser(userId, groups, queryFilter);// 待办 重新构造添加查询group
|
|
|
|
|
+ //东莞中医专用
|
|
|
|
|
+ List<BpmTaskPo> tasks = constructData(list,request);
|
|
|
bpmTaskRepository.removeForUpdate();
|
|
bpmTaskRepository.removeForUpdate();
|
|
|
|
|
+ return tasks;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private List<BpmTaskPo> constructData(List<BpmTaskPo> list, APIRequest request) {
|
|
|
|
|
+ String setting = ContextUtil.getSetting();
|
|
|
|
|
+ try {
|
|
|
|
|
+ ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
|
+ JsonNode node = objectMapper.readTree(setting);
|
|
|
|
|
+ String dgyy = Optional.ofNullable(node)
|
|
|
|
|
+ .map(p -> p.get("DGYY"))
|
|
|
|
|
+ .map(JsonNode::asText)
|
|
|
|
|
+ .orElse("");
|
|
|
|
|
+ if(BeanUtils.isNotEmpty(dgyy)){
|
|
|
|
|
+ if (list == null && list.isEmpty()) {
|
|
|
|
|
+ return new ArrayList<BpmTaskPo>();
|
|
|
|
|
+ }
|
|
|
|
|
+ //有入参表示是我的代办页面调用改方法,不过滤
|
|
|
|
|
+ if(request != null && BeanUtils.isNotEmpty(request.getParameters())){
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+ String sql = "select id_,can_shu_zhi_1_ from t_zlcsb where jian_zhi_ = 'sywddbcsgl'";//首页我的代办参数过滤
|
|
|
|
|
+ List<Map<String, Object>> zlcsbData = (List<Map<String, Object>>) commonDao.query(sql);
|
|
|
|
|
+ String toString = "";
|
|
|
|
|
+ if(list.size()>0 && BeanUtils.isNotEmpty(zlcsbData.get(0).get("can_shu_zhi_1_"))){
|
|
|
|
|
+ toString = zlcsbData.get(0).get("can_shu_zhi_1_").toString();
|
|
|
|
|
+ }
|
|
|
|
|
+ String finalToString = toString;
|
|
|
|
|
+ //没有请求参数表示是首页代办事宜调用,根据参数过滤
|
|
|
|
|
+ list = list.stream()
|
|
|
|
|
+ .filter(task -> task.getSubject() == null || !task.getSubject().contains(finalToString))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("获取东莞中医院配置失败,请联系管理员", e);
|
|
|
|
|
+ }
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
|