兴安列表优化
This commit is contained in:
@@ -143,10 +143,23 @@ public class VisCarryStuffController extends BaseController {
|
||||
}
|
||||
});
|
||||
|
||||
//查询放行保安名字
|
||||
VisExitOutRecordVo visExitOutRecordVo = new VisExitOutRecordVo();
|
||||
visExitOutRecordVo.setExitIds(collect);
|
||||
List<VisExitOutRecordVo> rList = visExitOutRecordService.selectList(visExitOutRecordVo);
|
||||
Map<Long, String> map1 = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(rList)) {
|
||||
map1 = rList.stream().collect(Collectors.toMap(VisExitOutRecordVo::getExitId, VisExitOutRecordVo::getUserName, (key1, key2) -> key1));
|
||||
}
|
||||
|
||||
//构造数据
|
||||
Map<Long, List<VisStuffInfoVo>> collect1 = stuffList.stream().collect(Collectors.groupingBy(VisStuffInfoVo::getExitId));
|
||||
Map<Long, String> finalMap = map1;
|
||||
list.forEach(exit -> {
|
||||
exit.setVisStuffInfoList(collect1.get(exit.getId()));
|
||||
if (null != finalMap.get(exit.getId())) {
|
||||
exit.setReleaseName(finalMap.get(exit.getId()));
|
||||
}
|
||||
});
|
||||
|
||||
return getDataTable(list);
|
||||
|
||||
@@ -18,6 +18,11 @@ public class VisExitOutRecordVo extends BaseEntity {
|
||||
*/
|
||||
private Long exitId;
|
||||
|
||||
/**
|
||||
* 出门证主键ids
|
||||
*/
|
||||
private List<Long> exitIds;
|
||||
|
||||
|
||||
/**
|
||||
* 放行人(保安)
|
||||
|
||||
@@ -129,6 +129,11 @@ public class VisExitOutVo extends BaseEntity {
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 放行人名字
|
||||
*/
|
||||
private String releaseName;
|
||||
|
||||
/**
|
||||
* 申请类型 0:临时访客 1:携物出门
|
||||
*/
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
select reviewer,
|
||||
state,
|
||||
sp.position type,
|
||||
date_format(created_time, '%Y-%m-%d %H:%i:%s') createdTime,
|
||||
date_format(ifnull(updated_time,created_time), '%Y-%m-%d %H:%i:%s') createdTime,
|
||||
sp.name reviewerName
|
||||
from vis_visitor_review_process vvrp
|
||||
left join sys_people sp on vvrp.reviewer = sp.id and sp.del_flag = '0'
|
||||
|
||||
@@ -64,6 +64,12 @@
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="applyName != null and applyName != ''">and e.`name` like concat('%', #{applyName}, '%')</if>
|
||||
<if test="exitId != null">and r.`exit_id` = #{exitId}</if>
|
||||
<if test="exitIds != null and exitIds.size() > 0">
|
||||
and r.`exit_id` in
|
||||
<foreach collection="exitIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user