1、流程数据保存错误bug修改

2、打回后无法审批bug修复
2024年2月1日V1.0.53
liujun 2024-01-29 13:20:28 +08:00
parent 0f331c3972
commit 2d6bbf03d7
7 changed files with 81 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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<PageData> getList(PageData condition);
}

View File

@ -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<PageData> getList(PageData condition);
}

View File

@ -26,4 +26,6 @@ public interface XgfUserService {
List<PageData> findRecordList(PageData condition) throws Exception;
List<PageData> getAppointApproveList(Page page);
Object getApproveInfo(PageData request);
}

View File

@ -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<PageData> 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";
}

View File

@ -133,4 +133,21 @@
and a.FOREIGN_KEY = #{FOREIGN_KEY}
</if>
</select>
<select id="getList" resultType="com.zcloud.entity.PageData">
select *
from BUS_FLOW_DETAIL a
where a.ISDELETE = '0'
<if test="FLOW_ID != null and FLOW_ID != ''">
and a.FLOW_ID = #{FLOW_ID}
</if>
<if test="STEP_FLAG != null and STEP_FLAG != ''">
and a.STEP_FLAG = #{STEP_FLAG}
</if>
<if test="PARENT_ID != null and PARENT_ID != ''">
and a.PARENT_ID = #{PARENT_ID}
</if>
<if test="FOREIGN_KEY != null and FOREIGN_KEY != ''">
and a.FOREIGN_KEY = #{FOREIGN_KEY}
</if>
</select>
</mapper>

View File

@ -98,4 +98,20 @@
and a.VALID_FLAG = #{VALID_FLAG}
</if>
</select>
<select id="getList" resultType="com.zcloud.entity.PageData">
select * from bus_flow a where a.ISDELETE = '0'
<if test="FOREIGN_KEY != null and FOREIGN_KEY != ''">
and a.FOREIGN_KEY = #{FOREIGN_KEY}
</if>
<if test="TYPE != null and TYPE != ''">
and a.TYPE = #{TYPE}
</if>
<if test="VALID_FLAG != null and VALID_FLAG != ''">
and a.VALID_FLAG = #{VALID_FLAG}
</if>
<if test="END_FLAG != null and END_FLAG != ''">
and a.END_FLAG = #{END_FLAG}
</if>
order by a.CREATOR_TIME desc
</select>
</mapper>