|
|
@ -1,6 +1,11 @@
|
|
|
|
package com.ruoyi.manage.controller;
|
|
|
|
package com.ruoyi.manage.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.manage.domain.RecordInspectionImg;
|
|
|
|
|
|
|
|
import com.ruoyi.manage.domain.RecordInspectionInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.manage.service.IRecordInspectionImgService;
|
|
|
|
|
|
|
|
import com.ruoyi.manage.service.IRecordInspectionInfoService;
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@ -27,33 +32,45 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Controller
|
|
|
|
@Controller
|
|
|
|
@RequestMapping("/manage/record_inspection")
|
|
|
|
@RequestMapping("/manage/record_inspection")
|
|
|
|
public class RecordInspectionController extends BaseController
|
|
|
|
public class RecordInspectionController extends BaseController {
|
|
|
|
{
|
|
|
|
|
|
|
|
private String prefix = "manage/record_inspection";
|
|
|
|
private String prefix = "manage/record_inspection";
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IRecordInspectionInfoService recordInspectionInfoService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IRecordInspectionImgService recordInspectionImgService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IRecordInspectionService recordInspectionService;
|
|
|
|
private IRecordInspectionService recordInspectionService;
|
|
|
|
|
|
|
|
|
|
|
|
@RequiresPermissions("manage:record_inspection:view")
|
|
|
|
@RequiresPermissions("manage:record_inspection:view")
|
|
|
|
@GetMapping()
|
|
|
|
@GetMapping()
|
|
|
|
public String record_inspection()
|
|
|
|
public String record_inspection() {
|
|
|
|
{
|
|
|
|
|
|
|
|
return prefix + "/record_inspection";
|
|
|
|
return prefix + "/record_inspection";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/imgGroup")
|
|
|
|
@GetMapping("/imgGroup")
|
|
|
|
public String record_img()
|
|
|
|
public String record_img() {
|
|
|
|
{
|
|
|
|
|
|
|
|
return prefix + "/record_img_group";
|
|
|
|
return prefix + "/record_img_group";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/print")
|
|
|
|
|
|
|
|
public String print(String ids) {
|
|
|
|
|
|
|
|
System.out.println(ids);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RecordInspectionInfo> list=recordInspectionInfoService.selectInfoByInspectionId(ids);
|
|
|
|
|
|
|
|
System.out.println("巡检记录"+list.size());
|
|
|
|
|
|
|
|
List<RecordInspectionImg> recordInspectionImgs = recordInspectionImgService.selectImgByInspectionId(ids);
|
|
|
|
|
|
|
|
System.out.println("巡检图片"+recordInspectionImgs.size());
|
|
|
|
|
|
|
|
return prefix +"";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询巡检记录列表
|
|
|
|
* 查询巡检记录列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("manage:record_inspection:list")
|
|
|
|
@RequiresPermissions("manage:record_inspection:list")
|
|
|
|
@PostMapping("/list")
|
|
|
|
@PostMapping("/list")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public TableDataInfo list(RecordInspection recordInspection)
|
|
|
|
public TableDataInfo list(RecordInspection recordInspection) {
|
|
|
|
{
|
|
|
|
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
List<RecordInspection> list = recordInspectionService.selectRecordInspectionList(recordInspection);
|
|
|
|
List<RecordInspection> list = recordInspectionService.selectRecordInspectionList(recordInspection);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
@ -66,8 +83,7 @@ public class RecordInspectionController extends BaseController
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.EXPORT)
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public AjaxResult export(RecordInspection recordInspection)
|
|
|
|
public AjaxResult export(RecordInspection recordInspection) {
|
|
|
|
{
|
|
|
|
|
|
|
|
List<RecordInspection> list = recordInspectionService.selectRecordInspectionList(recordInspection);
|
|
|
|
List<RecordInspection> list = recordInspectionService.selectRecordInspectionList(recordInspection);
|
|
|
|
ExcelUtil<RecordInspection> util = new ExcelUtil<RecordInspection>(RecordInspection.class);
|
|
|
|
ExcelUtil<RecordInspection> util = new ExcelUtil<RecordInspection>(RecordInspection.class);
|
|
|
|
return util.exportExcel(list, "巡检记录数据");
|
|
|
|
return util.exportExcel(list, "巡检记录数据");
|
|
|
@ -77,8 +93,7 @@ public class RecordInspectionController extends BaseController
|
|
|
|
* 新增巡检记录
|
|
|
|
* 新增巡检记录
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/add")
|
|
|
|
@GetMapping("/add")
|
|
|
|
public String add()
|
|
|
|
public String add() {
|
|
|
|
{
|
|
|
|
|
|
|
|
return prefix + "/add";
|
|
|
|
return prefix + "/add";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -89,8 +104,7 @@ public class RecordInspectionController extends BaseController
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping("/add")
|
|
|
|
@PostMapping("/add")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public AjaxResult addSave(RecordInspection recordInspection)
|
|
|
|
public AjaxResult addSave(RecordInspection recordInspection) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(recordInspectionService.insertRecordInspection(recordInspection));
|
|
|
|
return toAjax(recordInspectionService.insertRecordInspection(recordInspection));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -99,8 +113,7 @@ public class RecordInspectionController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("manage:record_inspection:edit")
|
|
|
|
@RequiresPermissions("manage:record_inspection:edit")
|
|
|
|
@GetMapping("/edit/{inspectionId}")
|
|
|
|
@GetMapping("/edit/{inspectionId}")
|
|
|
|
public String edit(@PathVariable("inspectionId") Long inspectionId, ModelMap mmap)
|
|
|
|
public String edit(@PathVariable("inspectionId") Long inspectionId, ModelMap mmap) {
|
|
|
|
{
|
|
|
|
|
|
|
|
RecordInspection recordInspection = recordInspectionService.selectRecordInspectionByInspectionId(inspectionId);
|
|
|
|
RecordInspection recordInspection = recordInspectionService.selectRecordInspectionByInspectionId(inspectionId);
|
|
|
|
mmap.put("recordInspection", recordInspection);
|
|
|
|
mmap.put("recordInspection", recordInspection);
|
|
|
|
return prefix + "/edit";
|
|
|
|
return prefix + "/edit";
|
|
|
@ -113,8 +126,7 @@ public class RecordInspectionController extends BaseController
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.UPDATE)
|
|
|
|
@PostMapping("/edit")
|
|
|
|
@PostMapping("/edit")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public AjaxResult editSave(RecordInspection recordInspection)
|
|
|
|
public AjaxResult editSave(RecordInspection recordInspection) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(recordInspectionService.updateRecordInspection(recordInspection));
|
|
|
|
return toAjax(recordInspectionService.updateRecordInspection(recordInspection));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -125,8 +137,7 @@ public class RecordInspectionController extends BaseController
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.DELETE)
|
|
|
|
@Log(title = "巡检记录", businessType = BusinessType.DELETE)
|
|
|
|
@PostMapping("/remove")
|
|
|
|
@PostMapping("/remove")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public AjaxResult remove(String ids)
|
|
|
|
public AjaxResult remove(String ids) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(recordInspectionService.deleteRecordInspectionByInspectionIds(ids));
|
|
|
|
return toAjax(recordInspectionService.deleteRecordInspectionByInspectionIds(ids));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|