Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
* 'dev' of http://221.0.232.152:9393/ability-center/share-platform: 管理系统-工作台-部门待办列表查询及部门已办列表查询新增申请用户所在部门及申请内容字段
This commit is contained in:
commit
b071097e96
|
@ -18,6 +18,7 @@ import io.renren.modules.resource.dto.ResourceDTO;
|
|||
import io.renren.modules.resource.service.ResourceService;
|
||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||
import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
|
||||
import io.renren.modules.sys.dao.SysUserDao;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -79,6 +80,9 @@ public class HistoryController {
|
|||
@Autowired
|
||||
protected RuntimeService runtimeService;
|
||||
|
||||
@Autowired
|
||||
private SysUserDao sysUserDao;
|
||||
|
||||
@GetMapping("getInstImage")
|
||||
@ApiOperation(value = "获取流程活动图", produces = "application/octet-stream")
|
||||
@LogOperation("获取流程活动图")
|
||||
|
@ -195,6 +199,7 @@ public class HistoryController {
|
|||
if (StringUtils.isNotEmpty(activityDTO.getStartUserId())) {
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getStartUserId()));
|
||||
activityDTO.setStartUserName(userDTO != null ? userDTO.getRealName() : "");
|
||||
activityDTO.setStartUserDeptName(sysUserDao.getDeptNameByUserId(userDTO.getId().toString()));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(activityDTO.getAssignee())) {
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getAssignee()));
|
||||
|
@ -212,7 +217,7 @@ public class HistoryController {
|
|||
}
|
||||
if (abilityApplicationDTOS != null && !abilityApplicationDTOS.isEmpty()) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
abilityApplicationDTOS.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
|
||||
abilityApplicationDTOS.stream().map(TAbilityApplicationDTO::getSystem).filter(StringUtils::isNotEmpty).forEach(index -> {
|
||||
stringBuffer.append(index);
|
||||
stringBuffer.append(",");
|
||||
});
|
||||
|
|
|
@ -41,6 +41,9 @@ public class ProcessActivityDTO {
|
|||
@ApiModelProperty(value = "发起人姓名")
|
||||
private String startUserName;
|
||||
|
||||
@ApiModelProperty(value = "发起人部门名称")
|
||||
private String startUserDeptName;
|
||||
|
||||
@ApiModelProperty(value = "受理人")
|
||||
private String assignee;
|
||||
|
||||
|
|
|
@ -29,6 +29,12 @@ public class TaskDTO {
|
|||
@ApiModelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "用户部门名称")
|
||||
private String userDeptName;
|
||||
|
||||
@ApiModelProperty(value = "申请内容")
|
||||
private String applyTitle;
|
||||
|
||||
@ApiModelProperty(value = "任务参数")
|
||||
private Map<String, Object> params;
|
||||
|
||||
|
|
|
@ -17,12 +17,17 @@ import io.renren.modules.demandComment.dto.TDemandCommentDTO;
|
|||
import io.renren.modules.demandComment.service.TDemandCommentService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.resource.dao.ResourceDao;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.entity.ResourceEntity;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||
import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.sys.dao.SysDeptDao;
|
||||
import io.renren.modules.sys.dao.SysUserDao;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.entity.SysDeptEntity;
|
||||
import io.renren.modules.sys.entity.SysUserEntity;
|
||||
import io.renren.modules.sys.service.SysRoleUserService;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
|
@ -108,6 +113,12 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
private ResourceService resourceService;
|
||||
@Autowired
|
||||
private SysUserService sysUserService;
|
||||
@Autowired
|
||||
private SysUserDao sysUserDao;
|
||||
@Autowired
|
||||
private SysDeptDao sysDeptDao;
|
||||
@Autowired
|
||||
private ResourceDao resourceDao;
|
||||
|
||||
/**
|
||||
* 根据参数获取当前运行的任务信息
|
||||
|
@ -210,13 +221,18 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
TaskDTO dto = new TaskDTO();
|
||||
this.convertTaskInfo(task, dto);
|
||||
Map<String, Object> processVariable = new LinkedHashMap<>();
|
||||
|
||||
|
||||
if (task.getProcessVariables().containsKey("tAbilityApplicationDTOList")) {
|
||||
processVariable.putAll(task.getProcessVariables());
|
||||
dto.setParams(processVariable);
|
||||
|
||||
List<TAbilityApplicationDTO> dtoList = (List<TAbilityApplicationDTO>) task.getProcessVariables().get("tAbilityApplicationDTOList");
|
||||
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(dtoList.get(0)));
|
||||
if (jsonObject != null) {
|
||||
dto.setUserName(jsonObject.containsKey("user") ? jsonObject.getString("user") : "");
|
||||
dto.setUserDeptName(sysUserDao.getDeptNameByUserId(jsonObject.containsKey("userId") ? jsonObject.getString("userId") : null));
|
||||
dto.setApplyTitle(jsonObject.containsKey("title") ? jsonObject.getString("title") : "");
|
||||
}
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
|
@ -227,6 +243,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
dto.setParams(processVariable);
|
||||
Optional<SysUserEntity> creator = Optional.ofNullable(sysUserService.selectById(Long.parseLong(processVariable.get("creator").toString())));
|
||||
dto.setUserName(creator.get().getRealName());
|
||||
dto.setApplyTitle("");
|
||||
dto.setUserDeptName(creator.get().getDeptName());
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
}
|
||||
|
@ -239,6 +257,9 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
processVariable.putAll(task.getProcessVariables());
|
||||
dto.setParams(processVariable);
|
||||
dto.setUserName(abilityApplicationDTO.getUser());
|
||||
ResourceEntity resourceEntity = resourceDao.selectById(abilityApplicationDTO.getResourceId());
|
||||
dto.setApplyTitle(resourceEntity == null ? "" : resourceEntity.getName());
|
||||
dto.setUserDeptName(abilityApplicationDTO.getUnit());
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
}
|
||||
|
@ -249,6 +270,9 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
processVariable.putAll(task.getProcessVariables());
|
||||
dto.setParams(processVariable);
|
||||
dto.setUserName(resourceMountApplyDTO.getUserName());
|
||||
SysDeptEntity dept = sysDeptDao.getById(Long.parseLong(resourceMountApplyDTO.getDeptId()));
|
||||
dto.setUserDeptName(dept == null ? "" : dept.getName());
|
||||
dto.setApplyTitle(resourceMountApplyDTO.getResourceDTO().getName());
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
}
|
||||
|
@ -259,6 +283,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
processVariable.putAll(task.getProcessVariables());
|
||||
dto.setParams(processVariable);
|
||||
dto.setUserName(tDemandDataDTO.getApplyUserName());
|
||||
dto.setUserDeptName(tDemandDataDTO.getApplyUserDeptName());
|
||||
dto.setApplyTitle(tDemandDataDTO.getDemandSubject());
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
}
|
||||
|
@ -269,6 +295,9 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
processVariable.putAll(task.getProcessVariables());
|
||||
dto.setParams(processVariable);
|
||||
dto.setUserName(resourceDTO.getUndercarriageUserName());
|
||||
dto.setApplyTitle(resourceDTO.getName());
|
||||
SysDeptEntity dept = sysDeptDao.getById(resourceDTO.getUpdater());
|
||||
dto.setUserDeptName(dept == null ? "" : dept.getName());
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
}
|
||||
|
@ -280,6 +309,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
processVariable.putAll(task.getProcessVariables());
|
||||
dto.setParams(processVariable);
|
||||
dto.setUserName(tDemandCommentDTO.getName());
|
||||
dto.setApplyTitle(tDemandCommentDTO.getComment());
|
||||
dto.setUserDeptName(tDemandCommentDTO.getCreateDeptName());
|
||||
listDto.add(dto);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -45,4 +45,6 @@ public interface SysUserDao extends BaseDao<SysUserEntity> {
|
|||
void batchSaveUser(@Param("list")List<Map> list);
|
||||
|
||||
SysUserEntity getUserByName(@Param("username") String username);
|
||||
|
||||
String getDeptNameByUserId(@Param("id") String id);
|
||||
}
|
|
@ -5,6 +5,7 @@ import io.renren.common.service.BaseService;
|
|||
import io.renren.common.utils.Result;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.entity.SysUserEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -96,4 +96,8 @@
|
|||
SELECT id,username FROM sys_user WHERE username = #{username} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getDeptNameByUserId" resultType="java.lang.String">
|
||||
SELECT name FROM sys_dept LEFT JOIN sys_user ON sys_user.dept_id = sys_dept.id WHERE sys_user.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue