Commit 7c3358c8 authored by tianyiming's avatar tianyiming

ugp项目流程追踪

parent 90fc3803
...@@ -10,6 +10,7 @@ public enum TabLogoEnum { ...@@ -10,6 +10,7 @@ public enum TabLogoEnum {
项目资料信息("fileInfo"), 项目资料信息("fileInfo"),
项目告知信息("noticeInfo"), 项目告知信息("noticeInfo"),
项目进度信息("progressInfo"), 项目进度信息("progressInfo"),
项目流程跟踪("processRelationInfo"),
项目竣工信息("completeInfo"); 项目竣工信息("completeInfo");
String logo; String logo;
......
...@@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.ProcessRelation; import com.yeejoin.amos.boot.module.ugp.api.entity.ProcessRelation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface ProcessRelationMapper extends BaseMapper<ProcessRelation> { public interface ProcessRelationMapper extends BaseMapper<ProcessRelation> {
List<Map<String,Object>> selectInstanceIdBySourceId(Long projectId);
} }
package com.yeejoin.amos.boot.module.ugp.api.service; package com.yeejoin.amos.boot.module.ugp.api.service;
import java.util.Map;
public interface IProcessRelationService { public interface IProcessRelationService {
/** /**
...@@ -17,4 +19,6 @@ public interface IProcessRelationService { ...@@ -17,4 +19,6 @@ public interface IProcessRelationService {
* @param instanceId 流程实例id * @param instanceId 流程实例id
*/ */
void updateState(String instanceId,String taskName); void updateState(String instanceId,String taskName);
Map<String,Object> getProcessRelation(Long projectId);
} }
...@@ -2,4 +2,14 @@ ...@@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.ProcessRelationMapper"> <mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.ProcessRelationMapper">
<select id="selectInstanceIdBySourceId" resultType="java.util.Map">
SELECT
source_id,
instance_id,
def_code
FROM
tz_ugp_process_relation
WHERE
source_id = #{projectId}
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.ugp.biz.controller; package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil; import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.TabLogoEnum; import com.yeejoin.amos.boot.module.ugp.api.Enum.TabLogoEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum;
import com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant; import com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant;
import com.yeejoin.amos.boot.module.ugp.api.dto.*; import com.yeejoin.amos.boot.module.ugp.api.dto.InformationDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.*; import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper; import com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IProcessRelationService;
import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify; import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.*; import com.yeejoin.amos.boot.module.ugp.biz.service.impl.*;
import io.swagger.annotations.ApiModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import io.swagger.models.Model;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.BeanUtilsBean;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.ApiOperation;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import java.lang.reflect.InvocationTargetException; import org.springframework.web.bind.annotation.*;
import java.text.ParseException; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import org.springframework.web.servlet.support.RequestDataValueProcessor;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.crypto.spec.RC2ParameterSpec;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*; import java.util.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/** /**
* 项目信息表 * 项目信息表
...@@ -83,6 +63,8 @@ public class ProjectController extends BaseController { ...@@ -83,6 +63,8 @@ public class ProjectController extends BaseController {
@Autowired @Autowired
ProjectOverFlowServiceImpl projectOverFlowService; ProjectOverFlowServiceImpl projectOverFlowService;
@Autowired
IProcessRelationService iProcessRelationService;
/** /**
* 新增项目信息表 * 新增项目信息表
* *
...@@ -594,6 +576,8 @@ public class ProjectController extends BaseController { ...@@ -594,6 +576,8 @@ public class ProjectController extends BaseController {
jsonObject.put(TabLogoEnum.项目告知信息.getLogo(),iInstallNoticeService.getInfoByProjectId(projectId)); jsonObject.put(TabLogoEnum.项目告知信息.getLogo(),iInstallNoticeService.getInfoByProjectId(projectId));
//项目竣工信息 //项目竣工信息
jsonObject.put(TabLogoEnum.项目竣工信息.getLogo(), projectOverFlowService.selectOne(projectId)); jsonObject.put(TabLogoEnum.项目竣工信息.getLogo(), projectOverFlowService.selectOne(projectId));
//项目竣工信息
jsonObject.put(TabLogoEnum.项目流程跟踪.getLogo(), iProcessRelationService.getProcessRelation(projectId));
return ResponseHelper.buildResponse(jsonObject); return ResponseHelper.buildResponse(jsonObject);
} }
} }
......
...@@ -8,9 +8,14 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.ProcessRelationMapper; ...@@ -8,9 +8,14 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.ProcessRelationMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IProcessRelationService; import com.yeejoin.amos.boot.module.ugp.api.service.IProcessRelationService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service @Service
public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto, ProcessRelation, ProcessRelationMapper> implements IProcessRelationService { public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto, ProcessRelation, ProcessRelationMapper> implements IProcessRelationService {
...@@ -18,6 +23,14 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto, ...@@ -18,6 +23,14 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto,
@Autowired @Autowired
ProjectInitiationServiceImpl projectInitiationService; ProjectInitiationServiceImpl projectInitiationService;
@Autowired
ProcessRelationMapper processRelationMapper;
//项目立项流程编码
static final String projectApproval = "projectApproval";
//项目结项流程编码
static final String projectClosing = "projectClosing";
/** /**
* 保存资源流程关系信息 * 保存资源流程关系信息
* *
...@@ -58,4 +71,28 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto, ...@@ -58,4 +71,28 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto,
} }
} }
/**
* 根据projectId查询流程id
* @param projectId
* @return
*/
@Override
public Map<String, Object> getProcessRelation(Long projectId) {
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> mapList = processRelationMapper.selectInstanceIdBySourceId(projectId);
if(!ObjectUtils.isEmpty(mapList)){
for (Map<String, Object> map : mapList) {
if(projectApproval.equals(map.get("def_code"))){
resultMap.put(projectApproval,map.get("instance_id"));
}
if(projectClosing.equals(map.get("def_code"))){
resultMap.put(projectClosing,map.get("instance_id"));
}
}
return resultMap;
} else {
return null;
}
}
} }
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