1、巡检记录
2、水电双计灌溉记录和刷卡记录 3、水电双计充值记录和卡信息
This commit is contained in:
@ -34,6 +34,14 @@
|
||||
<artifactId>fastbee-ruleEngine</artifactId>
|
||||
<version>3.8.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-xunjian-service</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-waterele-service</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.waterele;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.waterele.domain.MaCardinfo;
|
||||
import com.fastbee.waterele.service.IMaCardinfoService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 卡记录Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/waterele/cardinfo")
|
||||
@Api(tags = "卡记录")
|
||||
public class MaCardinfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMaCardinfoService maCardinfoService;
|
||||
|
||||
/**
|
||||
* 查询卡记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:cardinfo:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询卡记录列表")
|
||||
public TableDataInfo list(MaCardinfo maCardinfo)
|
||||
{
|
||||
startPage();
|
||||
List<MaCardinfo> list = maCardinfoService.selectMaCardinfoList(maCardinfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出卡记录列表
|
||||
*/
|
||||
@ApiOperation("导出卡记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('waterele:cardinfo:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MaCardinfo maCardinfo)
|
||||
{
|
||||
List<MaCardinfo> list = maCardinfoService.selectMaCardinfoList(maCardinfo);
|
||||
ExcelUtil<MaCardinfo> util = new ExcelUtil<MaCardinfo>(MaCardinfo.class);
|
||||
util.exportExcel(response, list, "卡记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取卡记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:cardinfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取卡记录详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(maCardinfoService.selectMaCardinfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增卡记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:cardinfo:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增卡记录")
|
||||
public AjaxResult add(@RequestBody MaCardinfo maCardinfo)
|
||||
{
|
||||
return toAjax(maCardinfoService.insertMaCardinfo(maCardinfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改卡记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:cardinfo:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改卡记录")
|
||||
public AjaxResult edit(@RequestBody MaCardinfo maCardinfo)
|
||||
{
|
||||
return toAjax(maCardinfoService.updateMaCardinfo(maCardinfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除卡记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:cardinfo:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除卡记录")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(maCardinfoService.deleteMaCardinfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.fastbee.data.controller.waterele;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fastbee.waterele.domain.MaGuangaiRecord;
|
||||
import com.fastbee.waterele.service.IMaGuangaiRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 灌溉记录Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/waterele/guangaiRecord")
|
||||
@Api(tags = "灌溉记录")
|
||||
public class MaGuangaiRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMaGuangaiRecordService maGuangaiRecordService;
|
||||
|
||||
/**
|
||||
* 查询灌溉记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询灌溉记录列表")
|
||||
public TableDataInfo list(MaGuangaiRecord maGuangaiRecord)
|
||||
{
|
||||
startPage();
|
||||
List<MaGuangaiRecord> list
|
||||
= maGuangaiRecordService.selectMaGuangaiRecordList(maGuangaiRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出灌溉记录列表
|
||||
*/
|
||||
@ApiOperation("导出灌溉记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MaGuangaiRecord maGuangaiRecord)
|
||||
{
|
||||
List<MaGuangaiRecord> list = maGuangaiRecordService.selectMaGuangaiRecordList(maGuangaiRecord);
|
||||
ExcelUtil<MaGuangaiRecord> util = new ExcelUtil<MaGuangaiRecord>(MaGuangaiRecord.class);
|
||||
util.exportExcel(response, list, "灌溉记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取灌溉记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取灌溉记录详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(maGuangaiRecordService.selectMaGuangaiRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增灌溉记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增灌溉记录")
|
||||
public AjaxResult add(@RequestBody MaGuangaiRecord maGuangaiRecord)
|
||||
{
|
||||
return toAjax(maGuangaiRecordService.insertMaGuangaiRecord(maGuangaiRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改灌溉记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改灌溉记录")
|
||||
public AjaxResult edit(@RequestBody MaGuangaiRecord maGuangaiRecord)
|
||||
{
|
||||
return toAjax(maGuangaiRecordService.updateMaGuangaiRecord(maGuangaiRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除灌溉记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除灌溉记录")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(maGuangaiRecordService.deleteMaGuangaiRecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.waterele;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.waterele.domain.MaRechargerecord;
|
||||
import com.fastbee.waterele.service.IMaRechargerecordService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 充值记录Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/waterele/rechargerecord")
|
||||
@Api(tags = "充值记录")
|
||||
public class MaRechargerecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMaRechargerecordService maRechargerecordService;
|
||||
|
||||
/**
|
||||
* 查询充值记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询充值记录列表")
|
||||
public TableDataInfo list(MaRechargerecord maRechargerecord)
|
||||
{
|
||||
startPage();
|
||||
List<MaRechargerecord> list = maRechargerecordService.selectMaRechargerecordList(maRechargerecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出充值记录列表
|
||||
*/
|
||||
@ApiOperation("导出充值记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MaRechargerecord maRechargerecord)
|
||||
{
|
||||
List<MaRechargerecord> list = maRechargerecordService.selectMaRechargerecordList(maRechargerecord);
|
||||
ExcelUtil<MaRechargerecord> util = new ExcelUtil<MaRechargerecord>(MaRechargerecord.class);
|
||||
util.exportExcel(response, list, "充值记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取充值记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取充值记录详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(maRechargerecordService.selectMaRechargerecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充值记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增充值记录")
|
||||
public AjaxResult add(@RequestBody MaRechargerecord maRechargerecord)
|
||||
{
|
||||
return toAjax(maRechargerecordService.insertMaRechargerecord(maRechargerecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改充值记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改充值记录")
|
||||
public AjaxResult edit(@RequestBody MaRechargerecord maRechargerecord)
|
||||
{
|
||||
return toAjax(maRechargerecordService.updateMaRechargerecord(maRechargerecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充值记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:rechargerecord:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除充值记录")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(maRechargerecordService.deleteMaRechargerecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.waterele;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.waterele.domain.MaWatereleRecord;
|
||||
import com.fastbee.waterele.service.IMaWatereleRecordService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 水电双计数据记录Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/waterele/watereleRecord")
|
||||
@Api(tags = "水电双计数据记录")
|
||||
public class MaWatereleRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMaWatereleRecordService maWatereleRecordService;
|
||||
|
||||
/**
|
||||
* 查询水电双计数据记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:watereleRecord:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询水电双计数据记录列表")
|
||||
public TableDataInfo list(MaWatereleRecord maWatereleRecord)
|
||||
{
|
||||
startPage();
|
||||
List<MaWatereleRecord> list = maWatereleRecordService.selectMaWatereleRecordList(maWatereleRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出水电双计数据记录列表
|
||||
*/
|
||||
@ApiOperation("导出水电双计数据记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('waterele:watereleRecord:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MaWatereleRecord maWatereleRecord)
|
||||
{
|
||||
List<MaWatereleRecord> list = maWatereleRecordService.selectMaWatereleRecordList(maWatereleRecord);
|
||||
ExcelUtil<MaWatereleRecord> util = new ExcelUtil<MaWatereleRecord>(MaWatereleRecord.class);
|
||||
util.exportExcel(response, list, "水电双计数据记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取水电双计数据记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:watereleRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取水电双计数据记录详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(maWatereleRecordService.selectMaWatereleRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水电双计数据记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:watereleRecord:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增水电双计数据记录")
|
||||
public AjaxResult add(@RequestBody MaWatereleRecord maWatereleRecord)
|
||||
{
|
||||
return toAjax(maWatereleRecordService.insertMaWatereleRecord(maWatereleRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水电双计数据记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:watereleRecord:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改水电双计数据记录")
|
||||
public AjaxResult edit(@RequestBody MaWatereleRecord maWatereleRecord)
|
||||
{
|
||||
return toAjax(maWatereleRecordService.updateMaWatereleRecord(maWatereleRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水电双计数据记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:watereleRecord:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除水电双计数据记录")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(maWatereleRecordService.deleteMaWatereleRecordByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.fastbee.data.controller.xunjian;
|
||||
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.xunjian.domain.XjInspectionNote;
|
||||
import com.fastbee.xunjian.service.IXjInspectionNoteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检注意事项Controller
|
||||
*
|
||||
* @author kenlixunjian
|
||||
* @date 2023-08-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/note")
|
||||
public class XjInspectionNoteController extends BaseController {
|
||||
@Autowired
|
||||
private IXjInspectionNoteService klxjInspectionNoteService;
|
||||
|
||||
/**
|
||||
* 查询巡检注意事项列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:note:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(XjInspectionNote klxjInspectionNote) {
|
||||
startPage();
|
||||
List<XjInspectionNote> list = klxjInspectionNoteService.selectXjInspectionNoteList(klxjInspectionNote);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检注意事项列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:note:export')")
|
||||
@Log(title = "巡检注意事项", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XjInspectionNote klxjInspectionNote) {
|
||||
List<XjInspectionNote> list = klxjInspectionNoteService.selectXjInspectionNoteList(klxjInspectionNote);
|
||||
ExcelUtil<XjInspectionNote> util = new ExcelUtil<XjInspectionNote>(XjInspectionNote.class);
|
||||
util.exportExcel(response, list, "巡检注意事项数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检注意事项详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:note:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(klxjInspectionNoteService.selectXjInspectionNoteById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检注意事项
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:note:add')")
|
||||
@Log(title = "巡检注意事项", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody XjInspectionNote klxjInspectionNote) {
|
||||
return toAjax(klxjInspectionNoteService.insertXjInspectionNote(klxjInspectionNote));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检注意事项
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:note:edit')")
|
||||
@Log(title = "巡检注意事项", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody XjInspectionNote klxjInspectionNote) {
|
||||
return toAjax(klxjInspectionNoteService.updateXjInspectionNote(klxjInspectionNote));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检注意事项
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:note:remove')")
|
||||
@Log(title = "巡检注意事项", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(klxjInspectionNoteService.deleteXjInspectionNoteByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.fastbee.data.controller.xunjian;
|
||||
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.xunjian.domain.XjInspectionRecords;
|
||||
import com.fastbee.xunjian.service.IXjInspectionRecordsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 记录Controller
|
||||
*
|
||||
* @author kenlixunjian
|
||||
* @date 2023-08-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/records")
|
||||
public class XjInspectionRecordsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IXjInspectionRecordsService klxjInspectionRecordsService;
|
||||
|
||||
/**
|
||||
* 查询记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:records:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(XjInspectionRecords klxjInspectionRecords)
|
||||
{
|
||||
startPage();
|
||||
List<XjInspectionRecords> list = klxjInspectionRecordsService.selectXjInspectionRecordsList(klxjInspectionRecords);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:records:export')")
|
||||
@Log(title = "记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XjInspectionRecords klxjInspectionRecords)
|
||||
{
|
||||
List<XjInspectionRecords> list = klxjInspectionRecordsService.selectXjInspectionRecordsList(klxjInspectionRecords);
|
||||
ExcelUtil<XjInspectionRecords> util = new ExcelUtil<XjInspectionRecords>(XjInspectionRecords.class);
|
||||
util.exportExcel(response, list, "记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:records:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(klxjInspectionRecordsService.selectXjInspectionRecordsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:records:add')")
|
||||
@Log(title = "记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody XjInspectionRecords klxjInspectionRecords)
|
||||
{
|
||||
return toAjax(klxjInspectionRecordsService.insertXjInspectionRecords(klxjInspectionRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:records:edit')")
|
||||
@Log(title = "记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody XjInspectionRecords klxjInspectionRecords)
|
||||
{
|
||||
return toAjax(klxjInspectionRecordsService.updateXjInspectionRecords(klxjInspectionRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:records:remove')")
|
||||
@Log(title = "记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(klxjInspectionRecordsService.deleteXjInspectionRecordsByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package com.fastbee.data.controller.xunjian;
|
||||
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.xunjian.domain.XjInspectionRoutes;
|
||||
import com.fastbee.xunjian.service.IXjInspectionRoutesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检路线Controller
|
||||
*
|
||||
* @author kenlixunjian
|
||||
* @date 2023-08-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/routes")
|
||||
public class XjInspectionRoutesController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IXjInspectionRoutesService klxjInspectionRoutesService;
|
||||
|
||||
/**
|
||||
* 查询巡检路线列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(XjInspectionRoutes klxjInspectionRoutes)
|
||||
{
|
||||
startPage();
|
||||
List<XjInspectionRoutes> list = klxjInspectionRoutesService.selectXjInspectionRoutesList(klxjInspectionRoutes);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检路线列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:export')")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XjInspectionRoutes klxjInspectionRoutes) {
|
||||
List<XjInspectionRoutes> list = klxjInspectionRoutesService.selectXjInspectionRoutesList(klxjInspectionRoutes);
|
||||
ExcelUtil<XjInspectionRoutes> util = new ExcelUtil<XjInspectionRoutes>(XjInspectionRoutes.class);
|
||||
util.exportExcel(response, list, "巡检路线数据");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取巡检路线详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(klxjInspectionRoutesService.selectXjInspectionRoutesById(id));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelUtil<XjInspectionRoutes> util = new ExcelUtil<XjInspectionRoutes>(XjInspectionRoutes.class);
|
||||
List<XjInspectionRoutes> userList = util.importExcel(file.getInputStream());
|
||||
String operName = getUsername();
|
||||
String message = klxjInspectionRoutesService.importData(userList, updateSupport, operName);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<XjInspectionRoutes> util = new ExcelUtil<XjInspectionRoutes>(XjInspectionRoutes.class);
|
||||
util.importTemplateExcel(response, "巡检对象数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检路线
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:add')")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody XjInspectionRoutes klxjInspectionRoutes) {
|
||||
return toAjax(klxjInspectionRoutesService.insertXjInspectionRoutes(klxjInspectionRoutes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检路线
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:edit')")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody XjInspectionRoutes klxjInspectionRoutes)
|
||||
{
|
||||
return toAjax(klxjInspectionRoutesService.updateXjInspectionRoutes(klxjInspectionRoutes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检路线
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('inspection:routes:remove')")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(klxjInspectionRoutesService.deleteXjInspectionRoutesByIds(ids));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user