Commit c86c815b authored by 王晓倩's avatar 王晓倩

管道、设备、巡检员、巡检记录

parent 068c6f1c
package com.zehong.web.controller.system;
package com.zehong.web.controller.device;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -15,89 +15,89 @@ import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TGasMeter;
import com.zehong.system.service.ITGasMeterService;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 物联网燃气表Controller
* 设备信息Controller
*
* @author zehong
* @date 2021-07-08
* @date 2021-07-09
*/
@RestController
@RequestMapping("/system/gasMeter")
public class TGasMeterController extends BaseController
@RequestMapping("/device/deviceInfo")
public class TDeviceInfoController extends BaseController
{
@Autowired
private ITGasMeterService tGasMeterService;
private ITDeviceInfoService tDeviceInfoService;
/**
* 查询物联网燃气表列表
* 查询设备信息列表
*/
@PreAuthorize("@ss.hasPermi('system:gasMeter:list')")
@PreAuthorize("@ss.hasPermi('device:deviceInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TGasMeter tGasMeter)
public TableDataInfo list(TDeviceInfo tDeviceInfo)
{
startPage();
List<TGasMeter> list = tGasMeterService.selectTGasMeterList(tGasMeter);
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
}
/**
* 导出物联网燃气表列表
* 导出设备信息列表
*/
@PreAuthorize("@ss.hasPermi('system:gasMeter:export')")
@Log(title = "物联网燃气表", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('device:deviceInfo:export')")
@Log(title = "设备信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TGasMeter tGasMeter)
public AjaxResult export(TDeviceInfo tDeviceInfo)
{
List<TGasMeter> list = tGasMeterService.selectTGasMeterList(tGasMeter);
ExcelUtil<TGasMeter> util = new ExcelUtil<TGasMeter>(TGasMeter.class);
return util.exportExcel(list, "物联网燃气表数据");
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class);
return util.exportExcel(list, "设备信息数据");
}
/**
* 获取物联网燃气表详细信息
* 获取设备信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:gasMeter:query')")
@GetMapping(value = "/{gasId}")
public AjaxResult getInfo(@PathVariable("gasId") Long gasId)
@PreAuthorize("@ss.hasPermi('device:deviceInfo:query')")
@GetMapping(value = "/{deviceId}")
public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
{
return AjaxResult.success(tGasMeterService.selectTGasMeterById(gasId));
return AjaxResult.success(tDeviceInfoService.selectTDeviceInfoById(deviceId));
}
/**
* 新增物联网燃气表
* 新增设备信息
*/
@PreAuthorize("@ss.hasPermi('system:gasMeter:add')")
@Log(title = "物联网燃气表", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('device:deviceInfo:add')")
@Log(title = "设备信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TGasMeter tGasMeter)
public AjaxResult add(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tGasMeterService.insertTGasMeter(tGasMeter));
return toAjax(tDeviceInfoService.insertTDeviceInfo(tDeviceInfo));
}
/**
* 修改物联网燃气表
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('system:gasMeter:edit')")
@Log(title = "物联网燃气表", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('device:deviceInfo:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TGasMeter tGasMeter)
public AjaxResult edit(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tGasMeterService.updateTGasMeter(tGasMeter));
return toAjax(tDeviceInfoService.updateTDeviceInfo(tDeviceInfo));
}
/**
* 删除物联网燃气表
* 删除设备信息
*/
@PreAuthorize("@ss.hasPermi('system:gasMeter:remove')")
@Log(title = "物联网燃气表", businessType = BusinessType.DELETE)
@DeleteMapping("/{gasIds}")
public AjaxResult remove(@PathVariable Long[] gasIds)
@PreAuthorize("@ss.hasPermi('device:deviceInfo:remove')")
@Log(title = "设备信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{deviceIds}")
public AjaxResult remove(@PathVariable Long[] deviceIds)
{
return toAjax(tGasMeterService.deleteTGasMeterByIds(gasIds));
return toAjax(tDeviceInfoService.deleteTDeviceInfoByIds(deviceIds));
}
}
package com.zehong.web.controller.system;
package com.zehong.web.controller.device;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -15,89 +15,89 @@ import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TValveWell;
import com.zehong.system.service.ITValveWellService;
import com.zehong.system.domain.TInspectionData;
import com.zehong.system.service.ITInspectionDataService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 阀门井Controller
* 巡检记录Controller
*
* @author zehong
* @date 2021-07-08
* @date 2021-07-09
*/
@RestController
@RequestMapping("/system/valveWell")
public class TValveWellController extends BaseController
@RequestMapping("/device/inspectionData")
public class TInspectionDataController extends BaseController
{
@Autowired
private ITValveWellService tValveWellService;
private ITInspectionDataService tInspectionDataService;
/**
* 查询阀门井列表
* 查询巡检记录列表
*/
@PreAuthorize("@ss.hasPermi('system:valveWell:list')")
@PreAuthorize("@ss.hasPermi('device:inspectionData:list')")
@GetMapping("/list")
public TableDataInfo list(TValveWell tValveWell)
public TableDataInfo list(TInspectionData tInspectionData)
{
startPage();
List<TValveWell> list = tValveWellService.selectTValveWellList(tValveWell);
List<TInspectionData> list = tInspectionDataService.selectTInspectionDataList(tInspectionData);
return getDataTable(list);
}
/**
* 导出阀门井列表
* 导出巡检记录列表
*/
@PreAuthorize("@ss.hasPermi('system:valveWell:export')")
@Log(title = "阀门井", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('device:inspectionData:export')")
@Log(title = "巡检记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TValveWell tValveWell)
public AjaxResult export(TInspectionData tInspectionData)
{
List<TValveWell> list = tValveWellService.selectTValveWellList(tValveWell);
ExcelUtil<TValveWell> util = new ExcelUtil<TValveWell>(TValveWell.class);
return util.exportExcel(list, "阀门井数据");
List<TInspectionData> list = tInspectionDataService.selectTInspectionDataList(tInspectionData);
ExcelUtil<TInspectionData> util = new ExcelUtil<TInspectionData>(TInspectionData.class);
return util.exportExcel(list, "巡检记录数据");
}
/**
* 获取阀门井详细信息
* 获取巡检记录详细信息
*/
@PreAuthorize("@ss.hasPermi('system:valveWell:query')")
@GetMapping(value = "/{wellId}")
public AjaxResult getInfo(@PathVariable("wellId") Long wellId)
@PreAuthorize("@ss.hasPermi('device:inspectionData:query')")
@GetMapping(value = "/{dataId}")
public AjaxResult getInfo(@PathVariable("dataId") Long dataId)
{
return AjaxResult.success(tValveWellService.selectTValveWellById(wellId));
return AjaxResult.success(tInspectionDataService.selectTInspectionDataById(dataId));
}
/**
* 新增阀门井
* 新增巡检记录
*/
@PreAuthorize("@ss.hasPermi('system:valveWell:add')")
@Log(title = "阀门井", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('device:inspectionData:add')")
@Log(title = "巡检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TValveWell tValveWell)
public AjaxResult add(@RequestBody TInspectionData tInspectionData)
{
return toAjax(tValveWellService.insertTValveWell(tValveWell));
return toAjax(tInspectionDataService.insertTInspectionData(tInspectionData));
}
/**
* 修改阀门井
* 修改巡检记录
*/
@PreAuthorize("@ss.hasPermi('system:valveWell:edit')")
@Log(title = "阀门井", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('device:inspectionData:edit')")
@Log(title = "巡检记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TValveWell tValveWell)
public AjaxResult edit(@RequestBody TInspectionData tInspectionData)
{
return toAjax(tValveWellService.updateTValveWell(tValveWell));
return toAjax(tInspectionDataService.updateTInspectionData(tInspectionData));
}
/**
* 删除阀门井
* 删除巡检记录
*/
@PreAuthorize("@ss.hasPermi('system:valveWell:remove')")
@Log(title = "阀门井", businessType = BusinessType.DELETE)
@DeleteMapping("/{wellIds}")
public AjaxResult remove(@PathVariable Long[] wellIds)
@PreAuthorize("@ss.hasPermi('device:inspectionData:remove')")
@Log(title = "巡检记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{dataIds}")
public AjaxResult remove(@PathVariable Long[] dataIds)
{
return toAjax(tValveWellService.deleteTValveWellByIds(wellIds));
return toAjax(tInspectionDataService.deleteTInspectionDataByIds(dataIds));
}
}
package com.zehong.web.controller.system;
package com.zehong.web.controller.device;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TInspector;
import com.zehong.system.service.ITInspectorService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 巡检员Controller
......@@ -27,7 +21,7 @@ import com.zehong.common.core.page.TableDataInfo;
* @date 2021-07-08
*/
@RestController
@RequestMapping("/system/inspector")
@RequestMapping("/device/inspector")
public class TInspectorController extends BaseController
{
@Autowired
......@@ -36,7 +30,7 @@ public class TInspectorController extends BaseController
/**
* 查询巡检员列表
*/
@PreAuthorize("@ss.hasPermi('system:inspector:list')")
@PreAuthorize("@ss.hasPermi('device:inspector:list')")
@GetMapping("/list")
public TableDataInfo list(TInspector tInspector)
{
......@@ -48,7 +42,7 @@ public class TInspectorController extends BaseController
/**
* 导出巡检员列表
*/
@PreAuthorize("@ss.hasPermi('system:inspector:export')")
@PreAuthorize("@ss.hasPermi('device:inspector:export')")
@Log(title = "巡检员", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspector tInspector)
......@@ -61,7 +55,7 @@ public class TInspectorController extends BaseController
/**
* 获取巡检员详细信息
*/
@PreAuthorize("@ss.hasPermi('system:inspector:query')")
@PreAuthorize("@ss.hasPermi('device:inspector:query')")
@GetMapping(value = "/{inspectorId}")
public AjaxResult getInfo(@PathVariable("inspectorId") Long inspectorId)
{
......@@ -71,7 +65,7 @@ public class TInspectorController extends BaseController
/**
* 新增巡检员
*/
@PreAuthorize("@ss.hasPermi('system:inspector:add')")
@PreAuthorize("@ss.hasPermi('device:inspector:add')")
@Log(title = "巡检员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspector tInspector)
......@@ -82,7 +76,7 @@ public class TInspectorController extends BaseController
/**
* 修改巡检员
*/
@PreAuthorize("@ss.hasPermi('system:inspector:edit')")
@PreAuthorize("@ss.hasPermi('device:inspector:edit')")
@Log(title = "巡检员", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspector tInspector)
......@@ -93,7 +87,7 @@ public class TInspectorController extends BaseController
/**
* 删除巡检员
*/
@PreAuthorize("@ss.hasPermi('system:inspector:remove')")
@PreAuthorize("@ss.hasPermi('device:inspector:remove')")
@Log(title = "巡检员", businessType = BusinessType.DELETE)
@DeleteMapping("/{inspectorIds}")
public AjaxResult remove(@PathVariable Long[] inspectorIds)
......
package com.zehong.web.controller.system;
package com.zehong.web.controller.device;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TPipe;
import com.zehong.system.service.ITPipeService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 管道信息Controller
......@@ -27,7 +21,7 @@ import com.zehong.common.core.page.TableDataInfo;
* @date 2021-07-08
*/
@RestController
@RequestMapping("/system/pipe")
@RequestMapping("/device/pipe")
public class TPipeController extends BaseController
{
@Autowired
......@@ -36,7 +30,7 @@ public class TPipeController extends BaseController
/**
* 查询管道信息列表
*/
@PreAuthorize("@ss.hasPermi('system:pipe:list')")
@PreAuthorize("@ss.hasPermi('device:pipe:list')")
@GetMapping("/list")
public TableDataInfo list(TPipe tPipe)
{
......@@ -48,7 +42,7 @@ public class TPipeController extends BaseController
/**
* 导出管道信息列表
*/
@PreAuthorize("@ss.hasPermi('system:pipe:export')")
@PreAuthorize("@ss.hasPermi('device:pipe:export')")
@Log(title = "管道信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipe tPipe)
......@@ -61,7 +55,7 @@ public class TPipeController extends BaseController
/**
* 获取管道信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:pipe:query')")
@PreAuthorize("@ss.hasPermi('device:pipe:query')")
@GetMapping(value = "/{pipeId}")
public AjaxResult getInfo(@PathVariable("pipeId") Long pipeId)
{
......@@ -71,7 +65,7 @@ public class TPipeController extends BaseController
/**
* 新增管道信息
*/
@PreAuthorize("@ss.hasPermi('system:pipe:add')")
@PreAuthorize("@ss.hasPermi('device:pipe:add')")
@Log(title = "管道信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipe tPipe)
......@@ -82,7 +76,7 @@ public class TPipeController extends BaseController
/**
* 修改管道信息
*/
@PreAuthorize("@ss.hasPermi('system:pipe:edit')")
@PreAuthorize("@ss.hasPermi('device:pipe:edit')")
@Log(title = "管道信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipe tPipe)
......@@ -93,7 +87,7 @@ public class TPipeController extends BaseController
/**
* 删除管道信息
*/
@PreAuthorize("@ss.hasPermi('system:pipe:remove')")
@PreAuthorize("@ss.hasPermi('device:pipe:remove')")
@Log(title = "管道信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{pipeIds}")
public AjaxResult remove(@PathVariable Long[] pipeIds)
......
package com.zehong.web.controller.system;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TFlowmeter;
import com.zehong.system.service.ITFlowmeterService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 流量计Controller
*
* @author zehong
* @date 2021-07-08
*/
@RestController
@RequestMapping("/system/flowmeter")
public class TFlowmeterController extends BaseController
{
@Autowired
private ITFlowmeterService tFlowmeterService;
/**
* 查询流量计列表
*/
@PreAuthorize("@ss.hasPermi('system:flowmeter:list')")
@GetMapping("/list")
public TableDataInfo list(TFlowmeter tFlowmeter)
{
startPage();
List<TFlowmeter> list = tFlowmeterService.selectTFlowmeterList(tFlowmeter);
return getDataTable(list);
}
/**
* 导出流量计列表
*/
@PreAuthorize("@ss.hasPermi('system:flowmeter:export')")
@Log(title = "流量计", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TFlowmeter tFlowmeter)
{
List<TFlowmeter> list = tFlowmeterService.selectTFlowmeterList(tFlowmeter);
ExcelUtil<TFlowmeter> util = new ExcelUtil<TFlowmeter>(TFlowmeter.class);
return util.exportExcel(list, "流量计数据");
}
/**
* 获取流量计详细信息
*/
@PreAuthorize("@ss.hasPermi('system:flowmeter:query')")
@GetMapping(value = "/{flowmeterId}")
public AjaxResult getInfo(@PathVariable("flowmeterId") Long flowmeterId)
{
return AjaxResult.success(tFlowmeterService.selectTFlowmeterById(flowmeterId));
}
/**
* 新增流量计
*/
@PreAuthorize("@ss.hasPermi('system:flowmeter:add')")
@Log(title = "流量计", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TFlowmeter tFlowmeter)
{
return toAjax(tFlowmeterService.insertTFlowmeter(tFlowmeter));
}
/**
* 修改流量计
*/
@PreAuthorize("@ss.hasPermi('system:flowmeter:edit')")
@Log(title = "流量计", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TFlowmeter tFlowmeter)
{
return toAjax(tFlowmeterService.updateTFlowmeter(tFlowmeter));
}
/**
* 删除流量计
*/
@PreAuthorize("@ss.hasPermi('system:flowmeter:remove')")
@Log(title = "流量计", businessType = BusinessType.DELETE)
@DeleteMapping("/{flowmeterIds}")
public AjaxResult remove(@PathVariable Long[] flowmeterIds)
{
return toAjax(tFlowmeterService.deleteTFlowmeterByIds(flowmeterIds));
}
}
package com.zehong.web.controller.system;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TRegulatorBox;
import com.zehong.system.service.ITRegulatorBoxService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 调压箱Controller
*
* @author zehong
* @date 2021-07-08
*/
@RestController
@RequestMapping("/system/regulatorBox")
public class TRegulatorBoxController extends BaseController
{
@Autowired
private ITRegulatorBoxService tRegulatorBoxService;
/**
* 查询调压箱列表
*/
@PreAuthorize("@ss.hasPermi('system:regulatorBox:list')")
@GetMapping("/list")
public TableDataInfo list(TRegulatorBox tRegulatorBox)
{
startPage();
List<TRegulatorBox> list = tRegulatorBoxService.selectTRegulatorBoxList(tRegulatorBox);
return getDataTable(list);
}
/**
* 导出调压箱列表
*/
@PreAuthorize("@ss.hasPermi('system:regulatorBox:export')")
@Log(title = "调压箱", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TRegulatorBox tRegulatorBox)
{
List<TRegulatorBox> list = tRegulatorBoxService.selectTRegulatorBoxList(tRegulatorBox);
ExcelUtil<TRegulatorBox> util = new ExcelUtil<TRegulatorBox>(TRegulatorBox.class);
return util.exportExcel(list, "调压箱数据");
}
/**
* 获取调压箱详细信息
*/
@PreAuthorize("@ss.hasPermi('system:regulatorBox:query')")
@GetMapping(value = "/{boxId}")
public AjaxResult getInfo(@PathVariable("boxId") Long boxId)
{
return AjaxResult.success(tRegulatorBoxService.selectTRegulatorBoxById(boxId));
}
/**
* 新增调压箱
*/
@PreAuthorize("@ss.hasPermi('system:regulatorBox:add')")
@Log(title = "调压箱", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TRegulatorBox tRegulatorBox)
{
return toAjax(tRegulatorBoxService.insertTRegulatorBox(tRegulatorBox));
}
/**
* 修改调压箱
*/
@PreAuthorize("@ss.hasPermi('system:regulatorBox:edit')")
@Log(title = "调压箱", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TRegulatorBox tRegulatorBox)
{
return toAjax(tRegulatorBoxService.updateTRegulatorBox(tRegulatorBox));
}
/**
* 删除调压箱
*/
@PreAuthorize("@ss.hasPermi('system:regulatorBox:remove')")
@Log(title = "调压箱", businessType = BusinessType.DELETE)
@DeleteMapping("/{boxIds}")
public AjaxResult remove(@PathVariable Long[] boxIds)
{
return toAjax(tRegulatorBoxService.deleteTRegulatorBoxByIds(boxIds));
}
}
......@@ -9,17 +9,17 @@ import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 流量计对象 t_flowmeter
* 设备信息对象 t_device_info
*
* @author zehong
* @date 2021-07-08
* @date 2021-07-09
*/
public class TFlowmeter extends BaseEntity
public class TDeviceInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 流量计id */
private Long flowmeterId;
/** 设备id */
private Long deviceId;
/** 企业id */
@Excel(name = "企业id")
......@@ -29,18 +29,22 @@ public class TFlowmeter extends BaseEntity
@Excel(name = "所属管道id")
private Long pipeId;
/** 名称 */
@Excel(name = "名称")
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 地址 */
@Excel(name = "地址")
/** 所在地址 */
@Excel(name = "所在地址")
private String deviceAddr;
/** 型号 */
@Excel(name = "型号")
/** 设备型号 */
@Excel(name = "设备型号")
private String deviceModel;
/** 设备类型 */
@Excel(name = "设备类型")
private String deviceType;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
......@@ -79,14 +83,14 @@ public class TFlowmeter extends BaseEntity
@Excel(name = "备注")
private String remarks;
public void setFlowmeterId(Long flowmeterId)
public void setDeviceId(Long deviceId)
{
this.flowmeterId = flowmeterId;
this.deviceId = deviceId;
}
public Long getFlowmeterId()
public Long getDeviceId()
{
return flowmeterId;
return deviceId;
}
public void setEnterpriseId(Long enterpriseId)
{
......@@ -133,6 +137,15 @@ public class TFlowmeter extends BaseEntity
{
return deviceModel;
}
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
......@@ -218,12 +231,13 @@ public class TFlowmeter extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("flowmeterId", getFlowmeterId())
.append("deviceId", getDeviceId())
.append("enterpriseId", getEnterpriseId())
.append("pipeId", getPipeId())
.append("deviceName", getDeviceName())
.append("deviceAddr", getDeviceAddr())
.append("deviceModel", getDeviceModel())
.append("deviceType", getDeviceType())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("iotNo", getIotNo())
......
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 物联网燃气表对象 t_gas_meter
*
* @author zehong
* @date 2021-07-08
*/
public class TGasMeter extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 燃气表id */
private Long gasId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 所属管道id */
@Excel(name = "所属管道id")
private Long pipeId;
/** 名称 */
@Excel(name = "名称")
private String deviceName;
/** 地址 */
@Excel(name = "地址")
private String deviceAddr;
/** 型号 */
@Excel(name = "型号")
private String deviceModel;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 物联网编号 */
@Excel(name = "物联网编号")
private String iotNo;
/** 设备图片路径 */
@Excel(name = "设备图片路径")
private String iconUrl;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setGasId(Long gasId)
{
this.gasId = gasId;
}
public Long getGasId()
{
return gasId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setPipeId(Long pipeId)
{
this.pipeId = pipeId;
}
public Long getPipeId()
{
return pipeId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
public void setDeviceAddr(String deviceAddr)
{
this.deviceAddr = deviceAddr;
}
public String getDeviceAddr()
{
return deviceAddr;
}
public void setDeviceModel(String deviceModel)
{
this.deviceModel = deviceModel;
}
public String getDeviceModel()
{
return deviceModel;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setIotNo(String iotNo)
{
this.iotNo = iotNo;
}
public String getIotNo()
{
return iotNo;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
public String getIconUrl()
{
return iconUrl;
}
public void setLinkman(String linkman)
{
this.linkman = linkman;
}
public String getLinkman()
{
return linkman;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setInstallationTime(Date installationTime)
{
this.installationTime = installationTime;
}
public Date getInstallationTime()
{
return installationTime;
}
public void setInspectionTime(Date inspectionTime)
{
this.inspectionTime = inspectionTime;
}
public Date getInspectionTime()
{
return inspectionTime;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("gasId", getGasId())
.append("enterpriseId", getEnterpriseId())
.append("pipeId", getPipeId())
.append("deviceName", getDeviceName())
.append("deviceAddr", getDeviceAddr())
.append("deviceModel", getDeviceModel())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("iotNo", getIotNo())
.append("iconUrl", getIconUrl())
.append("linkman", getLinkman())
.append("phone", getPhone())
.append("installationTime", getInstallationTime())
.append("inspectionTime", getInspectionTime())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 调压箱对象 t_regulator_box
* 巡检记录对象 t_inspection_data
*
* @author zehong
* @date 2021-07-08
* @date 2021-07-09
*/
public class TRegulatorBox extends BaseEntity
public class TInspectionData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 调压箱id */
private Long boxId;
/** 巡检记录id */
private Long dataId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 名称 */
@Excel(name = "名称")
private String deviceName;
/** 地址 */
@Excel(name = "地址")
private String deviceAddr;
/** 型号 */
@Excel(name = "型号")
private String deviceModel;
/** 巡检员id */
@Excel(name = "巡检员id")
private Long inspectorId;
/** 经度 */
@Excel(name = "经度")
......@@ -45,76 +31,27 @@ public class TRegulatorBox extends BaseEntity
@Excel(name = "纬度")
private BigDecimal latitude;
/** 设备图片路径 */
@Excel(name = "设备图片路径")
private String iconUrl;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setBoxId(Long boxId)
{
this.boxId = boxId;
}
public Long getBoxId()
{
return boxId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
public void setDataId(Long dataId)
{
return deviceName;
}
public void setDeviceAddr(String deviceAddr)
{
this.deviceAddr = deviceAddr;
this.dataId = dataId;
}
public String getDeviceAddr()
public Long getDataId()
{
return deviceAddr;
return dataId;
}
public void setDeviceModel(String deviceModel)
public void setInspectorId(Long inspectorId)
{
this.deviceModel = deviceModel;
this.inspectorId = inspectorId;
}
public String getDeviceModel()
public Long getInspectorId()
{
return deviceModel;
return inspectorId;
}
public void setLongitude(BigDecimal longitude)
{
......@@ -134,51 +71,6 @@ public class TRegulatorBox extends BaseEntity
{
return latitude;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
public String getIconUrl()
{
return iconUrl;
}
public void setLinkman(String linkman)
{
this.linkman = linkman;
}
public String getLinkman()
{
return linkman;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setInstallationTime(Date installationTime)
{
this.installationTime = installationTime;
}
public Date getInstallationTime()
{
return installationTime;
}
public void setInspectionTime(Date inspectionTime)
{
this.inspectionTime = inspectionTime;
}
public Date getInspectionTime()
{
return inspectionTime;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
......@@ -192,18 +84,11 @@ public class TRegulatorBox extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("boxId", getBoxId())
.append("enterpriseId", getEnterpriseId())
.append("deviceName", getDeviceName())
.append("deviceAddr", getDeviceAddr())
.append("deviceModel", getDeviceModel())
.append("dataId", getDataId())
.append("inspectorId", getInspectorId())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("iconUrl", getIconUrl())
.append("linkman", getLinkman())
.append("phone", getPhone())
.append("installationTime", getInstallationTime())
.append("inspectionTime", getInspectionTime())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.toString();
}
......
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 阀门井对象 t_valve_well
*
* @author zehong
* @date 2021-07-08
*/
public class TValveWell extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 阀门井id */
private Long wellId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 名称 */
@Excel(name = "名称")
private String deviceName;
/** 地址 */
@Excel(name = "地址")
private String deviceAddr;
/** 型号 */
@Excel(name = "型号")
private String deviceModel;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 设备图片路径 */
@Excel(name = "设备图片路径")
private String iconUrl;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setWellId(Long wellId)
{
this.wellId = wellId;
}
public Long getWellId()
{
return wellId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
public void setDeviceAddr(String deviceAddr)
{
this.deviceAddr = deviceAddr;
}
public String getDeviceAddr()
{
return deviceAddr;
}
public void setDeviceModel(String deviceModel)
{
this.deviceModel = deviceModel;
}
public String getDeviceModel()
{
return deviceModel;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
public String getIconUrl()
{
return iconUrl;
}
public void setLinkman(String linkman)
{
this.linkman = linkman;
}
public String getLinkman()
{
return linkman;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setInstallationTime(Date installationTime)
{
this.installationTime = installationTime;
}
public Date getInstallationTime()
{
return installationTime;
}
public void setInspectionTime(Date inspectionTime)
{
this.inspectionTime = inspectionTime;
}
public Date getInspectionTime()
{
return inspectionTime;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("wellId", getWellId())
.append("enterpriseId", getEnterpriseId())
.append("deviceName", getDeviceName())
.append("deviceAddr", getDeviceAddr())
.append("deviceModel", getDeviceModel())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("iconUrl", getIconUrl())
.append("linkman", getLinkman())
.append("phone", getPhone())
.append("installationTime", getInstallationTime())
.append("inspectionTime", getInspectionTime())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
/**
* 设备信息Mapper接口
*
* @author zehong
* @date 2021-07-09
*/
public interface TDeviceInfoMapper
{
/**
* 查询设备信息
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
public TDeviceInfo selectTDeviceInfoById(Long deviceId);
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息集合
*/
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
* 新增设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int insertTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 删除设备信息
*
* @param deviceId 设备信息ID
* @return 结果
*/
public int deleteTDeviceInfoById(Long deviceId);
/**
* 批量删除设备信息
*
* @param deviceIds 需要删除的数据ID
* @return 结果
*/
public int deleteTDeviceInfoByIds(Long[] deviceIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TFlowmeter;
/**
* 流量计Mapper接口
*
* @author zehong
* @date 2021-07-08
*/
public interface TFlowmeterMapper
{
/**
* 查询流量计
*
* @param flowmeterId 流量计ID
* @return 流量计
*/
public TFlowmeter selectTFlowmeterById(Long flowmeterId);
/**
* 查询流量计列表
*
* @param tFlowmeter 流量计
* @return 流量计集合
*/
public List<TFlowmeter> selectTFlowmeterList(TFlowmeter tFlowmeter);
/**
* 新增流量计
*
* @param tFlowmeter 流量计
* @return 结果
*/
public int insertTFlowmeter(TFlowmeter tFlowmeter);
/**
* 修改流量计
*
* @param tFlowmeter 流量计
* @return 结果
*/
public int updateTFlowmeter(TFlowmeter tFlowmeter);
/**
* 删除流量计
*
* @param flowmeterId 流量计ID
* @return 结果
*/
public int deleteTFlowmeterById(Long flowmeterId);
/**
* 批量删除流量计
*
* @param flowmeterIds 需要删除的数据ID
* @return 结果
*/
public int deleteTFlowmeterByIds(Long[] flowmeterIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TGasMeter;
/**
* 物联网燃气表Mapper接口
*
* @author zehong
* @date 2021-07-08
*/
public interface TGasMeterMapper
{
/**
* 查询物联网燃气表
*
* @param gasId 物联网燃气表ID
* @return 物联网燃气表
*/
public TGasMeter selectTGasMeterById(Long gasId);
/**
* 查询物联网燃气表列表
*
* @param tGasMeter 物联网燃气表
* @return 物联网燃气表集合
*/
public List<TGasMeter> selectTGasMeterList(TGasMeter tGasMeter);
/**
* 新增物联网燃气表
*
* @param tGasMeter 物联网燃气表
* @return 结果
*/
public int insertTGasMeter(TGasMeter tGasMeter);
/**
* 修改物联网燃气表
*
* @param tGasMeter 物联网燃气表
* @return 结果
*/
public int updateTGasMeter(TGasMeter tGasMeter);
/**
* 删除物联网燃气表
*
* @param gasId 物联网燃气表ID
* @return 结果
*/
public int deleteTGasMeterById(Long gasId);
/**
* 批量删除物联网燃气表
*
* @param gasIds 需要删除的数据ID
* @return 结果
*/
public int deleteTGasMeterByIds(Long[] gasIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInspectionData;
/**
* 巡检记录Mapper接口
*
* @author zehong
* @date 2021-07-09
*/
public interface TInspectionDataMapper
{
/**
* 查询巡检记录
*
* @param dataId 巡检记录ID
* @return 巡检记录
*/
public TInspectionData selectTInspectionDataById(Long dataId);
/**
* 查询巡检记录列表
*
* @param tInspectionData 巡检记录
* @return 巡检记录集合
*/
public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData);
/**
* 新增巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int insertTInspectionData(TInspectionData tInspectionData);
/**
* 修改巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int updateTInspectionData(TInspectionData tInspectionData);
/**
* 删除巡检记录
*
* @param dataId 巡检记录ID
* @return 结果
*/
public int deleteTInspectionDataById(Long dataId);
/**
* 批量删除巡检记录
*
* @param dataIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInspectionDataByIds(Long[] dataIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TRegulatorBox;
/**
* 调压箱Mapper接口
*
* @author zehong
* @date 2021-07-08
*/
public interface TRegulatorBoxMapper
{
/**
* 查询调压箱
*
* @param boxId 调压箱ID
* @return 调压箱
*/
public TRegulatorBox selectTRegulatorBoxById(Long boxId);
/**
* 查询调压箱列表
*
* @param tRegulatorBox 调压箱
* @return 调压箱集合
*/
public List<TRegulatorBox> selectTRegulatorBoxList(TRegulatorBox tRegulatorBox);
/**
* 新增调压箱
*
* @param tRegulatorBox 调压箱
* @return 结果
*/
public int insertTRegulatorBox(TRegulatorBox tRegulatorBox);
/**
* 修改调压箱
*
* @param tRegulatorBox 调压箱
* @return 结果
*/
public int updateTRegulatorBox(TRegulatorBox tRegulatorBox);
/**
* 删除调压箱
*
* @param boxId 调压箱ID
* @return 结果
*/
public int deleteTRegulatorBoxById(Long boxId);
/**
* 批量删除调压箱
*
* @param boxIds 需要删除的数据ID
* @return 结果
*/
public int deleteTRegulatorBoxByIds(Long[] boxIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TValveWell;
/**
* 阀门井Mapper接口
*
* @author zehong
* @date 2021-07-08
*/
public interface TValveWellMapper
{
/**
* 查询阀门井
*
* @param wellId 阀门井ID
* @return 阀门井
*/
public TValveWell selectTValveWellById(Long wellId);
/**
* 查询阀门井列表
*
* @param tValveWell 阀门井
* @return 阀门井集合
*/
public List<TValveWell> selectTValveWellList(TValveWell tValveWell);
/**
* 新增阀门井
*
* @param tValveWell 阀门井
* @return 结果
*/
public int insertTValveWell(TValveWell tValveWell);
/**
* 修改阀门井
*
* @param tValveWell 阀门井
* @return 结果
*/
public int updateTValveWell(TValveWell tValveWell);
/**
* 删除阀门井
*
* @param wellId 阀门井ID
* @return 结果
*/
public int deleteTValveWellById(Long wellId);
/**
* 批量删除阀门井
*
* @param wellIds 需要删除的数据ID
* @return 结果
*/
public int deleteTValveWellByIds(Long[] wellIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
/**
* 设备信息Service接口
*
* @author zehong
* @date 2021-07-09
*/
public interface ITDeviceInfoService
{
/**
* 查询设备信息
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
public TDeviceInfo selectTDeviceInfoById(Long deviceId);
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息集合
*/
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
* 新增设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int insertTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 批量删除设备信息
*
* @param deviceIds 需要删除的设备信息ID
* @return 结果
*/
public int deleteTDeviceInfoByIds(Long[] deviceIds);
/**
* 删除设备信息信息
*
* @param deviceId 设备信息ID
* @return 结果
*/
public int deleteTDeviceInfoById(Long deviceId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TFlowmeter;
/**
* 流量计Service接口
*
* @author zehong
* @date 2021-07-08
*/
public interface ITFlowmeterService
{
/**
* 查询流量计
*
* @param flowmeterId 流量计ID
* @return 流量计
*/
public TFlowmeter selectTFlowmeterById(Long flowmeterId);
/**
* 查询流量计列表
*
* @param tFlowmeter 流量计
* @return 流量计集合
*/
public List<TFlowmeter> selectTFlowmeterList(TFlowmeter tFlowmeter);
/**
* 新增流量计
*
* @param tFlowmeter 流量计
* @return 结果
*/
public int insertTFlowmeter(TFlowmeter tFlowmeter);
/**
* 修改流量计
*
* @param tFlowmeter 流量计
* @return 结果
*/
public int updateTFlowmeter(TFlowmeter tFlowmeter);
/**
* 批量删除流量计
*
* @param flowmeterIds 需要删除的流量计ID
* @return 结果
*/
public int deleteTFlowmeterByIds(Long[] flowmeterIds);
/**
* 删除流量计信息
*
* @param flowmeterId 流量计ID
* @return 结果
*/
public int deleteTFlowmeterById(Long flowmeterId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TGasMeter;
/**
* 物联网燃气表Service接口
*
* @author zehong
* @date 2021-07-08
*/
public interface ITGasMeterService
{
/**
* 查询物联网燃气表
*
* @param gasId 物联网燃气表ID
* @return 物联网燃气表
*/
public TGasMeter selectTGasMeterById(Long gasId);
/**
* 查询物联网燃气表列表
*
* @param tGasMeter 物联网燃气表
* @return 物联网燃气表集合
*/
public List<TGasMeter> selectTGasMeterList(TGasMeter tGasMeter);
/**
* 新增物联网燃气表
*
* @param tGasMeter 物联网燃气表
* @return 结果
*/
public int insertTGasMeter(TGasMeter tGasMeter);
/**
* 修改物联网燃气表
*
* @param tGasMeter 物联网燃气表
* @return 结果
*/
public int updateTGasMeter(TGasMeter tGasMeter);
/**
* 批量删除物联网燃气表
*
* @param gasIds 需要删除的物联网燃气表ID
* @return 结果
*/
public int deleteTGasMeterByIds(Long[] gasIds);
/**
* 删除物联网燃气表信息
*
* @param gasId 物联网燃气表ID
* @return 结果
*/
public int deleteTGasMeterById(Long gasId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInspectionData;
/**
* 巡检记录Service接口
*
* @author zehong
* @date 2021-07-09
*/
public interface ITInspectionDataService
{
/**
* 查询巡检记录
*
* @param dataId 巡检记录ID
* @return 巡检记录
*/
public TInspectionData selectTInspectionDataById(Long dataId);
/**
* 查询巡检记录列表
*
* @param tInspectionData 巡检记录
* @return 巡检记录集合
*/
public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData);
/**
* 新增巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int insertTInspectionData(TInspectionData tInspectionData);
/**
* 修改巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int updateTInspectionData(TInspectionData tInspectionData);
/**
* 批量删除巡检记录
*
* @param dataIds 需要删除的巡检记录ID
* @return 结果
*/
public int deleteTInspectionDataByIds(Long[] dataIds);
/**
* 删除巡检记录信息
*
* @param dataId 巡检记录ID
* @return 结果
*/
public int deleteTInspectionDataById(Long dataId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TRegulatorBox;
/**
* 调压箱Service接口
*
* @author zehong
* @date 2021-07-08
*/
public interface ITRegulatorBoxService
{
/**
* 查询调压箱
*
* @param boxId 调压箱ID
* @return 调压箱
*/
public TRegulatorBox selectTRegulatorBoxById(Long boxId);
/**
* 查询调压箱列表
*
* @param tRegulatorBox 调压箱
* @return 调压箱集合
*/
public List<TRegulatorBox> selectTRegulatorBoxList(TRegulatorBox tRegulatorBox);
/**
* 新增调压箱
*
* @param tRegulatorBox 调压箱
* @return 结果
*/
public int insertTRegulatorBox(TRegulatorBox tRegulatorBox);
/**
* 修改调压箱
*
* @param tRegulatorBox 调压箱
* @return 结果
*/
public int updateTRegulatorBox(TRegulatorBox tRegulatorBox);
/**
* 批量删除调压箱
*
* @param boxIds 需要删除的调压箱ID
* @return 结果
*/
public int deleteTRegulatorBoxByIds(Long[] boxIds);
/**
* 删除调压箱信息
*
* @param boxId 调压箱ID
* @return 结果
*/
public int deleteTRegulatorBoxById(Long boxId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TValveWell;
/**
* 阀门井Service接口
*
* @author zehong
* @date 2021-07-08
*/
public interface ITValveWellService
{
/**
* 查询阀门井
*
* @param wellId 阀门井ID
* @return 阀门井
*/
public TValveWell selectTValveWellById(Long wellId);
/**
* 查询阀门井列表
*
* @param tValveWell 阀门井
* @return 阀门井集合
*/
public List<TValveWell> selectTValveWellList(TValveWell tValveWell);
/**
* 新增阀门井
*
* @param tValveWell 阀门井
* @return 结果
*/
public int insertTValveWell(TValveWell tValveWell);
/**
* 修改阀门井
*
* @param tValveWell 阀门井
* @return 结果
*/
public int updateTValveWell(TValveWell tValveWell);
/**
* 批量删除阀门井
*
* @param wellIds 需要删除的阀门井ID
* @return 结果
*/
public int deleteTValveWellByIds(Long[] wellIds);
/**
* 删除阀门井信息
*
* @param wellId 阀门井ID
* @return 结果
*/
public int deleteTValveWellById(Long wellId);
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDeviceInfoMapper;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
/**
* 设备信息Service业务层处理
*
* @author zehong
* @date 2021-07-09
*/
@Service
public class TDeviceInfoServiceImpl implements ITDeviceInfoService
{
@Autowired
private TDeviceInfoMapper tDeviceInfoMapper;
/**
* 查询设备信息
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
@Override
public TDeviceInfo selectTDeviceInfoById(Long deviceId)
{
return tDeviceInfoMapper.selectTDeviceInfoById(deviceId);
}
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息
*/
@Override
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo)
{
return tDeviceInfoMapper.selectTDeviceInfoList(tDeviceInfo);
}
/**
* 新增设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
@Override
public int insertTDeviceInfo(TDeviceInfo tDeviceInfo)
{
return tDeviceInfoMapper.insertTDeviceInfo(tDeviceInfo);
}
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
@Override
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo)
{
return tDeviceInfoMapper.updateTDeviceInfo(tDeviceInfo);
}
/**
* 批量删除设备信息
*
* @param deviceIds 需要删除的设备信息ID
* @return 结果
*/
@Override
public int deleteTDeviceInfoByIds(Long[] deviceIds)
{
return tDeviceInfoMapper.deleteTDeviceInfoByIds(deviceIds);
}
/**
* 删除设备信息信息
*
* @param deviceId 设备信息ID
* @return 结果
*/
@Override
public int deleteTDeviceInfoById(Long deviceId)
{
return tDeviceInfoMapper.deleteTDeviceInfoById(deviceId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TFlowmeterMapper;
import com.zehong.system.domain.TFlowmeter;
import com.zehong.system.service.ITFlowmeterService;
/**
* 流量计Service业务层处理
*
* @author zehong
* @date 2021-07-08
*/
@Service
public class TFlowmeterServiceImpl implements ITFlowmeterService
{
@Autowired
private TFlowmeterMapper tFlowmeterMapper;
/**
* 查询流量计
*
* @param flowmeterId 流量计ID
* @return 流量计
*/
@Override
public TFlowmeter selectTFlowmeterById(Long flowmeterId)
{
return tFlowmeterMapper.selectTFlowmeterById(flowmeterId);
}
/**
* 查询流量计列表
*
* @param tFlowmeter 流量计
* @return 流量计
*/
@Override
public List<TFlowmeter> selectTFlowmeterList(TFlowmeter tFlowmeter)
{
return tFlowmeterMapper.selectTFlowmeterList(tFlowmeter);
}
/**
* 新增流量计
*
* @param tFlowmeter 流量计
* @return 结果
*/
@Override
public int insertTFlowmeter(TFlowmeter tFlowmeter)
{
return tFlowmeterMapper.insertTFlowmeter(tFlowmeter);
}
/**
* 修改流量计
*
* @param tFlowmeter 流量计
* @return 结果
*/
@Override
public int updateTFlowmeter(TFlowmeter tFlowmeter)
{
return tFlowmeterMapper.updateTFlowmeter(tFlowmeter);
}
/**
* 批量删除流量计
*
* @param flowmeterIds 需要删除的流量计ID
* @return 结果
*/
@Override
public int deleteTFlowmeterByIds(Long[] flowmeterIds)
{
return tFlowmeterMapper.deleteTFlowmeterByIds(flowmeterIds);
}
/**
* 删除流量计信息
*
* @param flowmeterId 流量计ID
* @return 结果
*/
@Override
public int deleteTFlowmeterById(Long flowmeterId)
{
return tFlowmeterMapper.deleteTFlowmeterById(flowmeterId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TGasMeterMapper;
import com.zehong.system.domain.TGasMeter;
import com.zehong.system.service.ITGasMeterService;
/**
* 物联网燃气表Service业务层处理
*
* @author zehong
* @date 2021-07-08
*/
@Service
public class TGasMeterServiceImpl implements ITGasMeterService
{
@Autowired
private TGasMeterMapper tGasMeterMapper;
/**
* 查询物联网燃气表
*
* @param gasId 物联网燃气表ID
* @return 物联网燃气表
*/
@Override
public TGasMeter selectTGasMeterById(Long gasId)
{
return tGasMeterMapper.selectTGasMeterById(gasId);
}
/**
* 查询物联网燃气表列表
*
* @param tGasMeter 物联网燃气表
* @return 物联网燃气表
*/
@Override
public List<TGasMeter> selectTGasMeterList(TGasMeter tGasMeter)
{
return tGasMeterMapper.selectTGasMeterList(tGasMeter);
}
/**
* 新增物联网燃气表
*
* @param tGasMeter 物联网燃气表
* @return 结果
*/
@Override
public int insertTGasMeter(TGasMeter tGasMeter)
{
return tGasMeterMapper.insertTGasMeter(tGasMeter);
}
/**
* 修改物联网燃气表
*
* @param tGasMeter 物联网燃气表
* @return 结果
*/
@Override
public int updateTGasMeter(TGasMeter tGasMeter)
{
return tGasMeterMapper.updateTGasMeter(tGasMeter);
}
/**
* 批量删除物联网燃气表
*
* @param gasIds 需要删除的物联网燃气表ID
* @return 结果
*/
@Override
public int deleteTGasMeterByIds(Long[] gasIds)
{
return tGasMeterMapper.deleteTGasMeterByIds(gasIds);
}
/**
* 删除物联网燃气表信息
*
* @param gasId 物联网燃气表ID
* @return 结果
*/
@Override
public int deleteTGasMeterById(Long gasId)
{
return tGasMeterMapper.deleteTGasMeterById(gasId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInspectionDataMapper;
import com.zehong.system.domain.TInspectionData;
import com.zehong.system.service.ITInspectionDataService;
/**
* 巡检记录Service业务层处理
*
* @author zehong
* @date 2021-07-09
*/
@Service
public class TInspectionDataServiceImpl implements ITInspectionDataService
{
@Autowired
private TInspectionDataMapper tInspectionDataMapper;
/**
* 查询巡检记录
*
* @param dataId 巡检记录ID
* @return 巡检记录
*/
@Override
public TInspectionData selectTInspectionDataById(Long dataId)
{
return tInspectionDataMapper.selectTInspectionDataById(dataId);
}
/**
* 查询巡检记录列表
*
* @param tInspectionData 巡检记录
* @return 巡检记录
*/
@Override
public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData)
{
return tInspectionDataMapper.selectTInspectionDataList(tInspectionData);
}
/**
* 新增巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
@Override
public int insertTInspectionData(TInspectionData tInspectionData)
{
tInspectionData.setCreateTime(DateUtils.getNowDate());
return tInspectionDataMapper.insertTInspectionData(tInspectionData);
}
/**
* 修改巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
@Override
public int updateTInspectionData(TInspectionData tInspectionData)
{
return tInspectionDataMapper.updateTInspectionData(tInspectionData);
}
/**
* 批量删除巡检记录
*
* @param dataIds 需要删除的巡检记录ID
* @return 结果
*/
@Override
public int deleteTInspectionDataByIds(Long[] dataIds)
{
return tInspectionDataMapper.deleteTInspectionDataByIds(dataIds);
}
/**
* 删除巡检记录信息
*
* @param dataId 巡检记录ID
* @return 结果
*/
@Override
public int deleteTInspectionDataById(Long dataId)
{
return tInspectionDataMapper.deleteTInspectionDataById(dataId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TRegulatorBoxMapper;
import com.zehong.system.domain.TRegulatorBox;
import com.zehong.system.service.ITRegulatorBoxService;
/**
* 调压箱Service业务层处理
*
* @author zehong
* @date 2021-07-08
*/
@Service
public class TRegulatorBoxServiceImpl implements ITRegulatorBoxService
{
@Autowired
private TRegulatorBoxMapper tRegulatorBoxMapper;
/**
* 查询调压箱
*
* @param boxId 调压箱ID
* @return 调压箱
*/
@Override
public TRegulatorBox selectTRegulatorBoxById(Long boxId)
{
return tRegulatorBoxMapper.selectTRegulatorBoxById(boxId);
}
/**
* 查询调压箱列表
*
* @param tRegulatorBox 调压箱
* @return 调压箱
*/
@Override
public List<TRegulatorBox> selectTRegulatorBoxList(TRegulatorBox tRegulatorBox)
{
return tRegulatorBoxMapper.selectTRegulatorBoxList(tRegulatorBox);
}
/**
* 新增调压箱
*
* @param tRegulatorBox 调压箱
* @return 结果
*/
@Override
public int insertTRegulatorBox(TRegulatorBox tRegulatorBox)
{
return tRegulatorBoxMapper.insertTRegulatorBox(tRegulatorBox);
}
/**
* 修改调压箱
*
* @param tRegulatorBox 调压箱
* @return 结果
*/
@Override
public int updateTRegulatorBox(TRegulatorBox tRegulatorBox)
{
return tRegulatorBoxMapper.updateTRegulatorBox(tRegulatorBox);
}
/**
* 批量删除调压箱
*
* @param boxIds 需要删除的调压箱ID
* @return 结果
*/
@Override
public int deleteTRegulatorBoxByIds(Long[] boxIds)
{
return tRegulatorBoxMapper.deleteTRegulatorBoxByIds(boxIds);
}
/**
* 删除调压箱信息
*
* @param boxId 调压箱ID
* @return 结果
*/
@Override
public int deleteTRegulatorBoxById(Long boxId)
{
return tRegulatorBoxMapper.deleteTRegulatorBoxById(boxId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TValveWellMapper;
import com.zehong.system.domain.TValveWell;
import com.zehong.system.service.ITValveWellService;
/**
* 阀门井Service业务层处理
*
* @author zehong
* @date 2021-07-08
*/
@Service
public class TValveWellServiceImpl implements ITValveWellService
{
@Autowired
private TValveWellMapper tValveWellMapper;
/**
* 查询阀门井
*
* @param wellId 阀门井ID
* @return 阀门井
*/
@Override
public TValveWell selectTValveWellById(Long wellId)
{
return tValveWellMapper.selectTValveWellById(wellId);
}
/**
* 查询阀门井列表
*
* @param tValveWell 阀门井
* @return 阀门井
*/
@Override
public List<TValveWell> selectTValveWellList(TValveWell tValveWell)
{
return tValveWellMapper.selectTValveWellList(tValveWell);
}
/**
* 新增阀门井
*
* @param tValveWell 阀门井
* @return 结果
*/
@Override
public int insertTValveWell(TValveWell tValveWell)
{
return tValveWellMapper.insertTValveWell(tValveWell);
}
/**
* 修改阀门井
*
* @param tValveWell 阀门井
* @return 结果
*/
@Override
public int updateTValveWell(TValveWell tValveWell)
{
return tValveWellMapper.updateTValveWell(tValveWell);
}
/**
* 批量删除阀门井
*
* @param wellIds 需要删除的阀门井ID
* @return 结果
*/
@Override
public int deleteTValveWellByIds(Long[] wellIds)
{
return tValveWellMapper.deleteTValveWellByIds(wellIds);
}
/**
* 删除阀门井信息
*
* @param wellId 阀门井ID
* @return 结果
*/
@Override
public int deleteTValveWellById(Long wellId)
{
return tValveWellMapper.deleteTValveWellById(wellId);
}
}
......@@ -2,15 +2,16 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TFlowmeterMapper">
<mapper namespace="com.zehong.system.mapper.TDeviceInfoMapper">
<resultMap type="TFlowmeter" id="TFlowmeterResult">
<result property="flowmeterId" column="flowmeter_id" />
<resultMap type="TDeviceInfo" id="TDeviceInfoResult">
<result property="deviceId" column="device_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="pipeId" column="pipe_id" />
<result property="deviceName" column="device_name" />
<result property="deviceAddr" column="device_addr" />
<result property="deviceModel" column="device_model" />
<result property="deviceType" column="device_type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iotNo" column="iot_no" />
......@@ -22,18 +23,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTFlowmeterVo">
select flowmeter_id, enterprise_id, pipe_id, device_name, device_addr, device_model, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_flowmeter
<sql id="selectTDeviceInfoVo">
select device_id, enterprise_id, pipe_id, device_name, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_device_info
</sql>
<select id="selectTFlowmeterList" parameterType="TFlowmeter" resultMap="TFlowmeterResult">
<include refid="selectTFlowmeterVo"/>
<select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="pipeId != null "> and pipe_id = #{pipeId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="iotNo != null and iotNo != ''"> and iot_no = #{iotNo}</if>
......@@ -46,19 +48,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectTFlowmeterById" parameterType="Long" resultMap="TFlowmeterResult">
<include refid="selectTFlowmeterVo"/>
where flowmeter_id = #{flowmeterId}
<select id="selectTDeviceInfoById" parameterType="Long" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/>
where device_id = #{deviceId}
</select>
<insert id="insertTFlowmeter" parameterType="TFlowmeter" useGeneratedKeys="true" keyProperty="flowmeterId">
insert into t_flowmeter
<insert id="insertTDeviceInfo" parameterType="TDeviceInfo" useGeneratedKeys="true" keyProperty="deviceId">
insert into t_device_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="pipeId != null">pipe_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceAddr != null">device_addr,</if>
<if test="deviceModel != null">device_model,</if>
<if test="deviceType != null">device_type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iotNo != null">iot_no,</if>
......@@ -75,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceAddr != null">#{deviceAddr},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iotNo != null">#{iotNo},</if>
......@@ -87,14 +91,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateTFlowmeter" parameterType="TFlowmeter">
update t_flowmeter
<update id="updateTDeviceInfo" parameterType="TDeviceInfo">
update t_device_info
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="pipeId != null">pipe_id = #{pipeId},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceAddr != null">device_addr = #{deviceAddr},</if>
<if test="deviceModel != null">device_model = #{deviceModel},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iotNo != null">iot_no = #{iotNo},</if>
......@@ -105,17 +110,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where flowmeter_id = #{flowmeterId}
where device_id = #{deviceId}
</update>
<delete id="deleteTFlowmeterById" parameterType="Long">
delete from t_flowmeter where flowmeter_id = #{flowmeterId}
<delete id="deleteTDeviceInfoById" parameterType="Long">
delete from t_device_info where device_id = #{deviceId}
</delete>
<delete id="deleteTFlowmeterByIds" parameterType="String">
delete from t_flowmeter where flowmeter_id in
<foreach item="flowmeterId" collection="array" open="(" separator="," close=")">
#{flowmeterId}
<delete id="deleteTDeviceInfoByIds" parameterType="String">
delete from t_device_info where device_id in
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
#{deviceId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.TGasMeterMapper">
<resultMap type="TGasMeter" id="TGasMeterResult">
<result property="gasId" column="gas_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="pipeId" column="pipe_id" />
<result property="deviceName" column="device_name" />
<result property="deviceAddr" column="device_addr" />
<result property="deviceModel" column="device_model" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iotNo" column="iot_no" />
<result property="iconUrl" column="icon_url" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
<result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTGasMeterVo">
select gas_id, enterprise_id, pipe_id, device_name, device_addr, device_model, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_gas_meter
</sql>
<select id="selectTGasMeterList" parameterType="TGasMeter" resultMap="TGasMeterResult">
<include refid="selectTGasMeterVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="pipeId != null "> and pipe_id = #{pipeId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="iotNo != null and iotNo != ''"> and iot_no = #{iotNo}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="installationTime != null "> and installation_time = #{installationTime}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTGasMeterById" parameterType="Long" resultMap="TGasMeterResult">
<include refid="selectTGasMeterVo"/>
where gas_id = #{gasId}
</select>
<insert id="insertTGasMeter" parameterType="TGasMeter" useGeneratedKeys="true" keyProperty="gasId">
insert into t_gas_meter
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="pipeId != null">pipe_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceAddr != null">device_addr,</if>
<if test="deviceModel != null">device_model,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iotNo != null">iot_no,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="linkman != null">linkman,</if>
<if test="phone != null">phone,</if>
<if test="installationTime != null">installation_time,</if>
<if test="inspectionTime != null">inspection_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="pipeId != null">#{pipeId},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceAddr != null">#{deviceAddr},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iotNo != null">#{iotNo},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="linkman != null">#{linkman},</if>
<if test="phone != null">#{phone},</if>
<if test="installationTime != null">#{installationTime},</if>
<if test="inspectionTime != null">#{inspectionTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTGasMeter" parameterType="TGasMeter">
update t_gas_meter
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="pipeId != null">pipe_id = #{pipeId},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceAddr != null">device_addr = #{deviceAddr},</if>
<if test="deviceModel != null">device_model = #{deviceModel},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iotNo != null">iot_no = #{iotNo},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where gas_id = #{gasId}
</update>
<delete id="deleteTGasMeterById" parameterType="Long">
delete from t_gas_meter where gas_id = #{gasId}
</delete>
<delete id="deleteTGasMeterByIds" parameterType="String">
delete from t_gas_meter where gas_id in
<foreach item="gasId" collection="array" open="(" separator="," close=")">
#{gasId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.TInspectionDataMapper">
<resultMap type="TInspectionData" id="TInspectionDataResult">
<result property="dataId" column="data_id" />
<result property="inspectorId" column="inspector_id" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTInspectionDataVo">
select data_id, inspector_id, longitude, latitude, create_time, remarks from t_inspection_data
</sql>
<select id="selectTInspectionDataList" parameterType="TInspectionData" resultMap="TInspectionDataResult">
<include refid="selectTInspectionDataVo"/>
<where>
<if test="inspectorId != null "> and inspector_id = #{inspectorId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTInspectionDataById" parameterType="Long" resultMap="TInspectionDataResult">
<include refid="selectTInspectionDataVo"/>
where data_id = #{dataId}
</select>
<insert id="insertTInspectionData" parameterType="TInspectionData">
insert into t_inspection_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dataId != null">data_id,</if>
<if test="inspectorId != null">inspector_id,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="createTime != null">create_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataId != null">#{dataId},</if>
<if test="inspectorId != null">#{inspectorId},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTInspectionData" parameterType="TInspectionData">
update t_inspection_data
<trim prefix="SET" suffixOverrides=",">
<if test="inspectorId != null">inspector_id = #{inspectorId},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where data_id = #{dataId}
</update>
<delete id="deleteTInspectionDataById" parameterType="Long">
delete from t_inspection_data where data_id = #{dataId}
</delete>
<delete id="deleteTInspectionDataByIds" parameterType="String">
delete from t_inspection_data where data_id in
<foreach item="dataId" collection="array" open="(" separator="," close=")">
#{dataId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.TRegulatorBoxMapper">
<resultMap type="TRegulatorBox" id="TRegulatorBoxResult">
<result property="boxId" column="box_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="deviceName" column="device_name" />
<result property="deviceAddr" column="device_addr" />
<result property="deviceModel" column="device_model" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iconUrl" column="icon_url" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
<result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTRegulatorBoxVo">
select box_id, enterprise_id, device_name, device_addr, device_model, longitude, latitude, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_regulator_box
</sql>
<select id="selectTRegulatorBoxList" parameterType="TRegulatorBox" resultMap="TRegulatorBoxResult">
<include refid="selectTRegulatorBoxVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="installationTime != null "> and installation_time = #{installationTime}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTRegulatorBoxById" parameterType="Long" resultMap="TRegulatorBoxResult">
<include refid="selectTRegulatorBoxVo"/>
where box_id = #{boxId}
</select>
<insert id="insertTRegulatorBox" parameterType="TRegulatorBox" useGeneratedKeys="true" keyProperty="boxId">
insert into t_regulator_box
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceAddr != null">device_addr,</if>
<if test="deviceModel != null">device_model,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="linkman != null">linkman,</if>
<if test="phone != null">phone,</if>
<if test="installationTime != null">installation_time,</if>
<if test="inspectionTime != null">inspection_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceAddr != null">#{deviceAddr},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="linkman != null">#{linkman},</if>
<if test="phone != null">#{phone},</if>
<if test="installationTime != null">#{installationTime},</if>
<if test="inspectionTime != null">#{inspectionTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTRegulatorBox" parameterType="TRegulatorBox">
update t_regulator_box
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceAddr != null">device_addr = #{deviceAddr},</if>
<if test="deviceModel != null">device_model = #{deviceModel},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where box_id = #{boxId}
</update>
<delete id="deleteTRegulatorBoxById" parameterType="Long">
delete from t_regulator_box where box_id = #{boxId}
</delete>
<delete id="deleteTRegulatorBoxByIds" parameterType="String">
delete from t_regulator_box where box_id in
<foreach item="boxId" collection="array" open="(" separator="," close=")">
#{boxId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.TValveWellMapper">
<resultMap type="TValveWell" id="TValveWellResult">
<result property="wellId" column="well_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="deviceName" column="device_name" />
<result property="deviceAddr" column="device_addr" />
<result property="deviceModel" column="device_model" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iconUrl" column="icon_url" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
<result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTValveWellVo">
select well_id, enterprise_id, device_name, device_addr, device_model, longitude, latitude, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_valve_well
</sql>
<select id="selectTValveWellList" parameterType="TValveWell" resultMap="TValveWellResult">
<include refid="selectTValveWellVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="installationTime != null "> and installation_time = #{installationTime}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTValveWellById" parameterType="Long" resultMap="TValveWellResult">
<include refid="selectTValveWellVo"/>
where well_id = #{wellId}
</select>
<insert id="insertTValveWell" parameterType="TValveWell" useGeneratedKeys="true" keyProperty="wellId">
insert into t_valve_well
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceAddr != null">device_addr,</if>
<if test="deviceModel != null">device_model,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="linkman != null">linkman,</if>
<if test="phone != null">phone,</if>
<if test="installationTime != null">installation_time,</if>
<if test="inspectionTime != null">inspection_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceAddr != null">#{deviceAddr},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="linkman != null">#{linkman},</if>
<if test="phone != null">#{phone},</if>
<if test="installationTime != null">#{installationTime},</if>
<if test="inspectionTime != null">#{inspectionTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTValveWell" parameterType="TValveWell">
update t_valve_well
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceAddr != null">device_addr = #{deviceAddr},</if>
<if test="deviceModel != null">device_model = #{deviceModel},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where well_id = #{wellId}
</update>
<delete id="deleteTValveWellById" parameterType="Long">
delete from t_valve_well where well_id = #{wellId}
</delete>
<delete id="deleteTValveWellByIds" parameterType="String">
delete from t_valve_well where well_id in
<foreach item="wellId" collection="array" open="(" separator="," close=")">
#{wellId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询物联网燃气表列表
export function listGasMeter(query) {
// 查询设备信息列表
export function listDeviceInfo(query) {
return request({
url: '/system/gasMeter/list',
url: '/device/deviceInfo/list',
method: 'get',
params: query
})
}
// 查询物联网燃气表详细
export function getGasMeter(gasId) {
// 查询设备信息详细
export function getDeviceInfo(deviceId) {
return request({
url: '/system/gasMeter/' + gasId,
url: '/device/deviceInfo/' + deviceId,
method: 'get'
})
}
// 新增物联网燃气表
export function addGasMeter(data) {
// 新增设备信息
export function addDeviceInfo(data) {
return request({
url: '/system/gasMeter',
url: '/device/deviceInfo',
method: 'post',
data: data
})
}
// 修改物联网燃气表
export function updateGasMeter(data) {
// 修改设备信息
export function updateDeviceInfo(data) {
return request({
url: '/system/gasMeter',
url: '/device/deviceInfo',
method: 'put',
data: data
})
}
// 删除物联网燃气表
export function delGasMeter(gasId) {
// 删除设备信息
export function delDeviceInfo(deviceId) {
return request({
url: '/system/gasMeter/' + gasId,
url: '/device/deviceInfo/' + deviceId,
method: 'delete'
})
}
// 导出物联网燃气表
export function exportGasMeter(query) {
// 导出设备信息
export function exportDeviceInfo(query) {
return request({
url: '/system/gasMeter/export',
url: '/device/deviceInfo/export',
method: 'get',
params: query
})
......
import request from '@/utils/request'
// 查询流量计列表
export function listFlowmeter(query) {
// 查询巡检记录列表
export function listInspectionData(query) {
return request({
url: '/system/flowmeter/list',
url: '/device/inspectionData/list',
method: 'get',
params: query
})
}
// 查询流量计详细
export function getFlowmeter(flowmeterId) {
// 查询巡检记录详细
export function getInspectionData(dataId) {
return request({
url: '/system/flowmeter/' + flowmeterId,
url: '/device/inspectionData/' + dataId,
method: 'get'
})
}
// 新增流量计
export function addFlowmeter(data) {
// 新增巡检记录
export function addInspectionData(data) {
return request({
url: '/system/flowmeter',
url: '/device/inspectionData',
method: 'post',
data: data
})
}
// 修改流量计
export function updateFlowmeter(data) {
// 修改巡检记录
export function updateInspectionData(data) {
return request({
url: '/system/flowmeter',
url: '/device/inspectionData',
method: 'put',
data: data
})
}
// 删除流量计
export function delFlowmeter(flowmeterId) {
// 删除巡检记录
export function delInspectionData(dataId) {
return request({
url: '/system/flowmeter/' + flowmeterId,
url: '/device/inspectionData/' + dataId,
method: 'delete'
})
}
// 导出流量计
export function exportFlowmeter(query) {
// 导出巡检记录
export function exportInspectionData(query) {
return request({
url: '/system/flowmeter/export',
url: '/device/inspectionData/export',
method: 'get',
params: query
})
......
......@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询巡检员列表
export function listInspector(query) {
return request({
url: '/system/inspector/list',
url: '/device/inspector/list',
method: 'get',
params: query
})
......@@ -12,7 +12,7 @@ export function listInspector(query) {
// 查询巡检员详细
export function getInspector(inspectorId) {
return request({
url: '/system/inspector/' + inspectorId,
url: '/device/inspector/' + inspectorId,
method: 'get'
})
}
......@@ -20,7 +20,7 @@ export function getInspector(inspectorId) {
// 新增巡检员
export function addInspector(data) {
return request({
url: '/system/inspector',
url: '/device/inspector',
method: 'post',
data: data
})
......@@ -29,7 +29,7 @@ export function addInspector(data) {
// 修改巡检员
export function updateInspector(data) {
return request({
url: '/system/inspector',
url: '/device/inspector',
method: 'put',
data: data
})
......@@ -38,7 +38,7 @@ export function updateInspector(data) {
// 删除巡检员
export function delInspector(inspectorId) {
return request({
url: '/system/inspector/' + inspectorId,
url: '/device/inspector/' + inspectorId,
method: 'delete'
})
}
......@@ -46,8 +46,8 @@ export function delInspector(inspectorId) {
// 导出巡检员
export function exportInspector(query) {
return request({
url: '/system/inspector/export',
url: '/device/inspector/export',
method: 'get',
params: query
})
}
\ No newline at end of file
}
......@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询管道信息列表
export function listPipe(query) {
return request({
url: '/system/pipe/list',
url: '/device/pipe/list',
method: 'get',
params: query
})
......@@ -12,7 +12,7 @@ export function listPipe(query) {
// 查询管道信息详细
export function getPipe(pipeId) {
return request({
url: '/system/pipe/' + pipeId,
url: '/device/pipe/' + pipeId,
method: 'get'
})
}
......@@ -20,7 +20,7 @@ export function getPipe(pipeId) {
// 新增管道信息
export function addPipe(data) {
return request({
url: '/system/pipe',
url: '/device/pipe',
method: 'post',
data: data
})
......@@ -29,7 +29,7 @@ export function addPipe(data) {
// 修改管道信息
export function updatePipe(data) {
return request({
url: '/system/pipe',
url: '/device/pipe',
method: 'put',
data: data
})
......@@ -38,7 +38,7 @@ export function updatePipe(data) {
// 删除管道信息
export function delPipe(pipeId) {
return request({
url: '/system/pipe/' + pipeId,
url: '/device/pipe/' + pipeId,
method: 'delete'
})
}
......@@ -46,8 +46,8 @@ export function delPipe(pipeId) {
// 导出管道信息
export function exportPipe(query) {
return request({
url: '/system/pipe/export',
url: '/device/pipe/export',
method: 'get',
params: query
})
}
\ No newline at end of file
}
import request from '@/utils/request'
// 查询调压箱列表
export function listRegulatorBox(query) {
return request({
url: '/system/regulatorBox/list',
method: 'get',
params: query
})
}
// 查询调压箱详细
export function getRegulatorBox(boxId) {
return request({
url: '/system/regulatorBox/' + boxId,
method: 'get'
})
}
// 新增调压箱
export function addRegulatorBox(data) {
return request({
url: '/system/regulatorBox',
method: 'post',
data: data
})
}
// 修改调压箱
export function updateRegulatorBox(data) {
return request({
url: '/system/regulatorBox',
method: 'put',
data: data
})
}
// 删除调压箱
export function delRegulatorBox(boxId) {
return request({
url: '/system/regulatorBox/' + boxId,
method: 'delete'
})
}
// 导出调压箱
export function exportRegulatorBox(query) {
return request({
url: '/system/regulatorBox/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询阀门井列表
export function listValveWell(query) {
return request({
url: '/system/valveWell/list',
method: 'get',
params: query
})
}
// 查询阀门井详细
export function getValveWell(wellId) {
return request({
url: '/system/valveWell/' + wellId,
method: 'get'
})
}
// 新增阀门井
export function addValveWell(data) {
return request({
url: '/system/valveWell',
method: 'post',
data: data
})
}
// 修改阀门井
export function updateValveWell(data) {
return request({
url: '/system/valveWell',
method: 'put',
data: data
})
}
// 删除阀门井
export function delValveWell(wellId) {
return request({
url: '/system/valveWell/' + wellId,
method: 'delete'
})
}
// 导出阀门井
export function exportValveWell(query) {
return request({
url: '/system/valveWell/export',
method: 'get',
params: query
})
}
\ No newline at end of file
This diff is collapsed.
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="经度" prop="longitude">
<el-input
v-model="queryParams.longitude"
placeholder="请输入经度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input
v-model="queryParams.latitude"
placeholder="请输入纬度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input
v-model="queryParams.remarks"
placeholder="请输入备注"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['device:inspectionData:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inspectionDataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" />
<el-table-column label="巡检员" align="center" prop="inspectorId" />
<el-table-column label="经度" align="center" prop="longitude" />
<el-table-column label="纬度" align="center" prop="latitude" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:inspectionData:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:inspectionData:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改巡检记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="巡检员id" prop="inspectorId">
<el-input v-model="form.inspectorId" placeholder="请输入巡检员id" />
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInspectionData, getInspectionData, delInspectionData, addInspectionData, updateInspectionData, exportInspectionData } from "@/api/device/inspectionData";
export default {
name: "InspectionData",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 巡检记录表格数据
inspectionDataList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
inspectorId: null,
longitude: null,
latitude: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询巡检记录列表 */
getList() {
this.loading = true;
listInspectionData(this.queryParams).then(response => {
this.inspectionDataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
dataId: null,
inspectorId: null,
longitude: null,
latitude: null,
createTime: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dataId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加巡检记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dataId = row.dataId || this.ids
getInspectionData(dataId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改巡检记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dataId != null) {
updateInspectionData(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInspectionData(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const dataIds = row.dataId || this.ids;
this.$confirm('是否确认删除巡检记录编号为"' + dataIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInspectionData(dataIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检记录数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInspectionData(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入电话"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['device:inspector:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:inspector:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:inspector:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['device:inspector:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inspectorList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" />
<el-table-column label="企业" align="center" prop="enterpriseId" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="电话" align="center" prop="phone" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:inspector:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:inspector:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改巡检员对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="企业id" prop="enterpriseId">
<el-input v-model="form.enterpriseId" placeholder="请输入企业id" />
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInspector, getInspector, delInspector, addInspector, updateInspector, exportInspector } from "@/api/device/inspector";
export default {
name: "Inspector",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 巡检员表格数据
inspectorList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
name: null,
phone: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询巡检员列表 */
getList() {
this.loading = true;
listInspector(this.queryParams).then(response => {
this.inspectorList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
inspectorId: null,
enterpriseId: null,
name: null,
phone: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.inspectorId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加巡检员";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const inspectorId = row.inspectorId || this.ids
getInspector(inspectorId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改巡检员";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.inspectorId != null) {
updateInspector(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInspector(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const inspectorIds = row.inspectorId || this.ids;
this.$confirm('是否确认删除巡检员编号为"' + inspectorIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInspector(inspectorIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检员数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInspector(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment