|
@@ -1,20 +1,24 @@
|
|
|
package com.usky.fire.controller.web;
|
|
package com.usky.fire.controller.web;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
import com.usky.common.core.bean.ApiResult;
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
|
|
+import com.usky.common.log.annotation.Log;
|
|
|
|
|
+import com.usky.common.log.enums.BusinessType;
|
|
|
import com.usky.fire.domain.PatrolInspectionAbnormal;
|
|
import com.usky.fire.domain.PatrolInspectionAbnormal;
|
|
|
import com.usky.fire.domain.PatrolInspectionRecord;
|
|
import com.usky.fire.domain.PatrolInspectionRecord;
|
|
|
import com.usky.fire.domain.PatrolInspectionRoute;
|
|
import com.usky.fire.domain.PatrolInspectionRoute;
|
|
|
import com.usky.fire.service.PatrolInspectionAbnormalService;
|
|
import com.usky.fire.service.PatrolInspectionAbnormalService;
|
|
|
|
|
+import com.usky.fire.service.vo.PatrolInspectionAbnormalExportVo;
|
|
|
import com.usky.fire.service.vo.PatrolInspectionAbnormalVo;
|
|
import com.usky.fire.service.vo.PatrolInspectionAbnormalVo;
|
|
|
import com.usky.fire.service.vo.PatrolInspectionRecordVo;
|
|
import com.usky.fire.service.vo.PatrolInspectionRecordVo;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
|
|
-
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -56,5 +60,33 @@ public class PatrolInspectionAbnormalController {
|
|
|
public ApiResult<List<PatrolInspectionAbnormalVo>> recordDetails(@RequestParam(value = "id") Integer id) {
|
|
public ApiResult<List<PatrolInspectionAbnormalVo>> recordDetails(@RequestParam(value = "id") Integer id) {
|
|
|
return ApiResult.success(patrolInspectionAbnormalService.recordDetails(id));
|
|
return ApiResult.success(patrolInspectionAbnormalService.recordDetails(id));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 巡检异常记录导出
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param response HttpServletResponse
|
|
|
|
|
+ * @param areaName 区域名称(可选)
|
|
|
|
|
+ * @param siteName 地点名称(可选)
|
|
|
|
|
+ * @param name 人员名称(可选)
|
|
|
|
|
+ * @param planType 计划类型(可选)
|
|
|
|
|
+ * @param routeId 路线ID(可选)
|
|
|
|
|
+ * @param startDateTime 开始时间(可选)
|
|
|
|
|
+ * @param endDateTime 结束时间(可选)
|
|
|
|
|
+ * @throws IOException
|
|
|
|
|
+ */
|
|
|
|
|
+ @Log(title = "巡检异常记录", businessType = BusinessType.EXPORT)
|
|
|
|
|
+ @PostMapping("/abnormalListExport")
|
|
|
|
|
+ public void export(HttpServletResponse response,
|
|
|
|
|
+ @RequestParam(value = "areaName", required = false) String areaName,
|
|
|
|
|
+ @RequestParam(value = "siteName", required = false) String siteName,
|
|
|
|
|
+ @RequestParam(value = "name", required = false) String name,
|
|
|
|
|
+ @RequestParam(value = "planType", required = false) Integer planType,
|
|
|
|
|
+ @RequestParam(value = "routeId", required = false) Integer routeId,
|
|
|
|
|
+ @RequestParam(value = "startDateTime", required = false) String startDateTime,
|
|
|
|
|
+ @RequestParam(value = "endDateTime", required = false) String endDateTime) throws IOException {
|
|
|
|
|
+ List<PatrolInspectionAbnormalExportVo> list = patrolInspectionAbnormalService.abnormalListExport(areaName, siteName, name, planType, routeId, startDateTime, endDateTime);
|
|
|
|
|
+ ExcelUtil<PatrolInspectionAbnormalExportVo> util = new ExcelUtil<>(PatrolInspectionAbnormalExportVo.class);
|
|
|
|
|
+ util.exportExcel(response, list, "巡检异常记录", "巡检异常记录");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|