瀏覽代碼

中台接口及调用调整

lizhenhao 2 年之前
父節點
當前提交
bd601a5922

+ 4 - 1
src/main/java/com/jeeplus/modules/centerservice/service/cpa/reimbursement/ReimbursementService.java

@@ -223,8 +223,11 @@ public class ReimbursementService {
      * @return
      */
     public Map<String,Object> auditFunc(String id,String flag,String comment) {
+        Map<String,Object> res = new HashMap<>();
         Object o = reimbursementRequest.auditFunc(id, flag, comment);
-        Map<String,Object> res = JSONObject.parseObject(JSON.toJSONString(o));
+        if (Objects.nonNull(o)) {
+            res.putAll(JSONObject.parseObject(JSON.toJSONString(o)));
+        }
         return res;
     }
 

+ 4 - 1
src/main/java/com/jeeplus/modules/centerservice/service/cpa/task/TaskFlowRequest.java

@@ -1,5 +1,6 @@
 package com.jeeplus.modules.centerservice.service.cpa.task;
 
+import com.jeeplus.common.config.Global;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.centerservice.utils.RestTemplateService;
@@ -28,6 +29,8 @@ public class TaskFlowRequest {
     public Object getNotifyList(WorkProjectNotify workProjectNotify) {
         String token = "";
         Map<String, Object> paramMap = new HashMap<>();
+        paramMap.put("belongProject","ccpm");
+        paramMap.put("inquireStatus", Global.getConfig("INQUIRE_STATUS"));
         // 设置查询条件
         if (workProjectNotify.getStartDate () != null) { // 创建时间
             SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -43,7 +46,7 @@ public class TaskFlowRequest {
         if (StringUtils.isNotBlank(workProjectNotify.getUserName())) { // 流程发起人
             paramMap.put("assigneeName", workProjectNotify.getUserName());
         }
-        Object response = restTemplateService.getCPA("/flowable/task/allTodo", token, paramMap);
+        Object response = restTemplateService.getCPA("/flowable/task/queryTodoListCenter", token, paramMap);
         return response;
     }
 

+ 13 - 3
src/main/java/com/jeeplus/modules/centerservice/service/cpa/task/TaskFlowService.java

@@ -8,8 +8,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 @Service
 @Transactional(rollbackFor = Exception.class)
@@ -24,9 +26,14 @@ public class TaskFlowService {
      * @return
      */
     public List<WorkProjectNotify> getNotifyList(WorkProjectNotify workProjectNotify) throws Exception{
+        List<WorkProjectNotify> notifyList = new ArrayList<>();
         Object res = taskRequest.getNotifyList(workProjectNotify);
-        List<Map<String,Object>> notifys = (List)JSONArray.parseArray(JSON.toJSONString(res));
-        List<WorkProjectNotify> notifyList = ConvertServiceUtil.convertWorkProjectNotifyList(notifys); // 格式转换
+        if (Objects.nonNull(res)) {
+            List<Map<String,Object>> notifys = (List)JSONArray.parseArray(JSON.toJSONString(res));
+            if (notifys.size() > 0) {
+                notifyList.addAll(ConvertServiceUtil.convertWorkProjectNotifyList(notifys)); // 格式转换
+            }
+        }
         return notifyList;
     }
 
@@ -36,8 +43,11 @@ public class TaskFlowService {
      * @return
      */
     public List<Map<String,Object>> getHisTaskListById(String procInsId) {
+        List<Map<String,Object>> resp = new ArrayList<>();
         Object hisTaskListById = taskRequest.getHisTaskListById(procInsId);
-        List<Map<String,Object>> resp = (List)JSONArray.parseArray(JSON.toJSONString(hisTaskListById));
+        if (Objects.nonNull(hisTaskListById)) {
+            resp.addAll((List)JSONArray.parseArray(JSON.toJSONString(hisTaskListById)));
+        }
         return resp;
     }
 }

+ 126 - 19
src/main/java/com/jeeplus/modules/centerservice/utils/ConvertServiceUtil.java

@@ -6,19 +6,127 @@ import com.alibaba.fastjson.JSONObject;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import java.text.SimpleDateFormat;
 import java.util.*;
 
 public class ConvertServiceUtil {
 
+    @Autowired
+    private RuralProjectRecordsService ruralProjectRecordsService;
+
     /**
      * 批量将cpa系统待办返回的字段转换为当前系统待办需要的字段
      * @param res
      * @return
      */
     public static List<WorkProjectNotify> convertWorkProjectNotifyList(List<Map<String, Object>> res) throws Exception {
+        List<WorkProjectNotify> resp = new ArrayList<>();
+        List<WorkProjectNotify> workProjectNotifyList = JSON.parseArray(JSON.toJSONString(res), WorkProjectNotify.class);
+        String cpa_task = Global.getConfig("CPA_TASK"); // 获取cpa可查看的待办数据
+        for (WorkProjectNotify workProjectNotify : workProjectNotifyList) {
+            if ("ccpm".equals(workProjectNotify.getBelongProject())) {
+                resp.add(workProjectNotify);
+            } else if ("cpa".equals(workProjectNotify.getBelongProject())) {
+                if (StringUtils.isNotBlank(workProjectNotify.getType())) {
+                    if (StringUtils.isNotBlank(cpa_task) && cpa_task.contains(workProjectNotify.getType())) {
+                        // 评估-报销审批
+                        if ("Process_1665383385070".equals(workProjectNotify.getType())) {
+                            workProjectNotify.setType("13");
+                            resp.add(workProjectNotify);
+                        }
+                    }
+                }
+            }
+        }
+        return resp;
+    }
+
+    /**
+     *
+     * @param workProjectNotifyList
+     * @return
+     */
+    public static List<Map<String,Object>> copyNotifyListToCenter(List<WorkProjectNotify> workProjectNotifyList) {
+        List<Map<String, Object>> res = new ArrayList<>();
+        for (WorkProjectNotify workProjectNotify : workProjectNotifyList) {
+            Map<String, Object> stringObjectMap = copyNotifyToCenter(workProjectNotify);
+            res.add(stringObjectMap);
+        }
+        return res;
+    }
+
+    /**
+     * 将本系统待办信息字段改为业务系统字段
+     * @param workProjectNotify
+     * @return
+     */
+    public static Map<String,Object> copyNotifyToCenter(WorkProjectNotify workProjectNotify) {
+        Map<String, Object> res = new HashMap<>();
+        Map<String, Object> vars = new HashMap<>();
+        Map<String, Object> task = new HashMap<>();
+        if (Objects.nonNull(workProjectNotify)) {
+            // 所属系统
+            if (Objects.nonNull(workProjectNotify.getBelongProject())) {
+                res.put("belongProject", workProjectNotify.getBelongProject());
+            } else {
+                res.put("belongProject", "ccpm");
+            }
+            // 标题
+            if (Objects.nonNull(workProjectNotify.getTitle())){
+                vars.put("title", workProjectNotify.getTitle());
+            }
+            // 流程名称
+            if (Objects.nonNull(workProjectNotify.getTypeLabel())){
+                res.put("processDefinitionName", workProjectNotify.getTypeLabel());
+            }
+            // 流程类型
+            if (Objects.nonNull(workProjectNotify.getType())){
+                task.put("processDefKey", workProjectNotify.getType());
+            }
+            // 当前环节
+            if (Objects.nonNull(workProjectNotify.getNotifyRole())){
+                task.put("name", workProjectNotify.getNotifyRole());
+            }
+            // 流程发起人
+            if (Objects.nonNull(workProjectNotify.getCreateUserName())){
+                vars.put("userName", workProjectNotify.getCreateUserName());
+            }
+            // 创建时间
+            if (Objects.nonNull(workProjectNotify.getCreateDate())){
+                task.put("createTime", workProjectNotify.getCreateDate());
+//                task.setCreateTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(map.get("createDate").toString()));
+            }
+            // 流程id
+            if (Objects.nonNull(workProjectNotify.getId())){
+                task.put("id", workProjectNotify.getId());
+            }
+            // 数据id
+            if (Objects.nonNull(workProjectNotify.getNotifyId())){
+                vars.put("notifyId", workProjectNotify.getNotifyId());
+            }
+            // 审批状态
+            if (Objects.nonNull(workProjectNotify.getRemarks())){
+                vars.put("remarks", workProjectNotify.getRemarks());
+            }
+        }
+        res.put("vars", vars);
+        res.put("task", task);
+        res.put("status", "todo");
+        return res;
+    }
+
+    /**
+     * 批量将cpa系统待办返回的字段转换为当前系统待办需要的字段 old
+     * @param res
+     * @return
+     */
+    @Deprecated
+    public static List<WorkProjectNotify> convertWorkProjectNotifyListOld(List<Map<String, Object>> res) throws Exception {
         ArrayList<WorkProjectNotify> workProjectNotifyList = new ArrayList<>();
         String cpa_task = Global.getConfig("CPA_TASK"); // 获取cpa可查看的待办数据
         if (StringUtils.isNotBlank(cpa_task)) {
@@ -33,10 +141,6 @@ public class ConvertServiceUtil {
                 for (Map<String, Object> item : res) {
                     Map<String, Object> vars = JSON.parseObject(JSON.toJSONString(item.get("vars")), Map.class);
                     Map<String, Object> task = JSON.parseObject(JSON.toJSONString(item.get("task")), Map.class);
-                    if (Objects.nonNull(vars.get("agree"))) {
-                        boolean agree = Boolean.parseBoolean(vars.get("agree").toString());
-                        String s = new String();
-                    }
                     for (String taskAlias : taskAliasList) {
                         // vars.get("agree") 的值为false时,此流程为驳回状态。值为null或其他时,此流程为待审批状态
                         if (taskAlias.equals(task.get("processDefKey").toString()) &&
@@ -55,6 +159,7 @@ public class ConvertServiceUtil {
      * @param map
      * @return
      */
+    @Deprecated
     public static WorkProjectNotify convertWorkProjectNotify(Map<String, Object> map) throws Exception {
         WorkProjectNotify workProjectNotify = new WorkProjectNotify();
 
@@ -117,23 +222,25 @@ public class ConvertServiceUtil {
      * @return
      */
     public static Page getSortAndPaging(Page<WorkProjectNotify> page, List<WorkProjectNotify> list) {
-        // 将数据按照createDate倒序排序
-        list.sort(new Comparator<WorkProjectNotify>() {
-            @Override
-            public int compare(WorkProjectNotify o1, WorkProjectNotify o2) {
-                return o2.getCreateDate().compareTo(o1.getCreateDate());
-            }
-        });
-        // 将数据分页
-        page.setCount(list.size());
         List<WorkProjectNotify> records = new ArrayList<>();
-        int startIndex = (int) ((page.getPageNo() - 1) * page.getPageSize());
-        for (int i = 0; i < page.getPageSize() ; i ++) {
-            if (startIndex == list.size() || Objects.isNull(list.get(startIndex))) {
-                break;
+        if (list.size() > 0) {
+            // 将数据按照createDate倒序排序
+            list.sort(new Comparator<WorkProjectNotify>() {
+                @Override
+                public int compare(WorkProjectNotify o1, WorkProjectNotify o2) {
+                    return o2.getCreateDate().compareTo(o1.getCreateDate());
+                }
+            });
+            // 将数据分页
+            page.setCount(list.size());
+            int startIndex = (int) ((page.getPageNo() - 1) * page.getPageSize());
+            for (int i = 0; i < page.getPageSize() ; i ++) {
+                if (startIndex == list.size() || Objects.isNull(list.get(startIndex))) {
+                    break;
+                }
+                records.add(list.get(startIndex));
+                startIndex++;
             }
-            records.add(list.get(startIndex));
-            startIndex++;
         }
         page.setList(records);
         return page;

+ 19 - 12
src/main/java/com/jeeplus/modules/centerservice/utils/RestTemplateService.java

@@ -52,19 +52,26 @@ public class RestTemplateService {
      * @return
      */
     public Object httpRequest(HttpMethod method, String token, Map<String, Object> paramMap, Map<String, Object> bodyMap, String hostAddress, String path) {
-        JSONObject jsonObject = new JSONObject();
-        if (Objects.nonNull(bodyMap)) {
-            jsonObject = new JSONObject(bodyMap); // 另一端接口需要使用@RequestBody来接收此参数
+        Object res = null;
+        try {
+            JSONObject jsonObject = new JSONObject();
+            if (Objects.nonNull(bodyMap)) {
+                jsonObject = new JSONObject(bodyMap); // 另一端接口需要使用@RequestBody来接收此参数
+            }
+            String url = getUrl(hostAddress, path, paramMap);
+            HttpHeaders httpHeaders = new HttpHeaders();
+            httpHeaders.add("token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2ODI2NjU3MjYsInVzZXJuYW1lIjoi5r2Y5LitIn0.A6ph05Hy6fjGwO4NKCgBIIpbvD0woc1xplW7H9aK0FM");
+            httpHeaders.add("Accept", MediaType.ALL_VALUE);
+            //        httpHeaders.add("cookie", "jeeplus.session.id=0635611b0f5a4401836262c7d23ae98e");
+            httpHeaders.setContentType(new MediaType("application", "json", Charset.forName("UTF-8")));
+            HttpEntity<Object> entity = new HttpEntity<>(jsonObject, httpHeaders);
+            ResponseEntity<Object> responseEntity = restTemplate.exchange(url, method, entity, Object.class);
+            res = responseEntity.getBody();
+        }catch (Exception e) {
+            System.out.println("远程调用失败");
+            e.printStackTrace();
         }
-        String url = getUrl(hostAddress, path, paramMap);
-        HttpHeaders httpHeaders = new HttpHeaders();
-        httpHeaders.add("token","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2ODI0ODQ1MDYsInVzZXJuYW1lIjoi6Zu357qiIn0.OAfzNwmCT4SHFEVRfwUgcSzqRUX03IaBuY8wpoEq0vw");
-        httpHeaders.add("Accept", MediaType.ALL_VALUE);
-//        httpHeaders.add("cookie", "jeeplus.session.id=0635611b0f5a4401836262c7d23ae98e");
-        httpHeaders.setContentType(new MediaType("application","json", Charset.forName("UTF-8")));
-        HttpEntity<Object> entity = new HttpEntity<>(jsonObject,httpHeaders);
-        ResponseEntity<Object> responseEntity = restTemplate.exchange(url, method, entity, Object.class);
-        return responseEntity.getBody();
+        return res;
     }
 
     /**

+ 4 - 0
src/main/java/com/jeeplus/modules/centerservice/web/cpa/reimbursement/ReimbursementController.java

@@ -5,6 +5,7 @@ import com.jeeplus.common.config.Global;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.centerservice.service.cpa.reimbursement.ReimbursementService;
 import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
+import org.apache.commons.collections.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -33,6 +34,9 @@ public class ReimbursementController {
         Map<String, Object> res = new HashMap<>();
         if (Objects.nonNull(workReimbursement.getAct())) {
             res = reimbursementService.auditFunc(workReimbursement.getId(), workReimbursement.getAct().getFlag(),workReimbursement.getComment());
+            if (MapUtils.isEmpty(res)) {
+                addMessage(redirectAttributes, "操作失败");
+            }
             addMessage(redirectAttributes, res.get("message").toString());
         } else {
             addMessage(redirectAttributes, "操作失败");

+ 47 - 27
src/main/java/com/jeeplus/modules/sys/web/LoginController.java

@@ -534,37 +534,36 @@ public class LoginController extends BaseController{
 		workProjectNotify.setUser(user);
 		workProjectNotify.setCompanyId(user.getComId());
 		workProjectNotify.setRemarks("待审批");
-		Page<WorkProjectNotify> workProjectNotifyPage = new Page<>(request, response);
-		workProjectNotifyPage.setPageNo(1);
-		workProjectNotifyPage.setPageSize(10);
-		Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, -1), workProjectNotify);
-		if(notifyPage.getList().size()>0){
-			for (WorkProjectNotify info: notifyPage.getList()) {
-				//对项目进行处理,工程咨询,造价审核可添加作废按钮
-				if("39".equals(info.getType())){
-					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(info.getNotifyId());
-					if(null != ruralProjectRecords) {
-						info.setProjectType(ruralProjectRecords.getProjectType());
-					}
-					else{
-						info.setProjectType("");
-					}
-				}
-			}
-		}
-		// 各服务引用状态 =》 (若包含,则进行获取该服务的流程信息)
-		String inquireStatus = Global.getConfig("INQUIRE_STATUS");
 		//判定如果当前登陆人是否可以查看其他服务的待办信息
 		if("1".equals(user.getOtherServiceFlag())){
-			if(inquireStatus.contains("cpa")){
-				List<WorkProjectNotify> notifyList = centerCpaTaskService.getNotifyList(workProjectNotify);
-				notifyPage.getList().addAll(notifyList);
+			Page<WorkProjectNotify> workProjectNotifyPage = new Page<>(request, response);
+			workProjectNotifyPage.setPageNo(1);
+			workProjectNotifyPage.setPageSize(10);
+			// 查询中台待办数据
+			List<WorkProjectNotify> notifyList = centerCpaTaskService.getNotifyList(workProjectNotify);
+			if (notifyList.size() > 0) {
+				disposePageResp(notifyList); // 查询结果处理
+				workProjectNotifyPage.getList().addAll(notifyList);
+				Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(workProjectNotifyPage, workProjectNotifyPage.getList());
+				model.addAttribute("notifyPage", resultPage.getList());
+				model.addAttribute("notifyCount", workProjectNotifyPage.getList().size());//未读通知条数
+				model.addAttribute("notifyCount1", workProjectNotifyPage.getCount());//未读通知条数
+			} else {
+				// 中台没有查询到待办时,查询本系统待办分页数据
+				Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
+				disposePageResp(notifyPage.getList()); // 查询结果处理
+				model.addAttribute("notifyPage", notifyPage.getList());
+				model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
+				model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
 			}
+		} else {
+			// 本系统待办分页数据查询
+			Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
+			disposePageResp(notifyPage.getList()); // 查询结果处理
+			model.addAttribute("notifyPage", notifyPage.getList());
+			model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
+			model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
 		}
-		Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(workProjectNotifyPage, notifyPage.getList());
-		model.addAttribute("notifyPage", resultPage.getList());
-		model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
-		model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
 		workProjectNotify.setStatus("0");
 		workProjectNotify.setRemarks("待通知");
 		long s4 = System.currentTimeMillis();
@@ -607,6 +606,27 @@ public class LoginController extends BaseController{
 	}
 
 	/**
+	 * 查询结果处理
+	 * @param list
+	 */
+	public void disposePageResp(List<WorkProjectNotify> list) {
+		if(list.size()>0){
+			for (WorkProjectNotify info: list) {
+				//对项目进行处理,工程咨询,造价审核可添加作废按钮
+				if("39".equals(info.getType())){
+					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(info.getNotifyId());
+					if(null != ruralProjectRecords) {
+						info.setProjectType(ruralProjectRecords.getProjectType());
+					}
+					else{
+						info.setProjectType("");
+					}
+				}
+			}
+		}
+	}
+
+	/**
 	 * 时间倒叙排列
 	 * @param list
 	 */

+ 57 - 13
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -4,7 +4,9 @@
 package com.jeeplus.modules.workprojectnotify.web;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.google.common.collect.Lists;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.oss.OSSClientUtil;
@@ -237,6 +239,7 @@ import org.activiti.engine.HistoryService;
 import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
+import org.json.JSONString;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -568,12 +571,49 @@ public class WorkProjectNotifyController extends BaseController {
 			}
 		}
 		User user = UserUtils.getUser();
+		if("1".equals(user.getOtherServiceFlag())){
+			// 中台数据查询
+			List<WorkProjectNotify> notifyList = centerCpaTaskService.getNotifyList(workProjectNotify);
+			if (notifyList.size() > 0) {
+				disposePageResp(notifyList); // 结果处理
+				Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(new Page<WorkProjectNotify>(request, response), notifyList);
+				model.addAttribute("page", resultPage);
+			} else {
+				// 中台数据查询失败时,查询本系统分页待办数据
+				Page<WorkProjectNotify> page = findPage(user, workProjectNotify);
+				model.addAttribute("page", page);
+			}
+
+		} else {
+			// 本系统待办分页数据查询
+			Page<WorkProjectNotify> page = findPage(user, workProjectNotify);
+			model.addAttribute("page", page);
+		}
+		return "modules/workprojectnotify/workProjectNotifyList";
+	}
+
+	/**
+	 * 本系统待办分页数据查询
+	 * @param user
+	 * @param workProjectNotify
+	 * @return
+	 */
+	public Page<WorkProjectNotify> findPage(User user,WorkProjectNotify workProjectNotify) {
 		workProjectNotify.setUser(user);
 		workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
 		workProjectNotify.setRemarks("待审批");
-		Page<WorkProjectNotify> pageList = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, -1),workProjectNotify);
-		if(pageList.getList().size()>0){
-			for (WorkProjectNotify info: pageList.getList()) {
+		Page<WorkProjectNotify> pageList = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10),workProjectNotify);
+		disposePageResp(pageList.getList()); // 结果处理
+		return pageList;
+	}
+
+	/**
+	 * 查询结果处理
+	 * @param list
+	 */
+	public void disposePageResp(List<WorkProjectNotify> list) {
+		if(list.size()>0){
+			for (WorkProjectNotify info: list) {
 				//对项目进行处理,工程咨询,造价审核可添加作废按钮
 				if("39".equals(info.getType())){
 					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(info.getNotifyId());
@@ -586,16 +626,11 @@ public class WorkProjectNotifyController extends BaseController {
 				}
 			}
 		}
-		List<WorkProjectNotify> notifyList = centerCpaTaskService.getNotifyList(workProjectNotify);
-		pageList.getList().addAll(notifyList);
-		Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(new Page<WorkProjectNotify>(request, response), pageList.getList());
-		model.addAttribute("page", resultPage);
-		return "modules/workprojectnotify/workProjectNotifyList";
 	}
 
 	@RequestMapping(value = "getList",method = RequestMethod.GET)
 	@ResponseBody
-	public List<WorkProjectNotify> getList(WorkProjectNotify workProjectNotify, Page<WorkProjectNotify> page) {
+	public List<Map<String, Object>> getList(WorkProjectNotify workProjectNotify, Page<WorkProjectNotify> page) {
 		User user = UserUtils.getUser();
 		workProjectNotify.setUser(user);
 		if (StringUtils.isNotBlank(workProjectNotify.getUserName())) {
@@ -612,9 +647,9 @@ public class WorkProjectNotifyController extends BaseController {
 		}
 		workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
 		workProjectNotify.setRemarks("待审批");
-		List<WorkProjectNotify> list = workProjectNotifyService.findDataList(workProjectNotify);
-		if(list.size()>0){
-			for (WorkProjectNotify info: list) {
+		Page<WorkProjectNotify> workProjectNotifyPage = workProjectNotifyService.findPage(new Page<>(1,-1),workProjectNotify);
+		if(workProjectNotifyPage.getList().size()>0){
+			for (WorkProjectNotify info: workProjectNotifyPage.getList()) {
 				// 获取流程类型
 				String typeLabel = DictUtils.getDictLabel(info.getType(),"project_notify_type","");
 				info.setTypeLabel(typeLabel);
@@ -628,9 +663,18 @@ public class WorkProjectNotifyController extends BaseController {
 				if (Objects.nonNull(audit)) {
 					info.setAuditUserName(audit.getName());
 				}
+				info.setBelongProject("ccpm");
 			}
 		}
-		return list;
+		List<Map<String, Object>> maps = new ArrayList<>();
+		if (StringUtils.isNotBlank(workProjectNotify.getBelongProject())&&"ccpm".equals(workProjectNotify.getBelongProject())) {
+			JSON.DEFAULT_GENERATE_FEATURE = SerializerFeature.config(
+					JSON.DEFAULT_GENERATE_FEATURE, SerializerFeature.SkipTransientField, false);
+			maps.addAll((List)JSONArray.parseArray(JSON.toJSONString(workProjectNotifyPage.getList())));
+		} else {
+			maps = ConvertServiceUtil.copyNotifyListToCenter(workProjectNotifyPage.getList());
+		}
+		return maps;
 	}