This commit is contained in:
Lihx 2025-08-02 17:38:44 +08:00
parent 50f564aeca
commit 716536e260
6 changed files with 53 additions and 1 deletions

View File

@ -331,7 +331,7 @@
AND dscc.end_time IS NULL AND dscc.end_time IS NULL
AND dscc.deleted = 0 AND dscc.deleted = 0
<if test="entity.subject != null and entity.subject != '' "> <if test="entity.subject != null and entity.subject != '' ">
AND subject = #{entity.subject} AND dscc.subject = #{entity.subject}
</if> </if>
GROUP BY GROUP BY
dscc.id dscc.id

View File

@ -570,4 +570,16 @@ public class RescueInfoSystem extends BaseController {
// 导出空白模板到Excel // 导出空白模板到Excel
exportBlankTemplate(response, "staff_template.xlsx", "员工信息", head, dropdownColumns, true, exampleDataList, textColumns); exportBlankTemplate(response, "staff_template.xlsx", "员工信息", head, dropdownColumns, true, exampleDataList, textColumns);
} }
/**
* 导出
*/
@GetMapping("/drviceExport")
public void exportUserList(DriverInfoDto query,
HttpServletResponse response) throws IOException {
List<DriverInfoDto> list = rescueInfoService.getAll(query);
// 输出 Excel
ExcelUtils.write(response, "员工数据.xls", "数据", DriverInfoDto.class,
list);
}
} }

View File

@ -90,4 +90,6 @@ public interface RescueInfoMapper extends BaseMapper<RescueInfo>
List<Map<String, Object>> selectRescueOrderByRoad(String dictType); List<Map<String, Object>> selectRescueOrderByRoad(String dictType);
DriverStaffSaveVO getOnInternal(Long id); DriverStaffSaveVO getOnInternal(Long id);
List<DriverInfoDto> getAll(@Param("entity") DriverInfoDto query);
} }

View File

@ -175,4 +175,6 @@ public interface IRescueInfoService extends IService<RescueInfo>
DriverStaffSaveVO getOnInternal(Long id); DriverStaffSaveVO getOnInternal(Long id);
List<DriverInfoDto> getAll(DriverInfoDto query);
} }

View File

@ -1547,6 +1547,10 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
return driverStaffSaveVo; return driverStaffSaveVo;
} }
@Override
public List<DriverInfoDto> getAll(DriverInfoDto query) {
return baseMapper.getAll(query);
}
public List<RescueInfo> filterRescueInfoByDate(List<RescueInfo> rescueInfos, Date startTime, Date endTime) { public List<RescueInfo> filterRescueInfoByDate(List<RescueInfo> rescueInfos, Date startTime, Date endTime) {
return rescueInfos.stream() return rescueInfos.stream()
.filter(info -> info.getRescueTime() != null && .filter(info -> info.getRescueTime() != null &&

View File

@ -520,5 +520,37 @@
</where> </where>
</select> </select>
<select id="getAll" resultType="cn.iocoder.yudao.module.rescue.dto.DriverInfoDto">
SELECT su.id AS userId,
su.nickname AS nickName,
su.mobile AS phonenumber,
su.sex as sex,
su.avatar as avatar,
di.*
FROM driver_info di
INNER JOIN system_users su ON di.user_id = su.id
AND su.deleted = '0'
WHERE 1 = 1
<if test="entity.nickName != null and entity.nickName != ''">
and su.nickname like concat('%', #{entity.nickName}, '%')
</if>
<if test="entity.phonenumber != null and entity.phonenumber != ''">
and su.mobile like concat('%', #{entity.phonenumber}, '%')
</if>
<if test="entity.driveStatus != null and entity.driveStatus != ''">
and di.driver_status = #{entity.driveStatus}
</if>
<if test="entity.authStatus != null and entity.authStatus != ''">
and di.auth_status = #{entity.authStatus}
</if>
<if test="entity.carType != null and entity.carType != ''">
and di.car_type = #{entity.carType}
</if>
<if test="entity.carLicenseNum != null and entity.carLicenseNum != ''">
and di.car_license_num like concat('%', #{entity.carLicenseNum}, '%')
</if>
order by di.create_time desc
</select>
</mapper> </mapper>