diff --git a/src/main/java/com/zcloud/controller/xgf/XgfUserController.java b/src/main/java/com/zcloud/controller/xgf/XgfUserController.java index 22d6d78d..edbf89cd 100644 --- a/src/main/java/com/zcloud/controller/xgf/XgfUserController.java +++ b/src/main/java/com/zcloud/controller/xgf/XgfUserController.java @@ -124,4 +124,18 @@ public class XgfUserController extends BaseController { response.put("data", request); return response; } + + /** + * 人员指定审核 + */ + @RequestMapping(value = "/getApproveInfo") + @ResponseBody + public Object getApproveInfo() throws Exception{ + PageData request = this.getPageData(); + PageData response = new PageData(); + response.put("list", xgfUserService.getApproveInfo(request)); + response.put("result", "success"); + response.put("data", request); + return response; + } } diff --git a/src/main/java/com/zcloud/mapper/datasource/xgf/FlowDetailMapper.java b/src/main/java/com/zcloud/mapper/datasource/xgf/FlowDetailMapper.java index 37ab6211..9e91a697 100644 --- a/src/main/java/com/zcloud/mapper/datasource/xgf/FlowDetailMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/xgf/FlowDetailMapper.java @@ -2,6 +2,8 @@ package com.zcloud.mapper.datasource.xgf; import com.zcloud.entity.PageData; +import java.util.List; + public interface FlowDetailMapper { void save(PageData flow); @@ -13,4 +15,6 @@ public interface FlowDetailMapper { PageData findById(PageData flow); PageData selectOne(PageData condition); + + List getList(PageData condition); } diff --git a/src/main/java/com/zcloud/mapper/datasource/xgf/FlowMapper.java b/src/main/java/com/zcloud/mapper/datasource/xgf/FlowMapper.java index 160baf67..93e7faf0 100644 --- a/src/main/java/com/zcloud/mapper/datasource/xgf/FlowMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/xgf/FlowMapper.java @@ -2,6 +2,8 @@ package com.zcloud.mapper.datasource.xgf; import com.zcloud.entity.PageData; +import java.util.List; + public interface FlowMapper { void save(PageData flow); @@ -13,4 +15,6 @@ public interface FlowMapper { PageData findById(PageData flow); PageData findByCondition(PageData condition); + + List getList(PageData condition); } diff --git a/src/main/java/com/zcloud/service/xgf/XgfUserService.java b/src/main/java/com/zcloud/service/xgf/XgfUserService.java index 47ee65ad..86b86b84 100644 --- a/src/main/java/com/zcloud/service/xgf/XgfUserService.java +++ b/src/main/java/com/zcloud/service/xgf/XgfUserService.java @@ -26,4 +26,6 @@ public interface XgfUserService { List findRecordList(PageData condition) throws Exception; List getAppointApproveList(Page page); + + Object getApproveInfo(PageData request); } diff --git a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java index 634723d2..14111ff8 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -215,6 +215,10 @@ public class XgfUserServiceImpl implements XgfUserService { nextNode.put("SORT", Integer.parseInt(currentNode.get("SORT").toString()) + 1); nextNode.put("PARENT_ID", currentNode.getString("FLOW_DETAIL_ID")); nextNode.put("STEP_NAME", "相关方数据将人员打回后重新发送给企业端"); + nextNode.put("PASS_FLAG", "1"); + nextNode.put("APPROVER_TIME", DateUtil.getTime()); + nextNode.put("APPROVER_ID", ""); + nextNode.put("APPROVER_NAME", ""); flowDetailMapper.save(nextNode); currentNode.put("STEP_FLAG", "0"); flowDetailMapper.edit(currentNode); @@ -303,6 +307,20 @@ public class XgfUserServiceImpl implements XgfUserService { return list; } + @Override + public Object getApproveInfo(PageData request) { + PageData condition = new PageData(); + condition.put("FOREIGN_KEY", request.getString("XGF_USER_ID")); + condition.put("TYPE", "1"); + List list = flowMapper.getList(condition); + for(PageData x : list){ + condition.clear(); + condition.put("FLOW_ID", x.getString("FLOW_ID")); + x.put("flow",flowDetailMapper.getList(condition)); + } + return list; + } + /* 获取当前用户是否有权限审批 */ private String getPower(PageData x) { switch (Integer.parseInt(x.get("CHECK_STEP").toString())) { @@ -483,6 +501,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STATUS", 2); entity.put("VALID_FLAG", "1"); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); + entity.put("STATUS", "2"); xgfUserMapper.edit(entity); return "1"; case "1":// 集团单位审批,需要指定下一位人员进行审批 @@ -526,9 +545,11 @@ public class XgfUserServiceImpl implements XgfUserService { if (result == null || !"succeed".equals(result.get("result"))) { throw new RuntimeException("请求失败"); } + xgfUserMapper.edit(entity); flows.put("APPOINT_THREE_TIME", DateUtil.getTime()); flows.put("APPOINT_THREE_STATUS", info.getString("STATUS")); flows.put("APPOINT_THREE_OPINION", info.getString("OPINION")); + xgfFlowsMapper.edit(flows); return "0"; } else { // TODO 根据是否委托辖区单位进行处理(前端传回来) @@ -537,6 +558,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STATUS", 2); entity.put("VALID_FLAG", "1"); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); + entity.put("STATUS", "2"); xgfUserMapper.edit(entity); return "1"; case "0":// 辖区单位审批,需要指定审批人 @@ -592,6 +614,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STATUS", 2); entity.put("VALID_FLAG", "1"); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); + entity.put("STATUS", "2"); xgfUserMapper.edit(entity); return "1"; case "1":// 辖区单位审批,需要指定审批人 @@ -640,6 +663,7 @@ public class XgfUserServiceImpl implements XgfUserService { entity.put("CHECK_STATUS", 2); entity.put("VALID_FLAG", "1"); entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1); + entity.put("STATUS", "2"); xgfUserMapper.edit(entity); return "1"; } diff --git a/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml b/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml index 238c3b06..68702d01 100644 --- a/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/FlowDetailMapper.xml @@ -133,4 +133,21 @@ and a.FOREIGN_KEY = #{FOREIGN_KEY} + diff --git a/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml b/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml index c0ab1b4e..c9ca4481 100644 --- a/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/FlowMapper.xml @@ -98,4 +98,20 @@ and a.VALID_FLAG = #{VALID_FLAG} +