1、巡检记录

2、水电双计灌溉记录和刷卡记录
3、水电双计充值记录和卡信息
This commit is contained in:
wuyw
2024-08-12 08:30:02 +08:00
parent d1c9afecd8
commit 7d08d3ca47
47 changed files with 4999 additions and 1 deletions

View File

@ -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>

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fastbee-service</artifactId>
<groupId>com.fastbee</groupId>
<version>3.8.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fastbee-waterele-service</artifactId>
<description>
水电双计系统模块
</description>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.fastbee</groupId>
<artifactId>fastbee-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,58 @@
package com.fastbee.waterele.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
/**
* 卡记录对象 ma_cardinfo
*
* @author kerwincui
* @date 2024-08-12
*/
@ApiModel(value = "MaCardinfo",description = "卡记录 ma_cardinfo")
@Data
@EqualsAndHashCode(callSuper = true)
public class MaCardinfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private Long id;
/** 卡编号 */
@Excel(name = "卡编号")
@ApiModelProperty("卡编号")
private String cardNum;
/** 区域号 */
@Excel(name = "区域号")
@ApiModelProperty("区域号")
private String areaCode;
/** 卡ID */
@Excel(name = "卡ID")
@ApiModelProperty("卡ID")
private String cardId;
/** 地址信息 */
@Excel(name = "地址信息")
@ApiModelProperty("地址信息")
private String addressInfo;
/** 卡类型 */
@Excel(name = "卡类型")
@ApiModelProperty("卡类型")
private Integer cardtype;
/** mcuSn */
@Excel(name = "mcuSn")
@ApiModelProperty("mcuSn")
private String mcusn;
}

View File

@ -0,0 +1,76 @@
package com.fastbee.waterele.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
/**
* 灌溉记录对象 ma_guangai_record
*
* @author kerwincui
* @date 2024-08-12
*/
@ApiModel(value = "MaGuangaiRecord",description = "灌溉记录 ma_guangai_record")
@Data
@EqualsAndHashCode(callSuper = true)
public class MaGuangaiRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private Long id;
/** 设备编号 */
@Excel(name = "设备编号")
@ApiModelProperty("设备编号")
private String devSn;
/** 开泵时间 */
@Excel(name = "开泵时间")
@ApiModelProperty("开泵时间")
private Long startTime;
/** 关泵时间 */
@Excel(name = "关泵时间")
@ApiModelProperty("关泵时间")
private Long endTime;
/** 灌溉最新上报时间 */
@Excel(name = "灌溉最新上报时间")
@ApiModelProperty("灌溉最新上报时间")
private Long lastTime;
/** 卡编号 */
@Excel(name = "卡编号")
@ApiModelProperty("卡编号")
private String cardId;
/** 区域号 */
@Excel(name = "区域号")
@ApiModelProperty("区域号")
private String areaCode;
/** 卡内余额 */
@Excel(name = "卡内余额")
@ApiModelProperty("卡内余额")
private String userBalance;
/** 本次用水量 */
@Excel(name = "本次用水量")
@ApiModelProperty("本次用水量")
private String curFlow;
/** 本次用电量 */
@Excel(name = "本次用电量")
@ApiModelProperty("本次用电量")
private String curEle;
/** 灌溉状态 */
@Excel(name = "灌溉状态")
@ApiModelProperty("灌溉状态")
private Integer status;
}

View File

@ -0,0 +1,58 @@
package com.fastbee.waterele.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
/**
* 充值记录对象 ma_rechargerecord
*
* @author kerwincui
* @date 2024-08-12
*/
@ApiModel(value = "MaRechargerecord",description = "充值记录 ma_rechargerecord")
@Data
@EqualsAndHashCode(callSuper = true)
public class MaRechargerecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private Long id;
/** 余额 */
@Excel(name = "余额")
@ApiModelProperty("余额")
private String balance;
/** 充值金额 */
@Excel(name = "充值金额")
@ApiModelProperty("充值金额")
private String investval;
/** 卡编号 */
@Excel(name = "卡编号")
@ApiModelProperty("卡编号")
private String cardNum;
/** 区域号 */
@Excel(name = "区域号")
@ApiModelProperty("区域号")
private String areaCode;
/** 卡ID */
@Excel(name = "卡ID")
@ApiModelProperty("卡ID")
private String cardId;
/** mcuSn */
@Excel(name = "mcuSn")
@ApiModelProperty("mcuSn")
private String mcusn;
}

View File

@ -0,0 +1,113 @@
package com.fastbee.waterele.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
/**
* 水电双计数据记录对象 ma_waterele_record
*
* @author kerwincui
* @date 2024-08-12
*/
@ApiModel(value = "MaWatereleRecord",description = "水电双计数据记录 ma_waterele_record")
@Data
@EqualsAndHashCode(callSuper = true)
public class MaWatereleRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private Long id;
/** 设备编号 */
@Excel(name = "设备编号")
@ApiModelProperty("设备编号")
private String devSn;
/** 工作状态:0=关泵,1=开泵 */
@Excel(name = "工作状态:0=关泵,1=开泵")
@ApiModelProperty("工作状态:0=关泵,1=开泵")
private Integer workstate;
/** 本次用水量(m³) */
@Excel(name = "本次用水量(m³)")
@ApiModelProperty("本次用水量(m³)")
private String usersumflow;
/** 本次用电量(度) */
@Excel(name = "本次用电量(度)")
@ApiModelProperty("本次用电量(度)")
private String usersumele;
/** 用户余额(元) */
@Excel(name = "用户余额(元)")
@ApiModelProperty("用户余额(元)")
private String userbalance;
/** 累计用水量(m³) */
@Excel(name = "累计用水量(m³)")
@ApiModelProperty("累计用水量(m³)")
private String sumflow;
/** 累计用电量(度) */
@Excel(name = "累计用电量(度)")
@ApiModelProperty("累计用电量(度)")
private String sumele;
/** 单片机编号 */
@Excel(name = "单片机编号")
@ApiModelProperty("单片机编号")
private String mcusn;
/** 瞬时电量 */
@Excel(name = "瞬时电量")
@ApiModelProperty("瞬时电量")
private String inspower;
/** 瞬时流量(m³/s) */
@Excel(name = "瞬时流量(m³/s)")
@ApiModelProperty("瞬时流量(m³/s)")
private String insflow;
/** 当前累计用水量(m³) */
@Excel(name = "当前累计用水量(m³)")
@ApiModelProperty("当前累计用水量(m³)")
private String curflow;
/** 当前累计用电量(度) */
@Excel(name = "当前累计用电量(度)")
@ApiModelProperty("当前累计用电量(度)")
private String curele;
/** 流量计累计水量(m³) */
@Excel(name = "流量计累计水量(m³)")
@ApiModelProperty("流量计累计水量(m³)")
private String metersum;
/** 流量计瞬时流量(m³/s) */
@Excel(name = "流量计瞬时流量(m³/s)")
@ApiModelProperty("流量计瞬时流量(m³/s)")
private String meterins;
/** 卡编号 */
@Excel(name = "卡编号")
@ApiModelProperty("卡编号")
private String cardid;
/** 区域号 */
@Excel(name = "区域号")
@ApiModelProperty("区域号")
private String areacode;
/** 当前动作 */
@Excel(name = "当前动作")
@ApiModelProperty("当前动作")
private String action;
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.mapper;
import java.util.List;
import com.fastbee.waterele.domain.MaCardinfo;
/**
* 卡记录Mapper接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface MaCardinfoMapper
{
/**
* 查询卡记录
*
* @param id 卡记录主键
* @return 卡记录
*/
public MaCardinfo selectMaCardinfoById(Long id);
/**
* 查询卡记录列表
*
* @param maCardinfo 卡记录
* @return 卡记录集合
*/
public List<MaCardinfo> selectMaCardinfoList(MaCardinfo maCardinfo);
/**
* 新增卡记录
*
* @param maCardinfo 卡记录
* @return 结果
*/
public int insertMaCardinfo(MaCardinfo maCardinfo);
/**
* 修改卡记录
*
* @param maCardinfo 卡记录
* @return 结果
*/
public int updateMaCardinfo(MaCardinfo maCardinfo);
/**
* 删除卡记录
*
* @param id 卡记录主键
* @return 结果
*/
public int deleteMaCardinfoById(Long id);
/**
* 批量删除卡记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMaCardinfoByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.fastbee.waterele.mapper;
import com.fastbee.waterele.domain.MaGuangaiRecord;
import java.util.List;
/**
* 灌溉记录Mapper接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface MaGuangaiRecordMapper
{
/**
* 查询灌溉记录
*
* @param id 灌溉记录主键
* @return 灌溉记录
*/
public MaGuangaiRecord selectMaGuangaiRecordById(Long id);
/**
* 查询灌溉记录列表
*
* @param maGuangaiRecord 灌溉记录
* @return 灌溉记录集合
*/
public List<MaGuangaiRecord> selectMaGuangaiRecordList(MaGuangaiRecord maGuangaiRecord);
/**
* 新增灌溉记录
*
* @param maGuangaiRecord 灌溉记录
* @return 结果
*/
public int insertMaGuangaiRecord(MaGuangaiRecord maGuangaiRecord);
/**
* 修改灌溉记录
*
* @param maGuangaiRecord 灌溉记录
* @return 结果
*/
public int updateMaGuangaiRecord(MaGuangaiRecord maGuangaiRecord);
/**
* 删除灌溉记录
*
* @param id 灌溉记录主键
* @return 结果
*/
public int deleteMaGuangaiRecordById(Long id);
/**
* 批量删除灌溉记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMaGuangaiRecordByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.mapper;
import java.util.List;
import com.fastbee.waterele.domain.MaRechargerecord;
/**
* 充值记录Mapper接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface MaRechargerecordMapper
{
/**
* 查询充值记录
*
* @param id 充值记录主键
* @return 充值记录
*/
public MaRechargerecord selectMaRechargerecordById(Long id);
/**
* 查询充值记录列表
*
* @param maRechargerecord 充值记录
* @return 充值记录集合
*/
public List<MaRechargerecord> selectMaRechargerecordList(MaRechargerecord maRechargerecord);
/**
* 新增充值记录
*
* @param maRechargerecord 充值记录
* @return 结果
*/
public int insertMaRechargerecord(MaRechargerecord maRechargerecord);
/**
* 修改充值记录
*
* @param maRechargerecord 充值记录
* @return 结果
*/
public int updateMaRechargerecord(MaRechargerecord maRechargerecord);
/**
* 删除充值记录
*
* @param id 充值记录主键
* @return 结果
*/
public int deleteMaRechargerecordById(Long id);
/**
* 批量删除充值记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMaRechargerecordByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.mapper;
import java.util.List;
import com.fastbee.waterele.domain.MaWatereleRecord;
/**
* 水电双计数据记录Mapper接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface MaWatereleRecordMapper
{
/**
* 查询水电双计数据记录
*
* @param id 水电双计数据记录主键
* @return 水电双计数据记录
*/
public MaWatereleRecord selectMaWatereleRecordById(Long id);
/**
* 查询水电双计数据记录列表
*
* @param maWatereleRecord 水电双计数据记录
* @return 水电双计数据记录集合
*/
public List<MaWatereleRecord> selectMaWatereleRecordList(MaWatereleRecord maWatereleRecord);
/**
* 新增水电双计数据记录
*
* @param maWatereleRecord 水电双计数据记录
* @return 结果
*/
public int insertMaWatereleRecord(MaWatereleRecord maWatereleRecord);
/**
* 修改水电双计数据记录
*
* @param maWatereleRecord 水电双计数据记录
* @return 结果
*/
public int updateMaWatereleRecord(MaWatereleRecord maWatereleRecord);
/**
* 删除水电双计数据记录
*
* @param id 水电双计数据记录主键
* @return 结果
*/
public int deleteMaWatereleRecordById(Long id);
/**
* 批量删除水电双计数据记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMaWatereleRecordByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.service;
import java.util.List;
import com.fastbee.waterele.domain.MaCardinfo;
/**
* 卡记录Service接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface IMaCardinfoService
{
/**
* 查询卡记录
*
* @param id 卡记录主键
* @return 卡记录
*/
public MaCardinfo selectMaCardinfoById(Long id);
/**
* 查询卡记录列表
*
* @param maCardinfo 卡记录
* @return 卡记录集合
*/
public List<MaCardinfo> selectMaCardinfoList(MaCardinfo maCardinfo);
/**
* 新增卡记录
*
* @param maCardinfo 卡记录
* @return 结果
*/
public int insertMaCardinfo(MaCardinfo maCardinfo);
/**
* 修改卡记录
*
* @param maCardinfo 卡记录
* @return 结果
*/
public int updateMaCardinfo(MaCardinfo maCardinfo);
/**
* 批量删除卡记录
*
* @param ids 需要删除的卡记录主键集合
* @return 结果
*/
public int deleteMaCardinfoByIds(Long[] ids);
/**
* 删除卡记录信息
*
* @param id 卡记录主键
* @return 结果
*/
public int deleteMaCardinfoById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.service;
import java.util.List;
import com.fastbee.waterele.domain.MaGuangaiRecord;
/**
* 灌溉记录Service接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface IMaGuangaiRecordService
{
/**
* 查询灌溉记录
*
* @param id 灌溉记录主键
* @return 灌溉记录
*/
public MaGuangaiRecord selectMaGuangaiRecordById(Long id);
/**
* 查询灌溉记录列表
*
* @param maGuangaiRecord 灌溉记录
* @return 灌溉记录集合
*/
public List<MaGuangaiRecord> selectMaGuangaiRecordList(MaGuangaiRecord maGuangaiRecord);
/**
* 新增灌溉记录
*
* @param maGuangaiRecord 灌溉记录
* @return 结果
*/
public int insertMaGuangaiRecord(MaGuangaiRecord maGuangaiRecord);
/**
* 修改灌溉记录
*
* @param maGuangaiRecord 灌溉记录
* @return 结果
*/
public int updateMaGuangaiRecord(MaGuangaiRecord maGuangaiRecord);
/**
* 批量删除灌溉记录
*
* @param ids 需要删除的灌溉记录主键集合
* @return 结果
*/
public int deleteMaGuangaiRecordByIds(Long[] ids);
/**
* 删除灌溉记录信息
*
* @param id 灌溉记录主键
* @return 结果
*/
public int deleteMaGuangaiRecordById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.service;
import java.util.List;
import com.fastbee.waterele.domain.MaRechargerecord;
/**
* 充值记录Service接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface IMaRechargerecordService
{
/**
* 查询充值记录
*
* @param id 充值记录主键
* @return 充值记录
*/
public MaRechargerecord selectMaRechargerecordById(Long id);
/**
* 查询充值记录列表
*
* @param maRechargerecord 充值记录
* @return 充值记录集合
*/
public List<MaRechargerecord> selectMaRechargerecordList(MaRechargerecord maRechargerecord);
/**
* 新增充值记录
*
* @param maRechargerecord 充值记录
* @return 结果
*/
public int insertMaRechargerecord(MaRechargerecord maRechargerecord);
/**
* 修改充值记录
*
* @param maRechargerecord 充值记录
* @return 结果
*/
public int updateMaRechargerecord(MaRechargerecord maRechargerecord);
/**
* 批量删除充值记录
*
* @param ids 需要删除的充值记录主键集合
* @return 结果
*/
public int deleteMaRechargerecordByIds(Long[] ids);
/**
* 删除充值记录信息
*
* @param id 充值记录主键
* @return 结果
*/
public int deleteMaRechargerecordById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.fastbee.waterele.service;
import java.util.List;
import com.fastbee.waterele.domain.MaWatereleRecord;
/**
* 水电双计数据记录Service接口
*
* @author kerwincui
* @date 2024-08-12
*/
public interface IMaWatereleRecordService
{
/**
* 查询水电双计数据记录
*
* @param id 水电双计数据记录主键
* @return 水电双计数据记录
*/
public MaWatereleRecord selectMaWatereleRecordById(Long id);
/**
* 查询水电双计数据记录列表
*
* @param maWatereleRecord 水电双计数据记录
* @return 水电双计数据记录集合
*/
public List<MaWatereleRecord> selectMaWatereleRecordList(MaWatereleRecord maWatereleRecord);
/**
* 新增水电双计数据记录
*
* @param maWatereleRecord 水电双计数据记录
* @return 结果
*/
public int insertMaWatereleRecord(MaWatereleRecord maWatereleRecord);
/**
* 修改水电双计数据记录
*
* @param maWatereleRecord 水电双计数据记录
* @return 结果
*/
public int updateMaWatereleRecord(MaWatereleRecord maWatereleRecord);
/**
* 批量删除水电双计数据记录
*
* @param ids 需要删除的水电双计数据记录主键集合
* @return 结果
*/
public int deleteMaWatereleRecordByIds(Long[] ids);
/**
* 删除水电双计数据记录信息
*
* @param id 水电双计数据记录主键
* @return 结果
*/
public int deleteMaWatereleRecordById(Long id);
}

View File

@ -0,0 +1,96 @@
package com.fastbee.waterele.service.impl;
import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.waterele.mapper.MaCardinfoMapper;
import com.fastbee.waterele.domain.MaCardinfo;
import com.fastbee.waterele.service.IMaCardinfoService;
/**
* 卡记录Service业务层处理
*
* @author kerwincui
* @date 2024-08-12
*/
@Service
public class MaCardinfoServiceImpl implements IMaCardinfoService
{
@Autowired
private MaCardinfoMapper maCardinfoMapper;
/**
* 查询卡记录
*
* @param id 卡记录主键
* @return 卡记录
*/
@Override
public MaCardinfo selectMaCardinfoById(Long id)
{
return maCardinfoMapper.selectMaCardinfoById(id);
}
/**
* 查询卡记录列表
*
* @param maCardinfo 卡记录
* @return 卡记录
*/
@Override
public List<MaCardinfo> selectMaCardinfoList(MaCardinfo maCardinfo)
{
return maCardinfoMapper.selectMaCardinfoList(maCardinfo);
}
/**
* 新增卡记录
*
* @param maCardinfo 卡记录
* @return 结果
*/
@Override
public int insertMaCardinfo(MaCardinfo maCardinfo)
{
maCardinfo.setCreateTime(DateUtils.getNowDate());
return maCardinfoMapper.insertMaCardinfo(maCardinfo);
}
/**
* 修改卡记录
*
* @param maCardinfo 卡记录
* @return 结果
*/
@Override
public int updateMaCardinfo(MaCardinfo maCardinfo)
{
maCardinfo.setUpdateTime(DateUtils.getNowDate());
return maCardinfoMapper.updateMaCardinfo(maCardinfo);
}
/**
* 批量删除卡记录
*
* @param ids 需要删除的卡记录主键
* @return 结果
*/
@Override
public int deleteMaCardinfoByIds(Long[] ids)
{
return maCardinfoMapper.deleteMaCardinfoByIds(ids);
}
/**
* 删除卡记录信息
*
* @param id 卡记录主键
* @return 结果
*/
@Override
public int deleteMaCardinfoById(Long id)
{
return maCardinfoMapper.deleteMaCardinfoById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.fastbee.waterele.service.impl;
import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.waterele.mapper.MaGuangaiRecordMapper;
import com.fastbee.waterele.domain.MaGuangaiRecord;
import com.fastbee.waterele.service.IMaGuangaiRecordService;
/**
* 灌溉记录Service业务层处理
*
* @author kerwincui
* @date 2024-08-12
*/
@Service
public class MaGuangaiRecordServiceImpl implements IMaGuangaiRecordService
{
@Autowired
private MaGuangaiRecordMapper maGuangaiRecordMapper;
/**
* 查询灌溉记录
*
* @param id 灌溉记录主键
* @return 灌溉记录
*/
@Override
public MaGuangaiRecord selectMaGuangaiRecordById(Long id)
{
return maGuangaiRecordMapper.selectMaGuangaiRecordById(id);
}
/**
* 查询灌溉记录列表
*
* @param maGuangaiRecord 灌溉记录
* @return 灌溉记录
*/
@Override
public List<MaGuangaiRecord> selectMaGuangaiRecordList(MaGuangaiRecord maGuangaiRecord)
{
return maGuangaiRecordMapper.selectMaGuangaiRecordList(maGuangaiRecord);
}
/**
* 新增灌溉记录
*
* @param maGuangaiRecord 灌溉记录
* @return 结果
*/
@Override
public int insertMaGuangaiRecord(MaGuangaiRecord maGuangaiRecord)
{
maGuangaiRecord.setCreateTime(DateUtils.getNowDate());
return maGuangaiRecordMapper.insertMaGuangaiRecord(maGuangaiRecord);
}
/**
* 修改灌溉记录
*
* @param maGuangaiRecord 灌溉记录
* @return 结果
*/
@Override
public int updateMaGuangaiRecord(MaGuangaiRecord maGuangaiRecord)
{
maGuangaiRecord.setUpdateTime(DateUtils.getNowDate());
return maGuangaiRecordMapper.updateMaGuangaiRecord(maGuangaiRecord);
}
/**
* 批量删除灌溉记录
*
* @param ids 需要删除的灌溉记录主键
* @return 结果
*/
@Override
public int deleteMaGuangaiRecordByIds(Long[] ids)
{
return maGuangaiRecordMapper.deleteMaGuangaiRecordByIds(ids);
}
/**
* 删除灌溉记录信息
*
* @param id 灌溉记录主键
* @return 结果
*/
@Override
public int deleteMaGuangaiRecordById(Long id)
{
return maGuangaiRecordMapper.deleteMaGuangaiRecordById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.fastbee.waterele.service.impl;
import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.waterele.mapper.MaRechargerecordMapper;
import com.fastbee.waterele.domain.MaRechargerecord;
import com.fastbee.waterele.service.IMaRechargerecordService;
/**
* 充值记录Service业务层处理
*
* @author kerwincui
* @date 2024-08-12
*/
@Service
public class MaRechargerecordServiceImpl implements IMaRechargerecordService
{
@Autowired
private MaRechargerecordMapper maRechargerecordMapper;
/**
* 查询充值记录
*
* @param id 充值记录主键
* @return 充值记录
*/
@Override
public MaRechargerecord selectMaRechargerecordById(Long id)
{
return maRechargerecordMapper.selectMaRechargerecordById(id);
}
/**
* 查询充值记录列表
*
* @param maRechargerecord 充值记录
* @return 充值记录
*/
@Override
public List<MaRechargerecord> selectMaRechargerecordList(MaRechargerecord maRechargerecord)
{
return maRechargerecordMapper.selectMaRechargerecordList(maRechargerecord);
}
/**
* 新增充值记录
*
* @param maRechargerecord 充值记录
* @return 结果
*/
@Override
public int insertMaRechargerecord(MaRechargerecord maRechargerecord)
{
maRechargerecord.setCreateTime(DateUtils.getNowDate());
return maRechargerecordMapper.insertMaRechargerecord(maRechargerecord);
}
/**
* 修改充值记录
*
* @param maRechargerecord 充值记录
* @return 结果
*/
@Override
public int updateMaRechargerecord(MaRechargerecord maRechargerecord)
{
maRechargerecord.setUpdateTime(DateUtils.getNowDate());
return maRechargerecordMapper.updateMaRechargerecord(maRechargerecord);
}
/**
* 批量删除充值记录
*
* @param ids 需要删除的充值记录主键
* @return 结果
*/
@Override
public int deleteMaRechargerecordByIds(Long[] ids)
{
return maRechargerecordMapper.deleteMaRechargerecordByIds(ids);
}
/**
* 删除充值记录信息
*
* @param id 充值记录主键
* @return 结果
*/
@Override
public int deleteMaRechargerecordById(Long id)
{
return maRechargerecordMapper.deleteMaRechargerecordById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.fastbee.waterele.service.impl;
import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.waterele.mapper.MaWatereleRecordMapper;
import com.fastbee.waterele.domain.MaWatereleRecord;
import com.fastbee.waterele.service.IMaWatereleRecordService;
/**
* 水电双计数据记录Service业务层处理
*
* @author kerwincui
* @date 2024-08-12
*/
@Service
public class MaWatereleRecordServiceImpl implements IMaWatereleRecordService
{
@Autowired
private MaWatereleRecordMapper maWatereleRecordMapper;
/**
* 查询水电双计数据记录
*
* @param id 水电双计数据记录主键
* @return 水电双计数据记录
*/
@Override
public MaWatereleRecord selectMaWatereleRecordById(Long id)
{
return maWatereleRecordMapper.selectMaWatereleRecordById(id);
}
/**
* 查询水电双计数据记录列表
*
* @param maWatereleRecord 水电双计数据记录
* @return 水电双计数据记录
*/
@Override
public List<MaWatereleRecord> selectMaWatereleRecordList(MaWatereleRecord maWatereleRecord)
{
return maWatereleRecordMapper.selectMaWatereleRecordList(maWatereleRecord);
}
/**
* 新增水电双计数据记录
*
* @param maWatereleRecord 水电双计数据记录
* @return 结果
*/
@Override
public int insertMaWatereleRecord(MaWatereleRecord maWatereleRecord)
{
maWatereleRecord.setCreateTime(DateUtils.getNowDate());
return maWatereleRecordMapper.insertMaWatereleRecord(maWatereleRecord);
}
/**
* 修改水电双计数据记录
*
* @param maWatereleRecord 水电双计数据记录
* @return 结果
*/
@Override
public int updateMaWatereleRecord(MaWatereleRecord maWatereleRecord)
{
maWatereleRecord.setUpdateTime(DateUtils.getNowDate());
return maWatereleRecordMapper.updateMaWatereleRecord(maWatereleRecord);
}
/**
* 批量删除水电双计数据记录
*
* @param ids 需要删除的水电双计数据记录主键
* @return 结果
*/
@Override
public int deleteMaWatereleRecordByIds(Long[] ids)
{
return maWatereleRecordMapper.deleteMaWatereleRecordByIds(ids);
}
/**
* 删除水电双计数据记录信息
*
* @param id 水电双计数据记录主键
* @return 结果
*/
@Override
public int deleteMaWatereleRecordById(Long id)
{
return maWatereleRecordMapper.deleteMaWatereleRecordById(id);
}
}

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.waterele.mapper.MaCardinfoMapper">
<resultMap type="MaCardinfo" id="MaCardinfoResult">
<result property="id" column="id" />
<result property="cardNum" column="card_num" />
<result property="areaCode" column="area_code" />
<result property="cardId" column="card_id" />
<result property="addressInfo" column="address_info" />
<result property="cardtype" column="cardType" />
<result property="mcusn" column="mcuSn" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMaCardinfoVo">
select id, card_num, area_code, card_id, address_info, cardType, mcuSn, create_time, update_time from ma_cardinfo
</sql>
<select id="selectMaCardinfoList" parameterType="MaCardinfo" resultMap="MaCardinfoResult">
<include refid="selectMaCardinfoVo"/>
<where>
<if test="cardNum != null and cardNum != ''"> and card_num = #{cardNum}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="addressInfo != null and addressInfo != ''"> and address_info = #{addressInfo}</if>
<if test="cardtype != null "> and cardType = #{cardtype}</if>
<if test="mcusn != null and mcusn != ''"> and mcuSn = #{mcusn}</if>
</where>
</select>
<select id="selectMaCardinfoById" parameterType="Long" resultMap="MaCardinfoResult">
<include refid="selectMaCardinfoVo"/>
where id = #{id}
</select>
<insert id="insertMaCardinfo" parameterType="MaCardinfo" useGeneratedKeys="true" keyProperty="id">
insert into ma_cardinfo
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardNum != null">card_num,</if>
<if test="areaCode != null">area_code,</if>
<if test="cardId != null">card_id,</if>
<if test="addressInfo != null">address_info,</if>
<if test="cardtype != null">cardType,</if>
<if test="mcusn != null">mcuSn,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardNum != null">#{cardNum},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="cardId != null">#{cardId},</if>
<if test="addressInfo != null">#{addressInfo},</if>
<if test="cardtype != null">#{cardtype},</if>
<if test="mcusn != null">#{mcusn},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMaCardinfo" parameterType="MaCardinfo">
update ma_cardinfo
<trim prefix="SET" suffixOverrides=",">
<if test="cardNum != null">card_num = #{cardNum},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="addressInfo != null">address_info = #{addressInfo},</if>
<if test="cardtype != null">cardType = #{cardtype},</if>
<if test="mcusn != null">mcuSn = #{mcusn},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMaCardinfoById" parameterType="Long">
delete from ma_cardinfo where id = #{id}
</delete>
<delete id="deleteMaCardinfoByIds" parameterType="String">
delete from ma_cardinfo where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.waterele.mapper.MaGuangaiRecordMapper">
<resultMap type="com.fastbee.waterele.domain.MaGuangaiRecord" id="MaGuangaiRecordResult">
<result property="id" column="id" />
<result property="devSn" column="dev_sn" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="lastTime" column="last_time" />
<result property="cardId" column="card_id" />
<result property="areaCode" column="area_code" />
<result property="userBalance" column="user_balance" />
<result property="curFlow" column="cur_flow" />
<result property="curEle" column="cur_ele" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMaGuangaiRecordVo">
select id, dev_sn, start_time, end_time, last_time, card_id, area_code, user_balance, cur_flow, cur_ele, status, create_time, update_time from ma_guangai_record
</sql>
<select id="selectMaGuangaiRecordList" parameterType="MaGuangaiRecord" resultMap="MaGuangaiRecordResult">
<include refid="selectMaGuangaiRecordVo"/>
<where>
<if test="devSn != null and devSn != ''"> and dev_sn = #{devSn}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="lastTime != null "> and last_time = #{lastTime}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="userBalance != null and userBalance != ''"> and user_balance = #{userBalance}</if>
<if test="curFlow != null and curFlow != ''"> and cur_flow = #{curFlow}</if>
<if test="curEle != null and curEle != ''"> and cur_ele = #{curEle}</if>
<if test="status != null "> and status = #{status}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectMaGuangaiRecordById" parameterType="Long" resultMap="MaGuangaiRecordResult">
<include refid="selectMaGuangaiRecordVo"/>
where id = #{id}
</select>
<insert id="insertMaGuangaiRecord" parameterType="MaGuangaiRecord" useGeneratedKeys="true" keyProperty="id">
insert into ma_guangai_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="devSn != null">dev_sn,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="lastTime != null">last_time,</if>
<if test="cardId != null">card_id,</if>
<if test="areaCode != null">area_code,</if>
<if test="userBalance != null">user_balance,</if>
<if test="curFlow != null">cur_flow,</if>
<if test="curEle != null">cur_ele,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="devSn != null">#{devSn},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="lastTime != null">#{lastTime},</if>
<if test="cardId != null">#{cardId},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="userBalance != null">#{userBalance},</if>
<if test="curFlow != null">#{curFlow},</if>
<if test="curEle != null">#{curEle},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMaGuangaiRecord" parameterType="MaGuangaiRecord">
update ma_guangai_record
<trim prefix="SET" suffixOverrides=",">
<if test="devSn != null">dev_sn = #{devSn},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="lastTime != null">last_time = #{lastTime},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="userBalance != null">user_balance = #{userBalance},</if>
<if test="curFlow != null">cur_flow = #{curFlow},</if>
<if test="curEle != null">cur_ele = #{curEle},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMaGuangaiRecordById" parameterType="Long">
delete from ma_guangai_record where id = #{id}
</delete>
<delete id="deleteMaGuangaiRecordByIds" parameterType="String">
delete from ma_guangai_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.waterele.mapper.MaRechargerecordMapper">
<resultMap type="MaRechargerecord" id="MaRechargerecordResult">
<result property="id" column="id" />
<result property="balance" column="balance" />
<result property="investval" column="investVal" />
<result property="cardNum" column="card_num" />
<result property="areaCode" column="area_code" />
<result property="cardId" column="card_id" />
<result property="mcusn" column="mcuSn" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMaRechargerecordVo">
select id, balance, investVal, card_num, area_code, card_id, mcuSn, create_time, update_time from ma_rechargerecord
</sql>
<select id="selectMaRechargerecordList" parameterType="MaRechargerecord" resultMap="MaRechargerecordResult">
<include refid="selectMaRechargerecordVo"/>
<where>
<if test="balance != null and balance != ''"> and balance = #{balance}</if>
<if test="investval != null and investval != ''"> and investVal = #{investval}</if>
<if test="cardNum != null and cardNum != ''"> and card_num = #{cardNum}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="mcusn != null and mcusn != ''"> and mcuSn = #{mcusn}</if>
</where>
</select>
<select id="selectMaRechargerecordById" parameterType="Long" resultMap="MaRechargerecordResult">
<include refid="selectMaRechargerecordVo"/>
where id = #{id}
</select>
<insert id="insertMaRechargerecord" parameterType="MaRechargerecord" useGeneratedKeys="true" keyProperty="id">
insert into ma_rechargerecord
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="balance != null">balance,</if>
<if test="investval != null">investVal,</if>
<if test="cardNum != null">card_num,</if>
<if test="areaCode != null">area_code,</if>
<if test="cardId != null">card_id,</if>
<if test="mcusn != null">mcuSn,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="balance != null">#{balance},</if>
<if test="investval != null">#{investval},</if>
<if test="cardNum != null">#{cardNum},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="cardId != null">#{cardId},</if>
<if test="mcusn != null">#{mcusn},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMaRechargerecord" parameterType="MaRechargerecord">
update ma_rechargerecord
<trim prefix="SET" suffixOverrides=",">
<if test="balance != null">balance = #{balance},</if>
<if test="investval != null">investVal = #{investval},</if>
<if test="cardNum != null">card_num = #{cardNum},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="mcusn != null">mcuSn = #{mcusn},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMaRechargerecordById" parameterType="Long">
delete from ma_rechargerecord where id = #{id}
</delete>
<delete id="deleteMaRechargerecordByIds" parameterType="String">
delete from ma_rechargerecord where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.waterele.mapper.MaWatereleRecordMapper">
<resultMap type="com.fastbee.waterele.domain.MaWatereleRecord" id="MaWatereleRecordResult">
<result property="id" column="id" />
<result property="devSn" column="dev_sn" />
<result property="workstate" column="workState" />
<result property="usersumflow" column="userSumFlow" />
<result property="usersumele" column="userSumEle" />
<result property="userbalance" column="userBalance" />
<result property="sumflow" column="sumFlow" />
<result property="sumele" column="sumEle" />
<result property="mcusn" column="mcuSn" />
<result property="inspower" column="insPower" />
<result property="insflow" column="insFlow" />
<result property="curflow" column="curFlow" />
<result property="curele" column="curEle" />
<result property="metersum" column="meterSum" />
<result property="meterins" column="meterIns" />
<result property="cardid" column="cardId" />
<result property="areacode" column="areaCode" />
<result property="action" column="action" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMaWatereleRecordVo">
select id, dev_sn, workState, userSumFlow, userSumEle, userBalance, sumFlow, sumEle, mcuSn, insPower, insFlow, curFlow, curEle, meterSum, meterIns, cardId, areaCode, action, create_time, update_time from ma_waterele_record
</sql>
<select id="selectMaWatereleRecordList" parameterType="MaWatereleRecord" resultMap="MaWatereleRecordResult">
<include refid="selectMaWatereleRecordVo"/>
<where>
<if test="devSn != null and devSn != ''"> and dev_sn = #{devSn}</if>
<if test="workstate != null "> and workState = #{workstate}</if>
<if test="usersumflow != null and usersumflow != ''"> and userSumFlow = #{usersumflow}</if>
<if test="usersumele != null and usersumele != ''"> and userSumEle = #{usersumele}</if>
<if test="userbalance != null and userbalance != ''"> and userBalance = #{userbalance}</if>
<if test="sumflow != null and sumflow != ''"> and sumFlow = #{sumflow}</if>
<if test="sumele != null and sumele != ''"> and sumEle = #{sumele}</if>
<if test="mcusn != null and mcusn != ''"> and mcuSn = #{mcusn}</if>
<if test="inspower != null and inspower != ''"> and insPower = #{inspower}</if>
<if test="insflow != null and insflow != ''"> and insFlow = #{insflow}</if>
<if test="curflow != null and curflow != ''"> and curFlow = #{curflow}</if>
<if test="curele != null and curele != ''"> and curEle = #{curele}</if>
<if test="metersum != null and metersum != ''"> and meterSum = #{metersum}</if>
<if test="meterins != null and meterins != ''"> and meterIns = #{meterins}</if>
<if test="cardid != null and cardid != ''"> and cardId = #{cardid}</if>
<if test="areacode != null and areacode != ''"> and areaCode = #{areacode}</if>
<if test="action != null and action != ''"> and action = #{action}</if>
</where>
</select>
<select id="selectMaWatereleRecordById" parameterType="Long" resultMap="MaWatereleRecordResult">
<include refid="selectMaWatereleRecordVo"/>
where id = #{id}
</select>
<insert id="insertMaWatereleRecord" parameterType="MaWatereleRecord" useGeneratedKeys="true" keyProperty="id">
insert into ma_waterele_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="devSn != null">dev_sn,</if>
<if test="workstate != null">workState,</if>
<if test="usersumflow != null">userSumFlow,</if>
<if test="usersumele != null">userSumEle,</if>
<if test="userbalance != null">userBalance,</if>
<if test="sumflow != null">sumFlow,</if>
<if test="sumele != null">sumEle,</if>
<if test="mcusn != null">mcuSn,</if>
<if test="inspower != null">insPower,</if>
<if test="insflow != null">insFlow,</if>
<if test="curflow != null">curFlow,</if>
<if test="curele != null">curEle,</if>
<if test="metersum != null">meterSum,</if>
<if test="meterins != null">meterIns,</if>
<if test="cardid != null">cardId,</if>
<if test="areacode != null">areaCode,</if>
<if test="action != null">action,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="devSn != null">#{devSn},</if>
<if test="workstate != null">#{workstate},</if>
<if test="usersumflow != null">#{usersumflow},</if>
<if test="usersumele != null">#{usersumele},</if>
<if test="userbalance != null">#{userbalance},</if>
<if test="sumflow != null">#{sumflow},</if>
<if test="sumele != null">#{sumele},</if>
<if test="mcusn != null">#{mcusn},</if>
<if test="inspower != null">#{inspower},</if>
<if test="insflow != null">#{insflow},</if>
<if test="curflow != null">#{curflow},</if>
<if test="curele != null">#{curele},</if>
<if test="metersum != null">#{metersum},</if>
<if test="meterins != null">#{meterins},</if>
<if test="cardid != null">#{cardid},</if>
<if test="areacode != null">#{areacode},</if>
<if test="action != null">#{action},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMaWatereleRecord" parameterType="MaWatereleRecord">
update ma_waterele_record
<trim prefix="SET" suffixOverrides=",">
<if test="devSn != null">dev_sn = #{devSn},</if>
<if test="workstate != null">workState = #{workstate},</if>
<if test="usersumflow != null">userSumFlow = #{usersumflow},</if>
<if test="usersumele != null">userSumEle = #{usersumele},</if>
<if test="userbalance != null">userBalance = #{userbalance},</if>
<if test="sumflow != null">sumFlow = #{sumflow},</if>
<if test="sumele != null">sumEle = #{sumele},</if>
<if test="mcusn != null">mcuSn = #{mcusn},</if>
<if test="inspower != null">insPower = #{inspower},</if>
<if test="insflow != null">insFlow = #{insflow},</if>
<if test="curflow != null">curFlow = #{curflow},</if>
<if test="curele != null">curEle = #{curele},</if>
<if test="metersum != null">meterSum = #{metersum},</if>
<if test="meterins != null">meterIns = #{meterins},</if>
<if test="cardid != null">cardId = #{cardid},</if>
<if test="areacode != null">areaCode = #{areacode},</if>
<if test="action != null">action = #{action},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMaWatereleRecordById" parameterType="Long">
delete from ma_waterele_record where id = #{id}
</delete>
<delete id="deleteMaWatereleRecordByIds" parameterType="String">
delete from ma_waterele_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fastbee-service</artifactId>
<groupId>com.fastbee</groupId>
<version>3.8.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fastbee-xunjian-service</artifactId>
<description>
巡检系统模块
</description>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.fastbee</groupId>
<artifactId>fastbee-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,90 @@
package com.fastbee.xunjian.domain;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 巡检注意事项对象 xj_inspection_note
*
* @author
* @date 2023-08-23
*/
@Data
public class XjInspectionNote extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* $column.columnComment
*/
private Long id;
/**
* 工程对象类型
*/
@Excel(name = "工程对象类型")
private String engineeringObjectType;
/**
* 标题
*/
@Excel(name = "标题")
private String title;
/**
* 注意事项
*/
@Excel(name = "注意事项")
private String content;
/**
* 项目id
*/
@Excel(name = "项目id")
private Long projectId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("content", getContent())
.append("projectId", getProjectId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

View File

@ -0,0 +1,262 @@
package com.fastbee.xunjian.domain;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 记录对象 klxj_inspection_records
*
* @author kenlixunjian
* @date 2023-08-04
*/
@Data
public class XjInspectionRecords extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
/**
* 名称
*/
@Excel(name = "名称")
private String name;
private String personnelsOrTasksOrRecords;
//查询开始时间
private String chaxunBeginTime;
//查询结束时间
private String chaxunEndTime;
//点位集合
private String routesIds;
/**
* 任务id
*/
@Excel(name = "任务id")
private Long inspectionTaskId;
/**
* 计划id
*/
@Excel(name = "计划id")
private Long inspectionPlanId;
/**
* 开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
/**
* 终止时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "终止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/** 执行人 */
@Excel(name = "执行人")
private Long inspectionPersonnelId;
/** 点位id */
@Excel(name = "点位id")
private Long inspectionRouteId;
/** 完成状态 */
@Excel(name = "完成状态")
private String recordStatus;
/** 异常状态 */
@Excel(name = "异常状态")
private String abnormalStatus;
/** 经纬度 */
@Excel(name = "经纬度")
private String latAndLong;
/** 图片 */
@Excel(name = "图片")
private String picture;
/**
* 备注
*/
@Excel(name = "备注")
private String remarks;
private String abnormalType;
/**
* 行政区域码
*/
@Excel(name = "行政区域码")
private String quyuma;
/**
* 项目id
*/
@Excel(name = "项目id")
private Long projectId;
/**
* 班组id
*/
@Excel(name = "班组id")
private Long groupId;
public XjInspectionRoutes route;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getInspectionTaskId() {
return inspectionTaskId;
}
public void setInspectionTaskId(Long inspectionTaskId) {
this.inspectionTaskId = inspectionTaskId;
}
public Long getInspectionPlanId() {
return inspectionPlanId;
}
public void setInspectionPlanId(Long inspectionPlanId) {
this.inspectionPlanId = inspectionPlanId;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Long getInspectionPersonnelId() {
return inspectionPersonnelId;
}
public void setInspectionPersonnelId(Long inspectionPersonnelId) {
this.inspectionPersonnelId = inspectionPersonnelId;
}
public Long getInspectionRouteId() {
return inspectionRouteId;
}
public void setInspectionRouteId(Long inspectionRouteId) {
this.inspectionRouteId = inspectionRouteId;
}
public String getRecordStatus() {
return recordStatus;
}
public void setRecordStatus(String recordStatus) {
this.recordStatus = recordStatus;
}
public String getAbnormalStatus() {
return abnormalStatus;
}
public void setAbnormalStatus(String abnormalStatus) {
this.abnormalStatus = abnormalStatus;
}
public String getLatAndLong() {
return latAndLong;
}
public void setLatAndLong(String latAndLong) {
this.latAndLong = latAndLong;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getQuyuma() {
return quyuma;
}
public void setQuyuma(String quyuma) {
this.quyuma = quyuma;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("inspectionTaskId", getInspectionTaskId())
.append("inspectionPlanId", getInspectionPlanId())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("inspectionPersonnelId", getInspectionPersonnelId())
.append("inspectionRouteId", getInspectionRouteId())
.append("recordStatus", getRecordStatus())
.append("abnormalStatus", getAbnormalStatus())
.append("latAndLong", getLatAndLong())
.append("picture", getPicture())
.append("remarks", getRemarks())
.append("quyuma", getQuyuma())
.append("projectId", getProjectId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

View File

@ -0,0 +1,227 @@
package com.fastbee.xunjian.domain;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.List;
/**
* 巡检路线对象 klxj_inspection_routes
*
* @author kenlixunjian
* @date 2023-08-04
*/
@Data
public class XjInspectionRoutes extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
private String abnormalType;
/**
* 名称
*/
@Excel(name = "名称")
private String name;
/**
* 点线类型(1点2线
*/
@Excel(name = "点线类型(1点2线")
private String dotLineType;
/**
* 工程对象类型
*/
@Excel(name = "工程对象类型")
private String engineeringObjectType;
/**
* 工程对象id
*/
@Excel(name = "工程对象Id")
private Long engineeringObjectId;
/**
* 注意事项ids
*/
private String inspectionNoteIds;
private List<XjInspectionNote> inspectionNote;
/**
* 项目id
*/
@Excel(name = "项目id")
private Long projectId;
/**
* 经纬度
*/
@Excel(name = "经纬度", prompt = "以,隔开")
private String latAndLong;
/**
* 位置
*/
@Excel(name = "位置")
private String position;
/**
* 范围单位m
*/
@Excel(name = "巡检距离")
private String range;
/**
* 编码
*/
@Excel(name = "绑定二维码编码")
private String qrCodeSn;
/**
* 范围线
*/
// @Excel(name = "范围线")
private String rangeArea;
/**
* 二维码
*/
// @Excel(name = "二维码")
private Long qrCodeId;
/**
* 行政区域码
*/
// @Excel(name = "行政区域码")
private String quyuma;
private String recordStatus = "0";
private Long recordId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDotLineType() {
return dotLineType;
}
public void setDotLineType(String dotLineType) {
this.dotLineType = dotLineType;
}
public String getEngineeringObjectType() {
return engineeringObjectType;
}
public void setEngineeringObjectType(String engineeringObjectType) {
this.engineeringObjectType = engineeringObjectType;
}
public Long getEngineeringObjectId() {
return engineeringObjectId;
}
public void setEngineeringObjectId(Long engineeringObjectId) {
this.engineeringObjectId = engineeringObjectId;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public String getLatAndLong() {
return latAndLong;
}
public void setLatAndLong(String latAndLong) {
this.latAndLong = latAndLong;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getRange() {
return range;
}
public void setRange(String range) {
this.range = range;
}
public String getRangeArea() {
return rangeArea;
}
public void setRangeArea(String rangeArea) {
this.rangeArea = rangeArea;
}
public Long getQrCodeId() {
return qrCodeId;
}
public void setQrCodeId(Long qrCodeId) {
this.qrCodeId = qrCodeId;
}
public String getQuyuma() {
return quyuma;
}
public void setQuyuma(String quyuma) {
this.quyuma = quyuma;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("dotLineType", getDotLineType())
.append("engineeringObjectType", getEngineeringObjectType())
.append("engineeringObjectId", getEngineeringObjectId())
.append("projectId", getProjectId())
.append("latAndLong", getLatAndLong())
.append("position", getPosition())
.append("range", getRange())
.append("rangeArea", getRangeArea())
.append("qrCodeId", getQrCodeId())
.append("quyuma", getQuyuma())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

View File

@ -0,0 +1,62 @@
package com.fastbee.xunjian.mapper;
import com.fastbee.xunjian.domain.XjInspectionNote;
import java.util.List;
/**
* 巡检注意事项Mapper接口
*
* @author kenlixunjian
* @date 2023-08-23
*/
public interface XjInspectionNoteMapper {
/**
* 查询巡检注意事项
*
* @param id 巡检注意事项主键
* @return 巡检注意事项
*/
public XjInspectionNote selectXjInspectionNoteById(Long id);
/**
* 查询巡检注意事项列表
*
* @param XjInspectionNote 巡检注意事项
* @return 巡检注意事项集合
*/
public List<XjInspectionNote> selectXjInspectionNoteList(XjInspectionNote XjInspectionNote);
/**
* 新增巡检注意事项
*
* @param XjInspectionNote 巡检注意事项
* @return 结果
*/
public int insertXjInspectionNote(XjInspectionNote XjInspectionNote);
/**
* 修改巡检注意事项
*
* @param XjInspectionNote 巡检注意事项
* @return 结果
*/
public int updateXjInspectionNote(XjInspectionNote XjInspectionNote);
/**
* 删除巡检注意事项
*
* @param id 巡检注意事项主键
* @return 结果
*/
public int deleteXjInspectionNoteById(Long id);
/**
* 批量删除巡检注意事项
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteXjInspectionNoteByIds(Long[] ids);
}

View File

@ -0,0 +1,70 @@
package com.fastbee.xunjian.mapper;
import com.fastbee.xunjian.domain.XjInspectionRecords;
import org.apache.ibatis.annotations.Mapper;
import java.util.HashMap;
import java.util.List;
/**
* 记录Mapper接口
*
* @author kenlixunjian
* @date 2023-08-04
*/
@Mapper
public interface XjInspectionRecordsMapper {
/**
* 查询记录
*
* @param id 记录主键
* @return 记录
*/
public XjInspectionRecords selectXjInspectionRecordsById(Long id);
/**
* 查询记录列表
*
* @param XjInspectionRecords 记录
* @return 记录集合
*/
public List<XjInspectionRecords> selectXjInspectionRecordsList(XjInspectionRecords XjInspectionRecords);
// List<XjInspectionRecords> selectListByRoutesIds(KlxjInspectiontargetGroup klxjInspectiontargetGroup);
/**
* 新增记录
*
* @param XjInspectionRecords 记录
* @return 结果
*/
public int insertXjInspectionRecords(XjInspectionRecords XjInspectionRecords);
/**
* 修改记录
*
* @param XjInspectionRecords 记录
* @return 结果
*/
public int updateXjInspectionRecords(XjInspectionRecords XjInspectionRecords);
/**
* 删除记录
*
* @param id 记录主键
* @return 结果
*/
public int deleteXjInspectionRecordsById(Long id);
/**
* 批量删除记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteXjInspectionRecordsByIds(Long[] ids);
List<HashMap> getInspectionTasksYichangCountByParmas(HashMap<String, Object> params);
}

View File

@ -0,0 +1,68 @@
package com.fastbee.xunjian.mapper;
import com.fastbee.xunjian.domain.XjInspectionRoutes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 巡检路线Mapper接口
*
* @author kenlixunjian
* @date 2023-08-04
*/
@Mapper
public interface XjInspectionRoutesMapper {
/**
* 查询巡检路线
*
* @param id 巡检路线主键
* @return 巡检路线
*/
public XjInspectionRoutes selectXjInspectionRoutesById(Long id);
/**
* 查询巡检路线列表
*
* @param XjInspectionRoutes 巡检路线
* @return 巡检路线集合
*/
public List<XjInspectionRoutes> selectXjInspectionRoutesList(XjInspectionRoutes XjInspectionRoutes);
/**
* 新增巡检路线
*
* @param XjInspectionRoutes 巡检路线
* @return 结果
*/
public int insertXjInspectionRoutes(XjInspectionRoutes XjInspectionRoutes);
/**
* 修改巡检路线
*
* @param XjInspectionRoutes 巡检路线
* @return 结果
*/
public int updateXjInspectionRoutes(XjInspectionRoutes XjInspectionRoutes);
/**
* 删除巡检路线
*
* @param id 巡检路线主键
* @return 结果
*/
public int deleteXjInspectionRoutesById(Long id);
/**
* 批量删除巡检路线
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteXjInspectionRoutesByIds(Long[] ids);
XjInspectionRoutes selectXjInspectionRoutesByName(@Param("name") String name);
XjInspectionRoutes selectXjInspectionRoutesByQrSn(String qrSn);
}

View File

@ -0,0 +1,62 @@
package com.fastbee.xunjian.service;
import com.fastbee.xunjian.domain.XjInspectionNote;
import java.util.List;
/**
* 巡检注意事项Service接口
*
* @author kenlixunjian
* @date 2023-08-23
*/
public interface IXjInspectionNoteService {
/**
* 查询巡检注意事项
*
* @param id 巡检注意事项主键
* @return 巡检注意事项
*/
public XjInspectionNote selectXjInspectionNoteById(Long id);
/**
* 查询巡检注意事项列表
*
* @param XjInspectionNote 巡检注意事项
* @return 巡检注意事项集合
*/
public List<XjInspectionNote> selectXjInspectionNoteList(XjInspectionNote XjInspectionNote);
/**
* 新增巡检注意事项
*
* @param XjInspectionNote 巡检注意事项
* @return 结果
*/
public int insertXjInspectionNote(XjInspectionNote XjInspectionNote);
/**
* 修改巡检注意事项
*
* @param XjInspectionNote 巡检注意事项
* @return 结果
*/
public int updateXjInspectionNote(XjInspectionNote XjInspectionNote);
/**
* 批量删除巡检注意事项
*
* @param ids 需要删除的巡检注意事项主键集合
* @return 结果
*/
public int deleteXjInspectionNoteByIds(Long[] ids);
/**
* 删除巡检注意事项信息
*
* @param id 巡检注意事项主键
* @return 结果
*/
public int deleteXjInspectionNoteById(Long id);
}

View File

@ -0,0 +1,66 @@
package com.fastbee.xunjian.service;
import com.fastbee.xunjian.domain.XjInspectionRecords;
import java.util.HashMap;
import java.util.List;
/**
* 记录Service接口
*
* @author kenlixunjian
* @date 2023-08-04
*/
public interface IXjInspectionRecordsService {
/**
* 查询记录
*
* @param id 记录主键
* @return 记录
*/
public XjInspectionRecords selectXjInspectionRecordsById(Long id);
/**
* 查询记录列表
*
* @param XjInspectionRecords 记录
* @return 记录集合
*/
public List<XjInspectionRecords> selectXjInspectionRecordsList(XjInspectionRecords XjInspectionRecords);
/**
* 新增记录
*
* @param XjInspectionRecords 记录
* @return 结果
*/
public int insertXjInspectionRecords(XjInspectionRecords XjInspectionRecords);
/**
* 修改记录
*
* @param XjInspectionRecords 记录
* @return 结果
*/
public int updateXjInspectionRecords(XjInspectionRecords XjInspectionRecords);
/**
* 批量删除记录
*
* @param ids 需要删除的记录主键集合
* @return 结果
*/
public int deleteXjInspectionRecordsByIds(Long[] ids);
/**
* 删除记录信息
*
* @param id 记录主键
* @return 结果
*/
public int deleteXjInspectionRecordsById(Long id);
List<HashMap> getInspectionTasksYichangCountByParmas(HashMap<String, Object> params);
}

View File

@ -0,0 +1,69 @@
package com.fastbee.xunjian.service;
import com.fastbee.xunjian.domain.XjInspectionRoutes;
import java.util.List;
/**
* 巡检路线Service接口
*
* @author kenlixunjian
* @date 2023-08-04
*/
public interface IXjInspectionRoutesService {
/**
* 查询巡检路线
*
* @param id 巡检路线主键
* @return 巡检路线
*/
public XjInspectionRoutes selectXjInspectionRoutesById(Long id);
/**
* 查询巡检路线列表
*
* @param XjInspectionRoutes 巡检路线
* @return 巡检路线集合
*/
public List<XjInspectionRoutes> selectXjInspectionRoutesList(XjInspectionRoutes XjInspectionRoutes);
/**
* 新增巡检路线
*
* @param XjInspectionRoutes 巡检路线
* @return 结果
*/
public int insertXjInspectionRoutes(XjInspectionRoutes XjInspectionRoutes);
/**
* 修改巡检路线
*
* @param XjInspectionRoutes 巡检路线
* @return 结果
*/
public int updateXjInspectionRoutes(XjInspectionRoutes XjInspectionRoutes);
/**
* 批量删除巡检路线
*
* @param ids 需要删除的巡检路线主键集合
* @return 结果
*/
public int deleteXjInspectionRoutesByIds(Long[] ids);
/**
* 删除巡检路线信息
*
* @param id 巡检路线主键
* @return 结果
*/
public int deleteXjInspectionRoutesById(Long id);
String importData(List<XjInspectionRoutes> userList, boolean updateSupport, String operName);
XjInspectionRoutes selectXjInspectionRoutesByQrSn(String qrSn);
}

View File

@ -0,0 +1,90 @@
package com.fastbee.xunjian.service.impl;
import com.fastbee.common.utils.DateUtils;
import com.fastbee.xunjian.domain.XjInspectionNote;
import com.fastbee.xunjian.service.IXjInspectionNoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.xunjian.mapper.XjInspectionNoteMapper;
import java.util.List;
/**
* 巡检注意事项Service业务层处理
*
* @author kenlixunjian
* @date 2023-08-23
*/
@Service
public class XjInspectionNoteServiceImpl implements IXjInspectionNoteService {
@Autowired
private XjInspectionNoteMapper XjInspectionNoteMapper;
/**
* 查询巡检注意事项
*
* @param id 巡检注意事项主键
* @return 巡检注意事项
*/
@Override
public XjInspectionNote selectXjInspectionNoteById(Long id) {
return XjInspectionNoteMapper.selectXjInspectionNoteById(id);
}
/**
* 查询巡检注意事项列表
*
* @param XjInspectionNote 巡检注意事项
* @return 巡检注意事项
*/
@Override
public List<XjInspectionNote> selectXjInspectionNoteList(XjInspectionNote XjInspectionNote) {
return XjInspectionNoteMapper.selectXjInspectionNoteList(XjInspectionNote);
}
/**
* 新增巡检注意事项
*
* @param XjInspectionNote 巡检注意事项
* @return 结果
*/
@Override
public int insertXjInspectionNote(XjInspectionNote XjInspectionNote) {
XjInspectionNote.setCreateTime(DateUtils.getNowDate());
return XjInspectionNoteMapper.insertXjInspectionNote(XjInspectionNote);
}
/**
* 修改巡检注意事项
*
* @param XjInspectionNote 巡检注意事项
* @return 结果
*/
@Override
public int updateXjInspectionNote(XjInspectionNote XjInspectionNote) {
XjInspectionNote.setUpdateTime(DateUtils.getNowDate());
return XjInspectionNoteMapper.updateXjInspectionNote(XjInspectionNote);
}
/**
* 批量删除巡检注意事项
*
* @param ids 需要删除的巡检注意事项主键
* @return 结果
*/
@Override
public int deleteXjInspectionNoteByIds(Long[] ids) {
return XjInspectionNoteMapper.deleteXjInspectionNoteByIds(ids);
}
/**
* 删除巡检注意事项信息
*
* @param id 巡检注意事项主键
* @return 结果
*/
@Override
public int deleteXjInspectionNoteById(Long id) {
return XjInspectionNoteMapper.deleteXjInspectionNoteById(id);
}
}

View File

@ -0,0 +1,249 @@
package com.fastbee.xunjian.service.impl;
import cn.hutool.core.date.DateUtil;
import com.fastbee.common.utils.DateUtils;
import com.fastbee.common.utils.SecurityUtils;
import com.fastbee.xunjian.domain.XjInspectionRecords;
import com.fastbee.xunjian.mapper.XjInspectionRecordsMapper;
import com.fastbee.xunjian.service.IXjInspectionRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
/**
* 记录Service业务层处理
*
* @author kenlixunjian
* @date 2023-08-04
*/
@Service
public class XjInspectionRecordsServiceImpl implements IXjInspectionRecordsService {
@Autowired
private XjInspectionRecordsMapper XjInspectionRecordsMapper;
/**
* 查询记录
*
* @param id 记录主键
* @return 记录
*/
@Override
public XjInspectionRecords selectXjInspectionRecordsById(Long id) {
XjInspectionRecords XjInspectionRecords = XjInspectionRecordsMapper.selectXjInspectionRecordsById(id);
return XjInspectionRecords;
}
/**
* 查询记录列表
*
* @param XjInspectionRecords 记录
* @return 记录
*/
@Override
public List<XjInspectionRecords> selectXjInspectionRecordsList(XjInspectionRecords XjInspectionRecords) {
// try {
// if (SecurityUtils.getLoginUser().getUser().isZuzhang()) {
// KlxjInspectionPersonnels klxjInspectionPersonnels = SecurityUtils.getLoginUser().getPersonnels();
// if (klxjInspectionPersonnels != null) {
// XjInspectionRecords.setGroupId(klxjInspectionPersonnels.getGroupId());
// }
// } else if (SecurityUtils.getLoginUser().getUser().isXunjianyuan()) {
// KlxjInspectionPersonnels klxjInspectionPersonnels = SecurityUtils.getLoginUser().getPersonnels();
// if (klxjInspectionPersonnels != null) {
// XjInspectionRecords.setInspectionPersonnelId(klxjInspectionPersonnels.getId());
// }
// }
// } catch (Exception a) {
// }
List<XjInspectionRecords> XjInspectionRecords1 =
XjInspectionRecordsMapper.selectXjInspectionRecordsList(XjInspectionRecords);
// for (XjInspectionRecords inspectionRecords : XjInspectionRecords1) {
// List<KlxjInspectionEvents> list = inspectionEventsService.selectKlxjInspectionEventsList(new KlxjInspectionEvents() {{
// setInspectionRecordId(inspectionRecords.getId());
// }});
// if (list != null && list.size() > 0) {
// inspectionRecords.setAbnormalType(list.get(0).getAbnormalType());
// }
// }
return XjInspectionRecords1;
}
/**
* 新增记录
*
* @param XjInspectionRecords 记录
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertXjInspectionRecords(XjInspectionRecords XjInspectionRecords) {
XjInspectionRecords.setCreateTime(DateUtils.getNowDate());
// //执行人
// KlxjInspectionPersonnels klxjInspectionPersonnels =
// inspectionPersonnelsService.selectKlxjInspectionPersonnelsById(XjInspectionRecords.getInspectionPersonnelId());
// XjInspectionRecords.setGroupId(klxjInspectionPersonnels.getGroupId());
// if (XjInspectionRecords.getInspectionRouteId() != null) {
// KlxjInspectionTasks klxjInspectionTasks = new KlxjInspectionTasks();
// klxjInspectionTasks.setParams(new HashMap<String, Object>() {{
// put("taskTime", DateUtil.date().toString());
// }});
// klxjInspectionTasks.setInspectionPersonnelId(XjInspectionRecords.getInspectionPersonnelId());
// List<KlxjInspectionTasks> klxjInspectionTasks1 = inspectionTasksService.selectKlxjInspectionTasksList(klxjInspectionTasks);
// if (klxjInspectionTasks1 != null) {
// for (KlxjInspectionTasks inspectionTasks : klxjInspectionTasks1) {
// if (XjInspectionRecords.getInspectionTaskId() != null && XjInspectionRecords.getInspectionTaskId() != 0) {
// break;
// }
// for (KlxjInspectionRoutes klxjInspectionRoutes : inspectionTasks.getInspectionRouteList()) {
// if (klxjInspectionRoutes.getId().equals(XjInspectionRecords.getInspectionRouteId())) {
// XjInspectionRecords.setInspectionPlanId(inspectionTasks.getInspectionPlanId());
// XjInspectionRecords.setInspectionTaskId(inspectionTasks.getId());
// break;
// }
// }
// }
// }
// }
// if (XjInspectionRecords.getInspectionTaskId() != null && XjInspectionRecords.getInspectionTaskId() != 0) {
// KlxjInspectionTasks klxjInspectionTasks = inspectionTasksService.selectKlxjInspectionTasksById(XjInspectionRecords.getInspectionTaskId());
//
//
// if (klxjInspectionTasks != null && klxjInspectionTasks.getInspectionRouteIds() != null && !klxjInspectionTasks.getInspectionRouteIds().equals("")) {
//
// List<Long> collect = klxjInspectionTasks.getCompletedInspectionRouteList().stream().map(t -> t.getId()).collect(Collectors.toList());
// if (!collect.contains(XjInspectionRecords.getInspectionRouteId())) {
// String completedInspectionRouteIds = klxjInspectionTasks.getCompletedInspectionRouteIds() == null || klxjInspectionTasks.getCompletedInspectionRouteIds().equals("")
// ? "" + XjInspectionRecords.getInspectionRouteId()
// : klxjInspectionTasks.getCompletedInspectionRouteIds() + "," + XjInspectionRecords.getInspectionRouteId();
// klxjInspectionTasks.setCompletedInspectionRouteIds(completedInspectionRouteIds);
// if (!klxjInspectionTasks.getTaskStatus().equals("4")) {
// if (klxjInspectionTasks.getInspectionRouteIds().split(",").length == klxjInspectionTasks.getCompletedInspectionRouteIds().split(",").length) {
// klxjInspectionTasks.setTaskStatus("3");
// } else {
// klxjInspectionTasks.setTaskStatus("2");
// }
// }
// }
// inspectionTasksService.updateKlxjInspectionTasks(klxjInspectionTasks);
// }
// }
return XjInspectionRecordsMapper.insertXjInspectionRecords(XjInspectionRecords);
}
/**
* 修改记录
*
* @param XjInspectionRecords 记录
* @return 结果
*/
@Override
public int updateXjInspectionRecords(XjInspectionRecords XjInspectionRecords) {
XjInspectionRecords.setUpdateTime(DateUtils.getNowDate());
// KlxjInspectionPersonnels klxjInspectionPersonnels = inspectionPersonnelsService.selectKlxjInspectionPersonnelsById(XjInspectionRecords.getInspectionPersonnelId());
// XjInspectionRecords.setGroupId(klxjInspectionPersonnels.getGroupId());
// if (XjInspectionRecords.getInspectionRouteId() != null) {
// KlxjInspectionTasks klxjInspectionTasks = new KlxjInspectionTasks();
// klxjInspectionTasks.setParams(new HashMap<String, Object>() {{
// put("taskTime", DateUtil.date().toString());
// }});
// klxjInspectionTasks.setInspectionPersonnelId(XjInspectionRecords.getInspectionPersonnelId());
// List<KlxjInspectionTasks> klxjInspectionTasks1 = inspectionTasksService.selectKlxjInspectionTasksList(klxjInspectionTasks);
// if (klxjInspectionTasks1 != null) {
// for (KlxjInspectionTasks inspectionTasks : klxjInspectionTasks1) {
// if (XjInspectionRecords.getInspectionTaskId() != null && XjInspectionRecords.getInspectionTaskId() != 0) {
// break;
// }
// for (KlxjInspectionRoutes klxjInspectionRoutes : inspectionTasks.getInspectionRouteList()) {
// if (klxjInspectionRoutes.getId().equals(XjInspectionRecords.getInspectionRouteId())) {
// XjInspectionRecords.setInspectionPlanId(inspectionTasks.getInspectionPlanId());
// XjInspectionRecords.setInspectionTaskId(inspectionTasks.getId());
// break;
// }
// }
// }
// }
// }
// if (XjInspectionRecords.getInspectionTaskId() != null && XjInspectionRecords.getInspectionTaskId() != 0) {
// KlxjInspectionTasks klxjInspectionTasks = inspectionTasksService.selectKlxjInspectionTasksById(XjInspectionRecords.getInspectionTaskId());
//
//
// if (klxjInspectionTasks != null && klxjInspectionTasks.getInspectionRouteIds() != null && !klxjInspectionTasks.getInspectionRouteIds().equals("")) {
//
// List<Long> collect = klxjInspectionTasks.getCompletedInspectionRouteList().stream().map(t -> t.getId()).collect(Collectors.toList());
// if (!collect.contains(XjInspectionRecords.getInspectionRouteId())) {
// klxjInspectionTasks.setCompletedInspectionRouteIds(klxjInspectionTasks.getCompletedInspectionRouteIds() == null
// ? "" + XjInspectionRecords.getInspectionRouteId()
// : klxjInspectionTasks.getCompletedInspectionRouteIds() + "," + XjInspectionRecords.getInspectionRouteId());
// if (!klxjInspectionTasks.getTaskStatus().equals("4")) {
// if (klxjInspectionTasks.getCompletedInspectionRouteIds().split(",").length == klxjInspectionTasks.getCompletedInspectionRouteIds().split(",").length) {
// klxjInspectionTasks.setTaskStatus("3");
// } else {
// klxjInspectionTasks.setTaskStatus("2");
// }
// }
// }
// inspectionTasksService.updateKlxjInspectionTasks(klxjInspectionTasks);
// }
// }
return XjInspectionRecordsMapper.updateXjInspectionRecords(XjInspectionRecords);
}
/**
* 批量删除记录
*
* @param ids 需要删除的记录主键
* @return 结果
*/
@Override
public int deleteXjInspectionRecordsByIds(Long[] ids) {
return XjInspectionRecordsMapper.deleteXjInspectionRecordsByIds(ids);
}
/**
* 删除记录信息
*
* @param id 记录主键
* @return 结果
*/
@Override
public int deleteXjInspectionRecordsById(Long id) {
return XjInspectionRecordsMapper.deleteXjInspectionRecordsById(id);
}
@Override
public List<HashMap> getInspectionTasksYichangCountByParmas(HashMap<String, Object> params) {
return XjInspectionRecordsMapper.getInspectionTasksYichangCountByParmas(params);
}
// @Override
// public List<XjInspectionRecords> listByGroupName(KlxjInspectiontargetGroup
// klxjInspectiontargetGroup) {
// KlxjInspectiontargetGroup klxjInspectiontargetGroup1 =
// klxjInspectiontargetGroupMapper.selectByName(klxjInspectiontargetGroup.getName());
// if(null == klxjInspectiontargetGroup1){
// return new ArrayList<XjInspectionRecords>();
// }
// if(StringUtils.isEmpty(klxjInspectiontargetGroup1.getRoutesIds())){
// return new ArrayList<XjInspectionRecords>();
// }
// klxjInspectiontargetGroup.setRoutesIds(klxjInspectiontargetGroup1.getRoutesIds());
// if(StringUtils.isEmpty(klxjInspectiontargetGroup.getEndTime())){
// klxjInspectiontargetGroup.setEndTime(DateUtils.getTime());
// }
// if(StringUtils.isEmpty(klxjInspectiontargetGroup.getBeginTime())){
// Calendar calendar = Calendar.getInstance();
// int year = calendar.get(Calendar.YEAR);
//// calendar.add(Calendar.DATE,-30);
//// Date beginDate = calendar.getTime();
// klxjInspectiontargetGroup.setBeginTime(year + "-01-01 00:00:00");
// }
// PageUtils.startPage();
// List<XjInspectionRecords> XjInspectionRecords = XjInspectionRecordsMapper.selectListByRoutesIds(klxjInspectiontargetGroup);
// return XjInspectionRecords;
// }
}

View File

@ -0,0 +1,831 @@
package com.fastbee.xunjian.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.fastbee.common.exception.ServiceException;
import com.fastbee.common.utils.DateUtils;
import com.fastbee.common.utils.StringUtils;
import com.fastbee.xunjian.domain.XjInspectionNote;
import com.fastbee.xunjian.domain.XjInspectionRoutes;
import com.fastbee.xunjian.mapper.XjInspectionRoutesMapper;
import com.fastbee.xunjian.service.IXjInspectionNoteService;
import com.fastbee.xunjian.service.IXjInspectionRoutesService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
/**
* 巡检路线Service业务层处理
*
* @author kenlixunjian
* @date 2023-08-04
*/
@Service
public class XjInspectionRoutesServiceImpl implements IXjInspectionRoutesService {
@Autowired
private XjInspectionRoutesMapper XjInspectionRoutesMapper;
// @Autowired
// private KlxjQrCodeMapper klxjQrCodeMapper;
private static final Logger log = LoggerFactory.getLogger(XjInspectionRoutesServiceImpl.class);
@Autowired
private IXjInspectionNoteService iXjInspectionNoteService;
// @Autowired
// private ISysConfigService configService;
//
// @Autowired
// private ISysDictTypeService dictTypeService;
/**
* 查询巡检路线
*
* @param id 巡检路线主键
* @return 巡检路线
*/
@Override
public XjInspectionRoutes selectXjInspectionRoutesById(Long id) {
XjInspectionRoutes XjInspectionRoutes = XjInspectionRoutesMapper.selectXjInspectionRoutesById(id);
if (XjInspectionRoutes.getInspectionNoteIds() != null && !XjInspectionRoutes.getInspectionNoteIds().equals("")) {
XjInspectionNote xjInspectionNote = new XjInspectionNote();
// XjInspectionNote.setParams(new HashMap<String, Object>() {{
// put("ids", XjInspectionRoutes.getInspectionNoteIds());
// }});
List<XjInspectionNote> XjInspectionNotes =
iXjInspectionNoteService.selectXjInspectionNoteList(xjInspectionNote);
XjInspectionRoutes.setInspectionNote(XjInspectionNotes);
}
return XjInspectionRoutes;
}
/**
* 查询巡检路线列表
*
* @param XjInspectionRoutes 巡检路线
* @return 巡检路线
*/
@Override
public List<XjInspectionRoutes> selectXjInspectionRoutesList(XjInspectionRoutes XjInspectionRoutes) {
List<XjInspectionRoutes> XjInspectionRoutes1 = XjInspectionRoutesMapper.selectXjInspectionRoutesList(XjInspectionRoutes);
return XjInspectionRoutes1;
}
/**
* 新增巡检路线
*
* @param XjInspectionRoutes 巡检路线
* @return 结果
*/
@Override
public int insertXjInspectionRoutes(XjInspectionRoutes XjInspectionRoutes) {
XjInspectionRoutes.setCreateTime(DateUtils.getNowDate());
// if (XjInspectionRoutes.getQrCodeId() != null && XjInspectionRoutes.getQrCodeId() != 0) {
// KlxjQrCode klxjQrCode = klxjQrCodeMapper.selectKlxjQrCodeById(XjInspectionRoutes.getQrCodeId());
// if (selectXjInspectionRoutesByQrSn(klxjQrCode.getCodeSn()) != null) {
// throw new RuntimeException("二维码已被绑定");
// }
// XjInspectionRoutes.setQrCodeSn(klxjQrCode.getCodeSn());
// }
// if (XjInspectionRoutes.getEngineeringObjectType() != null && XjInspectionRoutes.getEngineeringObjectId() != null && XjInspectionRoutes.getEngineeringObjectId() != 0L) {
// KlxjEngineeringVo klxjEngineeringVo = new KlxjEngineeringVo();
// klxjEngineeringVo.setEngineeringObjectType(XjInspectionRoutes.getEngineeringObjectType());
// klxjEngineeringVo.setEngineeringObjectId(XjInspectionRoutes.getEngineeringObjectId().toString());
// Object engineeringData = getEngineeringData(klxjEngineeringVo);
// setRouteDataByEngineeringObjectId(XjInspectionRoutes, klxjEngineeringVo, engineeringData);
// }
return XjInspectionRoutesMapper.insertXjInspectionRoutes(XjInspectionRoutes);
}
// private void setRouteDataByEngineeringObjectId(XjInspectionRoutes XjInspectionRoutes, KlxjEngineeringVo klxjEngineeringVo, Object engineeringData) {
//// switch (EngineeringObjectType.getName(klxjEngineeringVo.getEngineeringObjectType())) {
//// case SHUIZHA_TYPE:
////
//// BaseSluiceInfo baseSluiceInfo = BeanUtil.toBean(engineeringData, BaseSluiceInfo.class);
//// if (baseSluiceInfo != null) {
//// XjInspectionRoutes.setName(baseSluiceInfo.getName());
//// XjInspectionRoutes.setQuyuma(baseSluiceInfo.getRegion());
//// XjInspectionRoutes.setPosition(baseSluiceInfo.getPosition());
//// ArrayList<Object> list = new ArrayList<>();
//// if (StringUtils.isNotEmpty(baseSluiceInfo.getLatitude()) || StringUtils.isNotEmpty(baseSluiceInfo.getLongitude())) {
//// list.add(baseSluiceInfo.getLongitude());
//// list.add(baseSluiceInfo.getLatitude());
//// }
//// String str = "{\"geometry\":{\"coordinates\":" + list.toString() + ",\"type\":\"Point\"},\"type\":\"Feature\",\"properties\":{\"altitude\":\"0\",\"textDisplayStyle\":\"0\",\"iconStyle\":\"33\"}}";
//// XjInspectionRoutes.setLatAndLong(str);
//// }
//// break;
//// case BENGFANG_TYPE:
//// BasePumpHouseInfo basePumpHouseInfo = BeanUtil.toBean(engineeringData, BasePumpHouseInfo.class);
//// if (basePumpHouseInfo != null) {
//// XjInspectionRoutes.setName(basePumpHouseInfo.getName());
//// XjInspectionRoutes.setQuyuma(basePumpHouseInfo.getRegion());
//// XjInspectionRoutes.setPosition(basePumpHouseInfo.getPosition());
//// ArrayList<Object> list = new ArrayList<>();
//// if (StringUtils.isNotEmpty(basePumpHouseInfo.getLatitude()) || StringUtils.isNotEmpty(basePumpHouseInfo.getLongitude())) {
//// list.add(basePumpHouseInfo.getLongitude());
//// list.add(basePumpHouseInfo.getLatitude());
//// }
//// String str = "{\"geometry\":{\"coordinates\":" + list.toString() + ",\"type\":\"Point\"},\"type\":\"Feature\",\"properties\":{\"altitude\":\"0\",\"textDisplayStyle\":\"0\",\"iconStyle\":\"33\"}}";
//// XjInspectionRoutes.setLatAndLong(str);
//// }
////
//// break;
//// case SHUIKU_TYPE:
//// BaseReservoirInfo baseReservoirInfo = BeanUtil.toBean(engineeringData, BaseReservoirInfo.class);
//// if (baseReservoirInfo != null) {
//// XjInspectionRoutes.setName(baseReservoirInfo.getName());
//// XjInspectionRoutes.setQuyuma(baseReservoirInfo.getRegion());
//// XjInspectionRoutes.setPosition(baseReservoirInfo.getPosition());
//// ArrayList<Object> list = new ArrayList<>();
//// if (StringUtils.isNotEmpty(baseReservoirInfo.getLatitude()) || StringUtils.isNotEmpty(baseReservoirInfo.getLongitude())) {
//// list.add(baseReservoirInfo.getLongitude());
//// list.add(baseReservoirInfo.getLatitude());
//// }
//// String str = "{\"geometry\":{\"coordinates\":" + list.toString() + ",\"type\":\"Point\"},\"type\":\"Feature\",\"properties\":{\"altitude\":\"0\",\"textDisplayStyle\":\"0\",\"iconStyle\":\"33\"}}";
//// XjInspectionRoutes.setLatAndLong(str);
//// }
//// break;
//// case DUCAO_TYPE:
//// KlAqueduct klAqueduct = BeanUtil.toBean(engineeringData, KlAqueduct.class);
//// if (klAqueduct != null) {
//// XjInspectionRoutes.setName(klAqueduct.getName());
//// XjInspectionRoutes.setPosition(klAqueduct.getPosition());
//// ArrayList<Object> list = new ArrayList<>();
//// if (StringUtils.isNotEmpty(klAqueduct.getLongLat())) {
//// list.addAll(Arrays.asList(klAqueduct.getLongLat().split(",")));
//// }
//// String str = "{\"geometry\":{\"coordinates\":" + list.toString() + ",\"type\":\"Point\"},\"type\":\"Feature\",\"properties\":{\"altitude\":\"0\",\"textDisplayStyle\":\"0\",\"iconStyle\":\"33\"}}";
//// XjInspectionRoutes.setLatAndLong(str);
//// }
//// break;
//// }
// }
// private void getRange(HhReachInfo hhReachInfo, Map mapparse, int type) {
//
// List<Map<String, Object>> features = (List<Map<String, Object>>) mapparse.get("features");
// ArrayList<Object> list1 = new ArrayList<>();
// if (features != null && features.size() > 0) {
// for (Map<String, Object> feature : features) {
// ArrayList<ArrayList> list = new ArrayList<>();
// ArrayList<ArrayList> listfan = new ArrayList<>();
// ArrayList<ArrayList> listdata = new ArrayList<>();
// Map<String, Object> geometry = (Map<String, Object>) feature.get("geometry");
// List<List<String>> coordinates = (List<List<String>>) geometry.get("coordinates");
// for (int i = 1; i < coordinates.size(); i++) {
// List<BigDecimal> objects1 = (List<BigDecimal>) Convert.toList(coordinates.get(i - 1));
// List<BigDecimal> objects2 = (List<BigDecimal>) Convert.toList(coordinates.get(i));
// BigDecimal long1 = objects1.get(0);
// BigDecimal lat1 = objects1.get(1);
// BigDecimal long2 = objects2.get(0);
// BigDecimal lat2 = objects2.get(1);
// if (long1 != null && lat1 != null && lat2 != null && long2 != null) {
// if (long2.compareTo(long1) == 0 || lat2.compareTo(lat1) == 0) {
// BigDecimal longdata = long2;
// BigDecimal latdata = lat2;
// BigDecimal longdatafan = long2;
// BigDecimal latdatafan = lat2;
//
// BigDecimal lomglat = new BigDecimal(0.00001);
// BigDecimal num = lomglat.multiply(new BigDecimal(type)).setScale(12, RoundingMode.FLOOR);
// if (i == 1) {
// BigDecimal longdata1 = long1;
// BigDecimal latdata1 = lat1;
// BigDecimal longdata1fan = long1;
// BigDecimal latdata1fan = lat1;
// if (long2.compareTo(long1) == 0) {
// if (lat2.compareTo(lat1) > 0) {
// longdata1 = long1.subtract(num);
// longdata1fan = long1.add(num);
// } else if (lat2.compareTo(lat1) < 0) {
// longdata1 = long1.add(num);
// longdata1fan = long1.subtract(num);
// }
// }
// if (lat2.compareTo(lat1) == 0) {
// if (long2.compareTo(long1) > 0) {
// latdata1 = lat1.add(num);
// latdata1fan = lat1.subtract(num);
// } else if (long2.compareTo(long1) < 0) {
// latdata1 = lat1.subtract(num);
// latdata1fan = lat1.add(num);
// }
// }
// ArrayList newlist = new ArrayList<>();
// ArrayList newlistfan = new ArrayList<>();
// newlistfan.add(longdata1fan);
// newlistfan.add(latdata1fan);
// listfan.add(newlist);
// newlist.add(longdata1);
// newlist.add(latdata1);
// list.add(newlist);
// }
//
// if (long2.compareTo(long1) == 0) {
// if (lat2.compareTo(lat1) > 0) {
// longdata = long2.subtract(num);
// longdatafan = long2.add(num);
// } else if (lat2.compareTo(lat1) < 0) {
// longdata = long2.add(num);
// longdatafan = long2.subtract(num);
// }
// }
// if (lat2.compareTo(lat1) == 0) {
// if (long2.compareTo(long1) > 0) {
// latdata = lat2.add(num);
// latdatafan = lat2.subtract(num);
// } else if (long2.compareTo(long1) < 0) {
// latdata = lat2.subtract(num);
// latdatafan = lat2.add(num);
// }
// }
// ArrayList newlist = new ArrayList<>();
// ArrayList newlistfan = new ArrayList<>();
// newlist.add(longdata);
// newlist.add(latdata);
// newlistfan.add(longdatafan);
// newlistfan.add(latdatafan);
// listfan.add(newlistfan);
// list.add(newlist);
//
// } else {
// isSanjiaoxing(type, list, listfan, i, long1, lat1, long2, lat2);
// }
// }
//
// }
// ArrayList<ArrayList> oneSemicircle = new ArrayList<>();
// ArrayList<ArrayList> twoSemicircle = new ArrayList<>();
// if (list.size() > 0 && listfan.size() > 0) {
// oneSemicircle = getSemicircle(list.get(0), coordinates.get(0), type, true);
// twoSemicircle = getSemicircle(list.get(list.size() - 1), coordinates.get(coordinates.size() - 1), type, false);
// }
// Collections.reverse(listfan);
// listdata.addAll(oneSemicircle);
// listdata.addAll(list);
// listdata.addAll(twoSemicircle);
// listdata.addAll(listfan);
// String str = "{\"type\": \"Feature\",\"properties\": {\"type\": \"polyline\",\"style\": {\"color\": \"#ff0000\", \"opacity\": 0.5,\"outline\": true,\"clampToGround\": true},\"group\": \"默认分组\"},\"geometry\": {\"type\": \"LineString\",\"coordinates\": " + listdata + "} }";
// Map<String, Object> newparse = (Map<String, Object>) JSON.parse(str);
//// features.add(newparse); //在原有内容上添加
//// mapparse.put("features",features);
// list1.add(newparse);
// }
// }
//
//
// mapparse.put("features", list1);
// if (type == 1000) {
// hhReachInfo.setRange1000(mapparse.toString());
// } else if (type == 5000) {
// hhReachInfo.setRange5000(mapparse.toString());
// } else if (type == 10000) {
// hhReachInfo.setRange10000(mapparse.toString());
// }
// }
private ArrayList<ArrayList> getSemicircle(ArrayList arrayList, List<String> strings, int type, boolean flag) {
BigDecimal long1 = (BigDecimal) arrayList.get(0);
List<BigDecimal> objects1 = (List<BigDecimal>) Convert.toList(strings);
BigDecimal long2 = objects1.get(0);
BigDecimal lat1 = (BigDecimal) arrayList.get(1);
BigDecimal lat2 = objects1.get(1);
BigDecimal angle = new BigDecimal(0);
BigDecimal lomglat = new BigDecimal(0.00001);
BigDecimal num = lomglat.multiply(new BigDecimal(type)).setScale(8, RoundingMode.FLOOR);
ArrayList<ArrayList> data = new ArrayList<>();
// 平行于经纬度
if (long2.compareTo(long1) == 0 || lat2.compareTo(lat1) == 0) {
if (long2.compareTo(long1) == 0) {
if (lat2.compareTo(lat1) > 0) {
angle = flag ? new BigDecimal(90) : new BigDecimal(270);
}
if (lat2.compareTo(lat1) < 0) {
angle = flag ? new BigDecimal(270) : new BigDecimal(90);
}
}
if (lat2.compareTo(lat1) == 0) {
if (long2.compareTo(long1) > 0) {
angle = flag ? new BigDecimal(360) : new BigDecimal(180);
}
if (long2.compareTo(long1) < 0) {
angle = flag ? new BigDecimal(180) : new BigDecimal(360);
}
}
} else {
// double degrees = Math.acos((a*a + b*b -c*c)/(2.0*a*b));
// // 用角度表示的角
// Math.toDegrees(degrees);
if (long2.compareTo(long1) > 0 && lat2.compareTo(lat1) > 0) {
BigDecimal c = lat2.subtract(lat1);
BigDecimal b = long2.subtract(long1);
BigDecimal a = num;
double degrees = getjiaodu(c, b, a);
if (flag) {
angle = new BigDecimal((180 + degrees - 180) < 0 ? 360.0 + (180 + degrees - 180) : 180 + degrees - 180).setScale(12, RoundingMode.FLOOR);
} else {
angle = new BigDecimal(180 + degrees).setScale(12, RoundingMode.FLOOR);
}
//右下画
} else if (long2.compareTo(long1) > 0 && lat2.compareTo(lat1) < 0) {
BigDecimal c = lat1.subtract(lat2);
BigDecimal b = num;
BigDecimal a = long2.subtract(long1);
double degrees = getjiaodu(c, b, a);
if (flag) {
angle = new BigDecimal((180 - degrees - 180) < 0 ? 360.0 + (180 - degrees - 180) : 180 - degrees - 180).setScale(12, RoundingMode.FLOOR);
} else {
angle = new BigDecimal(180 - degrees).setScale(12, RoundingMode.FLOOR);
}
//左上画
} else if (long2.compareTo(long1) < 0 && lat2.compareTo(lat1) > 0) {
BigDecimal c = lat2.subtract(lat1);
BigDecimal b = num;
BigDecimal a = long1.subtract(long2);
double degrees = getjiaodu(c, b, a);
if (flag) {
angle = new BigDecimal((360.0 - degrees - 180) < 0 ? 360.0 + (360.0 - degrees - 180) : 360.0 - degrees - 180).setScale(12, RoundingMode.FLOOR);
} else {
angle = new BigDecimal(360.0 - degrees).setScale(12, RoundingMode.FLOOR);
}
//坐下画
} else if (long2.compareTo(long1) < 0 && lat2.compareTo(lat1) < 0) {
BigDecimal c = lat1.subtract(lat2);
BigDecimal b = num;
BigDecimal a = long1.subtract(long2);
double degrees = getjiaodu(c, b, a);
if (flag) {
angle = new BigDecimal((degrees - 180) < 0 ? 360.0 + (degrees - 180) : degrees - 180).setScale(12, RoundingMode.FLOOR);
} else {
angle = new BigDecimal(degrees).setScale(12, RoundingMode.FLOOR);
}
}
}
// x1 = x0 + r * cos(a0 * π/180)
// y1 = y0 + r * sin(a0 * π/180)
if (angle.compareTo(new BigDecimal(0)) > 0) {
for (int i = 1; i < 17; i++) {
BigDecimal newangle = angle.subtract(new BigDecimal(i * 10));
newangle = newangle.compareTo(BigDecimal.ZERO) < 1 ? (new BigDecimal(360)).add(newangle) : newangle;
BigDecimal longdata = long2.add(num.multiply(BigDecimal.valueOf(Math.cos(Double.valueOf(String.valueOf(newangle)) * Math.PI / 180.0))).setScale(12, RoundingMode.FLOOR));
BigDecimal latdata = lat2.add(num.multiply(BigDecimal.valueOf(Math.sin(Double.valueOf(String.valueOf(newangle)) * Math.PI / 180.0))).setScale(12, RoundingMode.FLOOR));
ArrayList<BigDecimal> newlist = new ArrayList<>();
newlist.add(longdata);
newlist.add(latdata);
data.add(newlist);
}
}
return data;
}
private double getjiaodu(BigDecimal c, BigDecimal b, BigDecimal a) {
//a2+b2-c2* / 2*ab
BigDecimal aa = a.multiply(a);
BigDecimal bb = b.multiply(b);
BigDecimal cc = b.multiply(c);
BigDecimal abc = aa.add(bb).subtract(cc);
BigDecimal ab2 = (new BigDecimal(2.0)).multiply(a).multiply(b);
BigDecimal divide = abc.divide(ab2, 26, RoundingMode.FLOOR);
double degrees = Math.toDegrees(Math.acos(new Double(String.valueOf(divide))));
return degrees;
}
private void isSanjiaoxing(int type, ArrayList<ArrayList> list, ArrayList<ArrayList> listfan, int i, BigDecimal long1, BigDecimal lat1, BigDecimal long2, BigDecimal lat2) {
BigDecimal subtract = long2.subtract(long1);
BigDecimal subtract1 = lat2.subtract(lat1);
BigDecimal mu = new BigDecimal(100000000);
BigDecimal longabs = subtract.abs().multiply(mu).setScale(0, RoundingMode.FLOOR);
BigDecimal latabs = subtract1.abs().multiply(mu).setScale(0, RoundingMode.FLOOR);
//斜边的长度
BigDecimal sqrt = BigDecimal.valueOf(Math.sqrt(Math.pow(Double.valueOf(String.valueOf(longabs)), 2) + Math.pow(Double.valueOf(String.valueOf(latabs)), 2))).setScale(8, RoundingMode.FLOOR);
//米数
BigDecimal lomglat = new BigDecimal(0.00001);
//1千米的经纬度度数
BigDecimal multiply = lomglat.multiply(new BigDecimal(type)).setScale(8, RoundingMode.FLOOR);
//
BigDecimal bizhi = multiply.divide(sqrt, 12, RoundingMode.FLOOR);
BigDecimal longnum = bizhi.multiply(longabs).setScale(8, RoundingMode.FLOOR);
BigDecimal latnum = bizhi.multiply(latabs).setScale(8, RoundingMode.FLOOR);
// break;
ArrayList<Object> newlist = new ArrayList<>();
ArrayList<Object> newlistfan = new ArrayList<>();
//右上画
if (long2.compareTo(long1) > 0 && lat2.compareTo(lat1) > 0) {
if (i == 1) {
ArrayList<Object> listone = new ArrayList<>();
listone.add(long1.subtract(latnum));
listone.add(lat1.add(longnum));
list.add(listone);
ArrayList<Object> listonefan = new ArrayList<>();
listonefan.add(long1.add(latnum));
listonefan.add(lat1.subtract(longnum));
listfan.add(listonefan);
}
newlist.add(long2.subtract(latnum));
newlist.add(lat2.add(longnum));
newlistfan.add(long2.add(latnum));
newlistfan.add(lat2.subtract(longnum));
//右下画
} else if (long2.compareTo(long1) > 0 && lat2.compareTo(lat1) < 0) {
if (i == 1) {
ArrayList<Object> listone = new ArrayList<>();
listone.add(long1.add(latnum));
listone.add(lat1.add(longnum));
list.add(listone);
ArrayList<Object> listonefan = new ArrayList<>();
listonefan.add(long1.subtract(latnum));
listonefan.add(lat1.subtract(longnum));
listfan.add(listonefan);
}
newlist.add(long2.add(latnum));
newlist.add(lat2.add(longnum));
newlistfan.add(long2.subtract(latnum));
newlistfan.add(lat2.subtract(longnum));
//左上画
} else if (long2.compareTo(long1) < 0 && lat2.compareTo(lat1) > 0) {
if (i == 1) {
ArrayList<Object> listone = new ArrayList<>();
listone.add(long1.subtract(latnum));
listone.add(lat1.subtract(longnum));
list.add(listone);
ArrayList<Object> listonefan = new ArrayList<>();
listonefan.add(long1.add(latnum));
listonefan.add(lat1.add(longnum));
listfan.add(listonefan);
}
newlist.add(long2.subtract(latnum));
newlist.add(lat2.subtract(longnum));
newlistfan.add(long2.add(latnum));
newlistfan.add(lat2.add(longnum));
//坐下画
} else if (long2.compareTo(long1) < 0 && lat2.compareTo(lat1) < 0) {
if (i == 1) {
ArrayList<Object> listone = new ArrayList<>();
listone.add(long1.add(latnum));
listone.add(lat1.subtract(longnum));
list.add(listone);
ArrayList<Object> listonefan = new ArrayList<>();
listonefan.add(long1.subtract(latnum));
listonefan.add(lat1.add(longnum));
listfan.add(listonefan);
}
newlist.add(long2.add(latnum));
newlist.add(lat2.subtract(longnum));
newlistfan.add(long2.subtract(latnum));
newlistfan.add(lat2.add(longnum));
}
listfan.add(newlistfan);
list.add(newlist);
}
/**
* 修改巡检路线
*
* @param XjInspectionRoutes 巡检路线
* @return 结果
*/
@Override
public int updateXjInspectionRoutes(XjInspectionRoutes XjInspectionRoutes) {
XjInspectionRoutes.setUpdateTime(DateUtils.getNowDate());
// if (XjInspectionRoutes.getQrCodeId() != null && XjInspectionRoutes.getQrCodeId() != 0) {
// KlxjQrCode klxjQrCode = klxjQrCodeMapper.selectKlxjQrCodeById(XjInspectionRoutes.getQrCodeId());
// XjInspectionRoutes XjInspectionRoutes1 = selectXjInspectionRoutesByQrSn(klxjQrCode.getCodeSn());
// if (XjInspectionRoutes1 != null && !XjInspectionRoutes1.getId().equals(XjInspectionRoutes.getId())) {
// throw new RuntimeException("二维码已被绑定");
// }
// XjInspectionRoutes.setQrCodeSn(klxjQrCode.getCodeSn());
// }
// if (XjInspectionRoutes.getEngineeringObjectType() != null && XjInspectionRoutes.getEngineeringObjectId() != null && XjInspectionRoutes.getEngineeringObjectId() != 0L) {
// KlxjEngineeringVo klxjEngineeringVo = new KlxjEngineeringVo();
// klxjEngineeringVo.setEngineeringObjectType(XjInspectionRoutes.getEngineeringObjectType());
// klxjEngineeringVo.setEngineeringObjectId(XjInspectionRoutes.getEngineeringObjectId().toString());
// Object engineeringData = getEngineeringData(klxjEngineeringVo);
// setRouteDataByEngineeringObjectId(XjInspectionRoutes, klxjEngineeringVo, engineeringData);
// }
return XjInspectionRoutesMapper.updateXjInspectionRoutes(XjInspectionRoutes);
}
/**
* 批量删除巡检路线
*
* @param ids 需要删除的巡检路线主键
* @return 结果
*/
@Override
public int deleteXjInspectionRoutesByIds(Long[] ids) {
return XjInspectionRoutesMapper.deleteXjInspectionRoutesByIds(ids);
}
/**
* 删除巡检路线信息
*
* @param id 巡检路线主键
* @return 结果
*/
@Override
public int deleteXjInspectionRoutesById(Long id) {
return XjInspectionRoutesMapper.deleteXjInspectionRoutesById(id);
}
@Override
public String importData(List<XjInspectionRoutes> userList, boolean updateSupport, String operName) {
if (StringUtils.isNull(userList) || userList.size() == 0) {
throw new ServiceException("导入巡检对象数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
List<String> collect = userList.stream().filter(t -> t.getQrCodeSn() != null && !t.getQrCodeSn().equals("")).map(t -> t.getQrCodeSn()).collect(Collectors.toList());
Map<String, Long> idmap = new HashMap<>();
// if (collect != null && collect.size() > 0) {
// List<KlxjQrCode> qrCodeSn = klxjQrCodeMapper.selectKlxjQrCodeList(new KlxjQrCode() {{
// setParams(new HashMap<String, Object>() {{
// put("qrCodeSns", collect);
// }});
// }});
// idmap = qrCodeSn.stream().collect(Collectors.toMap(t -> t.getCodeSn(), t -> t.getId(), (key1, key2) -> key2));
// }
HashMap<String, List<Object>> EngineeringMap = new HashMap<>();
// KlxjEngineeringVo klxjEngineeringVo = new KlxjEngineeringVo();
// klxjEngineeringVo.setEngineeringObjectType(SHUIZHA_TYPE.getType());
// List<Object> shuizhaList = getEngineeringList(klxjEngineeringVo);
//// Map<String, BaseSluiceInfo> collect1 = ;
// EngineeringMap.put(SHUIZHA_TYPE.getType(), shuizhaList);
// klxjEngineeringVo.setEngineeringObjectType(BENGFANG_TYPE.getType());
// List<Object> bengfangList = getEngineeringList(klxjEngineeringVo);
//// Map<String, BaseSluiceInfo> collect1 = ;
// EngineeringMap.put(BENGFANG_TYPE.getType(), bengfangList);
// klxjEngineeringVo.setEngineeringObjectType(SHUIKU_TYPE.getType());
// List<Object> shuikuList = getEngineeringList(klxjEngineeringVo);
//// Map<String, BaseSluiceInfo> collect1 = ;
// EngineeringMap.put(SHUIKU_TYPE.getType(), shuikuList);
// klxjEngineeringVo.setEngineeringObjectType(DUCAO_TYPE.getType());
// List<Object> ducaoList = getEngineeringList(klxjEngineeringVo);
//// Map<String, BaseSluiceInfo> collect1 = ;
// EngineeringMap.put(DUCAO_TYPE.getType(), ducaoList);
//
//
// for (XjInspectionRoutes user : userList) {
// try {
// user.setQrCodeId(idmap.get(user.getQrCodeSn()));
// // 验证是否存在这个用户
// XjInspectionRoutes u = XjInspectionRoutesMapper.selectXjInspectionRoutesByName(user.getName());
// if (StringUtils.isNull(u)) {
// if (StringUtils.isNotEmpty(user.getEngineeringObjectType())) {
// if (EngineeringMap.get(user.getEngineeringObjectType()) != null) {
// if ((user.getEngineeringObjectId() == null && StringUtils.isNotEmpty(user.getName())) || user.getEngineeringObjectId() == 0L && StringUtils.isNotEmpty(user.getName())) {
// switch (EngineeringObjectType.getName(user.getEngineeringObjectType())) {
// case SHUIZHA_TYPE:
// List<Object> objects = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects) {
// BaseSluiceInfo basePumpHouseInfo = BeanUtil.toBean(t, BaseSluiceInfo.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// break;
// }
// }
// break;
// case BENGFANG_TYPE:
// List<Object> objects1 = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects1) {
// BasePumpHouseInfo basePumpHouseInfo = BeanUtil.toBean(t, BasePumpHouseInfo.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// }
// }
//
// break;
// case SHUIKU_TYPE:
// List<Object> objects2 = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects2) {
// BaseReservoirInfo basePumpHouseInfo = BeanUtil.toBean(t, BaseReservoirInfo.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// }
// }
//
// break;
// case DUCAO_TYPE:
// List<Object> objects3 = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects3) {
// KlAqueduct basePumpHouseInfo = BeanUtil.toBean(t, KlAqueduct.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// }
// }
// break;
// }
// }
// }
// }
// user.setCreateBy(operName);
// this.insertXjInspectionRoutes(user);
// successNum++;
// successMsg.append("<br/>" + successNum + "、水库 " + user.getName() + " 导入成功");
// } else if (updateSupport) {
//
// if (StringUtils.isNotEmpty(user.getEngineeringObjectType())) {
// if (EngineeringMap.get(user.getEngineeringObjectType()) != null) {
// if (u.getEngineeringObjectId() != null && !u.getEngineeringObjectId().equals(0L) && (user.getEngineeringObjectId() == null || user.getEngineeringObjectId() == 0L)) {
// user.setEngineeringObjectId(u.getEngineeringObjectId());
// }
// if ((user.getEngineeringObjectId() == null && StringUtils.isNotEmpty(user.getName())) || user.getEngineeringObjectId() == 0L && StringUtils.isNotEmpty(user.getName())) {
// switch (EngineeringObjectType.getName(user.getEngineeringObjectType())) {
// case SHUIZHA_TYPE:
// List<Object> objects = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects) {
// BaseSluiceInfo basePumpHouseInfo = BeanUtil.toBean(t, BaseSluiceInfo.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// break;
// }
// }
// break;
// case BENGFANG_TYPE:
// List<Object> objects1 = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects1) {
// BasePumpHouseInfo basePumpHouseInfo = BeanUtil.toBean(t, BasePumpHouseInfo.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// }
// }
//
// break;
// case SHUIKU_TYPE:
// List<Object> objects2 = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects2) {
// BaseReservoirInfo basePumpHouseInfo = BeanUtil.toBean(t, BaseReservoirInfo.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// }
// }
//
// break;
// case DUCAO_TYPE:
// List<Object> objects3 = EngineeringMap.get(user.getEngineeringObjectType());
// for (Object t : objects3) {
// KlAqueduct basePumpHouseInfo = BeanUtil.toBean(t, KlAqueduct.class);
// if (basePumpHouseInfo.getName().contains(user.getName())) {
// user.setEngineeringObjectId(basePumpHouseInfo.getId());
// }
// }
// break;
// }
// }
// }
// }
//
//
// user.setUpdateBy(operName);
// user.setId(u.getId());
// this.updateXjInspectionRoutes(user);
// successNum++;
// successMsg.append("<br/>" + successNum + "、水库 " + user.getName() + " 更新成功");
// } else {
// failureNum++;
// failureMsg.append("<br/>" + failureNum + "、水库 " + user.getName() + " 已存在");
// }
// } catch (Exception e) {
// failureNum++;
// String msg = "<br/>" + failureNum + "、水库 " + user.getName() + " 导入失败:";
// failureMsg.append(msg + e.getMessage());
// log.error(msg, e);
// }
// }
// if (failureNum > 0) {
// failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
// throw new ServiceException(failureMsg.toString());
// } else {
// successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
// }
return "";
}
@Override
public XjInspectionRoutes selectXjInspectionRoutesByQrSn(String qrSn) {
XjInspectionRoutes XjInspectionRoutes = XjInspectionRoutesMapper.selectXjInspectionRoutesByQrSn(qrSn);
if (XjInspectionRoutes != null && XjInspectionRoutes.getInspectionNoteIds() != null && !XjInspectionRoutes.getInspectionNoteIds().equals("")) {
XjInspectionNote XjInspectionNote = new XjInspectionNote();
XjInspectionNote.setParams(new HashMap<String, Object>() {{
put("ids", XjInspectionRoutes.getInspectionNoteIds());
}});
List<XjInspectionNote> XjInspectionNotes = iXjInspectionNoteService.selectXjInspectionNoteList(XjInspectionNote);
XjInspectionRoutes.setInspectionNote(XjInspectionNotes);
}
return XjInspectionRoutes;
}
// @Override
// public List<Object> getEngineeringList(KlxjEngineeringVo klxjEngineeringVo) {
//
// if (!StringUtils.isNotEmpty(klxjEngineeringVo.getEngineeringObjectType())) {
// throw new RuntimeException("工程类型不能为空");
// }
// JSONObject formMap = new JSONObject();
// String ip = configService.selectConfigByKey("kenli.ip");
// String username = configService.selectConfigByKey("kenli.user");
// String password = configService.selectConfigByKey("kenli.password");
// formMap.set("username", username);
// formMap.set("password", password);
// String body = HttpUtil.createPost(ip + "/login").body(formMap.toString()).execute().body();
// JSONObject jsonObject = new JSONObject(body);
// if (jsonObject.get("code").toString().equals("200")) {
// String token = jsonObject.get("token").toString();
// String Bearer = "Bearer " + token;
// List<SysDictData> engineering_object_type
// = dictTypeService.selectDictDataByType("engineering_object_type");
// if (engineering_object_type
// != null) {
// Map<String, SysDictData> collect = engineering_object_type.stream().collect(Collectors.toMap(t -> t.getDictValue(), t -> t));
// SysDictData sysDictData = collect.get(klxjEngineeringVo.getEngineeringObjectType());
// JSONObject map = new JSONObject();
// map.set("pageSize", 99999);
// map.set("pageNum", 1);
// HashMap<String, String> headers = new HashMap<>();
// headers.put("Authorization", Bearer);
// String body1 = HttpUtil.createGet(ip + sysDictData.getParam() + "list").headerMap(headers, false).form(map).execute().body();
// Object rows = new JSONObject(body1).get("rows");
// if (rows != null) {
// JSONArray dataList = new JSONArray(rows.toString());
// return dataList.toBean(List.class);
// }
//
// }
// }
// return new ArrayList<>();
// }
// @Override
// public Object getEngineeringData(KlxjEngineeringVo klxjEngineeringVo) {
// if (!StringUtils.isNotEmpty(klxjEngineeringVo.getEngineeringObjectType())) {
// throw new RuntimeException("工程类型不能为空");
// }
// JSONObject formMap = new JSONObject();
// String ip = configService.selectConfigByKey("kenli.ip");
// String username = configService.selectConfigByKey("kenli.user");
// String password = configService.selectConfigByKey("kenli.password");
// formMap.set("username", username);
// formMap.set("password", password);
// String body = HttpUtil.createPost(ip + "/login").body(formMap.toString()).execute().body();
// JSONObject jsonObject = new JSONObject(body);
// if (jsonObject.get("code").toString().equals("200")) {
// String token = jsonObject.get("token").toString();
// String Bearer = "Bearer " + token;
// List<SysDictData> engineering_object_type
// = dictTypeService.selectDictDataByType("engineering_object_type");
// if (engineering_object_type
// != null) {
// Map<String, SysDictData> collect = engineering_object_type.stream().collect(Collectors.toMap(t -> t.getDictValue(), t -> t));
// SysDictData sysDictData = collect.get(klxjEngineeringVo.getEngineeringObjectType());
// HashMap<String, String> headers = new HashMap<>();
// headers.put("Authorization", Bearer);
// String body1 = HttpUtil.createGet(ip + sysDictData.getParam() + klxjEngineeringVo.getEngineeringObjectId()).headerMap(headers, false).execute().body();
// JSONObject data = new JSONObject(body1).getJSONObject("data");
// if (data != null) {
// switch (EngineeringObjectType.getName(klxjEngineeringVo.getEngineeringObjectType())) {
// case SHUIZHA_TYPE:
// return data.toBean(BaseSluiceInfo.class);
// case BENGFANG_TYPE:
// return data.toBean(BasePumpHouseInfo.class);
// case SHUIKU_TYPE:
// return data.toBean(BaseReservoirInfo.class);
// case DUCAO_TYPE:
// return data.toBean(KlAqueduct.class);
// }
// }
// }
// }
// return null;
// }
}

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.xunjian.mapper.XjInspectionNoteMapper">
<resultMap type="com.fastbee.xunjian.domain.XjInspectionNote" id="XjInspectionNoteResult">
<result property="id" column="id"/>
<result property="title" column="title"/>
<result property="content" column="content"/>
<result property="projectId" column="project_id"/>
<result property="engineeringObjectType" column="engineering_object_type"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
</resultMap>
<sql id="selectXjInspectionNoteVo">
select *
from xj_inspection_note
</sql>
<select id="selectXjInspectionNoteList" parameterType="com.fastbee.xunjian.domain.XjInspectionNote"
resultMap="XjInspectionNoteResult">
<include refid="selectXjInspectionNoteVo"/>
<where>
<if test="title != null and title != ''">and title = #{title}</if>
<if test="content != null and content != ''">and content = #{content}</if>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="engineeringObjectType != null and engineeringObjectType != ''">and engineering_object_type =
#{engineeringObjectType}
</if>
<if test="params != null and params.ids!= null and params.ids!= ''">
AND id in
<foreach item="id" collection="params.ids.split(',')" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
order by id desc
</select>
<select id="selectXjInspectionNoteById" parameterType="Long" resultMap="XjInspectionNoteResult">
<include refid="selectXjInspectionNoteVo"/>
where id = #{id}
</select>
<insert id="insertXjInspectionNote" parameterType="com.fastbee.xunjian.domain.XjInspectionNote"
useGeneratedKeys="true" keyProperty="id">
insert into xj_inspection_note
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="projectId != null">project_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="engineeringObjectType != null">engineering_object_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="projectId != null">#{projectId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="engineeringObjectType != null">#{engineeringObjectType},</if>
</trim>
</insert>
<update id="updateXjInspectionNote" parameterType="com.fastbee.xunjian.domain.XjInspectionNote">
update xj_inspection_note
<trim prefix="SET" suffixOverrides=",">
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="engineeringObjectType != null">engineering_object_type = #{engineeringObjectType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteXjInspectionNoteById" parameterType="Long">
delete
from xj_inspection_note
where id = #{id}
</delete>
<delete id="deleteXjInspectionNoteByIds" parameterType="String">
delete from xj_inspection_note where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.xunjian.mapper.XjInspectionRecordsMapper">
<resultMap type="com.fastbee.xunjian.domain.XjInspectionRecords" id="XjInspectionRecordsResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="inspectionTaskId" column="inspection_task_id" />
<result property="inspectionPlanId" column="inspection_plan_id" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="inspectionPersonnelId" column="inspection_personnel_id" />
<result property="inspectionRouteId" column="inspection_route_id" />
<result property="recordStatus" column="record_status" />
<result property="abnormalStatus" column="abnormal_status"/>
<result property="latAndLong" column="lat_and_long"/>
<result property="picture" column="picture"/>
<result property="remarks" column="remarks"/>
<result property="quyuma" column="quyuma"/>
<result property="projectId" column="project_id"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="groupId" column="group_id"/>
</resultMap>
<sql id="selectXjInspectionRecordsVo">
select *
from xj_inspection_records
</sql>
<select id="selectXjInspectionRecordsList"
parameterType="com.fastbee.xunjian.domain.XjInspectionRecords"
resultMap="XjInspectionRecordsResult">
<include refid="selectXjInspectionRecordsVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="inspectionTaskId != null ">and inspection_task_id = #{inspectionTaskId}</if>
<if test="inspectionPlanId != null ">and inspection_plan_id = #{inspectionPlanId}</if>
<if test="startTime != null ">and start_time = #{startTime}</if>
<if test="endTime != null ">and end_time = #{endTime}</if>
<if test="inspectionPersonnelId != null ">and inspection_personnel_id = #{inspectionPersonnelId}</if>
<if test="inspectionRouteId != null ">and inspection_route_id = #{inspectionRouteId}</if>
<if test="recordStatus != null and recordStatus != ''">and record_status = #{recordStatus}</if>
<if test="abnormalStatus != null and abnormalStatus != ''">and abnormal_status = #{abnormalStatus}</if>
<if test="latAndLong != null and latAndLong != ''">and lat_and_long = #{latAndLong}</if>
<if test="picture != null and picture != ''">and picture = #{picture}</if>
<if test="remarks != null and remarks != ''">and remarks = #{remarks}</if>
<if test="quyuma != null and quyuma != ''">and quyuma = #{quyuma}</if>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="groupId != null ">and group_id = #{groupId}</if>
<if test="params != null and params.tasksIds != null and params.tasksIds.size>0">
and inspection_task_id in
<foreach collection="params.tasksIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(end_time ,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(end_time ,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
order by id desc
</select>
<select id="selectXjInspectionRecordsById" parameterType="Long" resultMap="XjInspectionRecordsResult">
<include refid="selectXjInspectionRecordsVo"/>
where id = #{id}
</select>
<insert id="insertXjInspectionRecords" parameterType="com.fastbee.xunjian.domain.XjInspectionRecords"
useGeneratedKeys="true" keyProperty="id">
insert into xj_inspection_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="inspectionTaskId != null">inspection_task_id,</if>
<if test="inspectionPlanId != null">inspection_plan_id,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="inspectionPersonnelId != null">inspection_personnel_id,</if>
<if test="inspectionRouteId != null">inspection_route_id,</if>
<if test="recordStatus != null">record_status,</if>
<if test="abnormalStatus != null">abnormal_status,</if>
<if test="latAndLong != null">lat_and_long,</if>
<if test="picture != null">picture,</if>
<if test="remarks != null">remarks,</if>
<if test="quyuma != null">quyuma,</if>
<if test="projectId != null">project_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="groupId != null">group_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="inspectionTaskId != null">#{inspectionTaskId},</if>
<if test="inspectionPlanId != null">#{inspectionPlanId},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="inspectionPersonnelId != null">#{inspectionPersonnelId},</if>
<if test="inspectionRouteId != null">#{inspectionRouteId},</if>
<if test="recordStatus != null">#{recordStatus},</if>
<if test="abnormalStatus != null">#{abnormalStatus},</if>
<if test="latAndLong != null">#{latAndLong},</if>
<if test="picture != null">#{picture},</if>
<if test="remarks != null">#{remarks},</if>
<if test="quyuma != null">#{quyuma},</if>
<if test="projectId != null">#{projectId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="groupId != null">#{groupId},</if>
</trim>
</insert>
<update id="updateXjInspectionRecords" parameterType="com.fastbee.xunjian.domain.XjInspectionRecords">
update xj_inspection_records
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="inspectionTaskId != null">inspection_task_id = #{inspectionTaskId},</if>
<if test="inspectionPlanId != null">inspection_plan_id = #{inspectionPlanId},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="inspectionPersonnelId != null">inspection_personnel_id = #{inspectionPersonnelId},</if>
<if test="inspectionRouteId != null">inspection_route_id = #{inspectionRouteId},</if>
<if test="recordStatus != null">record_status = #{recordStatus},</if>
<if test="abnormalStatus != null">abnormal_status = #{abnormalStatus},</if>
<if test="latAndLong != null">lat_and_long = #{latAndLong},</if>
<if test="picture != null">picture = #{picture},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="quyuma != null">quyuma = #{quyuma},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="groupId != null">group_id = #{groupId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteXjInspectionRecordsById" parameterType="Long">
delete from xj_inspection_records where id = #{id}
</delete>
<delete id="deleteXjInspectionRecordsByIds" parameterType="String">
delete from xj_inspection_records where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.xunjian.mapper.XjInspectionRoutesMapper">
<resultMap type="com.fastbee.xunjian.domain.XjInspectionRoutes" id="XjInspectionRoutesResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="dotLineType" column="dot_line_type"/>
<result property="engineeringObjectType" column="engineering_object_type"/>
<result property="engineeringObjectId" column="engineering_object_id"/>
<result property="projectId" column="project_id"/>
<result property="latAndLong" column="lat_and_long"/>
<result property="position" column="position"/>
<result property="range" column="range"/>
<result property="rangeArea" column="range_area"/>
<result property="qrCodeId" column="qr_code_id"/>
<result property="inspectionNoteIds" column="inspection_note_ids"/>
<result property="quyuma" column="quyuma"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="qrCodeSn" column="qr_code_sn"/>
</resultMap>
<sql id="selectXjInspectionRoutesVo">
select *
from xj_inspection_routes
</sql>
<select id="selectXjInspectionRoutesList"
parameterType="com.fastbee.xunjian.domain.XjInspectionRoutes"
resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="dotLineType != null and dotLineType != ''">and dot_line_type = #{dotLineType}</if>
<if test="engineeringObjectType != null and engineeringObjectType != ''">and engineering_object_type =
#{engineeringObjectType}
</if>
<if test="engineeringObjectId != null ">and engineering_object_id = #{engineeringObjectId}</if>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="latAndLong != null and latAndLong != ''">and lat_and_long = #{latAndLong}</if>
<if test="position != null and position != ''">and position = #{position}</if>
<if test="range != null and range != ''">and range = #{range}</if>
<if test="rangeArea != null and rangeArea != ''">and range_area = #{rangeArea}</if>
<if test="qrCodeId != null ">and qr_code_id = #{qrCodeId}</if>
<if test="quyuma != null and quyuma != ''">and quyuma = #{quyuma}</if>
<if test="qrCodeSn != null and qrCodeSn != ''">and qr_code_sn = #{qrCodeSn}</if>
<if test="params != null and params.ids!= null and params.ids!= ''">
AND id in
<foreach item="id" collection="params.ids.split(',')" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
order by id desc
</select>
<select id="selectXjInspectionRoutesById" parameterType="Long" resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
where id = #{id}
</select>
<select id="selectXjInspectionRoutesByName"
resultType="string" resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
where name = #{name} limit 1
</select>
<select id="selectXjInspectionRoutesByQrSn"
parameterType="string" resultMap="XjInspectionRoutesResult">
<include refid="selectXjInspectionRoutesVo"/>
WHERE kqc.code_sn = #{qrSn} limit 1
</select>
<insert id="insertXjInspectionRoutes" parameterType="com.fastbee.xunjian.domain.XjInspectionRoutes"
useGeneratedKeys="true" keyProperty="id">
insert into xj_inspection_routes
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="qrCodeSn != null">qr_code_sn,</if>
<if test="dotLineType != null">dot_line_type,</if>
<if test="engineeringObjectType != null">engineering_object_type,</if>
<if test="engineeringObjectId != null">engineering_object_id,</if>
<if test="projectId != null">project_id,</if>
<if test="latAndLong != null">lat_and_long,</if>
<if test="position != null">position,</if>
<if test="range != null">`range`,</if>
<if test="rangeArea != null">range_area,</if>
<if test="qrCodeId != null">qr_code_id,</if>
<if test="quyuma != null">quyuma,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="inspectionNoteIds != null">inspection_note_ids,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="qrCodeSn != null">#{qrCodeSn},</if>
<if test="dotLineType != null">#{dotLineType},</if>
<if test="engineeringObjectType != null">#{engineeringObjectType},</if>
<if test="engineeringObjectId != null">#{engineeringObjectId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="latAndLong != null">#{latAndLong},</if>
<if test="position != null">#{position},</if>
<if test="range != null">#{range},</if>
<if test="rangeArea != null">#{rangeArea},</if>
<if test="qrCodeId != null">#{qrCodeId},</if>
<if test="quyuma != null">#{quyuma},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="inspectionNoteIds != null">#{inspectionNoteIds},</if>
</trim>
</insert>
<update id="updateXjInspectionRoutes" parameterType="com.fastbee.xunjian.domain.XjInspectionRoutes">
update xj_inspection_routes
<trim prefix="SET" suffixOverrides=",">
<if test="inspectionNoteIds != null">inspection_note_ids = #{inspectionNoteIds},</if>
<if test="name != null">name = #{name},</if>
<if test="dotLineType != null">dot_line_type = #{dotLineType},</if>
<if test="engineeringObjectType != null">engineering_object_type = #{engineeringObjectType},</if>
<if test="engineeringObjectId != null">engineering_object_id = #{engineeringObjectId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="latAndLong != null">lat_and_long = #{latAndLong},</if>
<if test="position != null">position = #{position},</if>
<if test="range != null">`range` = #{range},</if>
<if test="rangeArea != null">range_area = #{rangeArea},</if>
<if test="qrCodeId != null">qr_code_id = #{qrCodeId},</if>
<if test="quyuma != null">quyuma = #{quyuma},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="qrCodeSn != null">qr_code_sn = #{qrCodeSn},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteXjInspectionRoutesById" parameterType="Long">
delete
from xj_inspection_routes
where id = #{id}
</delete>
<delete id="deleteXjInspectionRoutesByIds" parameterType="String">
delete from xj_inspection_routes where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -15,6 +15,8 @@
<modules>
<module>fastbee-iot-service</module>
<module>fastbee-system-service</module>
<module>fastbee-xunjian-service</module>
<module>fastbee-waterele-service</module>
</modules>

13
pom.xml
View File

@ -263,7 +263,18 @@
<artifactId>fastbee-system-service</artifactId>
<version>${fastbee.version}</version>
</dependency>
<!-- 巡检-->
<dependency>
<groupId>com.fastbee</groupId>
<artifactId>fastbee-xunjian-service</artifactId>
<version>${fastbee.version}</version>
</dependency>
<!-- 水电双计-->
<dependency>
<groupId>com.fastbee</groupId>
<artifactId>fastbee-waterele-service</artifactId>
<version>${fastbee.version}</version>
</dependency>
<!--定时模块-->
<dependency>
<groupId>com.fastbee</groupId>