|
@@ -1,6 +1,7 @@
|
|
|
package com.usky.fire.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
@@ -315,7 +316,7 @@ public class PatrolInspectionRecordServiceImpl extends AbstractCrudService<Patro
|
|
|
@Override
|
|
|
public List<PatrolInspectionRecordExportVo> recordLsitExport(String areaName, String siteName, String name,
|
|
|
Integer planType, String startDateTime,
|
|
|
- String endDateTime) {
|
|
|
+ String endDateTime, String idList) {
|
|
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
|
String userType = null;
|
|
@@ -327,21 +328,29 @@ public class PatrolInspectionRecordServiceImpl extends AbstractCrudService<Patro
|
|
|
if ("00".equals(userType)) {
|
|
|
queryWrapper.eq(PatrolInspectionRecord::getCreator, SecurityUtils.getUsername());
|
|
|
}
|
|
|
- if (areaName != null && "".equals(areaName)) {
|
|
|
+ if (StringUtils.isNotBlank(areaName)) {
|
|
|
queryWrapper.like(PatrolInspectionRecord::getAreaName, areaName);
|
|
|
}
|
|
|
- if (siteName != null && "".equals(siteName)) {
|
|
|
+ if (StringUtils.isNotBlank(siteName)) {
|
|
|
queryWrapper.like(PatrolInspectionRecord::getSiteName, siteName);
|
|
|
}
|
|
|
- if (name != null && "".equals(name)) {
|
|
|
+ if (StringUtils.isNotBlank(name)) {
|
|
|
queryWrapper.like(PatrolInspectionRecord::getName, name);
|
|
|
}
|
|
|
if (planType != null && planType != 0) {
|
|
|
queryWrapper.eq(PatrolInspectionRecord::getPlanType, planType);
|
|
|
}
|
|
|
- if (startDateTime != null && "".equals(startDateTime) && endDateTime != null && "".equals(endDateTime)) {
|
|
|
+ if (StringUtils.isNotBlank(startDateTime) && StringUtils.isNotBlank(endDateTime)) {
|
|
|
queryWrapper.between(PatrolInspectionRecord::getCreateTime, startDateTime, endDateTime);
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(idList)) {
|
|
|
+ List<Integer> listId = new ArrayList<>();
|
|
|
+ String[] idArray = idList.split(",");
|
|
|
+ for (int i = 0; i < idArray.length; i++) {
|
|
|
+ listId.add(Integer.parseInt(idArray[i]));
|
|
|
+ }
|
|
|
+ queryWrapper.in(PatrolInspectionRecord::getId, listId);
|
|
|
+ }
|
|
|
queryWrapper.orderByDesc(PatrolInspectionRecord::getId);
|
|
|
List<PatrolInspectionRecord> patrolInspectionRecordList = this.list(queryWrapper);
|
|
|
List<PatrolInspectionRecordExportVo> list = new ArrayList<>();
|