diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java index ca12ec50..e8b2877b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgAuditProcessController.java @@ -1,6 +1,7 @@ package com.daqing.financial.guarantee.controller; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.daqing.financial.guarantee.feign.HrmsFeignService; import com.daqing.financial.guarantee.service.IDgAuditProcessService; @@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.LinkedHashMap; import java.util.List; /** @@ -48,12 +50,15 @@ public class DgAuditProcessController { @RequestParam(required = false) String processId){ List processList = auditProcessService.queryProcessList(businessId,processId); ResponseResult responseResult = hrmsFeignService.roleList(); - //获取角色名称信息 - List list = (List) responseResult.getData(); + + List message = null; + if(responseResult.getData() != null){ + message = (List) responseResult.getData(); + } for (DgAuditProcess process:processList){ - for (RoleEntity roleEntity:list){ - if (process.getRoleId().equals(roleEntity.getId())){ - process.setDeptName(roleEntity.getName()); + for(LinkedHashMap res : message){ + if(process.getRoleId().equals(res.get("id"))){//如果id相同情况下,就往对象里面赋值 + process.setDeptName(JSONObject.toJSONString(res.get("name")).replace("\"","")); } } } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java index a66d8faa..000ca9f5 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgEfficiencyServiceImpl.java @@ -495,7 +495,6 @@ public class DgEfficiencyServiceImpl extends ServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq("user_id", currentUser).eq("business_id",key); diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java index bba7a2ad..999707ee 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java @@ -38,6 +38,7 @@ public class DgAuditProcess implements Serializable { @ApiModelProperty(value = "用户id") private Integer userId; + @TableField(exist = false) @ApiModelProperty(value = "部门名称(实为角色名称)") private String deptName;