修复部分bug
This commit is contained in:
parent
fb657b810e
commit
565a993f4b
|
|
@ -81,9 +81,15 @@ public class AccessPermit extends BaseEntity {
|
|||
@Schema(description = "附件列表(不映射到数据库)")
|
||||
private List<String> attachmentList;
|
||||
|
||||
@Schema(description = "作业班成员用户列表(不映射到数据库,从sys_user表查询)")
|
||||
@Schema(description = "作业班成员用户列表(不映射到数据库,从 sys_user 表查询)")
|
||||
private List<SysUser> sysUserList;
|
||||
|
||||
@Schema(description = "作业班成员用户ID数组(不映射到数据库,用于前端传参)")
|
||||
@Schema(description = "作业班成员用户 ID 数组(不映射到数据库,用于前端传参)")
|
||||
private Long[] sysUserIds;
|
||||
|
||||
@Schema(description = "开始时间(不映射到数据库,用于时间范围查询)")
|
||||
private String startTime;
|
||||
|
||||
@Schema(description = "结束时间(不映射到数据库,用于时间范围查询)")
|
||||
private String endTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,10 +63,20 @@ public class AccessPermitIssuanceServiceImpl implements IAccessPermitIssuanceSer
|
|||
public List<AccessPermit> selectAccessPermitIssuanceList(AccessPermit accessPermit) {
|
||||
// 通过工作计划表取项目名称,通过工作负责人所属部门取施工单位(已在 Mapper 联查)
|
||||
List<AccessPermit> list = accessPermitMapper.selectAccessPermitIssuanceList(accessPermit);
|
||||
|
||||
for (AccessPermit permit : list) {
|
||||
parseJsonFields(permit);
|
||||
loadSysUsers(permit);
|
||||
}
|
||||
|
||||
// 在内存中根据 constructionUnitName 字段进行模糊过滤
|
||||
if (StringUtils.isNotBlank(accessPermit.getConstructionUnitName())) {
|
||||
String keyword = accessPermit.getConstructionUnitName();
|
||||
list = list.stream()
|
||||
.filter(permit -> StringUtils.isNotBlank(permit.getConstructionUnitName())
|
||||
&& permit.getConstructionUnitName().contains(keyword))
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,12 @@
|
|||
<if test="projectId != null">
|
||||
and ap.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and ap.validity_end_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and ap.validity_start_time <= DATE_ADD(DATE(#{endTime}), INTERVAL 1 DAY)
|
||||
</if>
|
||||
order by ap.create_time desc
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue