JX.Li 1 год назад
Родитель
Сommit
cc187c5c77

+ 2 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MRoadSectionInspectionController.java

@@ -4,7 +4,6 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
 import com.ruoyi.common.core.validate.QueryGroup;
@@ -41,8 +40,8 @@ public class MRoadSectionInspectionController extends BaseController {
      */
     @ApiOperation("查询路段巡查列表")
     @GetMapping("/list")
-    public TableDataInfo<GRoadSectionInspectionVo> list(@Validated(QueryGroup.class) GRoadSectionInspectionBo bo) {
-        return iGRoadSectionInspectionService.queryPageList(bo);
+    public AjaxResult<?> list(@Validated(QueryGroup.class) GRoadSectionInspectionBo bo) {
+        return AjaxResult.success(iGRoadSectionInspectionService.queryPageList(bo).getRows());
     }
 
     /**

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MValveWellInspectionController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.mobile;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.core.validate.QueryGroup;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.gas.domain.bo.GValveWellInspectionBo;
+import com.ruoyi.gas.domain.vo.GValveWellInspectionVo;
+import com.ruoyi.gas.service.IGValveWellInspectionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 阀井巡查Controller
+ *
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Validated
+@Api(value = "阀井巡查控制器", tags = {"阀井巡查管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/mobile/valveWellInspection")
+public class MValveWellInspectionController extends BaseController {
+
+    private final IGValveWellInspectionService iGValveWellInspectionService;
+
+    /**
+     * 查询阀井巡查列表
+     */
+    @ApiOperation("查询阀井巡查列表")
+    @GetMapping("/list")
+    public AjaxResult<?> list(@Validated(QueryGroup.class) GValveWellInspectionBo bo) {
+        return AjaxResult.success(iGValveWellInspectionService.queryPageList(bo).getRows());
+    }
+
+    /**
+     * 导出阀井巡查列表
+     */
+    @ApiOperation("导出阀井巡查列表")
+    @Log(title = "阀井巡查", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public void export(@Validated GValveWellInspectionBo bo, HttpServletResponse response) {
+        List<GValveWellInspectionVo> list = iGValveWellInspectionService.queryList(bo);
+        ExcelUtil.exportExcel(list, "阀井巡查", GValveWellInspectionVo.class, response);
+    }
+
+    /**
+     * 获取阀井巡查详细信息
+     */
+    @ApiOperation("获取阀井巡查详细信息")
+    @GetMapping("/{id}")
+    public AjaxResult<GValveWellInspectionVo> getInfo(@NotNull(message = "主键不能为空")
+                                                  @PathVariable("id") Long id) {
+        return AjaxResult.success(iGValveWellInspectionService.queryById(id));
+    }
+
+    /**
+     * 新增阀井巡查
+     */
+    @ApiOperation("新增阀井巡查")
+    @Log(title = "阀井巡查", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GValveWellInspectionBo bo) {
+        return toAjax(iGValveWellInspectionService.insertByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 修改阀井巡查
+     */
+    @ApiOperation("修改阀井巡查")
+    @Log(title = "阀井巡查", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody GValveWellInspectionBo bo) {
+        return toAjax(iGValveWellInspectionService.updateByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 删除阀井巡查
+     */
+    @ApiOperation("删除阀井巡查")
+    @Log(title = "阀井巡查" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
+                                       @PathVariable Long[] ids) {
+        return toAjax(iGValveWellInspectionService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
+    }
+}

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/mobile/MValveWellPositionController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.mobile;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.core.validate.QueryGroup;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.gas.domain.bo.GValveWellPositionBo;
+import com.ruoyi.gas.domain.vo.GValveWellPositionVo;
+import com.ruoyi.gas.service.IGValveWellPositionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 阀井位置Controller
+ *
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Validated
+@Api(value = "阀井位置控制器", tags = {"阀井位置管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/mobile/valveWellPosition")
+public class MValveWellPositionController extends BaseController {
+
+    private final IGValveWellPositionService iGValveWellPositionService;
+
+    /**
+     * 查询阀井位置列表
+     */
+    @ApiOperation("查询阀井位置列表")
+    @GetMapping("/list")
+    public AjaxResult<?> list(@Validated(QueryGroup.class) GValveWellPositionBo bo) {
+        return AjaxResult.success(iGValveWellPositionService.queryPageList(bo).getRows());
+    }
+
+    /**
+     * 导出阀井位置列表
+     */
+    @ApiOperation("导出阀井位置列表")
+    @Log(title = "阀井位置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public void export(@Validated GValveWellPositionBo bo, HttpServletResponse response) {
+        List<GValveWellPositionVo> list = iGValveWellPositionService.queryList(bo);
+        ExcelUtil.exportExcel(list, "阀井位置", GValveWellPositionVo.class, response);
+    }
+
+    /**
+     * 获取阀井位置详细信息
+     */
+    @ApiOperation("获取阀井位置详细信息")
+    @GetMapping("/{id}")
+    public AjaxResult<GValveWellPositionVo> getInfo(@NotNull(message = "主键不能为空")
+                                                  @PathVariable("id") Long id) {
+        return AjaxResult.success(iGValveWellPositionService.queryById(id));
+    }
+
+    /**
+     * 新增阀井位置
+     */
+    @ApiOperation("新增阀井位置")
+    @Log(title = "阀井位置", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody GValveWellPositionBo bo) {
+        return toAjax(iGValveWellPositionService.insertByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 修改阀井位置
+     */
+    @ApiOperation("修改阀井位置")
+    @Log(title = "阀井位置", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody GValveWellPositionBo bo) {
+        return toAjax(iGValveWellPositionService.updateByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 删除阀井位置
+     */
+    @ApiOperation("删除阀井位置")
+    @Log(title = "阀井位置" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
+                                       @PathVariable Long[] ids) {
+        return toAjax(iGValveWellPositionService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
+    }
+}

+ 3 - 1
ruoyi-gas/src/main/java/com/ruoyi/gas/domain/bo/GValveWellInspectionBo.java

@@ -1,5 +1,6 @@
 package com.ruoyi.gas.domain.bo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.core.domain.BaseEntity;
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
@@ -24,7 +25,7 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel("阀井巡查业务对象")
 public class GValveWellInspectionBo extends BaseEntity {
-    
+
     private List<String> photoList;
     /**
      * 
@@ -52,6 +53,7 @@ public class GValveWellInspectionBo extends BaseEntity {
      */
     @ApiModelProperty(value = "发现时间", required = true)
     @NotNull(message = "发现时间不能为空", groups = { AddGroup.class, EditGroup.class })
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
     private Date discoverTime;
 
     /**

+ 1 - 1
ruoyi-gas/src/main/java/com/ruoyi/gas/service/impl/GValveWellPositionServiceImpl.java

@@ -48,7 +48,7 @@ public class GValveWellPositionServiceImpl extends ServicePlusImpl<GValveWellPos
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<GValveWellPosition> lqw = Wrappers.lambdaQuery();
         lqw.like(StringUtils.isNotBlank(bo.getValveWellName()), GValveWellPosition::getValveWellName, bo.getValveWellName());
-        lqw.eq(StringUtils.isNotBlank(bo.getPosition()), GValveWellPosition::getPosition, bo.getPosition());
+        lqw.like(StringUtils.isNotBlank(bo.getPosition()), GValveWellPosition::getPosition, bo.getPosition());
         lqw.eq(StringUtils.isNotBlank(bo.getLongitude()), GValveWellPosition::getLongitude, bo.getLongitude());
         lqw.eq(StringUtils.isNotBlank(bo.getLatitude()), GValveWellPosition::getLatitude, bo.getLatitude());
         return lqw;

+ 1 - 1
ruoyi-gas/src/main/resources/mapper/GValveWellInspectionPhotoMapper.xml

@@ -16,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <delete id="deleteByUrl" parameterType="String">
-        delete from g_road_section_inspection_photo where parent_id = #{parentId}
+        delete from g_valve_well_inspection_photo where parent_id = #{parentId}
         and pic_url in
         <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
             #{item}